Show More
@@ -2619,6 +2619,11 b' def amend(ui, repo, commitfunc, old, ext' | |||||
2619 | message = old.description() |
|
2619 | message = old.description() | |
2620 |
|
2620 | |||
2621 | pureextra = extra.copy() |
|
2621 | pureextra = extra.copy() | |
|
2622 | if 'amend_source' in pureextra: | |||
|
2623 | del pureextra['amend_source'] | |||
|
2624 | pureoldextra = old.extra() | |||
|
2625 | if 'amend_source' in pureoldextra: | |||
|
2626 | del pureoldextra['amend_source'] | |||
2622 | extra['amend_source'] = old.hex() |
|
2627 | extra['amend_source'] = old.hex() | |
2623 |
|
2628 | |||
2624 | new = context.memctx(repo, |
|
2629 | new = context.memctx(repo, | |
@@ -2636,7 +2641,7 b' def amend(ui, repo, commitfunc, old, ext' | |||||
2636 | and newdesc == old.description() |
|
2641 | and newdesc == old.description() | |
2637 | and user == old.user() |
|
2642 | and user == old.user() | |
2638 | and date == old.date() |
|
2643 | and date == old.date() | |
2639 |
and pureextra == old |
|
2644 | and pureextra == pureoldextra): | |
2640 | # nothing changed. continuing here would create a new node |
|
2645 | # nothing changed. continuing here would create a new node | |
2641 | # anyway because of the amend_source noise. |
|
2646 | # anyway because of the amend_source noise. | |
2642 | # |
|
2647 | # |
@@ -1617,6 +1617,9 b' def commit(ui, repo, *pats, **opts):' | |||||
1617 | if not allowunstable and old.children(): |
|
1617 | if not allowunstable and old.children(): | |
1618 | raise error.Abort(_('cannot amend changeset with children')) |
|
1618 | raise error.Abort(_('cannot amend changeset with children')) | |
1619 |
|
1619 | |||
|
1620 | newextra = extra.copy() | |||
|
1621 | newextra['branch'] = branch | |||
|
1622 | extra = newextra | |||
1620 | # commitfunc is used only for temporary amend commit by cmdutil.amend |
|
1623 | # commitfunc is used only for temporary amend commit by cmdutil.amend | |
1621 | def commitfunc(ui, repo, message, match, opts): |
|
1624 | def commitfunc(ui, repo, message, match, opts): | |
1622 | return repo.commit(message, |
|
1625 | return repo.commit(message, |
General Comments 0
You need to be logged in to leave comments.
Login now