##// END OF EJS Templates
graft: preserve original source in subsequent grafts
Stefano Tortarolo -
r15506:dc9fb701 stable
parent child Browse files
Show More
@@ -2590,7 +2590,10 b' def graft(ui, repo, *revs, **opts):'
2590 cont = False
2590 cont = False
2591
2591
2592 # commit
2592 # commit
2593 extra = {'source': ctx.hex()}
2593 source = ctx.extra().get('source')
2594 if not source:
2595 source = ctx.hex()
2596 extra = {'source': source}
2594 user = ctx.user()
2597 user = ctx.user()
2595 if opts.get('user'):
2598 if opts.get('user'):
2596 user = opts['user']
2599 user = opts['user']
@@ -225,3 +225,33 b' View graph:'
225 |/
225 |/
226 o test@rev: 0
226 o test@rev: 0
227
227
228 Graft again onto another branch should preserve the original source
229 $ hg up -q 0
230 $ echo 'g'>g
231 $ hg add g
232 $ hg ci -m 7
233 created new head
234 $ hg graft 7
235 grafting revision 7
236
237 $ hg log -r 7 --template '{rev}:{node}\n'
238 7:d2e44c99fd3f31c176ea4efb9eca9f6306c81756
239 $ hg log -r 2 --template '{rev}:{node}\n'
240 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4
241
242 $ hg log --debug -r tip
243 changeset: 13:39bb1d13572759bd1e6fc874fed1b12ece047a18
244 tag: tip
245 parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f
246 parent: -1:0000000000000000000000000000000000000000
247 manifest: 13:0780e055d8f4cd12eadd5a2719481648f336f7a9
248 user: foo
249 date: Thu Jan 01 00:00:00 1970 +0000
250 files+: b
251 files-: a
252 extra: branch=default
253 extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4
254 description:
255 2
256
257
General Comments 0
You need to be logged in to leave comments. Login now