Mercurial > hg
annotate tests/test-share.t @ 42391:c2deb2512823
testparseutil: fix doctest to use str instead of bytes
Differential Revision: https://phab.mercurial-scm.org/D6456
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 29 May 2019 10:00:30 -0400 |
parents | 81ece800576a |
children | 69883775b27d |
rev | line source |
---|---|
12487 | 1 $ echo "[extensions]" >> $HGRCPATH |
2 $ echo "share = " >> $HGRCPATH | |
3 | |
4 prepare repo1 | |
9990 | 5 |
12487 | 6 $ hg init repo1 |
7 $ cd repo1 | |
8 $ echo a > a | |
9 $ hg commit -A -m'init' | |
10 adding a | |
11 | |
12 share it | |
9990 | 13 |
12487 | 14 $ cd .. |
15 $ hg share repo1 repo2 | |
16 updating working directory | |
17 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
18 | |
19 share shouldn't have a store dir | |
20 | |
21 $ cd repo2 | |
22 $ test -d .hg/store | |
23 [1] | |
9990 | 24 |
40670
bd0874977a5e
checkexec: create destination directory if necessary
Boris Feld <boris.feld@octobus.net>
parents:
39848
diff
changeset
|
25 share shouldn't have a full cache dir, original repo should |
33539
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
26 |
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
27 $ hg branches |
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
28 default 0:d3873e73d99e |
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
29 $ hg tags |
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
30 tip 0:d3873e73d99e |
40792
47e3f554df35
check-exec: write file in 'wcache' instead of 'cache'
Boris Feld <boris.feld@octobus.net>
parents:
40674
diff
changeset
|
31 $ test -d .hg/cache |
47e3f554df35
check-exec: write file in 'wcache' instead of 'cache'
Boris Feld <boris.feld@octobus.net>
parents:
40674
diff
changeset
|
32 [1] |
47e3f554df35
check-exec: write file in 'wcache' instead of 'cache'
Boris Feld <boris.feld@octobus.net>
parents:
40674
diff
changeset
|
33 $ ls -1 .hg/wcache || true |
40674
25b7c4cb5de1
tests: stabilize the recent checkexec changes on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
40670
diff
changeset
|
34 checkisexec (execbit !) |
25b7c4cb5de1
tests: stabilize the recent checkexec changes on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
40670
diff
changeset
|
35 checklink (symlink !) |
25b7c4cb5de1
tests: stabilize the recent checkexec changes on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
40670
diff
changeset
|
36 checklink-target (symlink !) |
41965
e4ac7e63c213
manifestcache: use `wcache` directory for manifest cache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
41891
diff
changeset
|
37 manifestfulltextcache (reporevlogstore !) |
33539
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
38 $ ls -1 ../repo1/.hg/cache |
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
39 branch2-served |
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
40 rbc-names-v1 |
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
41 rbc-revs-v1 |
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
42 tags2-visible |
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
43 |
12487 | 44 Some sed versions appends newline, some don't, and some just fails |
45 | |
46 $ cat .hg/sharedpath; echo | |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
33986
diff
changeset
|
47 $TESTTMP/repo1/.hg |
12487 | 48 |
15101
a21ccf4412d5
share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents:
15080
diff
changeset
|
49 trailing newline on .hg/sharedpath is ok |
a21ccf4412d5
share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents:
15080
diff
changeset
|
50 $ hg tip -q |
a21ccf4412d5
share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents:
15080
diff
changeset
|
51 0:d3873e73d99e |
a21ccf4412d5
share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents:
15080
diff
changeset
|
52 $ echo '' >> .hg/sharedpath |
a21ccf4412d5
share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents:
15080
diff
changeset
|
53 $ cat .hg/sharedpath |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
33986
diff
changeset
|
54 $TESTTMP/repo1/.hg |
15101
a21ccf4412d5
share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents:
15080
diff
changeset
|
55 $ hg tip -q |
a21ccf4412d5
share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents:
15080
diff
changeset
|
56 0:d3873e73d99e |
a21ccf4412d5
share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents:
15080
diff
changeset
|
57 |
12487 | 58 commit in shared clone |
59 | |
60 $ echo a >> a | |
61 $ hg commit -m'change in shared clone' | |
62 | |
63 check original | |
9990 | 64 |
12487 | 65 $ cd ../repo1 |
66 $ hg log | |
67 changeset: 1:8af4dc49db9e | |
68 tag: tip | |
69 user: test | |
70 date: Thu Jan 01 00:00:00 1970 +0000 | |
71 summary: change in shared clone | |
72 | |
73 changeset: 0:d3873e73d99e | |
74 user: test | |
75 date: Thu Jan 01 00:00:00 1970 +0000 | |
76 summary: init | |
77 | |
78 $ hg update | |
79 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
80 $ cat a # should be two lines of "a" | |
81 a | |
82 a | |
9990 | 83 |
12487 | 84 commit in original |
85 | |
86 $ echo b > b | |
87 $ hg commit -A -m'another file' | |
88 adding b | |
89 | |
90 check in shared clone | |
9990 | 91 |
12487 | 92 $ cd ../repo2 |
93 $ hg log | |
94 changeset: 2:c2e0ac586386 | |
95 tag: tip | |
96 user: test | |
97 date: Thu Jan 01 00:00:00 1970 +0000 | |
98 summary: another file | |
99 | |
100 changeset: 1:8af4dc49db9e | |
101 user: test | |
102 date: Thu Jan 01 00:00:00 1970 +0000 | |
103 summary: change in shared clone | |
104 | |
105 changeset: 0:d3873e73d99e | |
106 user: test | |
107 date: Thu Jan 01 00:00:00 1970 +0000 | |
108 summary: init | |
109 | |
110 $ hg update | |
111 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
112 $ cat b # should exist with one "b" | |
113 b | |
9990 | 114 |
12487 | 115 hg serve shared clone |
9990 | 116 |
12487 | 117 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid |
118 $ cat hg.pid >> $DAEMON_PIDS | |
25472
4d2b9b304ad0
tests: drop explicit $TESTDIR from executables
Matt Mackall <mpm@selenic.com>
parents:
23614
diff
changeset
|
119 $ get-with-headers.py localhost:$HGPORT 'raw-file/' |
12487 | 120 200 Script output follows |
121 | |
122 | |
123 -rw-r--r-- 4 a | |
124 -rw-r--r-- 2 b | |
125 | |
126 | |
41792
2d835c42ab41
bundle2: don't send "shared" requirement when cloning from a share
mitchell plamann <mplamann@janestreet.com>
parents:
41791
diff
changeset
|
127 Cloning a shared repo via bundle2 results in a non-shared clone |
41791
a62ad1be1671
tests: demonstrate failure when cloning from a share via bundle2
mitchell plamann <mplamann@janestreet.com>
parents:
40807
diff
changeset
|
128 |
a62ad1be1671
tests: demonstrate failure when cloning from a share via bundle2
mitchell plamann <mplamann@janestreet.com>
parents:
40807
diff
changeset
|
129 $ cd .. |
41891
e82c932c01e3
tests: stabilize test-share.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
41792
diff
changeset
|
130 $ hg clone -q --stream --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/repo2 cloned-via-bundle2 |
41791
a62ad1be1671
tests: demonstrate failure when cloning from a share via bundle2
mitchell plamann <mplamann@janestreet.com>
parents:
40807
diff
changeset
|
131 $ cat ./cloned-via-bundle2/.hg/requires | grep "shared" |
41792
2d835c42ab41
bundle2: don't send "shared" requirement when cloning from a share
mitchell plamann <mplamann@janestreet.com>
parents:
41791
diff
changeset
|
132 [1] |
41791
a62ad1be1671
tests: demonstrate failure when cloning from a share via bundle2
mitchell plamann <mplamann@janestreet.com>
parents:
40807
diff
changeset
|
133 $ hg id --cwd cloned-via-bundle2 -r tip |
41792
2d835c42ab41
bundle2: don't send "shared" requirement when cloning from a share
mitchell plamann <mplamann@janestreet.com>
parents:
41791
diff
changeset
|
134 c2e0ac586386 tip |
41791
a62ad1be1671
tests: demonstrate failure when cloning from a share via bundle2
mitchell plamann <mplamann@janestreet.com>
parents:
40807
diff
changeset
|
135 $ cd repo2 |
15080
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
136 |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
137 test unshare command |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
138 |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
139 $ hg unshare |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
140 $ test -d .hg/store |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
141 $ test -f .hg/sharedpath |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
142 [1] |
31211
ecbd378d9a7e
share: fix typo to drop 'shared' requirement on unshare
Yuya Nishihara <yuya@tcha.org>
parents:
31133
diff
changeset
|
143 $ grep shared .hg/requires |
ecbd378d9a7e
share: fix typo to drop 'shared' requirement on unshare
Yuya Nishihara <yuya@tcha.org>
parents:
31133
diff
changeset
|
144 [1] |
15080
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
145 $ hg unshare |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
146 abort: this is not a shared repo |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
147 [255] |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
148 |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
149 check that a change does not propagate |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
150 |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
151 $ echo b >> b |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
152 $ hg commit -m'change in unshared' |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
153 $ cd ../repo1 |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
154 $ hg id -r tip |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
155 c2e0ac586386 tip |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15447
diff
changeset
|
156 |
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15447
diff
changeset
|
157 $ cd .. |
17539
bc7377160fa7
tests: enable more server tests on Windows
Patrick Mezard <patrick@mezard.eu>
parents:
17017
diff
changeset
|
158 |
23548
141baca16059
share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents:
22046
diff
changeset
|
159 |
31892
9e67ce5c4fd0
largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com>
parents:
31767
diff
changeset
|
160 non largefiles repos won't enable largefiles |
9e67ce5c4fd0
largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com>
parents:
31767
diff
changeset
|
161 |
42313
81ece800576a
tests: separate out bookmarks tests from test-share.t
Martin von Zweigbergk <martinvonz@google.com>
parents:
41965
diff
changeset
|
162 $ hg share --config extensions.largefiles= repo2 sharedrepo |
33212
fe0667cc521e
tests: add fsmonitor specific output lines at enabling largefiles
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31892
diff
changeset
|
163 The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
fe0667cc521e
tests: add fsmonitor specific output lines at enabling largefiles
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
31892
diff
changeset
|
164 The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
31892
9e67ce5c4fd0
largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com>
parents:
31767
diff
changeset
|
165 updating working directory |
9e67ce5c4fd0
largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com>
parents:
31767
diff
changeset
|
166 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
9e67ce5c4fd0
largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com>
parents:
31767
diff
changeset
|
167 $ [ -f sharedrepo/.hg/hgrc ] |
9e67ce5c4fd0
largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com>
parents:
31767
diff
changeset
|
168 [1] |
9e67ce5c4fd0
largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com>
parents:
31767
diff
changeset
|
169 |
31133
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
170 test shared clones using relative paths work |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
171 |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
172 $ mkdir thisdir |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
173 $ hg init thisdir/orig |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
174 $ hg share -U thisdir/orig thisdir/abs |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
175 $ hg share -U --relative thisdir/abs thisdir/rel |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
176 $ cat thisdir/rel/.hg/sharedpath |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
33986
diff
changeset
|
177 ../../orig/.hg (no-eol) |
31133
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
178 $ grep shared thisdir/*/.hg/requires |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
179 thisdir/abs/.hg/requires:shared |
39848
4ece3cdfd907
localrepo: support shared repo creation
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39696
diff
changeset
|
180 thisdir/rel/.hg/requires:relshared |
31133
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
181 thisdir/rel/.hg/requires:shared |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
182 |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
183 test that relative shared paths aren't relative to $PWD |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
184 |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
185 $ cd thisdir |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
186 $ hg -R rel root |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
33986
diff
changeset
|
187 $TESTTMP/thisdir/rel |
31133
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
188 $ cd .. |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
189 |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
190 now test that relative paths really are relative, survive across |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
191 renames and changes of PWD |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
192 |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
193 $ hg -R thisdir/abs root |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
33986
diff
changeset
|
194 $TESTTMP/thisdir/abs |
31133
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
195 $ hg -R thisdir/rel root |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
33986
diff
changeset
|
196 $TESTTMP/thisdir/rel |
31133
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
197 $ mv thisdir thatdir |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
198 $ hg -R thatdir/abs root |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
33986
diff
changeset
|
199 abort: .hg/sharedpath points to nonexistent directory $TESTTMP/thisdir/orig/.hg! |
31133
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
200 [255] |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
201 $ hg -R thatdir/rel root |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
33986
diff
changeset
|
202 $TESTTMP/thatdir/rel |
31212
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
203 |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
204 test unshare relshared repo |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
205 |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
206 $ cd thatdir/rel |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
207 $ hg unshare |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
208 $ test -d .hg/store |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
209 $ test -f .hg/sharedpath |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
210 [1] |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
211 $ grep shared .hg/requires |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
212 [1] |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
213 $ hg unshare |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
214 abort: this is not a shared repo |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
215 [255] |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
216 $ cd ../.. |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
217 |
31133
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
218 $ rm -r thatdir |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
219 |
39696
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
220 Demonstrate buggy behavior around requirements validation |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
221 See comment in localrepo.py:makelocalrepository() for more. |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
222 |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
223 $ hg init sharenewrequires |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
224 $ hg share sharenewrequires shareoldrequires |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
225 updating working directory |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
226 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
227 |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
228 $ cat >> sharenewrequires/.hg/requires << EOF |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
229 > missing-requirement |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
230 > EOF |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
231 |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
232 We cannot open the repo with the unknown requirement |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
233 |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
234 $ hg -R sharenewrequires status |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
235 abort: repository requires features unknown to this Mercurial: missing-requirement! |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
236 (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
237 [255] |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
238 |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
239 BUG: we don't get the same error when opening the shared repo pointing to it |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
240 |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
241 $ hg -R shareoldrequires status |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
242 |
17539
bc7377160fa7
tests: enable more server tests on Windows
Patrick Mezard <patrick@mezard.eu>
parents:
17017
diff
changeset
|
243 Explicitly kill daemons to let the test exit on Windows |
bc7377160fa7
tests: enable more server tests on Windows
Patrick Mezard <patrick@mezard.eu>
parents:
17017
diff
changeset
|
244 |
25474
8c14f87bd0ae
tests: drop DAEMON_PIDS from killdaemons calls
Matt Mackall <mpm@selenic.com>
parents:
25472
diff
changeset
|
245 $ killdaemons.py |
17539
bc7377160fa7
tests: enable more server tests on Windows
Patrick Mezard <patrick@mezard.eu>
parents:
17017
diff
changeset
|
246 |