# HG changeset patch # User Brendan Cully # Date 1164913765 28800 # Node ID ea523d6f5f1adc6ef40cf723fb2a84a517bb24dc # Parent c828fca6f38a1f9db1f94e8c1df9d559169f6603 transplant: fix --continue; add --continue test diff -r c828fca6f38a -r ea523d6f5f1a hgext/transplant.py --- a/hgext/transplant.py Wed Nov 29 22:34:22 2006 -0800 +++ b/hgext/transplant.py Thu Nov 30 11:09:25 2006 -0800 @@ -231,8 +231,8 @@ '''recover last transaction and apply remaining changesets''' if os.path.exists(os.path.join(self.path, 'journal')): n, node = self.recover(repo) - self.ui.status(_('%s transplanted as %s\n') % (revlog.short(node), - revlog.short(n))) + self.ui.status(_('%s transplanted as %s\n') % (revlog.short(node), + revlog.short(n))) seriespath = os.path.join(self.path, 'series') if not os.path.exists(seriespath): return @@ -510,7 +510,7 @@ try: if opts.get('continue'): - n, node = tp.resume(repo, source, opts) + tp.resume(repo, source, opts) return tf=tp.transplantfilter(repo, source, p1) diff -r c828fca6f38a -r ea523d6f5f1a tests/test-transplant --- a/tests/test-transplant Wed Nov 29 22:34:22 2006 -0800 +++ b/tests/test-transplant Thu Nov 30 11:09:25 2006 -0800 @@ -58,3 +58,29 @@ hg clone t pullback cd pullback hg transplant -s ../remote -a -b tip + +echo '% transplant --continue' +hg init ../tc +cd ../tc +cat < foo +foo +bar +baz +EOF +hg ci -Amfoo -d '0 0' +cat < foo +foo2 +bar2 +baz2 +EOF +hg ci -mfoo2 -d '0 0' +echo bar > bar +hg ci -Ambar -d '0 0' +echo bar2 >> bar +hg ci -mbar2 -d '0 0' +hg up 0 +echo foobar > foo +hg ci -mfoobar -d '0 0' +hg transplant 1:3 +echo merge > foo +hg transplant --continue diff -r c828fca6f38a -r ea523d6f5f1a tests/test-transplant.out --- a/tests/test-transplant.out Wed Nov 29 22:34:22 2006 -0800 +++ b/tests/test-transplant.out Thu Nov 30 11:09:25 2006 -0800 @@ -75,3 +75,18 @@ searching for changes applying 4333daefcb15 4333daefcb15 transplanted to 5f42c04e07cc +% transplant --continue +adding foo +adding bar +1 files updated, 0 files merged, 1 files removed, 0 files unresolved +applying c029d661401c +foo +Hunk #1 FAILED at 1. +1 out of 1 hunk FAILED -- saving rejects to file foo.rej +patch command failed: exited with status 1 +abort: Fix up the merge and run hg transplant --continue +c029d661401c transplanted as 1b09cda4cf1b +applying 67f0722fdc4f +67f0722fdc4f transplanted to faa04033bb41 +applying 84c5126bd0d2 +84c5126bd0d2 transplanted to b35f4019ccc9