tests/test-narrow-widen.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Fri, 01 Oct 2021 23:13:44 +0200
changeset 48140 a8ff00ad290b
parent 47445 86418ad637d1
child 49920 2f2682f40ea0
permissions -rw-r--r--
dirstatemap: add a common `_insert_entry` method for dirstatemap This method is called to add a new DirstateItem to the map. Each variant have a different implementation (which is … the point). Differential Revision: https://phab.mercurial-scm.org/D11573
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36122
dc01484606da tests: fold narrow treemanifest tests into main test file using testcases
Augie Fackler <augie@google.com>
parents: 36117
diff changeset
     1
#testcases flat tree
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
     2
  $ . "$TESTDIR/narrow-library.sh"
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
     3
43241
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
     4
  $ cat >> $HGRCPATH <<EOF
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
     5
  > [alias]
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
     6
  > l = log -G -T "{if(ellipsis, '...')}{rev}: {desc}\n"
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
     7
  > EOF
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
     8
36122
dc01484606da tests: fold narrow treemanifest tests into main test file using testcases
Augie Fackler <augie@google.com>
parents: 36117
diff changeset
     9
#if tree
dc01484606da tests: fold narrow treemanifest tests into main test file using testcases
Augie Fackler <augie@google.com>
parents: 36117
diff changeset
    10
  $ cat << EOF >> $HGRCPATH
dc01484606da tests: fold narrow treemanifest tests into main test file using testcases
Augie Fackler <augie@google.com>
parents: 36117
diff changeset
    11
  > [experimental]
dc01484606da tests: fold narrow treemanifest tests into main test file using testcases
Augie Fackler <augie@google.com>
parents: 36117
diff changeset
    12
  > treemanifest = 1
dc01484606da tests: fold narrow treemanifest tests into main test file using testcases
Augie Fackler <augie@google.com>
parents: 36117
diff changeset
    13
  > EOF
dc01484606da tests: fold narrow treemanifest tests into main test file using testcases
Augie Fackler <augie@google.com>
parents: 36117
diff changeset
    14
#endif
dc01484606da tests: fold narrow treemanifest tests into main test file using testcases
Augie Fackler <augie@google.com>
parents: 36117
diff changeset
    15
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    16
  $ hg init master
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    17
  $ cd master
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    18
  $ cat >> .hg/hgrc <<EOF
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    19
  > [narrow]
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    20
  > serveellipses=True
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    21
  > EOF
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    22
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    23
  $ mkdir inside
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    24
  $ echo 'inside' > inside/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    25
  $ hg add inside/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    26
  $ hg commit -m 'add inside'
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    27
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    28
  $ mkdir widest
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    29
  $ echo 'widest' > widest/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    30
  $ hg add widest/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    31
  $ hg commit -m 'add widest'
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    32
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    33
  $ mkdir outside
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    34
  $ echo 'outside' > outside/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    35
  $ hg add outside/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    36
  $ hg commit -m 'add outside'
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    37
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    38
  $ cd ..
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    39
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    40
narrow clone the inside file
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    41
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    42
  $ hg clone --narrow ssh://user@dummy/master narrow --include inside
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    43
  requesting all changes
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    44
  adding changesets
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    45
  adding manifests
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    46
  adding file changes
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    47
  added 2 changesets with 1 changes to 1 files
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    48
  new changesets *:* (glob)
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    49
  updating to branch default
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    50
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    51
  $ cd narrow
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    52
  $ hg tracked
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    53
  I path:inside
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 43241
diff changeset
    54
  $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 43241
diff changeset
    55
  .hg
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    56
  inside
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    57
  $ cat inside/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    58
  inside
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    59
  $ cd ..
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    60
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    61
add more upstream files which we will include in a wider narrow spec
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    62
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    63
  $ cd master
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    64
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    65
  $ mkdir wider
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    66
  $ echo 'wider' > wider/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    67
  $ hg add wider/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    68
  $ echo 'widest v2' > widest/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    69
  $ hg commit -m 'add wider, update widest'
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    70
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    71
  $ echo 'widest v3' > widest/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    72
  $ hg commit -m 'update widest v3'
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    73
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    74
  $ echo 'inside v2' > inside/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    75
  $ hg commit -m 'update inside'
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    76
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    77
  $ mkdir outside2
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    78
  $ echo 'outside2' > outside2/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    79
  $ hg add outside2/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    80
  $ hg commit -m 'add outside2'
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    81
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    82
  $ echo 'widest v4' > widest/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    83
  $ hg commit -m 'update widest v4'
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
    84
