Show More
@@ -182,12 +182,15 b' def dosplit(ui, repo, tr, ctx, opts):' | |||||
182 | if not committed: |
|
182 | if not committed: | |
183 | raise error.InputError(_(b'cannot split an empty revision')) |
|
183 | raise error.InputError(_(b'cannot split an empty revision')) | |
184 |
|
184 | |||
185 | scmutil.cleanupnodes( |
|
185 | if len(committed) != 1 or committed[0].node() != ctx.node(): | |
186 | repo, |
|
186 | # Ensure we don't strip a node if we produce the same commit as already | |
187 | {ctx.node(): [c.node() for c in committed]}, |
|
187 | # exists | |
188 | operation=b'split', |
|
188 | scmutil.cleanupnodes( | |
189 | fixphase=True, |
|
189 | repo, | |
190 | ) |
|
190 | {ctx.node(): [c.node() for c in committed]}, | |
|
191 | operation=b'split', | |||
|
192 | fixphase=True, | |||
|
193 | ) | |||
191 |
|
194 | |||
192 | return committed[-1] |
|
195 | return committed[-1] | |
193 |
|
196 |
@@ -1086,16 +1086,9 b' Test that creating an empty split or "no' | |||||
1086 | HG: branch 'default' |
|
1086 | HG: branch 'default' | |
1087 | HG: added foo |
|
1087 | HG: added foo | |
1088 | warning: commit already existed in the repository! |
|
1088 | warning: commit already existed in the repository! | |
1089 | saved backup bundle to $TESTTMP/noop/.hg/strip-backup/ae694b2901bb-28e0b457-split.hg (obsstore-off !) |
|
|||
1090 | transaction abort! (obsstore-on !) |
|
|||
1091 | rollback completed (obsstore-on !) |
|
|||
1092 | abort: changeset ae694b2901bb cannot obsolete itself (obsstore-on !) |
|
|||
1093 | FIXME: this should not have stripped the commit we just no-op split |
|
|||
1094 | (obsstore-off only) |
|
|||
1095 | $ hg log -G -T'{phase} {rev}:{node|short} {desc}' |
|
1089 | $ hg log -G -T'{phase} {rev}:{node|short} {desc}' | |
1096 | warning: ignoring unknown working parent ae694b2901bb! (obsstore-off !) |
|
1090 | @ draft 1:ae694b2901bb foo | |
1097 | @ draft 1:ae694b2901bb foo (obsstore-on !) |
|
1091 | | | |
1098 | | (obsstore-on !) |
|
|||
1099 | o public 0:222799e2f90b r0 |
|
1092 | o public 0:222799e2f90b r0 | |
1100 |
|
1093 | |||
1101 |
|
1094 |
General Comments 0
You need to be logged in to leave comments.
Login now