Mercurial > hg
diff tests/test-rebase-obsolete.t @ 37920:ea63a2004d09
update: print warning about hidden changeset after update
When an attempt to update to a hidden changeset fails because the
working copy is dirty, you may get a message like this:
updating to a hidden changeset 343f6de32686
(hidden revision '343f6de32686' was rewritten as: 4ab941244072)
abort: conflicting changes
(commit or update --clean to discard changes)
It's easy to miss the real error here. This patch moves the warning
about the hidden changeset to after the update has happened. It
changes the verb tense accordingly (and drops the "a" that I think it
sounds better without). Of course, this means that the commit isn't
actually hidden anymore when the message is printed. I think that's
fine.
Differential Revision: https://phab.mercurial-scm.org/D3479
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 07 May 2018 19:43:43 -0700 |
parents | 92213f6745ed |
children | ead71b15efd5 |
line wrap: on
line diff
--- a/tests/test-rebase-obsolete.t Fri Apr 27 01:35:00 2018 -0400 +++ b/tests/test-rebase-obsolete.t Mon May 07 19:43:43 2018 -0700 @@ -281,7 +281,7 @@ even though it is hidden (until we're moved there). $ hg --hidden up -qr 'first(hidden())' - updating to a hidden changeset 42ccdea3bb16 + updated to hidden changeset 42ccdea3bb16 (hidden revision '42ccdea3bb16' is pruned) $ hg rebase --rev 13 --dest 15 rebasing 13:98f6af4ee953 "C" @@ -642,9 +642,9 @@ Test hidden changesets in the rebase set (issue4504) $ hg up --hidden 9 - updating to a hidden changeset 4bde274eefcf + 3 files updated, 0 files merged, 1 files removed, 0 files unresolved + updated to hidden changeset 4bde274eefcf (hidden revision '4bde274eefcf' was rewritten as: acd174b7ab39) - 3 files updated, 0 files merged, 1 files removed, 0 files unresolved $ echo J > J $ hg add J $ hg commit -m J @@ -764,9 +764,9 @@ $ hg commit --amend -m B1 $ hg commit --amend -m B2 $ hg up --hidden 'desc(B0)' - updating to a hidden changeset a8b11f55fb19 + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset a8b11f55fb19 (hidden revision 'a8b11f55fb19' was rewritten as: 261e70097290) - 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ echo C > C $ hg add C $ hg commit -m C @@ -790,9 +790,9 @@ Even when the chain include missing node $ hg up --hidden 'desc(B0)' - updating to a hidden changeset a8b11f55fb19 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + updated to hidden changeset a8b11f55fb19 (hidden revision 'a8b11f55fb19' was rewritten as: 261e70097290) - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ echo D > D $ hg add D $ hg commit -m D @@ -909,9 +909,9 @@ $ hg add bar $ hg commit --amend -m "10'" $ hg up 10 --hidden - updating to a hidden changeset 121d9e3bc4c6 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + updated to hidden changeset 121d9e3bc4c6 (hidden revision '121d9e3bc4c6' was rewritten as: 77d874d096a2) - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ echo "bar" > foo $ hg add foo $ hg commit -m "bar foo" @@ -1706,7 +1706,7 @@ $ rm .hg/localtags $ hg update -q $C --hidden - updating to a hidden changeset 7829726be4dc + updated to hidden changeset 7829726be4dc (hidden revision '7829726be4dc' is pruned) $ hg rebase -s $B -d $D rebasing 1:2ec65233581b "B"