Show More
@@ -0,0 +1,42 b'' | |||||
|
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" | |||
|
21 | cat .hg/sharedpath | sed "s:$HGTMP:*HGTMP*:"; echo | |||
|
22 | ||||
|
23 | echo % commit in shared clone | |||
|
24 | echo a >> a | |||
|
25 | hg commit -m'change in shared clone' | |||
|
26 | ||||
|
27 | echo % check original | |||
|
28 | cd ../repo1 | |||
|
29 | hg log | |||
|
30 | hg update | |||
|
31 | cat a # should be two lines of "a" | |||
|
32 | ||||
|
33 | echo % commit in original | |||
|
34 | echo b > b | |||
|
35 | hg commit -A -m'another file' | |||
|
36 | ||||
|
37 | echo % check in shared clone | |||
|
38 | cd ../repo2 | |||
|
39 | hg log | |||
|
40 | hg update | |||
|
41 | cat b # should exist with one "b" | |||
|
42 |
@@ -0,0 +1,45 b'' | |||||
|
1 | % prepare repo1 | |||
|
2 | adding a | |||
|
3 | % share it | |||
|
4 | updating working directory | |||
|
5 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
6 | % contents of repo2/.hg | |||
|
7 | pass: .hg/store does not exist | |||
|
8 | *HGTMP*/test-share/repo1/.hg | |||
|
9 | % commit in shared clone | |||
|
10 | % check original | |||
|
11 | changeset: 1:8af4dc49db9e | |||
|
12 | tag: tip | |||
|
13 | user: test | |||
|
14 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
15 | summary: change in shared clone | |||
|
16 | ||||
|
17 | changeset: 0:d3873e73d99e | |||
|
18 | user: test | |||
|
19 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
20 | summary: init | |||
|
21 | ||||
|
22 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
23 | a | |||
|
24 | a | |||
|
25 | % commit in original | |||
|
26 | adding b | |||
|
27 | % check in shared clone | |||
|
28 | changeset: 2:c2e0ac586386 | |||
|
29 | tag: tip | |||
|
30 | user: test | |||
|
31 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
32 | summary: another file | |||
|
33 | ||||
|
34 | changeset: 1:8af4dc49db9e | |||
|
35 | user: test | |||
|
36 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
37 | summary: change in shared clone | |||
|
38 | ||||
|
39 | changeset: 0:d3873e73d99e | |||
|
40 | user: test | |||
|
41 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
42 | summary: init | |||
|
43 | ||||
|
44 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
45 | b |
General Comments 0
You need to be logged in to leave comments.
Login now