# HG changeset patch # User David Soria Parra # Date 1409315177 -7200 # Node ID bac4e0bc9f6ad9512a42cf19289278f5771e1659 # Parent 1527ec81337e2cdc51fbefa7ce3bc5f3855be48b evolve: write a status message when the working directory changes Evolve changes the working directory during atop, etc which can confuse people as they are not aware that this happend. The ideal solution is to not have evolve change it, however mercurial limitations don't allow us to do that at the moment. So instead we are printing a status message that the working directory changed. diff -r 1527ec81337e -r bac4e0bc9f6a README --- a/README Fri Aug 29 09:29:02 2014 +0200 +++ b/README Fri Aug 29 14:26:17 2014 +0200 @@ -60,6 +60,7 @@ 4.2.0 -- - uncommit: add a --rev argument +- evolve: add a `working directory now at xxxxxxxxxx` message 4.1.1 -- diff -r 1527ec81337e -r bac4e0bc9f6a hgext/evolve.py --- a/hgext/evolve.py Fri Aug 29 09:29:02 2014 +0200 +++ b/hgext/evolve.py Fri Aug 29 14:26:17 2014 +0200 @@ -1239,6 +1239,8 @@ confirmopt = opts['confirm'] ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), 'evolve') + startnode = repo['.'] + if contopt: if anyopt: raise util.Abort('cannot specify both "--any" and "--continue"') @@ -1282,7 +1284,10 @@ print 'hg update %s' % ctx.rev() return 0 else: - return hg.update(repo, ctx.rev()) + res = hg.update(repo, ctx.rev()) + if ctx != startnode: + ui.status(_('working directory is now at %s\n') % ctx) + return res troubled = repo.revs('troubled()') if troubled: @@ -1315,6 +1320,8 @@ progresscb() seen += 1 if not allopt: + if repo['.'] != startnode: + ui.status(_('working directory is now at %s\n') % repo['.']) return result progresscb() tro = _picknexttroubled(ui, repo, anyopt or allopt) @@ -1322,6 +1329,9 @@ if allopt: ui.progress('evolve', None) + if repo['.'] != startnode: + ui.status(_('working directory is now at %s\n') % repo['.']) + def _evolveany(ui, repo, tro, dryrunopt, confirmopt, progresscb): repo = repo.unfiltered() diff -r 1527ec81337e -r bac4e0bc9f6a tests/test-evolve.t --- a/tests/test-evolve.t Fri Aug 29 09:29:02 2014 +0200 +++ b/tests/test-evolve.t Fri Aug 29 14:26:17 2014 +0200 @@ -270,6 +270,7 @@ move:[4] another feature atop:[6] a nifty feature merging main-file-1 + working directory is now at abe98aeaaa35 $ hg log 7 feature-B: another feature - test 6 feature-A: a nifty feature - test @@ -311,6 +312,7 @@ atop:[7] another feature computing new diff committed as ca3b75e3e59b + working directory is now at ca3b75e3e59b $ hg glog @ 9 feature-B: bumped update to abe98aeaaa35: - test | @@ -369,6 +371,7 @@ move:[11] dansk 3! atop:[14] dansk 2! merging main-file-1 + working directory is now at b0e2cfb8dd21 $ hg glog @ 15 : dansk 3! - test | @@ -731,6 +734,7 @@ $ hg stab --any move:[15] c atop:[13] a + working directory is now at 3742bde73477 $ hg st -C --change=tip A c a diff -r 1527ec81337e -r bac4e0bc9f6a tests/test-sharing.t --- a/tests/test-sharing.t Fri Aug 29 09:29:02 2014 +0200 +++ b/tests/test-sharing.t Fri Aug 29 14:26:17 2014 +0200 @@ -203,6 +203,7 @@ atop:[2] fix bug 15 computing new diff committed as 227d860d9ad0 + working directory is now at 227d860d9ad0 Figure SG08 $ hg --hidden shortlog -G diff -r 1527ec81337e -r bac4e0bc9f6a tests/test-stabilize-conflict.t --- a/tests/test-stabilize-conflict.t Fri Aug 29 09:29:02 2014 +0200 +++ b/tests/test-stabilize-conflict.t Fri Aug 29 14:26:17 2014 +0200 @@ -81,6 +81,7 @@ move:[2] babar count up to fifteen atop:[4] babar count up to ten merging babar + working directory is now at 71c18f70c34f $ hg resolve -l $ hg log -G @ changeset: 5:71c18f70c34f diff -r 1527ec81337e -r bac4e0bc9f6a tests/test-stabilize-order.t --- a/tests/test-stabilize-order.t Fri Aug 29 09:29:02 2014 +0200 +++ b/tests/test-stabilize-order.t Fri Aug 29 14:26:17 2014 +0200 @@ -71,6 +71,7 @@ resolving manifests getting b b + working directory is now at bede829dd2d3 $ glog @ 8:bede829dd2d3@default(draft) addb | @@ -99,6 +100,7 @@ resolving manifests getting c c + working directory is now at 65095d7d0dd5 $ hg debugobsolete > successors.new $ diff -u successors.old successors.new --- successors.old* (glob) @@ -159,6 +161,7 @@ resolving manifests getting c c + working directory is now at e99ecf51c867 $ glog @ 12:e99ecf51c867@default(draft) addc | diff -r 1527ec81337e -r bac4e0bc9f6a tests/test-stabilize-result.t --- a/tests/test-stabilize-result.t Fri Aug 29 09:29:02 2014 +0200 +++ b/tests/test-stabilize-result.t Fri Aug 29 14:26:17 2014 +0200 @@ -165,6 +165,7 @@ rebasing to destination parent: 66719795a494 computing new diff committed as (a7cabd7bd9c2|671b9d7eeaec) (re) + working directory is now at (a7cabd7bd9c2|671b9d7eeaec) (re) $ glog @ 14:(a7cabd7bd9c2|671b9d7eeaec)@default\(draft\) bk:\[\] bumped update to 1cf0aacfd363: (re) | @@ -258,6 +259,7 @@ copying changeset 283ccd10e2b8 to 7bc2f5967f5e a committed changeset 21:f344982e63c4 + working directory is now at f344982e63c4 $ hg st $ glog @ 21:f344982e63c4@default(draft) bk:[] More addition diff -r 1527ec81337e -r bac4e0bc9f6a tests/test-tutorial.t --- a/tests/test-tutorial.t Fri Aug 29 09:29:02 2014 +0200 +++ b/tests/test-tutorial.t Fri Aug 29 14:26:17 2014 +0200 @@ -702,6 +702,7 @@ move:[15] animals atop:[14] bathroom stuff merging shopping + working directory is now at ee942144f952 The old version of bathroom is hidden again. @@ -752,6 +753,7 @@ $ hg evolve update:[8] animals 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + working directory is now at ee942144f952 Relocating unstable change after prune ---------------------------------------------- @@ -829,6 +831,7 @@ move:[17] SPAM SPAM SPAM atop:[14] bathroom stuff merging shopping + working directory is now at 40aa40daeefb $ hg log -G @ 40aa40daeefb (draft): SPAM SPAM SPAM diff -r 1527ec81337e -r bac4e0bc9f6a tests/test-userguide.t --- a/tests/test-userguide.t Fri Aug 29 09:29:02 2014 +0200 +++ b/tests/test-userguide.t Fri Aug 29 14:26:17 2014 +0200 @@ -253,6 +253,7 @@ $ hg evolve --all move:[23] fix bug 67 atop:[24] fix bug 53 + working directory is now at 0d972d6888e6 $ hg --hidden shortlog -G -r 21:: @ 25:0d972d6888e6 draft fix bug 67 | @@ -301,6 +302,7 @@ $ hg evolve --all move:[27] new feature atop:[28] fix a bug + working directory is now at 166c1c368ab6 $ hg --hidden shortlog -G -r 25:: @ 30:166c1c368ab6 draft new feature |