##// END OF EJS Templates
convert/bzr: ignore nested repos when listing branches (issue3254)...
Patrick Mezard -
r16099:4e4c416a default
parent child Browse files
Show More
@@ -91,13 +91,16 class bzr_source(converter_source):
91 def after(self):
91 def after(self):
92 self.sourcerepo.unlock()
92 self.sourcerepo.unlock()
93
93
94 def _bzrbranches(self):
95 return self.sourcerepo.find_branches(using=True)
96
94 def getheads(self):
97 def getheads(self):
95 if not self.rev:
98 if not self.rev:
96 heads = sorted([b.last_revision()
99 # Set using=True to avoid nested repositories (see issue3254)
97 for b in self.sourcerepo.find_branches()])
100 heads = sorted([b.last_revision() for b in self._bzrbranches()])
98 else:
101 else:
99 revid = None
102 revid = None
100 for branch in self.sourcerepo.find_branches():
103 for branch in self._bzrbranches():
101 try:
104 try:
102 r = RevisionSpec.from_string(self.rev)
105 r = RevisionSpec.from_string(self.rev)
103 info = r.in_history(branch)
106 info = r.in_history(branch)
@@ -164,7 +167,7 class bzr_source(converter_source):
164
167
165 def gettags(self):
168 def gettags(self):
166 bytetags = {}
169 bytetags = {}
167 for branch in self.sourcerepo.find_branches():
170 for branch in self._bzrbranches():
168 if not branch.supports_tags():
171 if not branch.supports_tags():
169 return {}
172 return {}
170 tagdict = branch.tags.get_tag_dict()
173 tagdict = branch.tags.get_tag_dict()
@@ -261,3 +261,24 not and get incorporated in extra fields
261 tip 3:* (glob)
261 tip 3:* (glob)
262 branch-tag 1:* (glob)
262 branch-tag 1:* (glob)
263 trunk-tag 0:* (glob)
263 trunk-tag 0:* (glob)
264
265 Nested repositories (issue3254)
266
267 $ bzr init-repo -q --no-trees repo/inner
268 $ bzr init -q repo/inner/trunk
269 $ bzr co repo/inner/trunk inner-trunk
270 $ cd inner-trunk
271 $ echo b > b
272 $ bzr add b
273 adding b
274 $ bzr ci -qm addb
275 $ cd ..
276 $ hg convert --datesort repo noinner-bzr
277 initializing destination noinner-bzr repository
278 scanning source...
279 sorting...
280 converting...
281 2 adda
282 1 addb
283 0 changea
284 updating tags
General Comments 0
You need to be logged in to leave comments. Login now