Mercurial > hg
annotate tests/test-share.t @ 44909:d452acc8cce8 stable
flags: account for flag change when tracking rename relevant to merge
There are some logic filtering rename to the one relevant to the merge. That
logic was oblivious of flag change, leading to exec flag being dropped when
merged with a renamed.
There are two others bugs affecting this scenario. This patch fix the was where
there is not modification involved except for the flag change. Fixes for the
other bug are coming in later changesets.
Differential Revision: https://phab.mercurial-scm.org/D8531
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 16 May 2020 20:37:56 +0200 |
parents | 69883775b27d |
children | dc283bc7e033 |
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] | |
42419
69883775b27d
root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents:
42313
diff
changeset
|
24 $ hg root -Tjson | sed 's|\\\\|\\|g' |
69883775b27d
root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents:
42313
diff
changeset
|
25 [ |
69883775b27d
root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents:
42313
diff
changeset
|
26 { |
69883775b27d
root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents:
42313
diff
changeset
|
27 "hgpath": "$TESTTMP/repo2/.hg", |
69883775b27d
root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents:
42313
diff
changeset
|
28 "reporoot": "$TESTTMP/repo2", |
69883775b27d
root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents:
42313
diff
changeset
|
29 "storepath": "$TESTTMP/repo1/.hg/store" |
69883775b27d
root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents:
42313
diff
changeset
|
30 } |
69883775b27d
root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents:
42313
diff
changeset
|
31 ] |
9990 | 32 |
40670
bd0874977a5e
checkexec: create destination directory if necessary
Boris Feld <boris.feld@octobus.net>
parents:
39848
diff
changeset
|
33 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
|
34 |
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
35 $ hg branches |
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
36 default 0:d3873e73d99e |
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
37 $ hg tags |
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
38 tip 0:d3873e73d99e |
40792
47e3f554df35
check-exec: write file in 'wcache' instead of 'cache'
Boris Feld <boris.feld@octobus.net>
parents:
40674
diff
changeset
|
39 $ test -d .hg/cache |
47e3f554df35
check-exec: write file in 'wcache' instead of 'cache'
Boris Feld <boris.feld@octobus.net>
parents:
40674
diff
changeset
|
40 [1] |
47e3f554df35
check-exec: write file in 'wcache' instead of 'cache'
Boris Feld <boris.feld@octobus.net>
parents:
40674
diff
changeset
|
41 $ 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
|
42 checkisexec (execbit !) |
25b7c4cb5de1
tests: stabilize the recent checkexec changes on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
40670
diff
changeset
|
43 checklink (symlink !) |
25b7c4cb5de1
tests: stabilize the recent checkexec changes on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
40670
diff
changeset
|
44 checklink-target (symlink !) |
41965
e4ac7e63c213
manifestcache: use `wcache` directory for manifest cache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
41891
diff
changeset
|
45 manifestfulltextcache (reporevlogstore !) |
33539
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
46 $ ls -1 ../repo1/.hg/cache |
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
47 branch2-served |
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
48 rbc-names-v1 |
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
49 rbc-revs-v1 |
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
50 tags2-visible |
460733327640
share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents:
33212
diff
changeset
|
51 |
12487 | 52 Some sed versions appends newline, some don't, and some just fails |
53 | |
54 $ 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
|
55 $TESTTMP/repo1/.hg |
12487 | 56 |
15101
a21ccf4412d5
share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents:
15080
diff
changeset
|
57 trailing newline on .hg/sharedpath is ok |
a21ccf4412d5
share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents:
15080
diff
changeset
|
58 $ hg tip -q |
a21ccf4412d5
share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents:
15080
diff
changeset
|
59 0:d3873e73d99e |
a21ccf4412d5
share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents:
15080
diff
changeset
|
60 $ echo '' >> .hg/sharedpath |
a21ccf4412d5
share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents:
15080
diff
changeset
|
61 $ cat .hg/sharedpath |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
33986
diff
changeset
|
62 $TESTTMP/repo1/.hg |
15101
a21ccf4412d5
share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents:
15080
diff
changeset
|
63 $ hg tip -q |
a21ccf4412d5
share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents:
15080
diff
changeset
|
64 0:d3873e73d99e |
a21ccf4412d5
share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents:
15080
diff
changeset
|
65 |
12487 | 66 commit in shared clone |
67 | |
68 $ echo a >> a | |
69 $ hg commit -m'change in shared clone' | |
70 | |
71 check original | |
9990 | 72 |
12487 | 73 $ cd ../repo1 |
74 $ hg log | |
75 changeset: 1:8af4dc49db9e | |
76 tag: tip | |
77 user: test | |
78 date: Thu Jan 01 00:00:00 1970 +0000 | |
79 summary: change in shared clone | |
80 | |
81 changeset: 0:d3873e73d99e | |
82 user: test | |
83 date: Thu Jan 01 00:00:00 1970 +0000 | |
84 summary: init | |
85 | |
86 $ hg update | |
87 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
88 $ cat a # should be two lines of "a" | |
89 a | |
90 a | |
9990 | 91 |
12487 | 92 commit in original |
93 | |
94 $ echo b > b | |
95 $ hg commit -A -m'another file' | |
96 adding b | |
97 | |
98 check in shared clone | |
9990 | 99 |
12487 | 100 $ cd ../repo2 |
101 $ hg log | |
102 changeset: 2:c2e0ac586386 | |
103 tag: tip | |
104 user: test | |
105 date: Thu Jan 01 00:00:00 1970 +0000 | |
106 summary: another file | |
107 | |
108 changeset: 1:8af4dc49db9e | |
109 user: test | |
110 date: Thu Jan 01 00:00:00 1970 +0000 | |
111 summary: change in shared clone | |
112 | |
113 changeset: 0:d3873e73d99e | |
114 user: test | |
115 date: Thu Jan 01 00:00:00 1970 +0000 | |
116 summary: init | |
117 | |
118 $ hg update | |
119 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
120 $ cat b # should exist with one "b" | |
121 b | |
9990 | 122 |
12487 | 123 hg serve shared clone |
9990 | 124 |
12487 | 125 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid |
126 $ cat hg.pid >> $DAEMON_PIDS | |
25472
4d2b9b304ad0
tests: drop explicit $TESTDIR from executables
Matt Mackall <mpm@selenic.com>
parents:
23614
diff
changeset
|
127 $ get-with-headers.py localhost:$HGPORT 'raw-file/' |
12487 | 128 200 Script output follows |
129 | |
130 | |
131 -rw-r--r-- 4 a | |
132 -rw-r--r-- 2 b | |
133 | |
134 | |
41792
2d835c42ab41
bundle2: don't send "shared" requirement when cloning from a share
mitchell plamann <mplamann@janestreet.com>
parents:
41791
diff
changeset
|
135 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
|
136 |
a62ad1be1671
tests: demonstrate failure when cloning from a share via bundle2
mitchell plamann <mplamann@janestreet.com>
parents:
40807
diff
changeset
|
137 $ cd .. |
41891
e82c932c01e3
tests: stabilize test-share.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
41792
diff
changeset
|
138 $ 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
|
139 $ 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
|
140 [1] |
41791
a62ad1be1671
tests: demonstrate failure when cloning from a share via bundle2
mitchell plamann <mplamann@janestreet.com>
parents:
40807
diff
changeset
|
141 $ 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
|
142 c2e0ac586386 tip |
41791
a62ad1be1671
tests: demonstrate failure when cloning from a share via bundle2
mitchell plamann <mplamann@janestreet.com>
parents:
40807
diff
changeset
|
143 $ cd repo2 |
15080
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
144 |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
145 test unshare command |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
146 |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
147 $ hg unshare |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
148 $ test -d .hg/store |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
149 $ test -f .hg/sharedpath |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
150 [1] |
31211
ecbd378d9a7e
share: fix typo to drop 'shared' requirement on unshare
Yuya Nishihara <yuya@tcha.org>
parents:
31133
diff
changeset
|
151 $ grep shared .hg/requires |
ecbd378d9a7e
share: fix typo to drop 'shared' requirement on unshare
Yuya Nishihara <yuya@tcha.org>
parents:
31133
diff
changeset
|
152 [1] |
15080
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
153 $ hg unshare |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
154 abort: this is not a shared repo |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
155 [255] |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
156 |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
157 check that a change does not propagate |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
158 |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
159 $ echo b >> b |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
160 $ hg commit -m'change in unshared' |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
161 $ cd ../repo1 |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
162 $ hg id -r tip |
574dc5d74f9b
test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents:
12640
diff
changeset
|
163 c2e0ac586386 tip |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15447
diff
changeset
|
164 |
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15447
diff
changeset
|
165 $ cd .. |
17539
bc7377160fa7
tests: enable more server tests on Windows
Patrick Mezard <patrick@mezard.eu>
parents:
17017
diff
changeset
|
166 |
23548
141baca16059
share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents:
22046
diff
changeset
|
167 |
31892
9e67ce5c4fd0
largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com>
parents:
31767
diff
changeset
|
168 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
|
169 |
42313
81ece800576a
tests: separate out bookmarks tests from test-share.t
Martin von Zweigbergk <martinvonz@google.com>
parents:
41965
diff
changeset
|
170 $ 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
|
171 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
|
172 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
|
173 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
|
174 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
|
175 $ [ -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
|
176 [1] |
9e67ce5c4fd0
largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com>
parents:
31767
diff
changeset
|
177 |
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 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
|
179 |
23080c03a604
share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
31052
diff
changeset
|
180 $ 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
|
181 $ 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
|
182 $ 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
|
183 $ 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
|
184 $ 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
|
185 ../../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
|
186 $ 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
|
187 thisdir/abs/.hg/requires:shared |
39848
4ece3cdfd907
localrepo: support shared repo creation
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39696
diff
changeset
|
188 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
|
189 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
|
190 |
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 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
|
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 $ 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
|
194 $ 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
|
195 $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
|
196 $ 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
|
197 |
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 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
|
199 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
|
200 |
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 thisdir/abs root |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
33986
diff
changeset
|
202 $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
|
203 $ 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
|
204 $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
|
205 $ 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
|
206 $ 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
|
207 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
|
208 [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
|
209 $ 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
|
210 $TESTTMP/thatdir/rel |
31212
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
211 |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
212 test unshare relshared repo |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
213 |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
214 $ cd thatdir/rel |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
215 $ hg unshare |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
216 $ test -d .hg/store |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
217 $ test -f .hg/sharedpath |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
218 [1] |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
219 $ grep shared .hg/requires |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
220 [1] |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
221 $ hg unshare |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
222 abort: this is not a shared repo |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
223 [255] |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
224 $ cd ../.. |
344121b30f32
share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents:
31211
diff
changeset
|
225 |
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
|
226 $ 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
|
227 |
39696
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
228 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
|
229 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
|
230 |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
231 $ hg init sharenewrequires |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
232 $ hg share sharenewrequires shareoldrequires |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
233 updating working directory |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
234 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
|
235 |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
236 $ 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
|
237 > missing-requirement |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
238 > EOF |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
239 |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
240 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
|
241 |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
242 $ hg -R sharenewrequires status |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
243 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
|
244 (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
|
245 [255] |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
246 |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
247 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
|
248 |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
249 $ hg -R shareoldrequires status |
9de1a1c83cd7
localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39323
diff
changeset
|
250 |
17539
bc7377160fa7
tests: enable more server tests on Windows
Patrick Mezard <patrick@mezard.eu>
parents:
17017
diff
changeset
|
251 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
|
252 |
25474
8c14f87bd0ae
tests: drop DAEMON_PIDS from killdaemons calls
Matt Mackall <mpm@selenic.com>
parents:
25472
diff
changeset
|
253 $ killdaemons.py |
17539
bc7377160fa7
tests: enable more server tests on Windows
Patrick Mezard <patrick@mezard.eu>
parents:
17017
diff
changeset
|
254 |