Show More
@@ -1,48 +1,99 b'' | |||||
1 | #!/bin/sh |
|
|||
2 |
|
1 | |||
3 | echo "[extensions]" >> $HGRCPATH |
|
2 | $ echo "[extensions]" >> $HGRCPATH | |
4 | echo "share = " >> $HGRCPATH |
|
3 | $ echo "share = " >> $HGRCPATH | |
|
4 | ||||
|
5 | prepare repo1 | |||
5 |
|
6 | |||
6 | echo % prepare repo1 |
|
7 | $ hg init repo1 | |
7 | hg init repo1 |
|
8 | $ cd repo1 | |
8 | cd repo1 |
|
9 | $ echo a > a | |
9 | echo a > a |
|
10 | $ hg commit -A -m'init' | |
10 | hg commit -A -m'init' |
|
11 | adding a | |
|
12 | ||||
|
13 | share it | |||
11 |
|
14 | |||
12 | echo % share it |
|
15 | $ cd .. | |
13 | cd .. |
|
16 | $ hg share repo1 repo2 | |
14 | hg share repo1 repo2 |
|
17 | updating working directory | |
|
18 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
19 | ||||
|
20 | share shouldn't have a store dir | |||
|
21 | ||||
|
22 | $ cd repo2 | |||
|
23 | $ test -d .hg/store | |||
|
24 | [1] | |||
15 |
|
25 | |||
16 | echo % contents of repo2/.hg |
|
26 | Some sed versions appends newline, some don't, and some just fails | |
17 | cd repo2 |
|
27 | ||
18 | [ -d .hg/store ] \ |
|
28 | $ cat .hg/sharedpath; echo | |
19 | && echo "fail: .hg/store should not exist" \ |
|
29 | */repo1/.hg (glob) | |
20 | || echo "pass: .hg/store does not exist" |
|
30 | ||
21 | # Some sed versions appends newline, some don't, and some just fails |
|
31 | commit in shared clone | |
22 | (cat .hg/sharedpath; echo) | head -n1 | "$TESTDIR/filtertmp.py" |
|
32 | ||
|
33 | $ echo a >> a | |||
|
34 | $ hg commit -m'change in shared clone' | |||
|
35 | ||||
|
36 | check original | |||
23 |
|
37 | |||
24 | echo % commit in shared clone |
|
38 | $ cd ../repo1 | |
25 | echo a >> a |
|
39 | $ hg log | |
26 | hg commit -m'change in shared clone' |
|
40 | changeset: 1:8af4dc49db9e | |
|
41 | tag: tip | |||
|
42 | user: test | |||
|
43 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
44 | summary: change in shared clone | |||
|
45 | ||||
|
46 | changeset: 0:d3873e73d99e | |||
|
47 | user: test | |||
|
48 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
49 | summary: init | |||
|
50 | ||||
|
51 | $ hg update | |||
|
52 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
53 | $ cat a # should be two lines of "a" | |||
|
54 | a | |||
|
55 | a | |||
27 |
|
56 | |||
28 |
|
|
57 | commit in original | |
29 | cd ../repo1 |
|
58 | ||
30 | hg log |
|
59 | $ echo b > b | |
31 | hg update |
|
60 | $ hg commit -A -m'another file' | |
32 | cat a # should be two lines of "a" |
|
61 | adding b | |
|
62 | ||||
|
63 | check in shared clone | |||
33 |
|
64 | |||
34 | echo % commit in original |
|
65 | $ cd ../repo2 | |
35 | echo b > b |
|
66 | $ hg log | |
36 | hg commit -A -m'another file' |
|
67 | changeset: 2:c2e0ac586386 | |
|
68 | tag: tip | |||
|
69 | user: test | |||
|
70 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
71 | summary: another file | |||
|
72 | ||||
|
73 | changeset: 1:8af4dc49db9e | |||
|
74 | user: test | |||
|
75 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
76 | summary: change in shared clone | |||
|
77 | ||||
|
78 | changeset: 0:d3873e73d99e | |||
|
79 | user: test | |||
|
80 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
81 | summary: init | |||
|
82 | ||||
|
83 | $ hg update | |||
|
84 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
85 | $ cat b # should exist with one "b" | |||
|
86 | b | |||
37 |
|
87 | |||
38 |
|
|
88 | hg serve shared clone | |
39 | cd ../repo2 |
|
|||
40 | hg log |
|
|||
41 | hg update |
|
|||
42 | cat b # should exist with one "b" |
|
|||
43 |
|
89 | |||
44 | echo % hg serve shared clone |
|
90 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid | |
45 | hg serve -n test -p $HGPORT -d --pid-file=hg.pid |
|
91 | $ cat hg.pid >> $DAEMON_PIDS | |
46 | cat hg.pid >> $DAEMON_PIDS |
|
92 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-file/' | |
47 |
|
93 | 200 Script output follows | ||
48 | "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-file/' |
|
94 | ||
|
95 | ||||
|
96 | -rw-r--r-- 4 a | |||
|
97 | -rw-r--r-- 2 b | |||
|
98 | ||||
|
99 |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now