Show More
@@ -2581,6 +2581,7 b' def forget(ui, repo, *pats, **opts):' | |||||
2581 | 'graft', |
|
2581 | 'graft', | |
2582 | [('c', 'continue', False, _('resume interrupted graft')), |
|
2582 | [('c', 'continue', False, _('resume interrupted graft')), | |
2583 | ('e', 'edit', False, _('invoke editor on commit messages')), |
|
2583 | ('e', 'edit', False, _('invoke editor on commit messages')), | |
|
2584 | ('', 'log', None, _('append graft info to log message')), | |||
2584 | ('D', 'currentdate', False, |
|
2585 | ('D', 'currentdate', False, | |
2585 | _('record the current date as commit date')), |
|
2586 | _('record the current date as commit date')), | |
2586 | ('U', 'currentuser', False, |
|
2587 | ('U', 'currentuser', False, | |
@@ -2599,6 +2600,11 b' def graft(ui, repo, *revs, **opts):' | |||||
2599 | Changesets that are ancestors of the current revision, that have |
|
2600 | Changesets that are ancestors of the current revision, that have | |
2600 | already been grafted, or that are merges will be skipped. |
|
2601 | already been grafted, or that are merges will be skipped. | |
2601 |
|
2602 | |||
|
2603 | If --log is specified, log messages will have a comment appended | |||
|
2604 | of the form:: | |||
|
2605 | ||||
|
2606 | (grafted from CHANGESETHASH) | |||
|
2607 | ||||
2602 | If a graft merge results in conflicts, the graft process is |
|
2608 | If a graft merge results in conflicts, the graft process is | |
2603 | interrupted so that the current merge can be manually resolved. |
|
2609 | interrupted so that the current merge can be manually resolved. | |
2604 | Once all conflicts are addressed, the graft process can be |
|
2610 | Once all conflicts are addressed, the graft process can be | |
@@ -2748,7 +2754,10 b' def graft(ui, repo, *revs, **opts):' | |||||
2748 | date = ctx.date() |
|
2754 | date = ctx.date() | |
2749 | if opts.get('date'): |
|
2755 | if opts.get('date'): | |
2750 | date = opts['date'] |
|
2756 | date = opts['date'] | |
2751 |
|
|
2757 | message = ctx.description() | |
|
2758 | if opts.get('log'): | |||
|
2759 | message += '\n(grafted from %s)' % ctx.hex() | |||
|
2760 | node = repo.commit(text=message, user=user, | |||
2752 | date=date, extra=extra, editor=editor) |
|
2761 | date=date, extra=extra, editor=editor) | |
2753 | if node is None: |
|
2762 | if node is None: | |
2754 | ui.status(_('graft for revision %s is empty\n') % ctx.rev()) |
|
2763 | ui.status(_('graft for revision %s is empty\n') % ctx.rev()) |
@@ -247,7 +247,7 b' Show all commands + options' | |||||
247 | debugsub: rev |
|
247 | debugsub: rev | |
248 | debugwalk: include, exclude |
|
248 | debugwalk: include, exclude | |
249 | debugwireargs: three, four, five, ssh, remotecmd, insecure |
|
249 | debugwireargs: three, four, five, ssh, remotecmd, insecure | |
250 | graft: continue, edit, currentdate, currentuser, date, user, tool, dry-run |
|
250 | graft: continue, edit, log, currentdate, currentuser, date, user, tool, dry-run | |
251 | grep: print0, all, text, follow, ignore-case, files-with-matches, line-number, rev, user, date, include, exclude |
|
251 | grep: print0, all, text, follow, ignore-case, files-with-matches, line-number, rev, user, date, include, exclude | |
252 | heads: rev, topo, active, closed, style, template |
|
252 | heads: rev, topo, active, closed, style, template | |
253 | help: extension, command |
|
253 | help: extension, command |
@@ -277,3 +277,13 b' Disallow grafting already grafted csets ' | |||||
277 | $ hg graft tip |
|
277 | $ hg graft tip | |
278 | skipping already grafted revision 13 (same origin 2) |
|
278 | skipping already grafted revision 13 (same origin 2) | |
279 | [255] |
|
279 | [255] | |
|
280 | ||||
|
281 | Graft with --log | |||
|
282 | ||||
|
283 | $ hg up -Cq 1 | |||
|
284 | $ hg graft 3 --log -u foo | |||
|
285 | grafting revision 3 | |||
|
286 | warning: can't find ancestor for 'c' copied from 'b'! | |||
|
287 | $ hg log --template '{rev} {parents} {desc}\n' -r tip | |||
|
288 | 14 1:5d205f8b35b6 3 | |||
|
289 | (grafted from 4c60f11aa304a54ae1c199feb94e7fc771e51ed8) |
General Comments 0
You need to be logged in to leave comments.
Login now