author | Martin Geisler <mg@lazybytes.net> |
Fri, 22 Jan 2010 17:15:58 +0100 | |
changeset 10276 | 6109a02c682b |
parent 10082 | 66d8ec33da32 |
child 10468 | 2250fc372d34 |
permissions | -rwxr-xr-x |
9990 | 1 |
#!/bin/sh |
2 |
||
3 |
echo "[extensions]" >> $HGRCPATH |
|
4 |
echo "share = " >> $HGRCPATH |
|
5 |
||
6 |
echo % prepare repo1 |
|
7 |
hg init repo1 |
|
8 |
cd repo1 |
|
9 |
echo a > a |
|
10 |
hg commit -A -m'init' |
|
11 |
||
12 |
echo % share it |
|
13 |
cd .. |
|
14 |
hg share repo1 repo2 |
|
15 |
||
16 |
echo % contents of repo2/.hg |
|
17 |
cd repo2 |
|
18 |
[ -d .hg/store ] \ |
|
19 |
&& echo "fail: .hg/store should not exist" \ |
|
20 |
|| echo "pass: .hg/store does not exist" |
|
10082
66d8ec33da32
test-share: Solaris sed can't handle never-ending lines
Mads Kiilerich <mads@kiilerich.com>
parents:
10078
diff
changeset
|
21 |
# Some sed versions appends newline, some don't, and some just fails |
66d8ec33da32
test-share: Solaris sed can't handle never-ending lines
Mads Kiilerich <mads@kiilerich.com>
parents:
10078
diff
changeset
|
22 |
(cat .hg/sharedpath; echo) | head -n1 | sed "s:$HGTMP:*HGTMP*:" |
9990 | 23 |
|
24 |
echo % commit in shared clone |
|
25 |
echo a >> a |
|
26 |
hg commit -m'change in shared clone' |
|
27 |
||
28 |
echo % check original |
|
29 |
cd ../repo1 |
|
30 |
hg log |
|
31 |
hg update |
|
32 |
cat a # should be two lines of "a" |
|
33 |
||
34 |
echo % commit in original |
|
35 |
echo b > b |
|
36 |
hg commit -A -m'another file' |
|
37 |
||
38 |
echo % check in shared clone |
|
39 |
cd ../repo2 |
|
40 |
hg log |
|
41 |
hg update |
|
42 |
cat b # should exist with one "b" |
|
43 |
||
10078
97c75ad3b1a0
hgweb: Make get_mtime use repository to find store path.
Brendan Cully <brendan@kublai.com>
parents:
10062
diff
changeset
|
44 |
echo % hg serve shared clone |
97c75ad3b1a0
hgweb: Make get_mtime use repository to find store path.
Brendan Cully <brendan@kublai.com>
parents:
10062
diff
changeset
|
45 |
hg serve -n test -p $HGPORT -d --pid-file=hg.pid |
97c75ad3b1a0
hgweb: Make get_mtime use repository to find store path.
Brendan Cully <brendan@kublai.com>
parents:
10062
diff
changeset
|
46 |
cat hg.pid >> $DAEMON_PIDS |
97c75ad3b1a0
hgweb: Make get_mtime use repository to find store path.
Brendan Cully <brendan@kublai.com>
parents:
10062
diff
changeset
|
47 |
|
97c75ad3b1a0
hgweb: Make get_mtime use repository to find store path.
Brendan Cully <brendan@kublai.com>
parents:
10062
diff
changeset
|
48 |
"$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-file/' |