Show More
@@ -3026,6 +3026,7 def samefile(f, ctx1, ctx2): | |||||
3026 | else: |
|
3026 | else: | |
3027 | return f not in ctx2.manifest() |
|
3027 | return f not in ctx2.manifest() | |
3028 |
|
3028 | |||
|
3029 | # TODO: remove the commitfunc parameter because it is no longer used | |||
3029 | def amend(ui, repo, commitfunc, old, extra, pats, opts): |
|
3030 | def amend(ui, repo, commitfunc, old, extra, pats, opts): | |
3030 | # avoid cycle context -> subrepo -> cmdutil |
|
3031 | # avoid cycle context -> subrepo -> cmdutil | |
3031 | from . import context |
|
3032 | from . import context | |
@@ -3039,42 +3040,25 def amend(ui, repo, commitfunc, old, ext | |||||
3039 | base = old.p1() |
|
3040 | base = old.p1() | |
3040 |
|
3041 | |||
3041 | with repo.wlock(), repo.lock(), repo.transaction('amend'): |
|
3042 | with repo.wlock(), repo.lock(), repo.transaction('amend'): | |
3042 | # See if we got a message from -m or -l, if not, open the editor |
|
|||
3043 | # with the message of the changeset to amend |
|
|||
3044 | message = logmessage(ui, opts) |
|
|||
3045 | # ensure logfile does not conflict with later enforcement of the |
|
|||
3046 | # message. potential logfile content has been processed by |
|
|||
3047 | # `logmessage` anyway. |
|
|||
3048 | opts.pop('logfile') |
|
|||
3049 | # First, do a regular commit to record all changes in the working |
|
|||
3050 | # directory (if there are any) |
|
|||
3051 | ui.callhooks = False |
|
|||
3052 | activebookmark = repo._bookmarks.active |
|
|||
3053 | try: |
|
|||
3054 | repo._bookmarks.active = None |
|
|||
3055 | opts['message'] = 'temporary amend commit for %s' % old |
|
|||
3056 | node = commit(ui, repo, commitfunc, pats, opts) |
|
|||
3057 | finally: |
|
|||
3058 | repo._bookmarks.active = activebookmark |
|
|||
3059 | ui.callhooks = True |
|
|||
3060 | ctx = repo[node] |
|
|||
3061 |
|
||||
3062 | # Participating changesets: |
|
3043 | # Participating changesets: | |
3063 | # |
|
3044 | # | |
3064 |
# |
|
3045 | # wctx o - workingctx that contains changes from working copy | |
3065 |
# | |
|
3046 | # | to go into amending commit | |
3066 | # | (or a workingctx if there were no changes) |
|
|||
3067 | # | |
|
3047 | # | | |
3068 | # old o - changeset to amend |
|
3048 | # old o - changeset to amend | |
3069 | # | |
|
3049 | # | | |
3070 | # base o - first parent of the changeset to amend |
|
3050 | # base o - first parent of the changeset to amend | |
|
3051 | wctx = repo[None] | |||
3071 |
|
3052 | |||
3072 | # Update extra dict from amended commit (e.g. to preserve graft |
|
3053 | # Update extra dict from amended commit (e.g. to preserve graft | |
3073 | # source) |
|
3054 | # source) | |
3074 | extra.update(old.extra()) |
|
3055 | extra.update(old.extra()) | |
3075 |
|
3056 | |||
3076 |
# Also update it from the |
|
3057 | # Also update it from the from the wctx | |
3077 | extra.update(ctx.extra()) |
|
3058 | extra.update(wctx.extra()) | |
|
3059 | ||||
|
3060 | user = opts.get('user') or old.user() | |||
|
3061 | date = opts.get('date') or old.date() | |||
3078 |
|
3062 | |||
3079 | if len(old.parents()) > 1: |
|
3063 | if len(old.parents()) > 1: | |
3080 | # ctx.files() isn't reliable for merges, so fall back to the |
|
3064 | # ctx.files() isn't reliable for merges, so fall back to the | |
@@ -3084,30 +3068,47 def amend(ui, repo, commitfunc, old, ext | |||||
3084 | else: |
|
3068 | else: | |
3085 | files = set(old.files()) |
|
3069 | files = set(old.files()) | |
3086 |
|
3070 | |||
3087 | # Second, we use either the commit we just did, or if there were no |
|
3071 | # add/remove the files to the working copy if the "addremove" option | |
3088 | # changes the parent of the working directory as the version of the |
|
3072 | # was specified. | |
3089 | # files in the final amend commit |
|
3073 | matcher = scmutil.match(wctx, pats, opts) | |
3090 | if node: |
|
3074 | if (opts.get('addremove') | |
3091 | ui.note(_('copying changeset %s to %s\n') % (ctx, base)) |
|
3075 | and scmutil.addremove(repo, matcher, "", opts)): | |
3092 |
|
3076 | raise error.Abort( | ||
3093 | user = ctx.user() |
|
3077 | _("failed to mark all new/missing files as added/removed")) | |
3094 | date = ctx.date() |
|
3078 | ||
|
3079 | filestoamend = set(f for f in wctx.files() if matcher(f)) | |||
|
3080 | ||||
|
3081 | changes = (len(filestoamend) > 0) | |||
|
3082 | if changes: | |||
3095 | # Recompute copies (avoid recording a -> b -> a) |
|
3083 | # Recompute copies (avoid recording a -> b -> a) | |
3096 | copied = copies.pathcopies(base, ctx) |
|
3084 | copied = copies.pathcopies(base, wctx, matcher) | |
3097 | if old.p2: |
|
3085 | if old.p2: | |
3098 | copied.update(copies.pathcopies(old.p2(), ctx)) |
|
3086 | copied.update(copies.pathcopies(old.p2(), wctx, matcher)) | |
3099 |
|
3087 | |||
3100 | # Prune files which were reverted by the updates: if old |
|
3088 | # Prune files which were reverted by the updates: if old | |
3101 |
# introduced file X and |
|
3089 | # introduced file X and the file was renamed in the working | |
3102 |
# |
|
3090 | # copy, then those two files are the same and | |
3103 | # we can discard X from our list of files. Likewise if X |
|
3091 | # we can discard X from our list of files. Likewise if X | |
3104 | # was deleted, it's no longer relevant |
|
3092 | # was deleted, it's no longer relevant | |
3105 |
files.update( |
|
3093 | files.update(filestoamend) | |
3106 | files = [f for f in files if not samefile(f, ctx, base)] |
|
3094 | files = [f for f in files if not samefile(f, wctx, base)] | |
3107 |
|
3095 | |||
3108 | def filectxfn(repo, ctx_, path): |
|
3096 | def filectxfn(repo, ctx_, path): | |
3109 | try: |
|
3097 | try: | |
3110 | fctx = ctx[path] |
|
3098 | # If the file being considered is not amongst the files | |
|
3099 | # to be amended, we should return the file context from the | |||
|
3100 | # old changeset. This avoids issues when only some files in | |||
|
3101 | # the working copy are being amended but there are also | |||
|
3102 | # changes to other files from the old changeset. | |||
|
3103 | if path not in filestoamend: | |||
|
3104 | return old.filectx(path) | |||
|
3105 | ||||
|
3106 | fctx = wctx[path] | |||
|
3107 | ||||
|
3108 | # Return None for removed files. | |||
|
3109 | if not fctx.exists(): | |||
|
3110 | return None | |||
|
3111 | ||||
3111 | flags = fctx.flags() |
|
3112 | flags = fctx.flags() | |
3112 | mctx = context.memfilectx(repo, |
|
3113 | mctx = context.memfilectx(repo, | |
3113 | fctx.path(), fctx.data(), |
|
3114 | fctx.path(), fctx.data(), | |
@@ -3127,11 +3128,14 def amend(ui, repo, commitfunc, old, ext | |||||
3127 | except KeyError: |
|
3128 | except KeyError: | |
3128 | return None |
|
3129 | return None | |
3129 |
|
3130 | |||
3130 | user = opts.get('user') or old.user() |
|
3131 | # See if we got a message from -m or -l, if not, open the editor with | |
3131 | date = opts.get('date') or old.date() |
|
3132 | # the message of the changeset to amend. | |
|
3133 | message = logmessage(ui, opts) | |||
|
3134 | ||||
3132 | editform = mergeeditform(old, 'commit.amend') |
|
3135 | editform = mergeeditform(old, 'commit.amend') | |
3133 | editor = getcommiteditor(editform=editform, |
|
3136 | editor = getcommiteditor(editform=editform, | |
3134 | **pycompat.strkwargs(opts)) |
|
3137 | **pycompat.strkwargs(opts)) | |
|
3138 | ||||
3135 | if not message: |
|
3139 | if not message: | |
3136 | editor = getcommiteditor(edit=True, editform=editform) |
|
3140 | editor = getcommiteditor(edit=True, editform=editform) | |
3137 | message = old.description() |
|
3141 | message = old.description() | |
@@ -3150,7 +3154,7 def amend(ui, repo, commitfunc, old, ext | |||||
3150 | editor=editor) |
|
3154 | editor=editor) | |
3151 |
|
3155 | |||
3152 | newdesc = changelog.stripdesc(new.description()) |
|
3156 | newdesc = changelog.stripdesc(new.description()) | |
3153 |
if ((not |
|
3157 | if ((not changes) | |
3154 | and newdesc == old.description() |
|
3158 | and newdesc == old.description() | |
3155 | and user == old.user() |
|
3159 | and user == old.user() | |
3156 | and date == old.date() |
|
3160 | and date == old.date() | |
@@ -3172,10 +3176,27 def amend(ui, repo, commitfunc, old, ext | |||||
3172 | # Reroute the working copy parent to the new changeset |
|
3176 | # Reroute the working copy parent to the new changeset | |
3173 | repo.setparents(newid, nullid) |
|
3177 | repo.setparents(newid, nullid) | |
3174 | mapping = {old.node(): (newid,)} |
|
3178 | mapping = {old.node(): (newid,)} | |
3175 | if node: |
|
|||
3176 | mapping[node] = () |
|
|||
3177 | scmutil.cleanupnodes(repo, mapping, 'amend') |
|
3179 | scmutil.cleanupnodes(repo, mapping, 'amend') | |
3178 |
|
3180 | |||
|
3181 | # Fixing the dirstate because localrepo.commitctx does not update | |||
|
3182 | # it. This is rather convenient because we did not need to update | |||
|
3183 | # the dirstate for all the files in the new commit which commitctx | |||
|
3184 | # could have done if it updated the dirstate. Now, we can | |||
|
3185 | # selectively update the dirstate only for the amended files. | |||
|
3186 | dirstate = repo.dirstate | |||
|
3187 | ||||
|
3188 | # Update the state of the files which were added and | |||
|
3189 | # and modified in the amend to "normal" in the dirstate. | |||
|
3190 | normalfiles = set(wctx.modified() + wctx.added()) & filestoamend | |||
|
3191 | for f in normalfiles: | |||
|
3192 | dirstate.normal(f) | |||
|
3193 | ||||
|
3194 | # Update the state of files which were removed in the amend | |||
|
3195 | # to "removed" in the dirstate. | |||
|
3196 | removedfiles = set(wctx.removed()) & filestoamend | |||
|
3197 | for f in removedfiles: | |||
|
3198 | dirstate.drop(f) | |||
|
3199 | ||||
3179 | return newid |
|
3200 | return newid | |
3180 |
|
3201 | |||
3181 | def commiteditor(repo, ctx, subs, editform=''): |
|
3202 | def commiteditor(repo, ctx, subs, editform=''): |
@@ -29,7 +29,7 Basic amend | |||||
29 | $ echo 2 >> B |
|
29 | $ echo 2 >> B | |
30 |
|
30 | |||
31 | $ hg amend |
|
31 | $ hg amend | |
32 |
saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/112478962961- |
|
32 | saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/112478962961-7e959a55-amend.hg (glob) (obsstore-off !) | |
33 | #if obsstore-off |
|
33 | #if obsstore-off | |
34 | $ hg log -p -G --hidden -T '{rev} {node|short} {desc}\n' |
|
34 | $ hg log -p -G --hidden -T '{rev} {node|short} {desc}\n' | |
35 | @ 1 be169c7e8dbe B |
|
35 | @ 1 be169c7e8dbe B | |
@@ -51,7 +51,7 Basic amend | |||||
51 |
|
51 | |||
52 | #else |
|
52 | #else | |
53 | $ hg log -p -G --hidden -T '{rev} {node|short} {desc}\n' |
|
53 | $ hg log -p -G --hidden -T '{rev} {node|short} {desc}\n' | |
54 |
@ |
|
54 | @ 2 be169c7e8dbe B | |
55 | | diff --git a/B b/B |
|
55 | | diff --git a/B b/B | |
56 | | new file mode 100644 |
|
56 | | new file mode 100644 | |
57 | | --- /dev/null |
|
57 | | --- /dev/null | |
@@ -59,15 +59,6 Basic amend | |||||
59 | | @@ -0,0 +1,1 @@ |
|
59 | | @@ -0,0 +1,1 @@ | |
60 | | +B2 |
|
60 | | +B2 | |
61 | | |
|
61 | | | |
62 | | x 2 edf08988b141 temporary amend commit for 112478962961 |
|
|||
63 | | | diff --git a/B b/B |
|
|||
64 | | | --- a/B |
|
|||
65 | | | +++ b/B |
|
|||
66 | | | @@ -1,1 +1,1 @@ |
|
|||
67 | | | -B |
|
|||
68 | | | \ No newline at end of file |
|
|||
69 | | | +B2 |
|
|||
70 | | | |
|
|||
71 | | x 1 112478962961 B |
|
62 | | x 1 112478962961 B | |
72 | |/ diff --git a/B b/B |
|
63 | |/ diff --git a/B b/B | |
73 | | new file mode 100644 |
|
64 | | new file mode 100644 | |
@@ -100,13 +91,13 Matcher and metadata options | |||||
100 | $ echo 4 > D |
|
91 | $ echo 4 > D | |
101 | $ hg add C D |
|
92 | $ hg add C D | |
102 | $ hg amend -m NEWMESSAGE -I C |
|
93 | $ hg amend -m NEWMESSAGE -I C | |
103 |
saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/be169c7e8dbe- |
|
94 | saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/be169c7e8dbe-7684ddc5-amend.hg (glob) (obsstore-off !) | |
104 | $ hg log -r . -T '{node|short} {desc} {files}\n' |
|
95 | $ hg log -r . -T '{node|short} {desc} {files}\n' | |
105 | c7ba14d9075b NEWMESSAGE B C |
|
96 | c7ba14d9075b NEWMESSAGE B C | |
106 | $ echo 5 > E |
|
97 | $ echo 5 > E | |
107 | $ rm C |
|
98 | $ rm C | |
108 | $ hg amend -d '2000 1000' -u 'Foo <foo@example.com>' -A C D |
|
99 | $ hg amend -d '2000 1000' -u 'Foo <foo@example.com>' -A C D | |
109 |
saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/c7ba14d9075b-b |
|
100 | saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/c7ba14d9075b-b3e76daa-amend.hg (glob) (obsstore-off !) | |
110 | $ hg log -r . -T '{node|short} {desc} {files} {author} {date}\n' |
|
101 | $ hg log -r . -T '{node|short} {desc} {files} {author} {date}\n' | |
111 | 14f6c4bcc865 NEWMESSAGE B D Foo <foo@example.com> 2000.01000 |
|
102 | 14f6c4bcc865 NEWMESSAGE B D Foo <foo@example.com> 2000.01000 | |
112 |
|
103 | |||
@@ -153,7 +144,7 Interactive mode | |||||
153 | new file mode 100644 |
|
144 | new file mode 100644 | |
154 | examine changes to 'G'? [Ynesfdaq?] n |
|
145 | examine changes to 'G'? [Ynesfdaq?] n | |
155 |
|
146 | |||
156 |
saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/507be9bdac71- |
|
147 | saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/507be9bdac71-c8077452-amend.hg (glob) (obsstore-off !) | |
157 | $ hg log -r . -T '{files}\n' |
|
148 | $ hg log -r . -T '{files}\n' | |
158 | B D F |
|
149 | B D F | |
159 |
|
150 | |||
@@ -186,7 +177,7 With allowunstable, amend could work in | |||||
186 |
|
177 | |||
187 | $ hg amend |
|
178 | $ hg amend | |
188 | $ hg log -T '{rev} {node|short} {desc}\n' -G |
|
179 | $ hg log -T '{rev} {node|short} {desc}\n' -G | |
189 |
@ |
|
180 | @ 3 be169c7e8dbe B | |
190 | | |
|
181 | | | |
191 | | o 2 26805aba1e60 C |
|
182 | | o 2 26805aba1e60 C | |
192 | | | |
|
183 | | | |
@@ -40,7 +40,7 Amending changeset with changes in worki | |||||
40 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -m 'amend base1' |
|
40 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -m 'amend base1' | |
41 | pretxncommit 43f1ba15f28a50abf0aae529cf8a16bfced7b149 |
|
41 | pretxncommit 43f1ba15f28a50abf0aae529cf8a16bfced7b149 | |
42 | 43f1ba15f28a tip |
|
42 | 43f1ba15f28a tip | |
43 |
saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d- |
|
43 | saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-5ab4f721-amend.hg (glob) | |
44 | $ echo 'pretxncommit.foo = ' >> $HGRCPATH |
|
44 | $ echo 'pretxncommit.foo = ' >> $HGRCPATH | |
45 | $ hg diff -c . |
|
45 | $ hg diff -c . | |
46 | diff -r ad120869acf0 -r 43f1ba15f28a a |
|
46 | diff -r ad120869acf0 -r 43f1ba15f28a a | |
@@ -69,31 +69,36 Check proper abort for empty message | |||||
69 | > #!/bin/sh |
|
69 | > #!/bin/sh | |
70 | > echo "" > "$1" |
|
70 | > echo "" > "$1" | |
71 | > __EOF__ |
|
71 | > __EOF__ | |
|
72 | ||||
|
73 | Update the existing file to ensure that the dirstate is not in pending state | |||
|
74 | (where the status of some files in the working copy is not known yet). This in | |||
|
75 | turn ensures that when the transaction is aborted due to an empty message during | |||
|
76 | the amend, there should be no rollback. | |||
|
77 | $ echo a >> a | |||
|
78 | ||||
72 |
$ |
|
79 | $ echo b > b | |
73 | $ hg add b |
|
80 | $ hg add b | |
74 | $ hg summary |
|
81 | $ hg summary | |
75 | parent: 1:43f1ba15f28a tip |
|
82 | parent: 1:43f1ba15f28a tip | |
76 | amend base1 |
|
83 | amend base1 | |
77 | branch: default |
|
84 | branch: default | |
78 | commit: 1 added, 1 unknown |
|
85 | commit: 1 modified, 1 added, 1 unknown | |
79 | update: (current) |
|
86 | update: (current) | |
80 | phases: 2 draft |
|
87 | phases: 2 draft | |
81 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend |
|
88 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend | |
82 | transaction abort! |
|
|||
83 | rollback completed |
|
|||
84 | abort: empty commit message |
|
89 | abort: empty commit message | |
85 | [255] |
|
90 | [255] | |
86 | $ hg summary |
|
91 | $ hg summary | |
87 | parent: 1:43f1ba15f28a tip |
|
92 | parent: 1:43f1ba15f28a tip | |
88 | amend base1 |
|
93 | amend base1 | |
89 | branch: default |
|
94 | branch: default | |
90 | commit: 1 added, 1 unknown |
|
95 | commit: 1 modified, 1 added, 1 unknown | |
91 | update: (current) |
|
96 | update: (current) | |
92 | phases: 2 draft |
|
97 | phases: 2 draft | |
93 |
|
98 | |||
94 | Add new file: |
|
99 | Add new file along with modified existing file: | |
95 | $ hg ci --amend -m 'amend base1 new file' |
|
100 | $ hg ci --amend -m 'amend base1 new file' | |
96 |
saved backup bundle to $TESTTMP/.hg/strip-backup/43f1ba15f28a-7 |
|
101 | saved backup bundle to $TESTTMP/.hg/strip-backup/43f1ba15f28a-007467c2-amend.hg (glob) | |
97 |
|
102 | |||
98 | Remove file that was added in amended commit: |
|
103 | Remove file that was added in amended commit: | |
99 | (and test logfile option) |
|
104 | (and test logfile option) | |
@@ -102,17 +107,17 Remove file that was added in amended co | |||||
102 | $ hg rm b |
|
107 | $ hg rm b | |
103 | $ echo 'amend base1 remove new file' > ../logfile |
|
108 | $ echo 'amend base1 remove new file' > ../logfile | |
104 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg ci --amend --logfile ../logfile |
|
109 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg ci --amend --logfile ../logfile | |
105 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
110 | saved backup bundle to $TESTTMP/.hg/strip-backup/c16295aaf401-1ada9901-amend.hg (glob) | |
106 |
|
111 | |||
107 | $ hg cat b |
|
112 | $ hg cat b | |
108 |
b: no such file in rev |
|
113 | b: no such file in rev 47343646fa3d | |
109 | [1] |
|
114 | [1] | |
110 |
|
115 | |||
111 | No changes, just a different message: |
|
116 | No changes, just a different message: | |
112 |
|
117 | |||
113 | $ hg ci -v --amend -m 'no changes, new message' |
|
118 | $ hg ci -v --amend -m 'no changes, new message' | |
114 |
amending changeset |
|
119 | amending changeset 47343646fa3d | |
115 |
copying changeset |
|
120 | copying changeset 47343646fa3d to ad120869acf0 | |
116 | committing files: |
|
121 | committing files: | |
117 | a |
|
122 | a | |
118 | committing manifest |
|
123 | committing manifest | |
@@ -121,29 +126,30 No changes, just a different message: | |||||
121 | uncompressed size of bundle content: |
|
126 | uncompressed size of bundle content: | |
122 | 254 (changelog) |
|
127 | 254 (changelog) | |
123 | 163 (manifests) |
|
128 | 163 (manifests) | |
124 |
1 |
|
129 | 131 a | |
125 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
130 | saved backup bundle to $TESTTMP/.hg/strip-backup/47343646fa3d-c2758885-amend.hg (glob) | |
126 | 1 changesets found |
|
131 | 1 changesets found | |
127 | uncompressed size of bundle content: |
|
132 | uncompressed size of bundle content: | |
128 | 250 (changelog) |
|
133 | 250 (changelog) | |
129 | 163 (manifests) |
|
134 | 163 (manifests) | |
130 |
1 |
|
135 | 131 a | |
131 | adding branch |
|
136 | adding branch | |
132 | adding changesets |
|
137 | adding changesets | |
133 | adding manifests |
|
138 | adding manifests | |
134 | adding file changes |
|
139 | adding file changes | |
135 | added 1 changesets with 1 changes to 1 files |
|
140 | added 1 changesets with 1 changes to 1 files | |
136 |
committed changeset 1: |
|
141 | committed changeset 1:401431e913a1 | |
137 | $ hg diff -c . |
|
142 | $ hg diff -c . | |
138 |
diff -r ad120869acf0 -r |
|
143 | diff -r ad120869acf0 -r 401431e913a1 a | |
139 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
144 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
140 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
145 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
141 |
@@ -1,1 +1, |
|
146 | @@ -1,1 +1,4 @@ | |
142 | a |
|
147 | a | |
143 | +a |
|
148 | +a | |
144 | +a |
|
149 | +a | |
|
150 | +a | |||
145 | $ hg log |
|
151 | $ hg log | |
146 |
changeset: 1: |
|
152 | changeset: 1:401431e913a1 | |
147 | tag: tip |
|
153 | tag: tip | |
148 | user: test |
|
154 | user: test | |
149 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
155 | date: Thu Jan 01 00:00:00 1970 +0000 | |
@@ -168,12 +174,12 Test -u/-d: | |||||
168 | > EOF |
|
174 | > EOF | |
169 | $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -u foo -d '1 0' |
|
175 | $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -u foo -d '1 0' | |
170 | HGEDITFORM=commit.amend.normal |
|
176 | HGEDITFORM=commit.amend.normal | |
171 |
saved backup bundle to $TESTTMP/.hg/strip-backup/1 |
|
177 | saved backup bundle to $TESTTMP/.hg/strip-backup/401431e913a1-5e8e532c-amend.hg (glob) | |
172 | $ echo a >> a |
|
178 | $ echo a >> a | |
173 | $ hg ci --amend -u foo -d '1 0' |
|
179 | $ hg ci --amend -u foo -d '1 0' | |
174 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
180 | saved backup bundle to $TESTTMP/.hg/strip-backup/d96b1d28ae33-677e0afb-amend.hg (glob) | |
175 | $ hg log -r . |
|
181 | $ hg log -r . | |
176 |
changeset: 1: |
|
182 | changeset: 1:a9a13940fc03 | |
177 | tag: tip |
|
183 | tag: tip | |
178 | user: foo |
|
184 | user: foo | |
179 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
185 | date: Thu Jan 01 00:00:01 1970 +0000 | |
@@ -197,8 +203,8 at first, test saving last-message.txt | |||||
197 |
|
203 | |||
198 | $ rm -f .hg/last-message.txt |
|
204 | $ rm -f .hg/last-message.txt | |
199 | $ hg commit --amend -v -m "message given from command line" |
|
205 | $ hg commit --amend -v -m "message given from command line" | |
200 |
amending changeset |
|
206 | amending changeset a9a13940fc03 | |
201 |
copying changeset |
|
207 | copying changeset a9a13940fc03 to ad120869acf0 | |
202 | committing files: |
|
208 | committing files: | |
203 | a |
|
209 | a | |
204 | committing manifest |
|
210 | committing manifest | |
@@ -213,8 +219,8 at first, test saving last-message.txt | |||||
213 |
|
219 | |||
214 | $ rm -f .hg/last-message.txt |
|
220 | $ rm -f .hg/last-message.txt | |
215 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v |
|
221 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v | |
216 |
amending changeset |
|
222 | amending changeset a9a13940fc03 | |
217 |
copying changeset |
|
223 | copying changeset a9a13940fc03 to ad120869acf0 | |
218 | no changes, new message |
|
224 | no changes, new message | |
219 |
|
225 | |||
220 |
|
226 | |||
@@ -245,8 +251,8 at first, test saving last-message.txt | |||||
245 | then, test editing custom commit message |
|
251 | then, test editing custom commit message | |
246 |
|
252 | |||
247 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v |
|
253 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v | |
248 |
amending changeset |
|
254 | amending changeset a9a13940fc03 | |
249 |
copying changeset |
|
255 | copying changeset a9a13940fc03 to ad120869acf0 | |
250 | no changes, new message |
|
256 | no changes, new message | |
251 |
|
257 | |||
252 |
|
258 | |||
@@ -264,30 +270,25 then, test editing custom commit message | |||||
264 | uncompressed size of bundle content: |
|
270 | uncompressed size of bundle content: | |
265 | 249 (changelog) |
|
271 | 249 (changelog) | |
266 | 163 (manifests) |
|
272 | 163 (manifests) | |
267 |
13 |
|
273 | 133 a | |
268 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
274 | saved backup bundle to $TESTTMP/.hg/strip-backup/a9a13940fc03-7c2e8674-amend.hg (glob) | |
269 | 1 changesets found |
|
275 | 1 changesets found | |
270 | uncompressed size of bundle content: |
|
276 | uncompressed size of bundle content: | |
271 | 257 (changelog) |
|
277 | 257 (changelog) | |
272 | 163 (manifests) |
|
278 | 163 (manifests) | |
273 |
13 |
|
279 | 133 a | |
274 | adding branch |
|
280 | adding branch | |
275 | adding changesets |
|
281 | adding changesets | |
276 | adding manifests |
|
282 | adding manifests | |
277 | adding file changes |
|
283 | adding file changes | |
278 | added 1 changesets with 1 changes to 1 files |
|
284 | added 1 changesets with 1 changes to 1 files | |
279 |
committed changeset 1: |
|
285 | committed changeset 1:64a124ba1b44 | |
280 |
|
286 | |||
281 | Same, but with changes in working dir (different code path): |
|
287 | Same, but with changes in working dir (different code path): | |
282 |
|
288 | |||
283 | $ echo a >> a |
|
289 | $ echo a >> a | |
284 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v |
|
290 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v | |
285 |
amending changeset |
|
291 | amending changeset 64a124ba1b44 | |
286 | committing files: |
|
|||
287 | a |
|
|||
288 | committing manifest |
|
|||
289 | committing changelog |
|
|||
290 | copying changeset a0ea9b1a4c8c to ad120869acf0 |
|
|||
291 | another precious commit message |
|
292 | another precious commit message | |
292 |
|
293 | |||
293 |
|
294 | |||
@@ -301,27 +302,27 Same, but with changes in working dir (d | |||||
301 | a |
|
302 | a | |
302 | committing manifest |
|
303 | committing manifest | |
303 | committing changelog |
|
304 | committing changelog | |
304 | 2 changesets found |
|
|||
305 | uncompressed size of bundle content: |
|
|||
306 | 464 (changelog) |
|
|||
307 | 322 (manifests) |
|
|||
308 | 249 a |
|
|||
309 | saved backup bundle to $TESTTMP/.hg/strip-backup/7ab3bf440b54-8e3b5088-amend.hg (glob) |
|
|||
310 | 1 changesets found |
|
305 | 1 changesets found | |
311 | uncompressed size of bundle content: |
|
306 | uncompressed size of bundle content: | |
312 | 257 (changelog) |
|
307 | 257 (changelog) | |
313 | 163 (manifests) |
|
308 | 163 (manifests) | |
314 | 133 a |
|
309 | 133 a | |
|
310 | saved backup bundle to $TESTTMP/.hg/strip-backup/64a124ba1b44-10374b8f-amend.hg (glob) | |||
|
311 | 1 changesets found | |||
|
312 | uncompressed size of bundle content: | |||
|
313 | 257 (changelog) | |||
|
314 | 163 (manifests) | |||
|
315 | 135 a | |||
315 | adding branch |
|
316 | adding branch | |
316 | adding changesets |
|
317 | adding changesets | |
317 | adding manifests |
|
318 | adding manifests | |
318 | adding file changes |
|
319 | adding file changes | |
319 | added 1 changesets with 1 changes to 1 files |
|
320 | added 1 changesets with 1 changes to 1 files | |
320 |
committed changeset 1: |
|
321 | committed changeset 1:7892795b8e38 | |
321 |
|
322 | |||
322 | $ rm editor.sh |
|
323 | $ rm editor.sh | |
323 | $ hg log -r . |
|
324 | $ hg log -r . | |
324 |
changeset: 1: |
|
325 | changeset: 1:7892795b8e38 | |
325 | tag: tip |
|
326 | tag: tip | |
326 | user: foo |
|
327 | user: foo | |
327 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
328 | date: Thu Jan 01 00:00:01 1970 +0000 | |
@@ -333,16 +334,16 Moving bookmarks, preserve active bookma | |||||
333 | $ hg book book1 |
|
334 | $ hg book book1 | |
334 | $ hg book book2 |
|
335 | $ hg book book2 | |
335 | $ hg ci --amend -m 'move bookmarks' |
|
336 | $ hg ci --amend -m 'move bookmarks' | |
336 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
337 | saved backup bundle to $TESTTMP/.hg/strip-backup/7892795b8e38-3fb46217-amend.hg (glob) | |
337 | $ hg book |
|
338 | $ hg book | |
338 |
book1 1: |
|
339 | book1 1:8311f17e2616 | |
339 |
* book2 1: |
|
340 | * book2 1:8311f17e2616 | |
340 | $ echo a >> a |
|
341 | $ echo a >> a | |
341 | $ hg ci --amend -m 'move bookmarks' |
|
342 | $ hg ci --amend -m 'move bookmarks' | |
342 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
343 | saved backup bundle to $TESTTMP/.hg/strip-backup/8311f17e2616-f0504fe3-amend.hg (glob) | |
343 | $ hg book |
|
344 | $ hg book | |
344 |
book1 1: |
|
345 | book1 1:a3b65065808c | |
345 |
* book2 1: |
|
346 | * book2 1:a3b65065808c | |
346 |
|
347 | |||
347 | abort does not loose bookmarks |
|
348 | abort does not loose bookmarks | |
348 |
|
349 | |||
@@ -352,13 +353,11 abort does not loose bookmarks | |||||
352 | > __EOF__ |
|
353 | > __EOF__ | |
353 | $ echo a >> a |
|
354 | $ echo a >> a | |
354 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend |
|
355 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend | |
355 | transaction abort! |
|
|||
356 | rollback completed |
|
|||
357 | abort: empty commit message |
|
356 | abort: empty commit message | |
358 | [255] |
|
357 | [255] | |
359 | $ hg book |
|
358 | $ hg book | |
360 |
book1 1: |
|
359 | book1 1:a3b65065808c | |
361 |
* book2 1: |
|
360 | * book2 1:a3b65065808c | |
362 | $ hg revert -Caq |
|
361 | $ hg revert -Caq | |
363 | $ rm editor.sh |
|
362 | $ rm editor.sh | |
364 |
|
363 | |||
@@ -375,9 +374,9 Moving branches: | |||||
375 | $ hg branch default -f |
|
374 | $ hg branch default -f | |
376 | marked working directory as branch default |
|
375 | marked working directory as branch default | |
377 | $ hg ci --amend -m 'back to default' |
|
376 | $ hg ci --amend -m 'back to default' | |
378 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
377 | saved backup bundle to $TESTTMP/.hg/strip-backup/f8339a38efe1-c18453c9-amend.hg (glob) | |
379 | $ hg branches |
|
378 | $ hg branches | |
380 |
default 2: |
|
379 | default 2:9c07515f2650 | |
381 |
|
380 | |||
382 | Close branch: |
|
381 | Close branch: | |
383 |
|
382 | |||
@@ -391,7 +390,7 Close branch: | |||||
391 | $ echo b >> b |
|
390 | $ echo b >> b | |
392 | $ hg ci -mb |
|
391 | $ hg ci -mb | |
393 | $ hg ci --amend --close-branch -m 'closing branch foo' |
|
392 | $ hg ci --amend --close-branch -m 'closing branch foo' | |
394 |
saved backup bundle to $TESTTMP/.hg/strip-backup/c962248fa264- |
|
393 | saved backup bundle to $TESTTMP/.hg/strip-backup/c962248fa264-54245dc7-amend.hg (glob) | |
395 |
|
394 | |||
396 | Same thing, different code path: |
|
395 | Same thing, different code path: | |
397 |
|
396 | |||
@@ -400,9 +399,9 Same thing, different code path: | |||||
400 | reopening closed branch head 4 |
|
399 | reopening closed branch head 4 | |
401 | $ echo b >> b |
|
400 | $ echo b >> b | |
402 | $ hg ci --amend --close-branch |
|
401 | $ hg ci --amend --close-branch | |
403 |
saved backup bundle to $TESTTMP/.hg/strip-backup/027371728205- |
|
402 | saved backup bundle to $TESTTMP/.hg/strip-backup/027371728205-b900d9fa-amend.hg (glob) | |
404 | $ hg branches |
|
403 | $ hg branches | |
405 |
default 2: |
|
404 | default 2:9c07515f2650 | |
406 |
|
405 | |||
407 | Refuse to amend during a merge: |
|
406 | Refuse to amend during a merge: | |
408 |
|
407 | |||
@@ -421,7 +420,7 Follow copies/renames: | |||||
421 | $ hg ci -m 'b -> c' |
|
420 | $ hg ci -m 'b -> c' | |
422 | $ hg mv c d |
|
421 | $ hg mv c d | |
423 | $ hg ci --amend -m 'b -> d' |
|
422 | $ hg ci --amend -m 'b -> d' | |
424 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
423 | saved backup bundle to $TESTTMP/.hg/strip-backup/42f3f27a067d-f23cc9f7-amend.hg (glob) | |
425 | $ hg st --rev '.^' --copies d |
|
424 | $ hg st --rev '.^' --copies d | |
426 | A d |
|
425 | A d | |
427 | b |
|
426 | b | |
@@ -429,7 +428,7 Follow copies/renames: | |||||
429 | $ hg ci -m 'e = d' |
|
428 | $ hg ci -m 'e = d' | |
430 | $ hg cp e f |
|
429 | $ hg cp e f | |
431 | $ hg ci --amend -m 'f = d' |
|
430 | $ hg ci --amend -m 'f = d' | |
432 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
431 | saved backup bundle to $TESTTMP/.hg/strip-backup/9198f73182d5-251d584a-amend.hg (glob) | |
433 | $ hg st --rev '.^' --copies f |
|
432 | $ hg st --rev '.^' --copies f | |
434 | A f |
|
433 | A f | |
435 | d |
|
434 | d | |
@@ -440,7 +439,7 Follow copies/renames: | |||||
440 | $ hg cp a f |
|
439 | $ hg cp a f | |
441 | $ mv f.orig f |
|
440 | $ mv f.orig f | |
442 | $ hg ci --amend -m replacef |
|
441 | $ hg ci --amend -m replacef | |
443 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
442 | saved backup bundle to $TESTTMP/.hg/strip-backup/f0993ab6b482-eda301bf-amend.hg (glob) | |
444 | $ hg st --change . --copies |
|
443 | $ hg st --change . --copies | |
445 | $ hg log -r . --template "{file_copies}\n" |
|
444 | $ hg log -r . --template "{file_copies}\n" | |
446 |
|
445 | |||
@@ -452,7 +451,7 Move added file (issue3410): | |||||
452 | adding g |
|
451 | adding g | |
453 | $ hg mv g h |
|
452 | $ hg mv g h | |
454 | $ hg ci --amend |
|
453 | $ hg ci --amend | |
455 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
454 | saved backup bundle to $TESTTMP/.hg/strip-backup/58585e3f095c-0f5ebcda-amend.hg (glob) | |
456 | $ hg st --change . --copies h |
|
455 | $ hg st --change . --copies h | |
457 | A h |
|
456 | A h | |
458 | $ hg log -r . --template "{file_copies}\n" |
|
457 | $ hg log -r . --template "{file_copies}\n" | |
@@ -472,11 +471,11 Preserve extra dict (issue3430): | |||||
472 | $ echo a >> a |
|
471 | $ echo a >> a | |
473 | $ hg ci -ma |
|
472 | $ hg ci -ma | |
474 | $ hg ci --amend -m "a'" |
|
473 | $ hg ci --amend -m "a'" | |
475 |
saved backup bundle to $TESTTMP/.hg/strip-backup/3 |
|
474 | saved backup bundle to $TESTTMP/.hg/strip-backup/39a162f1d65e-9dfe13d8-amend.hg (glob) | |
476 | $ hg log -r . --template "{branch}\n" |
|
475 | $ hg log -r . --template "{branch}\n" | |
477 | a |
|
476 | a | |
478 | $ hg ci --amend -m "a''" |
|
477 | $ hg ci --amend -m "a''" | |
479 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
478 | saved backup bundle to $TESTTMP/.hg/strip-backup/d5ca7b1ac72b-0b4c1a34-amend.hg (glob) | |
480 | $ hg log -r . --template "{branch}\n" |
|
479 | $ hg log -r . --template "{branch}\n" | |
481 | a |
|
480 | a | |
482 |
|
481 | |||
@@ -493,9 +492,9 first graft something so there's an addi | |||||
493 | $ hg graft 12 |
|
492 | $ hg graft 12 | |
494 | grafting 12:2647734878ef "fork" (tip) |
|
493 | grafting 12:2647734878ef "fork" (tip) | |
495 | $ hg ci --amend -m 'graft amend' |
|
494 | $ hg ci --amend -m 'graft amend' | |
496 |
saved backup bundle to $TESTTMP/.hg/strip-backup/ |
|
495 | saved backup bundle to $TESTTMP/.hg/strip-backup/fe8c6f7957ca-25638666-amend.hg (glob) | |
497 | $ hg log -r . --debug | grep extra |
|
496 | $ hg log -r . --debug | grep extra | |
498 | extra: amend_source=bd010aea3f39f3fb2a2f884b9ccb0471cd77398e |
|
497 | extra: amend_source=fe8c6f7957ca1665ed77496ed7a07657d469ac60 | |
499 | extra: branch=a |
|
498 | extra: branch=a | |
500 | extra: source=2647734878ef0236dda712fae9c1651cf694ea8a |
|
499 | extra: source=2647734878ef0236dda712fae9c1651cf694ea8a | |
501 |
|
500 | |||
@@ -531,26 +530,26 Amend with no files changes | |||||
531 | $ hg id -n |
|
530 | $ hg id -n | |
532 | 14 |
|
531 | 14 | |
533 | $ hg log -Gl 3 --style=compact |
|
532 | $ hg log -Gl 3 --style=compact | |
534 |
@ 14[tip]:11 |
|
533 | @ 14[tip]:11 682950e85999 1970-01-01 00:00 +0000 test | |
535 | | babar |
|
534 | | babar | |
536 | | |
|
535 | | | |
537 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test |
|
536 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test | |
538 | | | fork |
|
537 | | | fork | |
539 | | ~ |
|
538 | | ~ | |
540 |
o 11 |
|
539 | o 11 0ddb275cfad1 1970-01-01 00:00 +0000 test | |
541 | | a'' |
|
540 | | a'' | |
542 | ~ |
|
541 | ~ | |
543 | $ hg log -Gl 4 --hidden --style=compact |
|
542 | $ hg log -Gl 4 --hidden --style=compact | |
544 |
@ 14[tip]:11 |
|
543 | @ 14[tip]:11 682950e85999 1970-01-01 00:00 +0000 test | |
545 | | babar |
|
544 | | babar | |
546 | | |
|
545 | | | |
547 |
| x 13:11 |
|
546 | | x 13:11 5167600b0f7a 1970-01-01 00:00 +0000 test | |
548 | |/ amend for phase |
|
547 | |/ amend for phase | |
549 | | |
|
548 | | | |
550 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test |
|
549 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test | |
551 | | | fork |
|
550 | | | fork | |
552 | | ~ |
|
551 | | ~ | |
553 |
o 11 |
|
552 | o 11 0ddb275cfad1 1970-01-01 00:00 +0000 test | |
554 | | a'' |
|
553 | | a'' | |
555 | ~ |
|
554 | ~ | |
556 |
|
555 | |||
@@ -562,23 +561,23 ride of) | |||||
562 | $ echo 'babar' >> a |
|
561 | $ echo 'babar' >> a | |
563 | $ hg commit --amend |
|
562 | $ hg commit --amend | |
564 | $ hg log -Gl 6 --hidden --style=compact |
|
563 | $ hg log -Gl 6 --hidden --style=compact | |
565 |
@ 1 |
|
564 | @ 15[tip]:11 a5b42b49b0d5 1970-01-01 00:00 +0000 test | |
566 | | babar |
|
565 | | babar | |
567 | | |
|
566 | | | |
568 |
| x 1 |
|
567 | | x 14:11 682950e85999 1970-01-01 00:00 +0000 test | |
569 | | | temporary amend commit for b650e6ee8614 |
|
|||
570 | | | |
|
|||
571 | | x 14:11 b650e6ee8614 1970-01-01 00:00 +0000 test |
|
|||
572 | |/ babar |
|
568 | |/ babar | |
573 | | |
|
569 | | | |
574 |
| x 13:11 |
|
570 | | x 13:11 5167600b0f7a 1970-01-01 00:00 +0000 test | |
575 | |/ amend for phase |
|
571 | |/ amend for phase | |
576 | | |
|
572 | | | |
577 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test |
|
573 | | o 12:0 2647734878ef 1970-01-01 00:00 +0000 test | |
578 | | | fork |
|
574 | | | fork | |
579 | | ~ |
|
575 | | ~ | |
580 |
o 11 |
|
576 | o 11 0ddb275cfad1 1970-01-01 00:00 +0000 test | |
581 | | a'' |
|
577 | | a'' | |
|
578 | | | |||
|
579 | o 10 5fa75032e226 1970-01-01 00:00 +0000 test | |||
|
580 | | g | |||
582 | ~ |
|
581 | ~ | |
583 |
|
582 | |||
584 |
|
583 | |||
@@ -586,12 +585,12 Test that amend does not make it easy to | |||||
586 | --------------------------------------------------------------------- |
|
585 | --------------------------------------------------------------------- | |
587 |
|
586 | |||
588 | $ hg id -r 14 --hidden |
|
587 | $ hg id -r 14 --hidden | |
589 |
|
|
588 | 682950e85999 (a) | |
590 | $ hg revert -ar 14 --hidden |
|
589 | $ hg revert -ar 14 --hidden | |
591 | reverting a |
|
590 | reverting a | |
592 | $ hg commit --amend |
|
591 | $ hg commit --amend | |
593 | $ hg id |
|
592 | $ hg id | |
594 | b99e5df575f7 (a) tip |
|
593 | 37973c7e0b61 (a) tip | |
595 |
|
594 | |||
596 | Test that rewriting leaving instability behind is allowed |
|
595 | Test that rewriting leaving instability behind is allowed | |
597 | --------------------------------------------------------------------- |
|
596 | --------------------------------------------------------------------- | |
@@ -600,14 +599,14 Test that rewriting leaving instability | |||||
600 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
599 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
601 | $ echo 'b' >> a |
|
600 | $ echo 'b' >> a | |
602 | $ hg log --style compact -r 'children(.)' |
|
601 | $ hg log --style compact -r 'children(.)' | |
603 |
1 |
|
602 | 16[tip]:11 37973c7e0b61 1970-01-01 00:00 +0000 test | |
604 | babar |
|
603 | babar | |
605 |
|
604 | |||
606 | $ hg commit --amend |
|
605 | $ hg commit --amend | |
607 | $ hg log -r 'orphan()' |
|
606 | $ hg log -r 'orphan()' | |
608 |
changeset: 1 |
|
607 | changeset: 16:37973c7e0b61 | |
609 | branch: a |
|
608 | branch: a | |
610 |
parent: 11: |
|
609 | parent: 11:0ddb275cfad1 | |
611 | user: test |
|
610 | user: test | |
612 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
611 | date: Thu Jan 01 00:00:00 1970 +0000 | |
613 | instability: orphan |
|
612 | instability: orphan | |
@@ -635,10 +634,10 Amend a merge changeset (with renames an | |||||
635 | (no more unresolved files) |
|
634 | (no more unresolved files) | |
636 | $ hg ci -m 'merge bar' |
|
635 | $ hg ci -m 'merge bar' | |
637 | $ hg log --config diff.git=1 -pr . |
|
636 | $ hg log --config diff.git=1 -pr . | |
638 |
changeset: 2 |
|
637 | changeset: 20:163cfd7219f7 | |
639 | tag: tip |
|
638 | tag: tip | |
640 |
parent: |
|
639 | parent: 19:30d96aeaf27b | |
641 |
parent: |
|
640 | parent: 18:1aa437659d19 | |
642 | user: test |
|
641 | user: test | |
643 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
642 | date: Thu Jan 01 00:00:00 1970 +0000 | |
644 | summary: merge bar |
|
643 | summary: merge bar | |
@@ -668,10 +667,10 Amend a merge changeset (with renames an | |||||
668 | $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -m 'merge bar (amend message)' --edit |
|
667 | $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -m 'merge bar (amend message)' --edit | |
669 | HGEDITFORM=commit.amend.merge |
|
668 | HGEDITFORM=commit.amend.merge | |
670 | $ hg log --config diff.git=1 -pr . |
|
669 | $ hg log --config diff.git=1 -pr . | |
671 |
changeset: 2 |
|
670 | changeset: 21:bca52d4ed186 | |
672 | tag: tip |
|
671 | tag: tip | |
673 |
parent: |
|
672 | parent: 19:30d96aeaf27b | |
674 |
parent: |
|
673 | parent: 18:1aa437659d19 | |
675 | user: test |
|
674 | user: test | |
676 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
675 | date: Thu Jan 01 00:00:00 1970 +0000 | |
677 | summary: merge bar (amend message) |
|
676 | summary: merge bar (amend message) | |
@@ -701,10 +700,10 Amend a merge changeset (with renames an | |||||
701 | $ hg mv zz z |
|
700 | $ hg mv zz z | |
702 | $ hg ci --amend -m 'merge bar (undo rename)' |
|
701 | $ hg ci --amend -m 'merge bar (undo rename)' | |
703 | $ hg log --config diff.git=1 -pr . |
|
702 | $ hg log --config diff.git=1 -pr . | |
704 |
changeset: 2 |
|
703 | changeset: 22:12594a98ca3f | |
705 | tag: tip |
|
704 | tag: tip | |
706 |
parent: |
|
705 | parent: 19:30d96aeaf27b | |
707 |
parent: |
|
706 | parent: 18:1aa437659d19 | |
708 | user: test |
|
707 | user: test | |
709 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
708 | date: Thu Jan 01 00:00:00 1970 +0000 | |
710 | summary: merge bar (undo rename) |
|
709 | summary: merge bar (undo rename) | |
@@ -737,10 +736,10 Amend a merge changeset (with renames du | |||||
737 | $ echo aa >> aaa |
|
736 | $ echo aa >> aaa | |
738 | $ hg ci -m 'merge bar again' |
|
737 | $ hg ci -m 'merge bar again' | |
739 | $ hg log --config diff.git=1 -pr . |
|
738 | $ hg log --config diff.git=1 -pr . | |
740 |
changeset: 2 |
|
739 | changeset: 24:dffde028b388 | |
741 | tag: tip |
|
740 | tag: tip | |
742 |
parent: 2 |
|
741 | parent: 22:12594a98ca3f | |
743 |
parent: 2 |
|
742 | parent: 23:4c94d5bc65f5 | |
744 | user: test |
|
743 | user: test | |
745 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
744 | date: Thu Jan 01 00:00:00 1970 +0000 | |
746 | summary: merge bar again |
|
745 | summary: merge bar again | |
@@ -772,10 +771,10 Amend a merge changeset (with renames du | |||||
772 | $ hg mv aaa aa |
|
771 | $ hg mv aaa aa | |
773 | $ hg ci --amend -m 'merge bar again (undo rename)' |
|
772 | $ hg ci --amend -m 'merge bar again (undo rename)' | |
774 | $ hg log --config diff.git=1 -pr . |
|
773 | $ hg log --config diff.git=1 -pr . | |
775 |
changeset: |
|
774 | changeset: 25:18e3ba160489 | |
776 | tag: tip |
|
775 | tag: tip | |
777 |
parent: 2 |
|
776 | parent: 22:12594a98ca3f | |
778 |
parent: 2 |
|
777 | parent: 23:4c94d5bc65f5 | |
779 | user: test |
|
778 | user: test | |
780 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
779 | date: Thu Jan 01 00:00:00 1970 +0000 | |
781 | summary: merge bar again (undo rename) |
|
780 | summary: merge bar again (undo rename) | |
@@ -814,10 +813,10 Amend a merge changeset (with manifest-l | |||||
814 | use (c)hanged version, (d)elete, or leave (u)nresolved? c |
|
813 | use (c)hanged version, (d)elete, or leave (u)nresolved? c | |
815 | $ hg ci -m 'merge bar (with conflicts)' |
|
814 | $ hg ci -m 'merge bar (with conflicts)' | |
816 | $ hg log --config diff.git=1 -pr . |
|
815 | $ hg log --config diff.git=1 -pr . | |
817 |
changeset: |
|
816 | changeset: 28:b4c3035e2544 | |
818 | tag: tip |
|
817 | tag: tip | |
819 |
parent: |
|
818 | parent: 27:4b216ca5ba97 | |
820 |
parent: |
|
819 | parent: 26:67db8847a540 | |
821 | user: test |
|
820 | user: test | |
822 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
821 | date: Thu Jan 01 00:00:00 1970 +0000 | |
823 | summary: merge bar (with conflicts) |
|
822 | summary: merge bar (with conflicts) | |
@@ -826,10 +825,10 Amend a merge changeset (with manifest-l | |||||
826 | $ hg rm aa |
|
825 | $ hg rm aa | |
827 | $ hg ci --amend -m 'merge bar (with conflicts, amended)' |
|
826 | $ hg ci --amend -m 'merge bar (with conflicts, amended)' | |
828 | $ hg log --config diff.git=1 -pr . |
|
827 | $ hg log --config diff.git=1 -pr . | |
829 |
changeset: |
|
828 | changeset: 29:1205ed810051 | |
830 | tag: tip |
|
829 | tag: tip | |
831 |
parent: |
|
830 | parent: 27:4b216ca5ba97 | |
832 |
parent: |
|
831 | parent: 26:67db8847a540 | |
833 | user: test |
|
832 | user: test | |
834 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
833 | date: Thu Jan 01 00:00:00 1970 +0000 | |
835 | summary: merge bar (with conflicts, amended) |
|
834 | summary: merge bar (with conflicts, amended) | |
@@ -870,12 +869,12 Test that amend with --secret creates ne | |||||
870 | --------------------------------------------------------------------- |
|
869 | --------------------------------------------------------------------- | |
871 |
|
870 | |||
872 | $ hg phase '.^::.' |
|
871 | $ hg phase '.^::.' | |
873 |
|
|
872 | 29: draft | |
874 |
3 |
|
873 | 30: draft | |
875 | $ hg commit --amend --secret -m 'amend as secret' -q |
|
874 | $ hg commit --amend --secret -m 'amend as secret' -q | |
876 | $ hg phase '.^::.' |
|
875 | $ hg phase '.^::.' | |
877 |
|
|
876 | 29: draft | |
878 |
3 |
|
877 | 31: secret | |
879 |
|
878 | |||
880 | Test that amend with --edit invokes editor forcibly |
|
879 | Test that amend with --edit invokes editor forcibly | |
881 | --------------------------------------------------- |
|
880 | --------------------------------------------------- | |
@@ -1065,12 +1064,12 in the file revlog topology and the chan | |||||
1065 | o 0 a0 |
|
1064 | o 0 a0 | |
1066 |
|
1065 | |||
1067 |
|
1066 | |||
1068 |
The way mercurial does amends is |
|
1067 | The way mercurial does amends is by folding the working copy and old commit | |
1069 |
|
|
1068 | together into another commit (rev 3). During this process, _findlimit is called | |
1070 |
|
|
1069 | to check how far back to look for the transitive closure of file copy | |
1071 |
|
|
1070 | information, but due to the divergence of the filelog and changelog graph | |
1072 |
|
|
1071 | topologies, before _findlimit was fixed, it returned a rev which was not far | |
1073 |
|
|
1072 | enough back in this case. | |
1074 | $ hg mv a1 a2 |
|
1073 | $ hg mv a1 a2 | |
1075 | $ hg status --copies --rev 0 |
|
1074 | $ hg status --copies --rev 0 | |
1076 | A a2 |
|
1075 | A a2 | |
@@ -1078,7 +1077,7 which was not far enough back in this ca | |||||
1078 | R a0 |
|
1077 | R a0 | |
1079 | $ hg ci --amend -q |
|
1078 | $ hg ci --amend -q | |
1080 | $ hg log -G --template '{rev} {desc}' |
|
1079 | $ hg log -G --template '{rev} {desc}' | |
1081 |
@ |
|
1080 | @ 3 a1-amend | |
1082 | | |
|
1081 | | | |
1083 | | o 1 a1 |
|
1082 | | o 1 a1 | |
1084 | |/ |
|
1083 | |/ | |
@@ -1161,10 +1160,10 Test if amend preserves executable bit c | |||||
1161 | $ hg ci --amend -m "chmod amended" |
|
1160 | $ hg ci --amend -m "chmod amended" | |
1162 | $ hg ci --amend -m "chmod amended second time" |
|
1161 | $ hg ci --amend -m "chmod amended second time" | |
1163 | $ hg log -p --git -r . |
|
1162 | $ hg log -p --git -r . | |
1164 |
changeset: |
|
1163 | changeset: 7:b1326f52dddf | |
1165 | branch: newdirname |
|
1164 | branch: newdirname | |
1166 | tag: tip |
|
1165 | tag: tip | |
1167 |
parent: |
|
1166 | parent: 4:7fd235f7cb2f | |
1168 | user: test |
|
1167 | user: test | |
1169 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1168 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1170 | summary: chmod amended second time |
|
1169 | summary: chmod amended second time |
@@ -206,7 +206,7 Amend option works | |||||
206 | > X |
|
206 | > X | |
207 | > EOF |
|
207 | > EOF | |
208 | $ hg commit -i -m "newly added file" -d "0 0" |
|
208 | $ hg commit -i -m "newly added file" -d "0 0" | |
209 |
saved backup bundle to $TESTTMP/a/.hg/strip-backup/2b0e9be4d336- |
|
209 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/2b0e9be4d336-3cf0bc8c-amend.hg (glob) | |
210 | $ hg diff -c . |
|
210 | $ hg diff -c . | |
211 | diff -r a6735021574d -r c1d239d165ae x |
|
211 | diff -r a6735021574d -r c1d239d165ae x | |
212 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
212 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
@@ -43,23 +43,22 Test that histedit learns about obsolesc | |||||
43 | $ hg commit --amend b |
|
43 | $ hg commit --amend b | |
44 | $ hg histedit --continue |
|
44 | $ hg histedit --continue | |
45 | $ hg log -G |
|
45 | $ hg log -G | |
46 |
@ |
|
46 | @ 5:46abc7c4d873 b | |
47 | | |
|
47 | | | |
48 |
o |
|
48 | o 4:49d44ab2be1b c | |
49 | | |
|
49 | | | |
50 | o 0:cb9a9f314b8b a |
|
50 | o 0:cb9a9f314b8b a | |
51 |
|
51 | |||
52 | $ hg debugobsolete |
|
52 | $ hg debugobsolete | |
53 | e72d22b19f8ecf4150ab4f91d0973fd9955d3ddf 49d44ab2be1b67a79127568a67c9c99430633b48 0 (*) {'user': 'test'} (glob) |
|
53 | e72d22b19f8ecf4150ab4f91d0973fd9955d3ddf 49d44ab2be1b67a79127568a67c9c99430633b48 0 (*) {'user': 'test'} (glob) | |
54 | 3e30a45cf2f719e96ab3922dfe039cfd047956ce 0 {e72d22b19f8ecf4150ab4f91d0973fd9955d3ddf} (*) {'user': 'test'} (glob) |
|
|||
55 | 1b2d564fad96311b45362f17c2aa855150efb35f 46abc7c4d8738e8563e577f7889e1b6db3da4199 0 (*) {'user': 'test'} (glob) |
|
54 | 1b2d564fad96311b45362f17c2aa855150efb35f 46abc7c4d8738e8563e577f7889e1b6db3da4199 0 (*) {'user': 'test'} (glob) | |
56 | 114f4176969ef342759a8a57e6bccefc4234829b 49d44ab2be1b67a79127568a67c9c99430633b48 0 (*) {'user': 'test'} (glob) |
|
55 | 114f4176969ef342759a8a57e6bccefc4234829b 49d44ab2be1b67a79127568a67c9c99430633b48 0 (*) {'user': 'test'} (glob) | |
57 |
|
56 | |||
58 | With some node gone missing during the edit. |
|
57 | With some node gone missing during the edit. | |
59 |
|
58 | |||
60 | $ echo "pick `hg log -r 0 -T '{node|short}'`" > plan |
|
59 | $ echo "pick `hg log -r 0 -T '{node|short}'`" > plan | |
61 |
$ echo "pick `hg log -r |
|
60 | $ echo "pick `hg log -r 5 -T '{node|short}'`" >> plan | |
62 |
$ echo "edit `hg log -r |
|
61 | $ echo "edit `hg log -r 4 -T '{node|short}'`" >> plan | |
63 | $ hg histedit -r 'all()' --commands plan |
|
62 | $ hg histedit -r 'all()' --commands plan | |
64 | Editing (49d44ab2be1b), you may commit or record as needed now. |
|
63 | Editing (49d44ab2be1b), you may commit or record as needed now. | |
65 | (hg histedit --continue to resume) |
|
64 | (hg histedit --continue to resume) | |
@@ -73,15 +72,14 With some node gone missing during the e | |||||
73 | $ hg --hidden --config extensions.strip= strip 'desc(XXXXXX)' --no-backup |
|
72 | $ hg --hidden --config extensions.strip= strip 'desc(XXXXXX)' --no-backup | |
74 | $ hg histedit --continue |
|
73 | $ hg histedit --continue | |
75 | $ hg log -G |
|
74 | $ hg log -G | |
76 |
@ |
|
75 | @ 8:273c1f3b8626 c | |
77 | | |
|
76 | | | |
78 |
o |
|
77 | o 7:aba7da937030 b2 | |
79 | | |
|
78 | | | |
80 | o 0:cb9a9f314b8b a |
|
79 | o 0:cb9a9f314b8b a | |
81 |
|
80 | |||
82 | $ hg debugobsolete |
|
81 | $ hg debugobsolete | |
83 | e72d22b19f8ecf4150ab4f91d0973fd9955d3ddf 49d44ab2be1b67a79127568a67c9c99430633b48 0 (*) {'user': 'test'} (glob) |
|
82 | e72d22b19f8ecf4150ab4f91d0973fd9955d3ddf 49d44ab2be1b67a79127568a67c9c99430633b48 0 (*) {'user': 'test'} (glob) | |
84 | 3e30a45cf2f719e96ab3922dfe039cfd047956ce 0 {e72d22b19f8ecf4150ab4f91d0973fd9955d3ddf} (*) {'user': 'test'} (glob) |
|
|||
85 | 1b2d564fad96311b45362f17c2aa855150efb35f 46abc7c4d8738e8563e577f7889e1b6db3da4199 0 (*) {'user': 'test'} (glob) |
|
83 | 1b2d564fad96311b45362f17c2aa855150efb35f 46abc7c4d8738e8563e577f7889e1b6db3da4199 0 (*) {'user': 'test'} (glob) | |
86 | 114f4176969ef342759a8a57e6bccefc4234829b 49d44ab2be1b67a79127568a67c9c99430633b48 0 (*) {'user': 'test'} (glob) |
|
84 | 114f4176969ef342759a8a57e6bccefc4234829b 49d44ab2be1b67a79127568a67c9c99430633b48 0 (*) {'user': 'test'} (glob) | |
87 | 76f72745eac0643d16530e56e2f86e36e40631f1 2ca853e48edbd6453a0674dc0fe28a0974c51b9c 0 (*) {'user': 'test'} (glob) |
|
85 | 76f72745eac0643d16530e56e2f86e36e40631f1 2ca853e48edbd6453a0674dc0fe28a0974c51b9c 0 (*) {'user': 'test'} (glob) |
@@ -2300,14 +2300,14 Even when the file revision is missing f | |||||
2300 | $ hg up 'head() and not .' |
|
2300 | $ hg up 'head() and not .' | |
2301 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
2301 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
2302 | $ hg log -G |
|
2302 | $ hg log -G | |
2303 |
o changeset: |
|
2303 | o changeset: 3:db815d6d32e6 | |
2304 | | tag: tip |
|
2304 | | tag: tip | |
2305 | | parent: 0:f7b1eb17ad24 |
|
2305 | | parent: 0:f7b1eb17ad24 | |
2306 | | user: test |
|
2306 | | user: test | |
2307 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2307 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2308 | | summary: 2 |
|
2308 | | summary: 2 | |
2309 | | |
|
2309 | | | |
2310 |
| @ changeset: |
|
2310 | | @ changeset: 2:9bc8ce7f9356 | |
2311 | |/ parent: 0:f7b1eb17ad24 |
|
2311 | |/ parent: 0:f7b1eb17ad24 | |
2312 | | user: test |
|
2312 | | user: test | |
2313 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2313 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
@@ -2319,14 +2319,14 Even when the file revision is missing f | |||||
2319 | summary: 0 |
|
2319 | summary: 0 | |
2320 |
|
2320 | |||
2321 | $ hg log -f -G b |
|
2321 | $ hg log -f -G b | |
2322 |
@ changeset: |
|
2322 | @ changeset: 2:9bc8ce7f9356 | |
2323 | | parent: 0:f7b1eb17ad24 |
|
2323 | | parent: 0:f7b1eb17ad24 | |
2324 | ~ user: test |
|
2324 | ~ user: test | |
2325 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2325 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2326 | summary: 1 |
|
2326 | summary: 1 | |
2327 |
|
2327 | |||
2328 | $ hg log -G b |
|
2328 | $ hg log -G b | |
2329 |
@ changeset: |
|
2329 | @ changeset: 2:9bc8ce7f9356 | |
2330 | | parent: 0:f7b1eb17ad24 |
|
2330 | | parent: 0:f7b1eb17ad24 | |
2331 | ~ user: test |
|
2331 | ~ user: test | |
2332 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2332 | date: Thu Jan 01 00:00:00 1970 +0000 |
@@ -45,24 +45,19 Test setup | |||||
45 | $ HGUSER=test2 hg commit --amend -m "A2" --config devel.default-date="987654321 0" |
|
45 | $ HGUSER=test2 hg commit --amend -m "A2" --config devel.default-date="987654321 0" | |
46 |
|
46 | |||
47 | $ hg log --hidden -G |
|
47 | $ hg log --hidden -G | |
48 |
@ changeset: |
|
48 | @ changeset: 3:d004c8f274b9 | |
49 | | tag: tip |
|
49 | | tag: tip | |
50 | | parent: 0:ea207398892e |
|
50 | | parent: 0:ea207398892e | |
51 | | user: test |
|
51 | | user: test | |
52 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
52 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
53 | | summary: A2 |
|
53 | | summary: A2 | |
54 | | |
|
54 | | | |
55 |
| x changeset: |
|
55 | | x changeset: 2:a468dc9b3633 | |
56 | |/ parent: 0:ea207398892e |
|
56 | |/ parent: 0:ea207398892e | |
57 | | user: test |
|
57 | | user: test | |
58 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
58 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
59 | | summary: A1 |
|
59 | | summary: A1 | |
60 | | |
|
60 | | | |
61 | | x changeset: 2:f137d23bb3e1 |
|
|||
62 | | | user: test |
|
|||
63 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
|||
64 | | | summary: temporary amend commit for 471f378eab4c |
|
|||
65 | | | |
|
|||
66 | | x changeset: 1:471f378eab4c |
|
61 | | x changeset: 1:471f378eab4c | |
67 | |/ user: test |
|
62 | |/ user: test | |
68 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
63 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
@@ -86,8 +81,8 Predecessors template should show curren | |||||
86 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
81 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] | |
87 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
82 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
88 | | @ 471f378eab4c |
|
83 | | @ 471f378eab4c | |
89 |
|/ Successors: |
|
84 | |/ Successors: 3:d004c8f274b9 | |
90 |
| multi-line: |
|
85 | | multi-line: 3:d004c8f274b9 | |
91 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] |
|
86 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] | |
92 | o ea207398892e |
|
87 | o ea207398892e | |
93 |
|
88 | |||
@@ -95,21 +90,21 Predecessors template should show curren | |||||
95 | o d004c8f274b9 |
|
90 | o d004c8f274b9 | |
96 | | |
|
91 | | | |
97 | | @ 471f378eab4c |
|
92 | | @ 471f378eab4c | |
98 |
|/ Obsfate: rewritten as |
|
93 | |/ Obsfate: rewritten as 3:d004c8f274b9 by test1, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000); | |
99 | o ea207398892e |
|
94 | o ea207398892e | |
100 |
|
95 | |||
101 | $ hg fatelog |
|
96 | $ hg fatelog | |
102 | o d004c8f274b9 |
|
97 | o d004c8f274b9 | |
103 | | |
|
98 | | | |
104 | | @ 471f378eab4c |
|
99 | | @ 471f378eab4c | |
105 |
|/ Obsfate: rewritten as |
|
100 | |/ Obsfate: rewritten as 3:d004c8f274b9 by test1, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000); | |
106 | o ea207398892e |
|
101 | o ea207398892e | |
107 |
|
102 | |||
108 | $ hg fatelog -v |
|
103 | $ hg fatelog -v | |
109 | o d004c8f274b9 |
|
104 | o d004c8f274b9 | |
110 | | |
|
105 | | | |
111 | | @ 471f378eab4c |
|
106 | | @ 471f378eab4c | |
112 |
|/ Obsfate: rewritten as |
|
107 | |/ Obsfate: rewritten as 3:d004c8f274b9 by test1, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000); | |
113 | o ea207398892e |
|
108 | o ea207398892e | |
114 |
|
109 | |||
115 | $ hg up 'desc(A1)' --hidden |
|
110 | $ hg up 'desc(A1)' --hidden | |
@@ -118,13 +113,13 Predecessors template should show curren | |||||
118 | Predecessors template should show current revision as it is the working copy |
|
113 | Predecessors template should show current revision as it is the working copy | |
119 | $ hg tlog |
|
114 | $ hg tlog | |
120 | o d004c8f274b9 |
|
115 | o d004c8f274b9 | |
121 |
| Predecessors: |
|
116 | | Predecessors: 2:a468dc9b3633 | |
122 |
| semi-colon: |
|
117 | | semi-colon: 2:a468dc9b3633 | |
123 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] |
|
118 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] | |
124 |
| map: |
|
119 | | map: 2:a468dc9b36338b14fdb7825f55ce3df4e71517ad | |
125 | | @ a468dc9b3633 |
|
120 | | @ a468dc9b3633 | |
126 |
|/ Successors: |
|
121 | |/ Successors: 3:d004c8f274b9 | |
127 |
| multi-line: |
|
122 | | multi-line: 3:d004c8f274b9 | |
128 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] |
|
123 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] | |
129 | o ea207398892e |
|
124 | o ea207398892e | |
130 |
|
125 | |||
@@ -132,30 +127,28 Predecessors template should show curren | |||||
132 | o d004c8f274b9 |
|
127 | o d004c8f274b9 | |
133 | | |
|
128 | | | |
134 | | @ a468dc9b3633 |
|
129 | | @ a468dc9b3633 | |
135 |
|/ Obsfate: rewritten as |
|
130 | |/ Obsfate: rewritten as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); | |
136 | o ea207398892e |
|
131 | o ea207398892e | |
137 |
|
132 | |||
138 | Predecessors template should show all the predecessors as we force their display |
|
133 | Predecessors template should show all the predecessors as we force their display | |
139 | with --hidden |
|
134 | with --hidden | |
140 | $ hg tlog --hidden |
|
135 | $ hg tlog --hidden | |
141 | o d004c8f274b9 |
|
136 | o d004c8f274b9 | |
142 |
| Predecessors: |
|
137 | | Predecessors: 2:a468dc9b3633 | |
143 |
| semi-colon: |
|
138 | | semi-colon: 2:a468dc9b3633 | |
144 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] |
|
139 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] | |
145 |
| map: |
|
140 | | map: 2:a468dc9b36338b14fdb7825f55ce3df4e71517ad | |
146 | | @ a468dc9b3633 |
|
141 | | @ a468dc9b3633 | |
147 | |/ Predecessors: 1:471f378eab4c |
|
142 | |/ Predecessors: 1:471f378eab4c | |
148 | | semi-colon: 1:471f378eab4c |
|
143 | | semi-colon: 1:471f378eab4c | |
149 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
144 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] | |
150 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
145 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
151 |
| Successors: |
|
146 | | Successors: 3:d004c8f274b9 | |
152 |
| multi-line: |
|
147 | | multi-line: 3:d004c8f274b9 | |
153 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] |
|
148 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] | |
154 | | x f137d23bb3e1 |
|
|||
155 | | | |
|
|||
156 | | x 471f378eab4c |
|
149 | | x 471f378eab4c | |
157 |
|/ Successors: |
|
150 | |/ Successors: 2:a468dc9b3633 | |
158 |
| multi-line: |
|
151 | | multi-line: 2:a468dc9b3633 | |
159 | | json: [["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]] |
|
152 | | json: [["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]] | |
160 | o ea207398892e |
|
153 | o ea207398892e | |
161 |
|
154 | |||
@@ -163,11 +156,9 with --hidden | |||||
163 | o d004c8f274b9 |
|
156 | o d004c8f274b9 | |
164 | | |
|
157 | | | |
165 | | @ a468dc9b3633 |
|
158 | | @ a468dc9b3633 | |
166 |
|/ Obsfate: rewritten as |
|
159 | |/ Obsfate: rewritten as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); | |
167 | | x f137d23bb3e1 |
|
|||
168 | | | Obsfate: pruned by test1 (at 2009-02-13 23:31 +0000); |
|
|||
169 | | x 471f378eab4c |
|
160 | | x 471f378eab4c | |
170 |
|/ Obsfate: rewritten as |
|
161 | |/ Obsfate: rewritten as 2:a468dc9b3633 by test1 (at 2009-02-13 23:31 +0000); | |
171 | o ea207398892e |
|
162 | o ea207398892e | |
172 |
|
163 | |||
173 |
|
164 | |||
@@ -182,23 +173,21 visible. | |||||
182 |
|
173 | |||
183 | $ hg tlog --hidden |
|
174 | $ hg tlog --hidden | |
184 | @ d004c8f274b9 |
|
175 | @ d004c8f274b9 | |
185 |
| Predecessors: |
|
176 | | Predecessors: 2:a468dc9b3633 | |
186 |
| semi-colon: |
|
177 | | semi-colon: 2:a468dc9b3633 | |
187 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] |
|
178 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] | |
188 |
| map: |
|
179 | | map: 2:a468dc9b36338b14fdb7825f55ce3df4e71517ad | |
189 | | x a468dc9b3633 |
|
180 | | x a468dc9b3633 | |
190 | |/ Predecessors: 1:471f378eab4c |
|
181 | |/ Predecessors: 1:471f378eab4c | |
191 | | semi-colon: 1:471f378eab4c |
|
182 | | semi-colon: 1:471f378eab4c | |
192 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
183 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] | |
193 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
184 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
194 |
| Successors: |
|
185 | | Successors: 3:d004c8f274b9 | |
195 |
| multi-line: |
|
186 | | multi-line: 3:d004c8f274b9 | |
196 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] |
|
187 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] | |
197 | | x f137d23bb3e1 |
|
|||
198 | | | |
|
|||
199 | | x 471f378eab4c |
|
188 | | x 471f378eab4c | |
200 |
|/ Successors: |
|
189 | |/ Successors: 2:a468dc9b3633 | |
201 |
| multi-line: |
|
190 | | multi-line: 2:a468dc9b3633 | |
202 | | json: [["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]] |
|
191 | | json: [["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]] | |
203 | o ea207398892e |
|
192 | o ea207398892e | |
204 |
|
193 | |||
@@ -212,11 +201,9 visible. | |||||
212 | @ d004c8f274b9 |
|
201 | @ d004c8f274b9 | |
213 | | |
|
202 | | | |
214 | | x a468dc9b3633 |
|
203 | | x a468dc9b3633 | |
215 |
|/ Obsfate: rewritten as |
|
204 | |/ Obsfate: rewritten as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); | |
216 | | x f137d23bb3e1 |
|
|||
217 | | | Obsfate: pruned by test1 (at 2009-02-13 23:31 +0000); |
|
|||
218 | | x 471f378eab4c |
|
205 | | x 471f378eab4c | |
219 |
|/ Obsfate: rewritten as |
|
206 | |/ Obsfate: rewritten as 2:a468dc9b3633 by test1 (at 2009-02-13 23:31 +0000); | |
220 | o ea207398892e |
|
207 | o ea207398892e | |
221 |
|
208 | |||
222 | $ hg fatelogjson --hidden |
|
209 | $ hg fatelogjson --hidden | |
@@ -224,8 +211,6 visible. | |||||
224 | | |
|
211 | | | |
225 | | x a468dc9b3633 |
|
212 | | x a468dc9b3633 | |
226 | |/ Obsfate: [{"markers": [["a468dc9b36338b14fdb7825f55ce3df4e71517ad", ["d004c8f274b9ec480a47a93c10dac5eee63adb78"], 0, [["user", "test2"]], [987654321.0, 0], null]], "successors": ["d004c8f274b9ec480a47a93c10dac5eee63adb78"]}] |
|
213 | |/ Obsfate: [{"markers": [["a468dc9b36338b14fdb7825f55ce3df4e71517ad", ["d004c8f274b9ec480a47a93c10dac5eee63adb78"], 0, [["user", "test2"]], [987654321.0, 0], null]], "successors": ["d004c8f274b9ec480a47a93c10dac5eee63adb78"]}] | |
227 | | x f137d23bb3e1 |
|
|||
228 | | | Obsfate: [{"markers": [["f137d23bb3e11dc1daeb6264fac9cb2433782e15", [], 0, [["user", "test1"]], [1234567890.0, 0], ["471f378eab4c5e25f6c77f785b27c936efb22874"]]], "successors": []}] |
|
|||
229 | | x 471f378eab4c |
|
214 | | x 471f378eab4c | |
230 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"], 0, [["user", "test1"]], [1234567890.0, 0], null]], "successors": ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]}] |
|
215 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"], 0, [["user", "test1"]], [1234567890.0, 0], null]], "successors": ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]}] | |
231 | o ea207398892e |
|
216 | o ea207398892e |
@@ -1029,18 +1029,18 This test issue 3805 | |||||
1029 | o 0:d20a80d4def3 (draft) [ ] base |
|
1029 | o 0:d20a80d4def3 (draft) [ ] base | |
1030 |
|
1030 | |||
1031 | $ hg log -G -R ../repo-issue3805 |
|
1031 | $ hg log -G -R ../repo-issue3805 | |
1032 |
@ |
|
1032 | @ 2:323a9c3ddd91 (draft) [tip ] A | |
1033 | | |
|
1033 | | | |
1034 | o 0:d20a80d4def3 (draft) [ ] base |
|
1034 | o 0:d20a80d4def3 (draft) [ ] base | |
1035 |
|
1035 | |||
1036 | $ hg incoming |
|
1036 | $ hg incoming | |
1037 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
1037 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) | |
1038 | searching for changes |
|
1038 | searching for changes | |
1039 |
|
|
1039 | 2:323a9c3ddd91 (draft) [tip ] A | |
1040 | $ hg incoming --bundle ../issue3805.hg |
|
1040 | $ hg incoming --bundle ../issue3805.hg | |
1041 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
1041 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) | |
1042 | searching for changes |
|
1042 | searching for changes | |
1043 |
|
|
1043 | 2:323a9c3ddd91 (draft) [tip ] A | |
1044 | $ hg outgoing |
|
1044 | $ hg outgoing | |
1045 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
1045 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) | |
1046 | searching for changes |
|
1046 | searching for changes | |
@@ -1078,7 +1078,7 This test issue 3814 | |||||
1078 | adding manifests |
|
1078 | adding manifests | |
1079 | adding file changes |
|
1079 | adding file changes | |
1080 | added 2 changesets with 2 changes to 2 files |
|
1080 | added 2 changesets with 2 changes to 2 files | |
1081 |
|
|
1081 | 1 new obsolescence markers | |
1082 | $ hg out ../repo-issue3814 |
|
1082 | $ hg out ../repo-issue3814 | |
1083 | comparing with ../repo-issue3814 |
|
1083 | comparing with ../repo-issue3814 | |
1084 | searching for changes |
|
1084 | searching for changes | |
@@ -1089,7 +1089,7 Test that a local tag blocks a changeset | |||||
1089 |
|
1089 | |||
1090 | $ hg tag -l visible -r 1 --hidden |
|
1090 | $ hg tag -l visible -r 1 --hidden | |
1091 | $ hg log -G |
|
1091 | $ hg log -G | |
1092 |
@ |
|
1092 | @ 2:323a9c3ddd91 (draft) [tip ] A | |
1093 | | |
|
1093 | | | |
1094 | | x 1:29f0c6921ddd (draft *obsolete*) [visible ] A |
|
1094 | | x 1:29f0c6921ddd (draft *obsolete*) [visible ] A | |
1095 | |/ |
|
1095 | |/ | |
@@ -1099,8 +1099,8 Test that removing a local tag does not | |||||
1099 |
|
1099 | |||
1100 | $ hg tag -l -r tip tiptag |
|
1100 | $ hg tag -l -r tip tiptag | |
1101 | $ hg tags |
|
1101 | $ hg tags | |
1102 |
tiptag |
|
1102 | tiptag 2:323a9c3ddd91 | |
1103 |
tip |
|
1103 | tip 2:323a9c3ddd91 | |
1104 | visible 1:29f0c6921ddd |
|
1104 | visible 1:29f0c6921ddd | |
1105 | $ hg --config extensions.strip= strip -r tip --no-backup |
|
1105 | $ hg --config extensions.strip= strip -r tip --no-backup | |
1106 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1106 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
@@ -1142,10 +1142,8 Test bundle overlay onto hidden revision | |||||
1142 | $ echo "B+" >> foo |
|
1142 | $ echo "B+" >> foo | |
1143 | $ hg ci --amend -m "B+" |
|
1143 | $ hg ci --amend -m "B+" | |
1144 | $ hg log -G --hidden |
|
1144 | $ hg log -G --hidden | |
1145 |
@ |
|
1145 | @ 2:b7d587542d40 (draft) [tip ] B+ | |
1146 | | |
|
1146 | | | |
1147 | | x 2:eb95e9297e18 (draft *obsolete*) [ ] temporary amend commit for 44526ebb0f98 |
|
|||
1148 | | | |
|
|||
1149 | | x 1:44526ebb0f98 (draft *obsolete*) [ ] B |
|
1147 | | x 1:44526ebb0f98 (draft *obsolete*) [ ] B | |
1150 | |/ |
|
1148 | |/ | |
1151 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1149 | o 0:4b34ecfb0d56 (draft) [ ] A | |
@@ -1157,9 +1155,9 Test bundle overlay onto hidden revision | |||||
1157 | 1:44526ebb0f98 (draft) [ ] B |
|
1155 | 1:44526ebb0f98 (draft) [ ] B | |
1158 | 2:c186d7714947 (draft) [tip ] C |
|
1156 | 2:c186d7714947 (draft) [tip ] C | |
1159 | $ hg log -G -R ../bundleoverlay.hg |
|
1157 | $ hg log -G -R ../bundleoverlay.hg | |
1160 |
o |
|
1158 | o 3:c186d7714947 (draft) [tip ] C | |
1161 | | |
|
1159 | | | |
1162 |
| @ |
|
1160 | | @ 2:b7d587542d40 (draft) [ ] B+ | |
1163 | |/ |
|
1161 | |/ | |
1164 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1162 | o 0:4b34ecfb0d56 (draft) [ ] A | |
1165 |
|
1163 | |||
@@ -1234,7 +1232,7 Test heads computation on pending index | |||||
1234 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1232 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1235 | $ echo aa > a |
|
1233 | $ echo aa > a | |
1236 | $ hg amendtransient |
|
1234 | $ hg amendtransient | |
1237 |
[1, |
|
1235 | [1, 2] | |
1238 |
|
1236 | |||
1239 | Test cache consistency for the visible filter |
|
1237 | Test cache consistency for the visible filter | |
1240 | 1) We want to make sure that the cached filtered revs are invalidated when |
|
1238 | 1) We want to make sure that the cached filtered revs are invalidated when | |
@@ -1275,7 +1273,7 bookmarks change | |||||
1275 | $ hg commit --amend -m "message" |
|
1273 | $ hg commit --amend -m "message" | |
1276 | $ hg book bookb -r 13bedc178fce --hidden |
|
1274 | $ hg book bookb -r 13bedc178fce --hidden | |
1277 | $ hg log -r 13bedc178fce |
|
1275 | $ hg log -r 13bedc178fce | |
1278 |
|
|
1276 | 4:13bedc178fce (draft *obsolete*) [ bookb] add b | |
1279 | $ hg book -d bookb |
|
1277 | $ hg book -d bookb | |
1280 | $ hg log -r 13bedc178fce |
|
1278 | $ hg log -r 13bedc178fce | |
1281 | abort: hidden revision '13bedc178fce'! |
|
1279 | abort: hidden revision '13bedc178fce'! | |
@@ -1306,17 +1304,15 Test ability to pull changeset with loca | |||||
1306 | $ echo bar > f2 |
|
1304 | $ echo bar > f2 | |
1307 | $ hg commit --amend --config experimetnal.stabilization=createmarkers |
|
1305 | $ hg commit --amend --config experimetnal.stabilization=createmarkers | |
1308 | $ hg log -G |
|
1306 | $ hg log -G | |
1309 |
@ |
|
1307 | @ 3:b0551702f918 (draft) [tip ] 2 | |
1310 | | |
|
1308 | | | |
1311 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1309 | o 1:e016b03fd86f (draft) [ ] 1 | |
1312 | | |
|
1310 | | | |
1313 | o 0:a78f55e5508c (draft) [ ] 0 |
|
1311 | o 0:a78f55e5508c (draft) [ ] 0 | |
1314 |
|
1312 | |||
1315 | $ hg log -G --hidden |
|
1313 | $ hg log -G --hidden | |
1316 |
@ |
|
1314 | @ 3:b0551702f918 (draft) [tip ] 2 | |
1317 | | |
|
1315 | | | |
1318 | | x 3:f27abbcc1f77 (draft *obsolete*) [ ] temporary amend commit for e008cf283490 |
|
|||
1319 | | | |
|
|||
1320 | | x 2:e008cf283490 (draft *obsolete*) [ ] 2 |
|
1316 | | x 2:e008cf283490 (draft *obsolete*) [ ] 2 | |
1321 | |/ |
|
1317 | |/ | |
1322 | o 1:e016b03fd86f (draft) [ ] 1 |
|
1318 | o 1:e016b03fd86f (draft) [ ] 1 | |
@@ -1325,10 +1321,9 Test ability to pull changeset with loca | |||||
1325 |
|
1321 | |||
1326 |
|
1322 | |||
1327 | $ hg strip --hidden -r 2 --config extensions.strip= --config devel.strip-obsmarkers=no |
|
1323 | $ hg strip --hidden -r 2 --config extensions.strip= --config devel.strip-obsmarkers=no | |
1328 |
saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e008cf283490- |
|
1324 | saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e008cf283490-ede36964-backup.hg (glob) | |
1329 | $ hg debugobsolete |
|
1325 | $ hg debugobsolete | |
1330 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) |
|
1326 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) | |
1331 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (*) {'user': 'test'} (glob) |
|
|||
1332 | $ hg log -G |
|
1327 | $ hg log -G | |
1333 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1328 | @ 2:b0551702f918 (draft) [tip ] 2 | |
1334 | | |
|
1329 | | | |
@@ -1345,22 +1340,17 Test ability to pull changeset with loca | |||||
1345 |
|
1340 | |||
1346 | $ hg debugbundle .hg/strip-backup/e008cf283490-*-backup.hg |
|
1341 | $ hg debugbundle .hg/strip-backup/e008cf283490-*-backup.hg | |
1347 | Stream params: {Compression: BZ} |
|
1342 | Stream params: {Compression: BZ} | |
1348 |
changegroup -- {nbchanges: |
|
1343 | changegroup -- {nbchanges: 1, version: 02} | |
1349 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 |
|
1344 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 | |
1350 | f27abbcc1f77fb409cf9160482fe619541e2d605 |
|
|||
1351 | obsmarkers -- {} |
|
|||
1352 | version: 1 (70 bytes) |
|
|||
1353 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
|||
1354 | phase-heads -- {} |
|
1345 | phase-heads -- {} | |
1355 | f27abbcc1f77fb409cf9160482fe619541e2d605 draft |
|
1346 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 draft | |
1356 |
|
1347 | |||
1357 | $ hg pull .hg/strip-backup/e008cf283490-*-backup.hg |
|
1348 | $ hg pull .hg/strip-backup/e008cf283490-*-backup.hg | |
1358 |
pulling from .hg/strip-backup/e008cf283490- |
|
1349 | pulling from .hg/strip-backup/e008cf283490-ede36964-backup.hg | |
1359 | searching for changes |
|
1350 | searching for changes | |
1360 | no changes found |
|
1351 | no changes found | |
1361 | $ hg debugobsolete |
|
1352 | $ hg debugobsolete | |
1362 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) |
|
1353 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) | |
1363 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (*) {'user': 'test'} (glob) |
|
|||
1364 | $ hg log -G |
|
1354 | $ hg log -G | |
1365 | @ 2:b0551702f918 (draft) [tip ] 2 |
|
1355 | @ 2:b0551702f918 (draft) [tip ] 2 | |
1366 | | |
|
1356 | | | |
@@ -1394,9 +1384,8 Testing that strip remove markers: | |||||
1394 | e016b03fd86fcccc54817d120b90b751aaf367d6 |
|
1384 | e016b03fd86fcccc54817d120b90b751aaf367d6 | |
1395 | b0551702f918510f01ae838ab03a463054c67b46 |
|
1385 | b0551702f918510f01ae838ab03a463054c67b46 | |
1396 | obsmarkers -- {} |
|
1386 | obsmarkers -- {} | |
1397 |
version: 1 ( |
|
1387 | version: 1 (70 bytes) | |
1398 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1388 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
1399 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
|||
1400 | phase-heads -- {} |
|
1389 | phase-heads -- {} | |
1401 | b0551702f918510f01ae838ab03a463054c67b46 draft |
|
1390 | b0551702f918510f01ae838ab03a463054c67b46 draft | |
1402 |
|
1391 | |||
@@ -1405,11 +1394,10 Testing that strip remove markers: | |||||
1405 | adding manifests |
|
1394 | adding manifests | |
1406 | adding file changes |
|
1395 | adding file changes | |
1407 | added 2 changesets with 2 changes to 2 files |
|
1396 | added 2 changesets with 2 changes to 2 files | |
1408 |
|
|
1397 | 1 new obsolescence markers | |
1409 | (run 'hg update' to get a working copy) |
|
1398 | (run 'hg update' to get a working copy) | |
1410 | $ hg debugobsolete | sort |
|
1399 | $ hg debugobsolete | sort | |
1411 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) |
|
1400 | e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (*) {'user': 'test'} (glob) | |
1412 | f27abbcc1f77fb409cf9160482fe619541e2d605 0 {e008cf2834908e5d6b0f792a9d4b0e2272260fb8} (*) {'user': 'test'} (glob) |
|
|||
1413 | $ hg log -G |
|
1401 | $ hg log -G | |
1414 | o 2:b0551702f918 (draft) [tip ] 2 |
|
1402 | o 2:b0551702f918 (draft) [tip ] 2 | |
1415 | | |
|
1403 | | |
@@ -626,11 +626,11 Test hidden changesets in the rebase set | |||||
626 | $ hg add M |
|
626 | $ hg add M | |
627 | $ hg commit --amend -m "M" |
|
627 | $ hg commit --amend -m "M" | |
628 | $ hg log -G |
|
628 | $ hg log -G | |
629 |
@ |
|
629 | @ 18:bfaedf8eb73b M | |
630 | | |
|
630 | | | |
631 |
| o 1 |
|
631 | | o 17:97219452e4bd L | |
632 | | | |
|
632 | | | | |
633 |
| x 1 |
|
633 | | x 16:fc37a630c901 K | |
634 | |/ |
|
634 | |/ | |
635 | | o 15:5ae8a643467b J |
|
635 | | o 15:5ae8a643467b J | |
636 | | | |
|
636 | | | | |
@@ -660,8 +660,8 Test hidden changesets in the rebase set | |||||
660 | |/ |
|
660 | |/ | |
661 | o 0:cd010b8cd998 A |
|
661 | o 0:cd010b8cd998 A | |
662 |
|
662 | |||
663 |
$ hg rebase -s 14 -d 1 |
|
663 | $ hg rebase -s 14 -d 17 --config experimental.rebaseskipobsolete=True | |
664 |
note: not rebasing 14:9ad579b4a5de "I", already in destination as 1 |
|
664 | note: not rebasing 14:9ad579b4a5de "I", already in destination as 16:fc37a630c901 "K" | |
665 | rebasing 15:5ae8a643467b "J" |
|
665 | rebasing 15:5ae8a643467b "J" | |
666 |
|
666 | |||
667 | $ cd .. |
|
667 | $ cd .. | |
@@ -797,9 +797,9 If a rebase is going to create divergenc | |||||
797 | $ hg add foo |
|
797 | $ hg add foo | |
798 | $ hg commit -m "bar foo" |
|
798 | $ hg commit -m "bar foo" | |
799 | $ hg log -G |
|
799 | $ hg log -G | |
800 |
@ 1 |
|
800 | @ 14:73568ab6879d bar foo | |
801 | | |
|
801 | | | |
802 |
| o 1 |
|
802 | | o 13:77d874d096a2 10' | |
803 | | | |
|
803 | | | | |
804 | | | o 12:3eb461388009 john doe |
|
804 | | | o 12:3eb461388009 john doe | |
805 | | |/ |
|
805 | | |/ | |
@@ -814,7 +814,7 If a rebase is going to create divergenc | |||||
814 | o 0:4a2df7238c3b A |
|
814 | o 0:4a2df7238c3b A | |
815 |
|
815 | |||
816 | $ hg summary |
|
816 | $ hg summary | |
817 |
parent: 1 |
|
817 | parent: 14:73568ab6879d tip (orphan) | |
818 | bar foo |
|
818 | bar foo | |
819 | branch: default |
|
819 | branch: default | |
820 | commit: (clean) |
|
820 | commit: (clean) | |
@@ -826,9 +826,9 If a rebase is going to create divergenc | |||||
826 | (to force the rebase please set experimental.allowdivergence=True) |
|
826 | (to force the rebase please set experimental.allowdivergence=True) | |
827 | [255] |
|
827 | [255] | |
828 | $ hg log -G |
|
828 | $ hg log -G | |
829 |
@ 1 |
|
829 | @ 14:73568ab6879d bar foo | |
830 | | |
|
830 | | | |
831 |
| o 1 |
|
831 | | o 13:77d874d096a2 10' | |
832 | | | |
|
832 | | | | |
833 | | | o 12:3eb461388009 john doe |
|
833 | | | o 12:3eb461388009 john doe | |
834 | | |/ |
|
834 | | |/ | |
@@ -846,9 +846,9 With experimental.allowdivergence=True, | |||||
846 |
|
846 | |||
847 | $ hg rebase -s 10 -d 12 --config experimental.allowdivergence=True |
|
847 | $ hg rebase -s 10 -d 12 --config experimental.allowdivergence=True | |
848 | rebasing 10:121d9e3bc4c6 "P" |
|
848 | rebasing 10:121d9e3bc4c6 "P" | |
849 |
rebasing 1 |
|
849 | rebasing 14:73568ab6879d "bar foo" (tip) | |
850 | $ hg summary |
|
850 | $ hg summary | |
851 |
parent: 1 |
|
851 | parent: 16:61bd55f69bc4 tip | |
852 | bar foo |
|
852 | bar foo | |
853 | branch: default |
|
853 | branch: default | |
854 | commit: (clean) |
|
854 | commit: (clean) | |
@@ -859,8 +859,8 With experimental.allowdivergence=True, | |||||
859 | rebase --continue + skipped rev because their successors are in destination |
|
859 | rebase --continue + skipped rev because their successors are in destination | |
860 | we make a change in trunk and work on conflicting changes to make rebase abort. |
|
860 | we make a change in trunk and work on conflicting changes to make rebase abort. | |
861 |
|
861 | |||
862 |
$ hg log -G -r 1 |
|
862 | $ hg log -G -r 16:: | |
863 |
@ 1 |
|
863 | @ 16:61bd55f69bc4 bar foo | |
864 | | |
|
864 | | | |
865 | ~ |
|
865 | ~ | |
866 |
|
866 | |||
@@ -873,7 +873,7 Create the two changes in trunk | |||||
873 | $ hg commit -m "dummy change successor" |
|
873 | $ hg commit -m "dummy change successor" | |
874 |
|
874 | |||
875 | Create the changes that we will rebase |
|
875 | Create the changes that we will rebase | |
876 |
$ hg update -C 1 |
|
876 | $ hg update -C 16 -q | |
877 | $ printf "b" > willconflict |
|
877 | $ printf "b" > willconflict | |
878 | $ hg add willconflict |
|
878 | $ hg add willconflict | |
879 | $ hg commit -m "willconflict second version" |
|
879 | $ hg commit -m "willconflict second version" | |
@@ -884,25 +884,25 Create the changes that we will rebase | |||||
884 | $ printf "dummy" > L |
|
884 | $ printf "dummy" > L | |
885 | $ hg add L |
|
885 | $ hg add L | |
886 | $ hg commit -m "dummy change" |
|
886 | $ hg commit -m "dummy change" | |
887 |
$ hg debugobsolete `hg log -r ".^" -T '{node}'` `hg log -r 1 |
|
887 | $ hg debugobsolete `hg log -r ".^" -T '{node}'` `hg log -r 18 -T '{node}'` --config experimental.stabilization=all | |
888 | obsoleted 1 changesets |
|
888 | obsoleted 1 changesets | |
889 |
|
889 | |||
890 |
$ hg log -G -r 1 |
|
890 | $ hg log -G -r 16:: | |
891 |
@ 2 |
|
891 | @ 21:7bdc8a87673d dummy change | |
892 | | |
|
892 | | | |
893 |
x 2 |
|
893 | x 20:8b31da3c4919 dummy change | |
894 | | |
|
894 | | | |
895 |
o |
|
895 | o 19:b82fb57ea638 willconflict second version | |
896 | | |
|
896 | | | |
897 |
| o 1 |
|
897 | | o 18:601db7a18f51 dummy change successor | |
898 | | | |
|
898 | | | | |
899 |
| o 1 |
|
899 | | o 17:357ddf1602d5 willconflict first version | |
900 | |/ |
|
900 | |/ | |
901 |
o 1 |
|
901 | o 16:61bd55f69bc4 bar foo | |
902 | | |
|
902 | | | |
903 | ~ |
|
903 | ~ | |
904 |
$ hg rebase -r ".^^ + .^ + ." -d 1 |
|
904 | $ hg rebase -r ".^^ + .^ + ." -d 18 | |
905 |
rebasing |
|
905 | rebasing 19:b82fb57ea638 "willconflict second version" | |
906 | merging willconflict |
|
906 | merging willconflict | |
907 | warning: conflicts while merging willconflict! (edit, then use 'hg resolve --mark') |
|
907 | warning: conflicts while merging willconflict! (edit, then use 'hg resolve --mark') | |
908 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
908 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
@@ -912,9 +912,9 Create the changes that we will rebase | |||||
912 | (no more unresolved files) |
|
912 | (no more unresolved files) | |
913 | continue: hg rebase --continue |
|
913 | continue: hg rebase --continue | |
914 | $ hg rebase --continue |
|
914 | $ hg rebase --continue | |
915 |
rebasing |
|
915 | rebasing 19:b82fb57ea638 "willconflict second version" | |
916 |
note: not rebasing 2 |
|
916 | note: not rebasing 20:8b31da3c4919 "dummy change", already in destination as 18:601db7a18f51 "dummy change successor" | |
917 |
rebasing 2 |
|
917 | rebasing 21:7bdc8a87673d "dummy change" (tip) | |
918 | $ cd .. |
|
918 | $ cd .. | |
919 |
|
919 | |||
920 | Rebase merge where successor of one parent is equal to destination (issue5198) |
|
920 | Rebase merge where successor of one parent is equal to destination (issue5198) |
@@ -862,7 +862,7 Committing a empty commit does not dupli | |||||
862 | $ hg commit -Aqm 'pre-empty commit' |
|
862 | $ hg commit -Aqm 'pre-empty commit' | |
863 | $ hg rm z |
|
863 | $ hg rm z | |
864 | $ hg commit --amend -m 'empty commit' |
|
864 | $ hg commit --amend -m 'empty commit' | |
865 |
saved backup bundle to $TESTTMP/grafted-dir-repo-clone/.hg/strip-backup/cb99d5717cea- |
|
865 | saved backup bundle to $TESTTMP/grafted-dir-repo-clone/.hg/strip-backup/cb99d5717cea-9e3b6b02-amend.hg (glob) | |
866 | $ hg log -r 'tip + tip^' -T '{manifest}\n' |
|
866 | $ hg log -r 'tip + tip^' -T '{manifest}\n' | |
867 | 1:678d3574b88c |
|
867 | 1:678d3574b88c | |
868 | 1:678d3574b88c |
|
868 | 1:678d3574b88c |
General Comments 0
You need to be logged in to leave comments.
Login now