annotate tests/test-share.t @ 41855:2dbdb9abcc4b

inno: remove w9xpopen.exe w9xpopen.exe is a utility program shipped with Python <3.4 (https://bugs.python.org/issue14470 tracked its removal). The program was used by subprocess to wrap invoked processes on Windows 95 and 98 or when command.com was used in order to work around a redirect bug. The workaround is only used on ancient Windows versions - versions that we shouldn't see in 2019. While Python 2.7's subprocess module still references w9xpopen.exe, not shipping it shouldn't matter unless we're running an ancient version of Windows. Python will raise an exception if w9xpopen.exe can't be found. It's highly unlikely anyone is using current Mercurial releases on these ancient Windows versions. So remove w9xpopen.exe from the Inno installer. .. bc:: The 32-bit Windows Inno installers no longer distribute w9xpopen.exe. This should only impact people running Mercurial on Windows 95, 98, or ME. Differential Revision: https://phab.mercurial-scm.org/D6068
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 03 Mar 2019 17:22:03 -0800
parents 2d835c42ab41
children e82c932c01e3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
1 $ echo "[extensions]" >> $HGRCPATH
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
2 $ echo "share = " >> $HGRCPATH
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
3
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
4 prepare repo1
9990
c1d940d31aea share: add a test script.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
5
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
6 $ hg init repo1
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
7 $ cd repo1
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
8 $ echo a > a
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
9 $ hg commit -A -m'init'
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
10 adding a
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
11
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
12 share it
9990
c1d940d31aea share: add a test script.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
13
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
14 $ cd ..
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
15 $ hg share repo1 repo2
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
16 updating working directory
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
17 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
18
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
19 share shouldn't have a store dir
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
20
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
21 $ cd repo2
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
22 $ test -d .hg/store
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
23 [1]
9990
c1d940d31aea share: add a test script.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
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 !)
33539
460733327640 share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents: 33212
diff changeset
37 $ ls -1 ../repo1/.hg/cache
460733327640 share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents: 33212
diff changeset
38 branch2-served
39323
c11e8894b9ca tests: mark manifestfulltextcache as conditional on revlog store
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39186
diff changeset
39 manifestfulltextcache (reporevlogstore !)
33539
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
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
44 Some sed versions appends newline, some don't, and some just fails
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
45
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
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
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
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
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
58 commit in shared clone
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
59
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
60 $ echo a >> a
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
61 $ hg commit -m'change in shared clone'
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
62
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
63 check original
9990
c1d940d31aea share: add a test script.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
64
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
65 $ cd ../repo1
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
66 $ hg log
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
67 changeset: 1:8af4dc49db9e
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
68 tag: tip
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
69 user: test
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
70 date: Thu Jan 01 00:00:00 1970 +0000
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
71 summary: change in shared clone
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
72
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
73 changeset: 0:d3873e73d99e
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
74 user: test
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
75 date: Thu Jan 01 00:00:00 1970 +0000
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
76 summary: init
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
77
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
78 $ hg update
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
79 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
80 $ cat a # should be two lines of "a"
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
81 a
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
82 a
9990
c1d940d31aea share: add a test script.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
83
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
84 commit in original
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
85
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
86 $ echo b > b
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
87 $ hg commit -A -m'another file'
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
88 adding b
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
89
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
90 check in shared clone
9990
c1d940d31aea share: add a test script.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
91
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
92 $ cd ../repo2
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
93 $ hg log
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
94 changeset: 2:c2e0ac586386
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
95 tag: tip
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
96 user: test
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
97 date: Thu Jan 01 00:00:00 1970 +0000
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
98 summary: another file
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
99
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
100 changeset: 1:8af4dc49db9e
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
101 user: test
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
102 date: Thu Jan 01 00:00:00 1970 +0000
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
103 summary: change in shared clone
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
104
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
105 changeset: 0:d3873e73d99e
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
106 user: test
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
107 date: Thu Jan 01 00:00:00 1970 +0000
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
108 summary: init
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
109
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
110 $ hg update
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
111 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
112 $ cat b # should exist with one "b"
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
113 b
9990
c1d940d31aea share: add a test script.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
114
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
115 hg serve shared clone
9990
c1d940d31aea share: add a test script.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
116
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
117 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
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
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
120 200 Script output follows
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
121
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
122
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
123 -rw-r--r-- 4 a
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
124 -rw-r--r-- 2 b
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
125
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
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 ..
a62ad1be1671 tests: demonstrate failure when cloning from a share via bundle2
mitchell plamann <mplamann@janestreet.com>
parents: 40807
diff changeset
130 $ hg clone -q --stream --config ui.ssh="$PYTHON \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/repo2 cloned-via-bundle2
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
23614
cd79fb4d75fd share: add option to share bookmarks
Ryan McElroy <rmcelroy@fb.com>
parents: 23548
diff changeset
160 test sharing bookmarks
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
161
23614
cd79fb4d75fd share: add option to share bookmarks
Ryan McElroy <rmcelroy@fb.com>
parents: 23548
diff changeset
162 $ hg share -B repo1 repo3
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
163 updating working directory
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
164 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
165 $ cd repo1
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
166 $ hg bookmark bm1
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
167 $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
168 * bm1 2:c2e0ac586386
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
169 $ cd ../repo2
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
170 $ hg book bm2
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
171 $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
172 * bm2 3:0e6e70d1d5f1
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
173 $ cd ../repo3
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
174 $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
175 bm1 2:c2e0ac586386
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
176 $ hg book bm3
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
177 $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
178 bm1 2:c2e0ac586386
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
179 * bm3 2:c2e0ac586386
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
180 $ cd ../repo1
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
181 $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
182 * bm1 2:c2e0ac586386
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
183 bm3 2:c2e0ac586386
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
184
31052
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
185 check whether HG_PENDING makes pending changes only in relatd
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
186 repositories visible to an external hook.
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
187
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
188 In "hg share" case, another transaction can't run in other
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
189 repositories sharing same source repository, because starting
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
190 transaction requires locking store of source repository.
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
191
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
192 Therefore, this test scenario ignores checking visibility of
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
193 .hg/bookmakrs.pending in repo2, which shares repo1 without bookmarks.
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
194
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
195 $ cat > $TESTTMP/checkbookmarks.sh <<EOF
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
196 > echo "@repo1"
31767
6c800688afe1 tests: quote paths in shell script hooks
Matt Harbison <matt_harbison@yahoo.com>
parents: 31766
diff changeset
197 > hg -R "$TESTTMP/repo1" bookmarks
31052
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
198 > echo "@repo2"
31767
6c800688afe1 tests: quote paths in shell script hooks
Matt Harbison <matt_harbison@yahoo.com>
parents: 31766
diff changeset
199 > hg -R "$TESTTMP/repo2" bookmarks
31052
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
200 > echo "@repo3"
31767
6c800688afe1 tests: quote paths in shell script hooks
Matt Harbison <matt_harbison@yahoo.com>
parents: 31766
diff changeset
201 > hg -R "$TESTTMP/repo3" bookmarks
31052
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
202 > exit 1 # to avoid adding new bookmark for subsequent tests
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
203 > EOF
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
204
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
205 $ cd ../repo1
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
206 $ hg --config hooks.pretxnclose="sh $TESTTMP/checkbookmarks.sh" -q book bmX
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
207 @repo1
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
208 bm1 2:c2e0ac586386
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
209 bm3 2:c2e0ac586386
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
210 * bmX 2:c2e0ac586386
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
211 @repo2
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
212 * bm2 3:0e6e70d1d5f1
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
213 @repo3
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
214 bm1 2:c2e0ac586386
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
215 * bm3 2:c2e0ac586386
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
216 bmX 2:c2e0ac586386
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
217 transaction abort!
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
218 rollback completed
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
219 abort: pretxnclose hook exited with status 1
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
220 [255]
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
221 $ hg book bm1
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
222
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
223 FYI, in contrast to above test, bmX is invisible in repo1 (= shared
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
224 src), because (1) HG_PENDING refers only repo3 and (2)
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
225 "bookmarks.pending" is written only into repo3.
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
226
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
227 $ cd ../repo3
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
228 $ hg --config hooks.pretxnclose="sh $TESTTMP/checkbookmarks.sh" -q book bmX
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
229 @repo1
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
230 * bm1 2:c2e0ac586386
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
231 bm3 2:c2e0ac586386
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
232 @repo2
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
233 * bm2 3:0e6e70d1d5f1
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
234 @repo3
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
235 bm1 2:c2e0ac586386
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
236 bm3 2:c2e0ac586386
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
237 * bmX 2:c2e0ac586386
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
238 transaction abort!
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
239 rollback completed
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
240 abort: pretxnclose hook exited with status 1
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
241 [255]
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
242 $ hg book bm3
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
243
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
244 $ cd ../repo1
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
245
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
246 test that commits work
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
247
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
248 $ echo 'shared bookmarks' > a
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
249 $ hg commit -m 'testing shared bookmarks'
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
250 $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
251 * bm1 3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
252 bm3 2:c2e0ac586386
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
253 $ cd ../repo3
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
254 $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
255 bm1 3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
256 * bm3 2:c2e0ac586386
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
257 $ echo 'more shared bookmarks' > a
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
258 $ hg commit -m 'testing shared bookmarks'
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
259 created new head
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
260 $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
261 bm1 3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
262 * bm3 4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
263 $ cd ../repo1
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
264 $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
265 * bm1 3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
266 bm3 4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
267 $ cd ..
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
268
31892
9e67ce5c4fd0 largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com>
parents: 31767
diff changeset
269 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
270
9e67ce5c4fd0 largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com>
parents: 31767
diff changeset
271 $ hg share --config extensions.largefiles= repo3 sharedrepo
33212
fe0667cc521e tests: add fsmonitor specific output lines at enabling largefiles
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 31892
diff changeset
272 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
273 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
274 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
275 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
276 $ [ -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
277 [1]
9e67ce5c4fd0 largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com>
parents: 31767
diff changeset
278
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
279 test pushing bookmarks works
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
280
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
281 $ hg clone repo3 repo4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
282 updating to branch default
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
283 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
284 $ cd repo4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
285 $ hg boo bm4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
286 $ echo foo > b
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
287 $ hg commit -m 'foo in b'
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
288 $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
289 bm1 3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
290 bm3 4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
291 * bm4 5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
292 $ hg push -B bm4
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 33986
diff changeset
293 pushing to $TESTTMP/repo3
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
294 searching for changes
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
295 adding changesets
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
296 adding manifests
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
297 adding file changes
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
298 added 1 changesets with 1 changes to 1 files
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
299 exporting bookmark bm4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
300 $ cd ../repo1
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
301 $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
302 * bm1 3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
303 bm3 4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
304 bm4 5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
305 $ cd ../repo3
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
306 $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
307 bm1 3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
308 * bm3 4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
309 bm4 5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
310 $ cd ..
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
311
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
312 test behavior when sharing a shared repo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
313
39186
e8deaa77c1b6 share: allow more than one level of directories to be created
Matt Harbison <matt_harbison@yahoo.com>
parents: 38781
diff changeset
314 $ hg share -B repo3 missingdir/repo5
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
315 updating working directory
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
316 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
39186
e8deaa77c1b6 share: allow more than one level of directories to be created
Matt Harbison <matt_harbison@yahoo.com>
parents: 38781
diff changeset
317 $ cd missingdir/repo5
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
318 $ hg book
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
319 bm1 3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
320 bm3 4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
321 bm4 5:92793bfc8cad
39186
e8deaa77c1b6 share: allow more than one level of directories to be created
Matt Harbison <matt_harbison@yahoo.com>
parents: 38781
diff changeset
322 $ cd ../..
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
323
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
324 test what happens when an active bookmark is deleted
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
325
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
326 $ cd repo1
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
327 $ hg boo -d bm3
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
328 $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
329 * bm1 3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
330 bm4 5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
331 $ cd ../repo3
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
332 $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
333 bm1 3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
334 bm4 5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
335 $ cd ..
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
336
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
337 verify that bookmarks are not written on failed transaction
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
338
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
339 $ cat > failpullbookmarks.py << EOF
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
340 > """A small extension that makes bookmark pulls fail, for testing"""
33986
169c97d4e722 tests: update test-share to pass our import checker
Augie Fackler <raf@durin42.com>
parents: 33539
diff changeset
341 > from __future__ import absolute_import
169c97d4e722 tests: update test-share to pass our import checker
Augie Fackler <raf@durin42.com>
parents: 33539
diff changeset
342 > from mercurial import (
169c97d4e722 tests: update test-share to pass our import checker
Augie Fackler <raf@durin42.com>
parents: 33539
diff changeset
343 > error,
169c97d4e722 tests: update test-share to pass our import checker
Augie Fackler <raf@durin42.com>
parents: 33539
diff changeset
344 > exchange,
169c97d4e722 tests: update test-share to pass our import checker
Augie Fackler <raf@durin42.com>
parents: 33539
diff changeset
345 > extensions,
169c97d4e722 tests: update test-share to pass our import checker
Augie Fackler <raf@durin42.com>
parents: 33539
diff changeset
346 > )
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
347 > def _pullbookmarks(orig, pullop):
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
348 > orig(pullop)
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
349 > raise error.HookAbort('forced failure by extension')
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
350 > def extsetup(ui):
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
351 > extensions.wrapfunction(exchange, '_pullbookmarks', _pullbookmarks)
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
352 > EOF
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
353 $ cd repo4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
354 $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
355 bm1 3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
356 bm3 4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
357 * bm4 5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
358 $ cd ../repo3
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
359 $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
360 bm1 3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
361 bm4 5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
362 $ hg --config "extensions.failpullbookmarks=$TESTTMP/failpullbookmarks.py" pull $TESTTMP/repo4
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 33986
diff changeset
363 pulling from $TESTTMP/repo4
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
364 searching for changes
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
365 no changes found
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
366 adding remote bookmark bm3
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
367 abort: forced failure by extension
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
368 [255]
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
369 $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
370 bm1 3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
371 bm4 5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
372 $ hg pull $TESTTMP/repo4
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 33986
diff changeset
373 pulling from $TESTTMP/repo4
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
374 searching for changes
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
375 no changes found
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
376 adding remote bookmark bm3
38250
d0abd7949ea3 phases: use "published" in the phase movement message
Boris Feld <boris.feld@octobus.net>
parents: 38249
diff changeset
377 1 local changesets published
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
378 $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
379 bm1 3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
380 * bm3 4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
381 bm4 5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
382 $ cd ..
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
383
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
384 verify bookmark behavior after unshare
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
385
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
386 $ cd repo3
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
387 $ hg unshare
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
388 $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
389 bm1 3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
390 * bm3 4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
391 bm4 5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
392 $ hg boo -d bm4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
393 $ hg boo bm5
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
394 $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
395 bm1 3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
396 bm3 4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
397 * bm5 4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
398 $ cd ../repo1
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
399 $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
400 * bm1 3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
401 bm3 4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
402 bm4 5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
403 $ cd ..
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
404
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
405 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
406
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31052
diff changeset
407 $ 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
408 $ 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
409 $ 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
410 $ 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
411 $ 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
412 ../../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
413 $ 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
414 thisdir/abs/.hg/requires:shared
39848
4ece3cdfd907 localrepo: support shared repo creation
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39696
diff changeset
415 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
416 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
417
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31052
diff changeset
418 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
419
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31052
diff changeset
420 $ 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
421 $ 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
422 $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
423 $ 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
424
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31052
diff changeset
425 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
426 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
427
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31052
diff changeset
428 $ 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
429 $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
430 $ 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
431 $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
432 $ 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
433 $ 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
434 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
435 [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
436 $ 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
437 $TESTTMP/thatdir/rel
31212
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31211
diff changeset
438
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31211
diff changeset
439 test unshare relshared repo
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31211
diff changeset
440
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31211
diff changeset
441 $ cd thatdir/rel
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31211
diff changeset
442 $ hg unshare
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31211
diff changeset
443 $ test -d .hg/store
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31211
diff changeset
444 $ test -f .hg/sharedpath
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31211
diff changeset
445 [1]
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31211
diff changeset
446 $ grep shared .hg/requires
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31211
diff changeset
447 [1]
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31211
diff changeset
448 $ hg unshare
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31211
diff changeset
449 abort: this is not a shared repo
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31211
diff changeset
450 [255]
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31211
diff changeset
451 $ cd ../..
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31211
diff changeset
452
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
453 $ 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
454
39696
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39323
diff changeset
455 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
456 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
457
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39323
diff changeset
458 $ hg init sharenewrequires
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39323
diff changeset
459 $ hg share sharenewrequires shareoldrequires
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39323
diff changeset
460 updating working directory
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39323
diff changeset
461 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
462
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39323
diff changeset
463 $ 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
464 > missing-requirement
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39323
diff changeset
465 > EOF
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39323
diff changeset
466
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39323
diff changeset
467 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
468
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39323
diff changeset
469 $ hg -R sharenewrequires status
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39323
diff changeset
470 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
471 (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
472 [255]
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39323
diff changeset
473
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39323
diff changeset
474 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
475
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39323
diff changeset
476 $ hg -R shareoldrequires status
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39323
diff changeset
477
17539
bc7377160fa7 tests: enable more server tests on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17017
diff changeset
478 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
479
25474
8c14f87bd0ae tests: drop DAEMON_PIDS from killdaemons calls
Matt Mackall <mpm@selenic.com>
parents: 25472
diff changeset
480 $ killdaemons.py
17539
bc7377160fa7 tests: enable more server tests on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17017
diff changeset
481