43241
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
    85
  $ hg l
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
    86
  @  7: update widest v4
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
    87
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
    88
  o  6: add outside2
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
    89
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
    90
  o  5: update inside
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
    91
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
    92
  o  4: update widest v3
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
    93
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
    94
  o  3: add wider, update widest
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
    95
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
    96
  o  2: add outside
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
    97
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
    98
  o  1: add widest
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
    99
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   100
  o  0: add inside
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   101
  
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   102
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   103
  $ cd ..
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   104
39483
83dd656586b1 tests: improve the widening testing in test-narrow-widen*
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39388
diff changeset
   105
Widen the narrow spec to see the widest file. This should not get the newly
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   106
added upstream revisions.
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   107
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   108
  $ cd narrow
43241
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   109
  $ hg l
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   110
  @  ...1: add outside
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   111
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   112
  o  0: add inside
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   113
  
39483
83dd656586b1 tests: improve the widening testing in test-narrow-widen*
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39388
diff changeset
   114
  $ hg tracked --addinclude widest/f
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   115
  comparing with ssh://user@dummy/master
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   116
  searching for changes
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   117
  saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob)
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   118
  adding changesets
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   119
  adding manifests
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   120
  adding file changes
47445
86418ad637d1 narrowbundle: use new context manager for silencing the ui
Martin von Zweigbergk <martinvonz@google.com>
parents: 46485
diff changeset
   121
  added 3 changesets with 2 changes to 3 files
43241
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   122
  $ hg l
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   123
  @  ...2: add outside
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   124
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   125
  o  1: add widest
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   126
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   127
  o  0: add inside
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   128
  
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   129
  $ hg tracked
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   130
  I path:inside
39483
83dd656586b1 tests: improve the widening testing in test-narrow-widen*
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39388
diff changeset
   131
  I path:widest/f
83dd656586b1 tests: improve the widening testing in test-narrow-widen*
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39388
diff changeset
   132
83dd656586b1 tests: improve the widening testing in test-narrow-widen*
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39388
diff changeset
   133
  $ cat widest/f
83dd656586b1 tests: improve the widening testing in test-narrow-widen*
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39388
diff changeset
   134
  widest
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   135
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   136
Pull down the newly added upstream revision.
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   137
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   138
  $ hg pull
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   139
  pulling from ssh://user@dummy/master
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   140
  searching for changes
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   141
  adding changesets
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   142
  adding manifests
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   143
  adding file changes
39483
83dd656586b1 tests: improve the widening testing in test-narrow-widen*
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39388
diff changeset
   144
  added 5 changesets with 4 changes to 2 files
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   145
  new changesets *:* (glob)
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   146
  (run 'hg update' to get a working copy)
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   147
  $ hg update -r 'desc("add wider")'
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   148
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
39483
83dd656586b1 tests: improve the widening testing in test-narrow-widen*
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39388
diff changeset
   149
  $ cat widest/f
83dd656586b1 tests: improve the widening testing in test-narrow-widen*
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39388
diff changeset
   150
  widest v2
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   151
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   152
  $ hg update -r 'desc("update inside")'
39483
83dd656586b1 tests: improve the widening testing in test-narrow-widen*
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39388
diff changeset
   153
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
83dd656586b1 tests: improve the widening testing in test-narrow-widen*
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39388
diff changeset
   154
  $ cat widest/f
