Show More
@@ -2967,20 +2967,6 b' def amend(ui, repo, old, extra, pats, op' | |||
|
2967 | 2967 | |
|
2968 | 2968 | # Reroute the working copy parent to the new changeset |
|
2969 | 2969 | repo.setparents(newid, nullid) |
|
2970 | mapping = {old.node(): (newid,)} | |
|
2971 | obsmetadata = None | |
|
2972 | if opts.get(b'note'): | |
|
2973 | obsmetadata = {b'note': encoding.fromlocal(opts[b'note'])} | |
|
2974 | backup = ui.configbool(b'rewrite', b'backup-bundle') | |
|
2975 | scmutil.cleanupnodes( | |
|
2976 | repo, | |
|
2977 | mapping, | |
|
2978 | b'amend', | |
|
2979 | metadata=obsmetadata, | |
|
2980 | fixphase=True, | |
|
2981 | targetphase=commitphase, | |
|
2982 | backup=backup, | |
|
2983 | ) | |
|
2984 | 2970 | |
|
2985 | 2971 | # Fixing the dirstate because localrepo.commitctx does not update |
|
2986 | 2972 | # it. This is rather convenient because we did not need to update |
@@ -3003,6 +2989,21 b' def amend(ui, repo, old, extra, pats, op' | |||
|
3003 | 2989 | for f in removedfiles: |
|
3004 | 2990 | dirstate.drop(f) |
|
3005 | 2991 | |
|
2992 | mapping = {old.node(): (newid,)} | |
|
2993 | obsmetadata = None | |
|
2994 | if opts.get(b'note'): | |
|
2995 | obsmetadata = {b'note': encoding.fromlocal(opts[b'note'])} | |
|
2996 | backup = ui.configbool(b'rewrite', b'backup-bundle') | |
|
2997 | scmutil.cleanupnodes( | |
|
2998 | repo, | |
|
2999 | mapping, | |
|
3000 | b'amend', | |
|
3001 | metadata=obsmetadata, | |
|
3002 | fixphase=True, | |
|
3003 | targetphase=commitphase, | |
|
3004 | backup=backup, | |
|
3005 | ) | |
|
3006 | ||
|
3006 | 3007 | return newid |
|
3007 | 3008 | |
|
3008 | 3009 |
General Comments 0
You need to be logged in to leave comments.
Login now