##// END OF EJS Templates
transplant: log source node when recovering too.
Brendan Cully -
r3758:889f7e74 default
parent child Browse files
Show More
@@ -238,6 +238,7 class transplanter:
238 238 revlog.short(n)))
239 239 seriespath = os.path.join(self.path, 'series')
240 240 if not os.path.exists(seriespath):
241 self.transplants.write()
241 242 return
242 243 nodes, merges = self.readseries()
243 244 revmap = {}
@@ -255,6 +256,7 class transplanter:
255 256 if not user or not date or not message or not parents[0]:
256 257 raise util.Abort(_('transplant log file is corrupt'))
257 258
259 extra = {'transplant_source': node}
258 260 wlock = repo.wlock()
259 261 p1, p2 = repo.dirstate.parents()
260 262 if p1 != parents[0]:
@@ -262,7 +264,7 class transplanter:
262 264 revlog.hex(parents[0]))
263 265 if merge:
264 266 repo.dirstate.setparents(p1, parents[1])
265 n = repo.commit(None, message, user, date, wlock=wlock)
267 n = repo.commit(None, message, user, date, wlock=wlock, extra=extra)
266 268 if not n:
267 269 raise util.Abort(_('commit failed'))
268 270 if not merge:
@@ -85,6 +85,9 hg up 0
85 85 echo foobar > foo
86 86 hg ci -mfoobar -d '0 0'
87 87 hg transplant 1:3
88 echo merge > foo
88 # transplant -c shouldn't use an old changeset
89 hg up -C
90 hg transplant 1
89 91 hg transplant --continue
92 hg transplant 1:3
90 93 hg locate
@@ -88,11 +88,19 Hunk #1 FAILED at 1.
88 88 1 out of 1 hunk FAILED -- saving rejects to file foo.rej
89 89 patch command failed: exited with status 1
90 90 abort: Fix up the merge and run hg transplant --continue
91 a1e30dd1b8e7 transplanted as e6d0b5145568
91 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
92 applying a1e30dd1b8e7
93 foo
94 Hunk #1 FAILED at 1.
95 1 out of 1 hunk FAILED -- saving rejects to file foo.rej
96 patch command failed: exited with status 1
97 abort: Fix up the merge and run hg transplant --continue
98 a1e30dd1b8e7 transplanted as f1563cf27039
99 skipping already applied revision 1:a1e30dd1b8e7
92 100 applying 1739ac5f6139
93 1739ac5f6139 transplanted to 48f780141a79
101 1739ac5f6139 transplanted to d649c221319f
94 102 applying 0282d5fbbe02
95 0282d5fbbe02 transplanted to 821d17b1a3ed
103 0282d5fbbe02 transplanted to 77418277ccb3
96 104 added
97 105 bar
98 106 foo
General Comments 0
You need to be logged in to leave comments. Login now