83dd656586b1 tests: improve the widening testing in test-narrow-widen*
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39388
diff changeset
   155
  widest v3
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   156
  $ cat inside/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   157
  inside v2
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   158
43241
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   159
  $ hg l
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   160
  o  7: update widest v4
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   161
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   162
  o  ...6: add outside2
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   163
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   164
  @  5: update inside
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   165
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   166
  o  4: update widest v3
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   167
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   168
  o  3: add wider, update widest
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   169
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   170
  o  ...2: add outside
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   171
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   172
  o  1: add widest
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   173
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   174
  o  0: add inside
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   175
  
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   176
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   177
Check that widening with a newline fails
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   178
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   179
  $ hg tracked --addinclude 'widest
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   180
  > '
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   181
  abort: newlines are not allowed in narrowspec paths
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   182
  [255]
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   183
39483
83dd656586b1 tests: improve the widening testing in test-narrow-widen*
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39388
diff changeset
   184
widen the narrow spec to include the wider file
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   185
39483
83dd656586b1 tests: improve the widening testing in test-narrow-widen*
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39388
diff changeset
   186
  $ hg tracked --addinclude wider
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   187
  comparing with ssh://user@dummy/master
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   188
  searching for changes
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   189
  saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob)
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   190
  adding changesets
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   191
  adding manifests
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   192
  adding file changes
47445
86418ad637d1 narrowbundle: use new context manager for silencing the ui
Martin von Zweigbergk <martinvonz@google.com>
parents: 46485
diff changeset
   193
  added 8 changesets with 7 changes to 5 files
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   194
  $ hg tracked
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   195
  I path:inside
39483
83dd656586b1 tests: improve the widening testing in test-narrow-widen*
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39388
diff changeset
   196
  I path:wider
83dd656586b1 tests: improve the widening testing in test-narrow-widen*
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39388
diff changeset
   197
  I path:widest/f
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   198
  $ hg update 'desc("add widest")'
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   199
  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   200
  $ cat widest/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   201
  widest
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   202
  $ hg update 'desc("add wider, update widest")'
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   203
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   204
  $ cat wider/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   205
  wider
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   206
  $ cat widest/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   207
  widest v2
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   208
  $ hg update 'desc("update widest v3")'
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   209
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   210
  $ cat widest/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   211
  widest v3
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   212
  $ hg update 'desc("update widest v4")'
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   213
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   214
  $ cat widest/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   215
  widest v4
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   216
43241
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   217
  $ hg l
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   218
  @  7: update widest v4
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   219
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   220
  o  ...6: add outside2
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   221
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   222
  o  5: update inside
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   223
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   224
  o  4: update widest v3
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   225
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   226
  o  3: add wider, update widest
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   227
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   228
  o  ...2: add outside
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   229
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   230
  o  1: add widest
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   231
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   232
  o  0: add inside
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   233
  
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   234
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   235
separate suite of tests: files from 0-10 modified in changes 0-10. This allows
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   236
more obvious precise tests tickling particular corner cases.
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   237
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   238
  $ cd ..
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   239
  $ hg init upstream
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   240
  $ cd upstream
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   241
  $ cat >> .hg/hgrc <<EOF
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   242
  > [narrow]
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   243
  > serveellipses=True
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   244
  > EOF
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   245
  $ for x in `$TESTDIR/seq.py 0 10`
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   246
  > do
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   247
  >   mkdir d$x
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   248
  >   echo $x > d$x/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   249
  >   hg add d$x/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   250
  >   hg commit -m "add d$x/f"
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   251
  > done
39388
5ebfb7cc6f2c tests: use {rev} instead of {node|short} and (glob) in narrow tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 36122
diff changeset
   252
  $ hg log -T "{rev}: {desc}\n"
5ebfb7cc6f2c tests: use {rev} instead of {node|short} and (glob) in narrow tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 36122
diff changeset
   253
  10: add d10/f
5ebfb7cc6f2c tests: use {rev} instead of {node|short} and (glob) in narrow tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 36122
diff changeset
   254
  9: add d9/f
5ebfb7cc6f2c tests: use {rev} instead of {node|short} and (glob) in narrow tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 36122
diff changeset
   255
  8: add d8/f
5ebfb7cc6f2c tests: use {rev} instead of {node|short} and (glob) in narrow tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 36122
diff changeset
   256
  7: add d7/f
5ebfb7cc6f2c tests: use {rev} instead of {node|short} and (glob) in narrow tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 36122
diff changeset
   257
  6: add d6/f
5ebfb7cc6f2c tests: use {rev} instead of {node|short} and (glob) in narrow tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 36122
diff changeset
   258
  5: add d5/f
