https://bz.mercurial-scm.org/show_bug.cgi?id=5593
Bug ID: 5593 Summary: histedit aborts halfway on hidden changesets Product: Mercurial Version: 4.2 Hardware: PC OS: Linux Status: UNCONFIRMED Severity: bug Priority: wish Component: histedit Assignee: bugzi...@mercurial-scm.org Reporter: patrickdepinguin+mercur...@gmail.com CC: mercurial-devel@mercurial-scm.org Quick summary: - histedit (fold) on set of hidden changes starts fine on the first fold but then aborts because it can't find the next hidden changeset - when passing the '--hidden' flag, it works fine Suggested fix: let histedit detect the situation upfront, bail out, and expect the user to pass '--hidden' explicitly from the beginning. Details: I did a histedit but then realized I made a mistake. I thus wanted to start over. As I have 'experimental.evolution = all' in my .hgrc, the previous commits were made hidden but still available. I thus attempted to update to the hidden tip, and run a new histedit session. It started fine, but bails out halfway. A reproduction run is: # setup repo with four commits cd /tmp hg init foo cd foo echo one > a hg add hg commit -m one echo two >> a hg commit -m two echo three >> a hg commit -m three echo four >> a hg commit -m four # First attempt: hg histe # let 'four' fold into 'two' # Result: hg gls --hidden @ 6 2feec63a60f0 tip default 2017-06-12 Thomas De Schampheleire three | o 5 722992a0f5b9 default 2017-06-12 Thomas De Schampheleire two | | x 4 93b14722574b default 2017-06-12 Thomas De Schampheleire fold-temp-revision a88280e97a21 | | | | x 3 a88280e97a21 default 2017-06-12 Thomas De Schampheleire four | | | | | x 2 05c7b8418269 default 2017-06-12 Thomas De Schampheleire three | |/ | x 1 8ff1950daa91 default 2017-06-12 Thomas De Schampheleire two |/ o 0 e2e0dff4b832 default 2017-06-12 Thomas De Schampheleire one # Realize that the end result is wrong (content-wise), so start over: hg up --hidden a88280e97a21 hg histe # let 'four' fold into 'two' again Updating from rev. 'a88280e97a21' to rev. '8ff1950daa91' Updating from rev. '8ff1950daa91' to rev. '8ff1950daa91' (merge with rev. 'a88280e97a21') abort: unknown revision 'a88280e97a21396d069da2b6efeb256a24e67cff'! # Result at this point: hg gls --hidden o 6 2feec63a60f0 tip default 2017-06-12 Thomas De Schampheleire three | o 5 722992a0f5b9 default 2017-06-12 Thomas De Schampheleire two | | @ 4 93b14722574b default 2017-06-12 Thomas De Schampheleire fold-temp-revision a88280e97a21 | | | | x 3 a88280e97a21 default 2017-06-12 Thomas De Schampheleire four | | | | | x 2 05c7b8418269 default 2017-06-12 Thomas De Schampheleire three | |/ | x 1 8ff1950daa91 default 2017-06-12 Thomas De Schampheleire two |/ o 0 e2e0dff4b832 default 2017-06-12 Thomas De Schampheleire one # and histedit is still 'in progress' although aborted: hg sum parent: 4:93b14722574b (obsolete) fold-temp-revision a88280e97a21 branch: default commit: (clean) update: 2 new changesets, 2 branch heads (merge) phases: 5 draft hist: 2 remaining (histedit --continue) # Now show the working method passing '--hidden' to histedit hg histe --abort hg up --hidden a88280e97a21 hg histe --hidden 8ff1950daa91 (let 'four' fold into 'two') Updating from rev. 'a88280e97a21' to rev. '8ff1950daa91' Updating from rev. '8ff1950daa91' to rev. '8ff1950daa91' (merge with rev. 'a88280e97a21') Updating from rev. '93b14722574b' to rev. 'e2e0dff4b832' updating [==============================================================>] 1/1Updating from rev. 'e2e0dff4b832' to rev. '722992a0f5b9' updating [==============================================================>] 1/1Updating from rev. '722992a0f5b9' to rev. '722992a0f5b9' Updating from rev. '722992a0f5b9' to rev. '722992a0f5b9' (merge with rev. '05c7b8418269') Updating from rev. '2feec63a60f0 tip' to rev. '2feec63a60f0' # Result: hg gls --hidden @ 6 2feec63a60f0 tip default 2017-06-12 Thomas De Schampheleire three | o 5 722992a0f5b9 default 2017-06-12 Thomas De Schampheleire two | | x 4 93b14722574b default 2017-06-12 Thomas De Schampheleire fold-temp-revision a88280e97a21 | | | | x 3 a88280e97a21 default 2017-06-12 Thomas De Schampheleire four | | | | | x 2 05c7b8418269 default 2017-06-12 Thomas De Schampheleire three | |/ | x 1 8ff1950daa91 default 2017-06-12 Thomas De Schampheleire two |/ o 0 e2e0dff4b832 default 2017-06-12 Thomas De Schampheleire one hg version Mercurial Distributed SCM (version 4.2) (see https://mercurial-scm.org for more information -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel