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