annotate tests/test-narrow-share.t @ 41141:89d103fc9c19

testrunner: avoid capturing a regex group we don't care about Differential Revision: https://phab.mercurial-scm.org/D5536
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 08 Jan 2019 22:07:47 -0800
parents ce0bc2952e2a
children 3227923979a1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
41042
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
1 #testcases flat tree
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
2
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
3 $ . "$TESTDIR/narrow-library.sh"
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
4
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
5 #if tree
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
6 $ cat << EOF >> $HGRCPATH
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
7 > [experimental]
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
8 > treemanifest = 1
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
9 > EOF
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
10 #endif
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
11
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
12 $ cat << EOF >> $HGRCPATH
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
13 > [extensions]
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
14 > share =
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
15 > EOF
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
16
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
17 $ hg init remote
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
18 $ cd remote
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
19 $ for x in `$TESTDIR/seq.py 0 10`
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
20 > do
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
21 > mkdir d$x
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
22 > echo $x > d$x/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
23 > hg add d$x/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
24 > hg commit -m "add d$x/f"
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
25 > done
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
26 $ cd ..
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
27
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
28 $ hg clone --narrow ssh://user@dummy/remote main -q \
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
29 > --include d1 --include d3 --include d5 --include d7
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
30
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
31 $ hg share main share
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
32 updating working directory
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
33 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
34 $ hg -R share tracked
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
35 I path:d1
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
36 I path:d3
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
37 I path:d5
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
38 I path:d7
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
39 $ hg -R share files
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
40 share/d1/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
41 share/d3/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
42 share/d5/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
43 share/d7/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
44
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
45 Narrow the share and check that the main repo's working copy gets updated
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
46
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
47 # Make d3/f dirty
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
48 $ echo x >> main/d3/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
49 $ echo y >> main/d3/g
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
50 $ hg add main/d3/g
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
51 $ hg -R main st
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
52 M d3/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
53 A d3/g
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
54 # Make d5/f not match the dirstate timestamp even though it's clean
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
55 $ sleep 2
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
56 $ hg -R main st
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
57 M d3/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
58 A d3/g
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
59 $ hg -R main debugdirstate --no-dates
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
60 n 644 2 set d1/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
61 n 644 2 unset d3/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
62 a 0 -1 unset d3/g
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
63 n 644 2 set d5/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
64 n 644 2 set d7/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
65 $ touch main/d5/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
66 $ hg -R share tracked --removeinclude d1 --removeinclude d3 --removeinclude d5
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
67 comparing with ssh://user@dummy/remote
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
68 searching for changes
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
69 looking for local changes to affected paths
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
70 deleting data/d1/f.i
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
71 deleting data/d3/f.i
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
72 deleting data/d5/f.i
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
73 deleting meta/d1/00manifest.i (tree !)
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
74 deleting meta/d3/00manifest.i (tree !)
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
75 deleting meta/d5/00manifest.i (tree !)
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
76 $ hg -R main tracked
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
77 I path:d7
41043
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
78 $ hg -R main files
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
79 abort: working copy's narrowspec is stale
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
80 (run 'hg tracked --update-working-copy')
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
81 [255]
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
82 $ hg -R main tracked --update-working-copy
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
83 not deleting possibly dirty file d3/f
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
84 not deleting possibly dirty file d3/g
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
85 not deleting possibly dirty file d5/f
41042
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
86 # d1/f, d3/f, d3/g and d5/f should no longer be reported
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
87 $ hg -R main files
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
88 main/d7/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
89 # d1/f should no longer be there, d3/f should be since it was dirty, d3/g should be there since
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
90 # it was added, and d5/f should be since we couldn't be sure it was clean
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
91 $ find main/d* -type f | sort
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
92 main/d3/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
93 main/d3/g
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
94 main/d5/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
95 main/d7/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
96
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
97 Widen the share and check that the main repo's working copy gets updated
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
98
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
99 $ hg -R share tracked --addinclude d1 --addinclude d3 -q
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
100 $ hg -R share tracked
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
101 I path:d1
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
102 I path:d3
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
103 I path:d7
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
104 $ hg -R share files
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
105 share/d1/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
106 share/d3/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
107 share/d7/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
108 $ hg -R main tracked
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
109 I path:d1
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
110 I path:d3
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
111 I path:d7
41043
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
112 $ hg -R main files
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
113 abort: working copy's narrowspec is stale
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
114 (run 'hg tracked --update-working-copy')
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
115 [255]
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
116 $ hg -R main tracked --update-working-copy
41042
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
117 # d1/f, d3/f should be back
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
118 $ hg -R main files
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
119 main/d1/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
120 main/d3/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
121 main/d7/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
122 # d3/f should be modified (not clobbered by the widening), and d3/g should be untracked
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
123 $ hg -R main st --all
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
124 M d3/f
41043
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
125 ? d3/g
41042
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
126 C d1/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
127 C d7/f
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
128
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
129 We should also be able to unshare without breaking everything:
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
130
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
131 $ hg share main share-unshare
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
132 updating working directory
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
133 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
134 $ cd share-unshare
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
135 $ hg unshare
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
136 $ hg verify
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
137 checking changesets
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
138 checking manifests
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
139 checking directory manifests (tree !)
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
140 crosschecking files in changesets and manifests
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
141 checking files
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
142 checked 11 changesets with 3 changes to 3 files
7db1619af061 tests: add test for narrow+share
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
143 $ cd ..
41043
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
144
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
145 Dirstate should be left alone when upgrading from version of hg that didn't support narrow+share
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
146
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
147 $ hg share main share-upgrade
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
148 updating working directory
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
149 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
150 $ cd share-upgrade
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
151 $ echo x >> d1/f
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
152 $ echo y >> d3/g
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
153 $ hg add d3/g
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
154 $ hg rm d7/f
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
155 $ hg st
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
156 M d1/f
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
157 A d3/g
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
158 R d7/f
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
159 Make it look like a repo from before narrow+share was supported
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
160 $ rm .hg/narrowspec.dirstate
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
161 $ hg st
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
162 abort: working copy's narrowspec is stale
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
163 (run 'hg tracked --update-working-copy')
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
164 [255]
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
165 $ hg tracked --update-working-copy
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
166 $ hg st
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
167 M d1/f
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
168 A d3/g
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
169 R d7/f
ce0bc2952e2a narrow: detect if narrowspec was changed in a different share
Martin von Zweigbergk <martinvonz@google.com>
parents: 41042
diff changeset
170 $ cd ..