5ebfb7cc6f2c tests: use {rev} instead of {node|short} and (glob) in narrow tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 36122
diff changeset
   259
  4: add d4/f
5ebfb7cc6f2c tests: use {rev} instead of {node|short} and (glob) in narrow tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 36122
diff changeset
   260
  3: add d3/f
5ebfb7cc6f2c tests: use {rev} instead of {node|short} and (glob) in narrow tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 36122
diff changeset
   261
  2: add d2/f
5ebfb7cc6f2c tests: use {rev} instead of {node|short} and (glob) in narrow tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 36122
diff changeset
   262
  1: add d1/f
5ebfb7cc6f2c tests: use {rev} instead of {node|short} and (glob) in narrow tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 36122
diff changeset
   263
  0: add d0/f
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   264
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   265
make narrow clone with every third node.
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   266
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   267
  $ cd ..
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   268
  $ hg clone --narrow ssh://user@dummy/upstream narrow2 --include d0 --include d3 --include d6 --include d9
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   269
  requesting all changes
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   270
  adding changesets
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   271
  adding manifests
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   272
  adding file changes
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   273
  added 8 changesets with 4 changes to 4 files
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   274
  new changesets *:* (glob)
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   275
  updating to branch default
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   276
  4 files updated, 0 files merged, 0 files removed, 0 files unresolved
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   277
  $ cd narrow2
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   278
  $ hg tracked
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   279
  I path:d0
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   280
  I path:d3
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   281
  I path:d6
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   282
  I path:d9
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   283
  $ hg verify
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   284
  checking changesets
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   285
  checking manifests
36122
dc01484606da tests: fold narrow treemanifest tests into main test file using testcases
Augie Fackler <augie@google.com>
parents: 36117
diff changeset
   286
  checking directory manifests (tree !)
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   287
  crosschecking files in changesets and manifests
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   288
  checking files
39506
f1186c292d03 verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents: 39483
diff changeset
   289
  checked 8 changesets with 4 changes to 4 files
