diff --git a/tests/test-narrow-widen-non-ellipsis.t b/tests/test-narrow-widen-non-ellipsis.t --- a/tests/test-narrow-widen-non-ellipsis.t +++ b/tests/test-narrow-widen-non-ellipsis.t @@ -72,15 +72,15 @@ $ echo 'widest v4' > widest/f $ hg commit -m 'update widest v4' - $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n" - *: update widest v4 (glob) - *: add outside2 (glob) - *: update inside (glob) - *: update widest v3 (glob) - *: add wider, update widest (glob) - *: add outside (glob) - *: add widest (glob) - *: add inside (glob) + $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" + 7: update widest v4 + 6: add outside2 + 5: update inside + 4: update widest v3 + 3: add wider, update widest + 2: add outside + 1: add widest + 0: add inside $ cd .. @@ -124,15 +124,15 @@ $ cat inside/f inside v2 - $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n" - *: update widest v4 (glob) - *: add outside2 (glob) - *: update inside (glob) - *: update widest v3 (glob) - *: add wider, update widest (glob) - *: add outside (glob) - *: add widest (glob) - *: add inside (glob) + $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" + 7: update widest v4 + 6: add outside2 + 5: update inside + 4: update widest v3 + 3: add wider, update widest + 2: add outside + 1: add widest + 0: add inside Check that widening with a newline fails @@ -175,15 +175,15 @@ $ cat widest/f widest v4 - $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n" - *: update widest v4 (glob) - *: add outside2 (glob) - *: update inside (glob) - *: update widest v3 (glob) - *: add wider, update widest (glob) - *: add outside (glob) - *: add widest (glob) - *: add inside (glob) + $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" + 7: update widest v4 + 6: add outside2 + 5: update inside + 4: update widest v3 + 3: add wider, update widest + 2: add outside + 1: add widest + 0: add inside separate suite of tests: files from 0-10 modified in changes 0-10. This allows more obvious precise tests tickling particular corner cases. @@ -198,18 +198,18 @@ > hg add d$x/f > hg commit -m "add d$x/f" > done - $ hg log -T "{node|short}: {desc}\n" - *: add d10/f (glob) - *: add d9/f (glob) - *: add d8/f (glob) - *: add d7/f (glob) - *: add d6/f (glob) - *: add d5/f (glob) - *: add d4/f (glob) - *: add d3/f (glob) - *: add d2/f (glob) - *: add d1/f (glob) - *: add d0/f (glob) + $ hg log -T "{rev}: {desc}\n" + 10: add d10/f + 9: add d9/f + 8: add d8/f + 7: add d7/f + 6: add d6/f + 5: add d5/f + 4: add d4/f + 3: add d3/f + 2: add d2/f + 1: add d1/f + 0: add d0/f make narrow clone with every third node. @@ -236,18 +236,18 @@ crosschecking files in changesets and manifests checking files 4 files, 11 changesets, 4 total revisions - $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n" - *: add d10/f (glob) - *: add d9/f (glob) - *: add d8/f (glob) - *: add d7/f (glob) - *: add d6/f (glob) - *: add d5/f (glob) - *: add d4/f (glob) - *: add d3/f (glob) - *: add d2/f (glob) - *: add d1/f (glob) - *: add d0/f (glob) + $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" + 10: add d10/f + 9: add d9/f + 8: add d8/f + 7: add d7/f + 6: add d6/f + 5: add d5/f + 4: add d4/f + 3: add d3/f + 2: add d2/f + 1: add d1/f + 0: add d0/f $ hg tracked --addinclude d1 comparing with ssh://user@dummy/upstream searching for changes @@ -263,18 +263,18 @@ I path:d3 I path:d6 I path:d9 - $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n" - *: add d10/f (glob) - *: add d9/f (glob) - *: add d8/f (glob) - *: add d7/f (glob) - *: add d6/f (glob) - *: add d5/f (glob) - *: add d4/f (glob) - *: add d3/f (glob) - *: add d2/f (glob) - *: add d1/f (glob) - *: add d0/f (glob) + $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" + 10: add d10/f + 9: add d9/f + 8: add d8/f + 7: add d7/f + 6: add d6/f + 5: add d5/f + 4: add d4/f + 3: add d3/f + 2: add d2/f + 1: add d1/f + 0: add d0/f Verify shouldn't claim the repo is corrupt after a widen. @@ -291,10 +291,10 @@ $ cd .. $ hg clone -q --narrow ssh://user@dummy/upstream narrow3 --include d2 -r 2 $ cd narrow3 - $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n" - *: add d2/f (glob) - *: add d1/f (glob) - *: add d0/f (glob) + $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" + 2: add d2/f + 1: add d1/f + 0: add d0/f $ hg pull -q -r 3 $ hg co -q tip $ hg pull -q -r 4 diff --git a/tests/test-narrow-widen.t b/tests/test-narrow-widen.t --- a/tests/test-narrow-widen.t +++ b/tests/test-narrow-widen.t @@ -76,15 +76,15 @@ $ echo 'widest v4' > widest/f $ hg commit -m 'update widest v4' - $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n" - *: update widest v4 (glob) - *: add outside2 (glob) - *: update inside (glob) - *: update widest v3 (glob) - *: add wider, update widest (glob) - *: add outside (glob) - *: add widest (glob) - *: add inside (glob) + $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" + 7: update widest v4 + 6: add outside2 + 5: update inside + 4: update widest v3 + 3: add wider, update widest + 2: add outside + 1: add widest + 0: add inside $ cd .. @@ -129,13 +129,13 @@ $ cat inside/f inside v2 - $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n" - ...*: update widest v4 (glob) - *: update inside (glob) - ...*: update widest v3 (glob) - *: add wider, update widest (glob) - ...*: add outside (glob) - *: add inside (glob) + $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" + ...5: update widest v4 + 4: update inside + ...3: update widest v3 + 2: add wider, update widest + ...1: add outside + 0: add inside Check that widening with a newline fails @@ -179,15 +179,15 @@ $ cat widest/f widest v4 - $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n" - *: update widest v4 (glob) - ...*: add outside2 (glob) - *: update inside (glob) - *: update widest v3 (glob) - *: add wider, update widest (glob) - ...*: add outside (glob) - *: add widest (glob) - *: add inside (glob) + $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" + 7: update widest v4 + ...6: add outside2 + 5: update inside + 4: update widest v3 + 3: add wider, update widest + ...2: add outside + 1: add widest + 0: add inside separate suite of tests: files from 0-10 modified in changes 0-10. This allows more obvious precise tests tickling particular corner cases. @@ -206,18 +206,18 @@ > hg add d$x/f > hg commit -m "add d$x/f" > done - $ hg log -T "{node|short}: {desc}\n" - *: add d10/f (glob) - *: add d9/f (glob) - *: add d8/f (glob) - *: add d7/f (glob) - *: add d6/f (glob) - *: add d5/f (glob) - *: add d4/f (glob) - *: add d3/f (glob) - *: add d2/f (glob) - *: add d1/f (glob) - *: add d0/f (glob) + $ hg log -T "{rev}: {desc}\n" + 10: add d10/f + 9: add d9/f + 8: add d8/f + 7: add d7/f + 6: add d6/f + 5: add d5/f + 4: add d4/f + 3: add d3/f + 2: add d2/f + 1: add d1/f + 0: add d0/f make narrow clone with every third node. @@ -244,15 +244,15 @@ crosschecking files in changesets and manifests checking files 4 files, 8 changesets, 4 total revisions - $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n" - ...*: add d10/f (glob) - *: add d9/f (glob) - ...*: add d8/f (glob) - *: add d6/f (glob) - ...*: add d5/f (glob) - *: add d3/f (glob) - ...*: add d2/f (glob) - *: add d0/f (glob) + $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" + ...7: add d10/f + 6: add d9/f + ...5: add d8/f + 4: add d6/f + ...3: add d5/f + 2: add d3/f + ...1: add d2/f + 0: add d0/f $ hg tracked --addinclude d1 comparing with ssh://user@dummy/upstream searching for changes @@ -269,16 +269,16 @@ I path:d3 I path:d6 I path:d9 - $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n" - ...*: add d10/f (glob) - *: add d9/f (glob) - ...*: add d8/f (glob) - *: add d6/f (glob) - ...*: add d5/f (glob) - *: add d3/f (glob) - ...*: add d2/f (glob) - *: add d1/f (glob) - *: add d0/f (glob) + $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" + ...8: add d10/f + 7: add d9/f + ...6: add d8/f + 5: add d6/f + ...4: add d5/f + 3: add d3/f + ...2: add d2/f + 1: add d1/f + 0: add d0/f Verify shouldn't claim the repo is corrupt after a widen. @@ -295,9 +295,9 @@ $ cd .. $ hg clone -q --narrow ssh://user@dummy/upstream narrow3 --include d2 -r 2 $ cd narrow3 - $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n" - *: add d2/f (glob) - ...*: add d1/f (glob) + $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" + 1: add d2/f + ...0: add d1/f $ hg pull -q -r 3 $ hg co -q tip $ hg pull -q -r 4 diff --git a/tests/test-narrow.t b/tests/test-narrow.t --- a/tests/test-narrow.t +++ b/tests/test-narrow.t @@ -22,18 +22,18 @@ > hg add d$x/f > hg commit -m "add d$x/f" > done - $ hg log -T "{node|short}: {desc}\n" - *: add d10/f (glob) - *: add d9/f (glob) - *: add d8/f (glob) - *: add d7/f (glob) - *: add d6/f (glob) - *: add d5/f (glob) - *: add d4/f (glob) - *: add d3/f (glob) - *: add d2/f (glob) - *: add d1/f (glob) - *: add d0/f (glob) + $ hg log -T "{rev}: {desc}\n" + 10: add d10/f + 9: add d9/f + 8: add d8/f + 7: add d7/f + 6: add d6/f + 5: add d5/f + 4: add d4/f + 3: add d3/f + 2: add d2/f + 1: add d1/f + 0: add d0/f $ cd .. Error if '.' or '..' are in the directory to track. @@ -111,15 +111,15 @@ d6/f $ hg verify -q Force deletion of local changes - $ hg log -T "{node|short}: {desc} {outsidenarrow}\n" - *: local change to d3 (glob) - *: local change to d0 (glob) - *: add d10/f outsidenarrow (glob) - *: add d6/f (glob) - *: add d5/f outsidenarrow (glob) - *: add d3/f (glob) - *: add d2/f outsidenarrow (glob) - *: add d0/f (glob) + $ hg log -T "{rev}: {desc} {outsidenarrow}\n" + 8: local change to d3 + 6: local change to d0 + 5: add d10/f outsidenarrow + 4: add d6/f + 3: add d5/f outsidenarrow + 2: add d3/f + 1: add d2/f outsidenarrow + 0: add d0/f $ hg tracked --removeinclude d0 --force-delete-local-changes comparing with ssh://user@dummy/master searching for changes @@ -133,14 +133,14 @@ deleting data/d0/f/4374b5650fc5ae54ac857c0f0381971fdde376f7 (reposimplestore !) deleting data/d0/f/index (reposimplestore !) - $ hg log -T "{node|short}: {desc} {outsidenarrow}\n" - *: local change to d3 (glob) - *: add d10/f outsidenarrow (glob) - *: add d6/f (glob) - *: add d5/f outsidenarrow (glob) - *: add d3/f (glob) - *: add d2/f outsidenarrow (glob) - *: add d0/f outsidenarrow (glob) + $ hg log -T "{rev}: {desc} {outsidenarrow}\n" + 7: local change to d3 + 5: add d10/f outsidenarrow + 4: add d6/f + 3: add d5/f outsidenarrow + 2: add d3/f + 1: add d2/f outsidenarrow + 0: add d0/f outsidenarrow Can restore stripped local changes after widening $ hg tracked --addinclude d0 -q $ hg unbundle .hg/strip-backup/*-narrow.hg -q