##// END OF EJS Templates
transplant: recover added/removed files after failed application
Brendan Cully -
r3726:752884db default
parent child Browse files
Show More
@@ -196,12 +196,14 b' class transplanter:'
196 196 if patchfile:
197 197 try:
198 198 files = {}
199 fuzz = patch.patch(patchfile, self.ui, cwd=repo.root,
200 files=files)
201 if not files:
202 self.ui.warn(_('%s: empty changeset') % revlog.hex(node))
203 return
204 files = patch.updatedir(self.ui, repo, files, wlock=wlock)
199 try:
200 fuzz = patch.patch(patchfile, self.ui, cwd=repo.root,
201 files=files)
202 if not files:
203 self.ui.warn(_('%s: empty changeset') % revlog.hex(node))
204 return
205 finally:
206 files = patch.updatedir(self.ui, repo, files, wlock=wlock)
205 207 if filter:
206 208 os.unlink(patchfile)
207 209 except Exception, inst:
@@ -67,13 +67,16 b' foo'
67 67 bar
68 68 baz
69 69 EOF
70 echo toremove > toremove
70 71 hg ci -Amfoo -d '0 0'
71 72 cat <<EOF > foo
72 73 foo2
73 74 bar2
74 75 baz2
75 76 EOF
76 hg ci -mfoo2 -d '0 0'
77 rm toremove
78 echo added > added
79 hg ci -Amfoo2 -d '0 0'
77 80 echo bar > bar
78 81 hg ci -Ambar -d '0 0'
79 82 echo bar2 >> bar
@@ -84,3 +87,4 b" hg ci -mfoobar -d '0 0'"
84 87 hg transplant 1:3
85 88 echo merge > foo
86 89 hg transplant --continue
90 hg locate
@@ -77,16 +77,22 b' applying 4333daefcb15'
77 77 4333daefcb15 transplanted to 5f42c04e07cc
78 78 % transplant --continue
79 79 adding foo
80 adding toremove
81 adding added
82 removing toremove
80 83 adding bar
81 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
82 applying c029d661401c
84 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
85 applying a1e30dd1b8e7
83 86 foo
84 87 Hunk #1 FAILED at 1.
85 88 1 out of 1 hunk FAILED -- saving rejects to file foo.rej
86 89 patch command failed: exited with status 1
87 90 abort: Fix up the merge and run hg transplant --continue
88 c029d661401c transplanted as 1b09cda4cf1b
89 applying 67f0722fdc4f
90 67f0722fdc4f transplanted to faa04033bb41
91 applying 84c5126bd0d2
92 84c5126bd0d2 transplanted to b35f4019ccc9
91 a1e30dd1b8e7 transplanted as e6d0b5145568
92 applying 1739ac5f6139
93 1739ac5f6139 transplanted to 48f780141a79
94 applying 0282d5fbbe02
95 0282d5fbbe02 transplanted to 821d17b1a3ed
96 added
97 bar
98 foo
General Comments 0
You need to be logged in to leave comments. Login now