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