Mercurial > hg
changeset 3724:ea523d6f5f1a
transplant: fix --continue; add --continue test
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Thu, 30 Nov 2006 11:09:25 -0800 |
parents | c828fca6f38a |
children | ccc7a9eb0e5e |
files | hgext/transplant.py tests/test-transplant tests/test-transplant.out |
diffstat | 3 files changed, 44 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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 <<EOF > foo +foo +bar +baz +EOF +hg ci -Amfoo -d '0 0' +cat <<EOF > 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
--- 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