##// END OF EJS Templates
convert: handle closed branch heads in hg-hg conversion (issue2185)
Matt Mackall -
r11688:419bd8f3 default
parent child Browse files
Show More
@@ -298,7 +298,9 b' class filemap_source(converter_source):'
298 298
299 299 self.origparents[rev] = parents
300 300
301 if len(mparents) < 2 and not self.wanted(rev, wp):
301 closed = 'close' in self.commits[rev].extra
302
303 if len(mparents) < 2 and not closed and not self.wanted(rev, wp):
302 304 # We don't want this revision.
303 305 # Update our state and tell the convert process to map this
304 306 # revision to the same revision its parent as mapped to.
@@ -175,7 +175,8 b' class mercurial_sink(converter_sink):'
175 175 if self.filemapmode and nparents == 1:
176 176 man = self.repo.manifest
177 177 mnode = self.repo.changelog.read(bin(p2))[0]
178 if not man.cmp(m1node, man.revision(mnode)):
178 closed = 'close' in commit.extra
179 if not closed and not man.cmp(m1node, man.revision(mnode)):
179 180 self.ui.status(_("filtering out empty revision\n"))
180 181 self.repo.rollback()
181 182 return parent
@@ -32,6 +32,10 b" hg ci -m 'merge remote copy' -d '4 0'"
32 32 chmod +x baz
33 33 hg ci -m 'mark baz executable' -d '5 0'
34 34
35 hg branch foo
36 hg ci -m 'branch foo' -d '6 0'
37 hg ci --close-branch -m 'close' -d '7 0'
38
35 39 cd ..
36 40 hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded'
37 41 cd new
@@ -7,16 +7,19 b' merging foo and baz to baz'
7 7 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
8 8 (branch merge, don't forget to commit)
9 9 created new head
10 marked working directory as branch foo
10 11 initializing destination new repository
11 12 scanning source...
12 13 sorting...
13 14 converting...
14 5 add foo bar
15 4 change foo
16 3 make bar and baz copies of foo
17 2 merge local copy
18 1 merge remote copy
19 0 mark baz executable
15 7 add foo bar
16 6 change foo
17 5 make bar and baz copies of foo
18 4 merge local copy
19 3 merge remote copy
20 2 mark baz executable
21 1 branch foo
22 0 close
20 23 comparing with ../orig
21 24 searching for changes
22 25 no changes found
General Comments 0
You need to be logged in to leave comments. Login now