43241
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   290
  $ hg l
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   291
  @  ...7: add d10/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   292
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   293
  o  6: add d9/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   294
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   295
  o  ...5: add d8/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   296
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   297
  o  4: add d6/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   298
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   299
  o  ...3: add d5/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   300
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   301
  o  2: add d3/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   302
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   303
  o  ...1: add d2/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   304
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   305
  o  0: add d0/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   306
  
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   307
  $ hg tracked --addinclude d1
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   308
  comparing with ssh://user@dummy/upstream
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   309
  searching for changes
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   310
  saved backup bundle to $TESTTMP/narrow2/.hg/strip-backup/*-widen.hg (glob)
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   311
  adding changesets
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   312
  adding manifests
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   313
  adding file changes
47445
86418ad637d1 narrowbundle: use new context manager for silencing the ui
Martin von Zweigbergk <martinvonz@google.com>
parents: 46485
diff changeset
   314
  added 9 changesets with 5 changes to 9 files
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   315
  $ hg tracked
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   316
  I path:d0
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   317
  I path:d1
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   318
  I path:d3
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   319
  I path:d6
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   320
  I path:d9
43241
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   321
  $ hg l
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   322
  @  ...8: add d10/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   323
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   324
  o  7: add d9/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   325
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   326
  o  ...6: add d8/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   327
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   328
  o  5: add d6/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   329
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   330
  o  ...4: add d5/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   331
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   332
  o  3: add d3/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   333
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   334
  o  ...2: add d2/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   335
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   336
  o  1: add d1/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   337
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   338
  o  0: add d0/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   339
  
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   340
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   341
Verify shouldn't claim the repo is corrupt after a widen.
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   342
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   343
  $ hg verify
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   344
  checking changesets
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   345
  checking manifests
36122
dc01484606da tests: fold narrow treemanifest tests into main test file using testcases
Augie Fackler <augie@google.com>
parents: 36117
diff changeset
   346
  checking directory manifests (tree !)
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   347
  crosschecking files in changesets and manifests
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   348
  checking files
39506
f1186c292d03 verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents: 39483
diff changeset
   349
  checked 9 changesets with 5 changes to 5 files
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   350
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   351
Widening preserves parent of local commit
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   352
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   353
  $ cd ..
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   354
  $ hg clone -q --narrow ssh://user@dummy/upstream narrow3 --include d2 -r 2
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   355
  $ cd narrow3
43241
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   356
  $ hg l
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   357
  @  1: add d2/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   358
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   359
  o  ...0: add d1/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   360
  
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   361
  $ hg pull -q -r 3
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   362
  $ hg co -q tip
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   363
  $ hg pull -q -r 4
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   364
  $ echo local > d2/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   365
  $ hg ci -m local
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   366
  created new head
43241
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   367
  $ hg l
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   368
  @  4: local
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   369
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   370
  | o  ...3: add d4/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   371
  |/
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   372
  o  ...2: add d3/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   373
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   374
  o  1: add d2/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   375
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   376
  o  ...0: add d1/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   377
  
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   378
  $ hg tracked -q --addinclude d0 --addinclude d9
43241
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   379
  $ hg l
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   380
  @  5: local
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   381
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   382
  | o  ...4: add d4/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   383
  |/
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   384
  o  ...3: add d3/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   385
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   386
  o  2: add d2/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   387
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   388
  o  ...1: add d1/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   389
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   390
  o  0: add d0/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   391
  
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   392
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   393
Widening preserves bookmarks
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   394
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   395
  $ cd ..
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   396
  $ hg clone -q --narrow ssh://user@dummy/upstream narrow-bookmarks --include d4
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   397
  $ cd narrow-bookmarks
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   398
  $ echo local > d4/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   399
  $ hg ci -m local
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   400
  $ hg bookmarks bookmark
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   401
  $ hg bookmarks
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   402
   * bookmark                  3:* (glob)
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   403
  $ hg -q tracked --addinclude d2
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   404
  $ hg bookmarks
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   405
   * bookmark                  5:* (glob)
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   406
  $ hg log -r bookmark -T '{desc}\n'
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   407
  local
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   408
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   409
Widening that fails can be recovered from
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   410
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   411
  $ cd ..
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   412
  $ hg clone -q --narrow ssh://user@dummy/upstream interrupted --include d0
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   413
  $ cd interrupted
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   414
  $ echo local > d0/f
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   415
  $ hg ci -m local
43241
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   416
  $ hg l
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   417
  @  2: local
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   418
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   419
  o  ...1: add d10/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   420
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   421
  o  0: add d0/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   422
  
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   423
  $ hg bookmarks bookmark
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   424
  $ hg --config hooks.pretxnchangegroup.bad=false tracked --addinclude d1
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   425
  comparing with ssh://user@dummy/upstream
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   426
  searching for changes
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   427
  saved backup bundle to $TESTTMP/interrupted/.hg/strip-backup/*-widen.hg (glob)
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   428
  adding changesets
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   429
  adding manifests
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   430
  adding file changes
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   431
  transaction abort!
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   432
  rollback completed
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   433
  abort: pretxnchangegroup.bad hook exited with status 1
46485
768056549737 errors: use exit code 40 for when a hook fails
Martin von Zweigbergk <martinvonz@google.com>
parents: 44724
diff changeset
   434
  [40]
43241
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   435
  $ hg l
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   436
  $ hg bookmarks
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   437
  no bookmarks set
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   438
  $ hg unbundle .hg/strip-backup/*-widen.hg
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   439
  adding changesets
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   440
  adding manifests
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   441
  adding file changes
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   442
  added 3 changesets with 2 changes to 1 files
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   443
  new changesets *:* (glob)
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   444
  (run 'hg update' to get a working copy)
43241
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   445
  $ hg l
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   446
  o  2: local
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   447
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   448
  o  ...1: add d10/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   449
  |
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   450
  o  0: add d0/f
cca3c1755224 tests: show graph log before and after widening in more cases
Martin von Zweigbergk <martinvonz@google.com>
parents: 42903
diff changeset
   451
  
36117
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   452
  $ hg bookmarks
a2a6e724d61a narrow: import experimental extension from narrowhg revision cb51d673e9c5
Augie Fackler <augie@google.com>
parents:
diff changeset
   453
   * bookmark                  2:* (glob)