Mercurial > hg
annotate tests/test-share.t @ 14955:6349a9eb0178
httprepo: use getattr instead of hasattr
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Mon, 25 Jul 2011 15:37:52 -0500 |
parents | 6cc4b14fb76b |
children | 574dc5d74f9b |
rev | line source |
---|---|
9990 | 1 |
12487 | 2 $ echo "[extensions]" >> $HGRCPATH |
3 $ echo "share = " >> $HGRCPATH | |
4 | |
5 prepare repo1 | |
9990 | 6 |
12487 | 7 $ hg init repo1 |
8 $ cd repo1 | |
9 $ echo a > a | |
10 $ hg commit -A -m'init' | |
11 adding a | |
12 | |
13 share it | |
9990 | 14 |
12487 | 15 $ cd .. |
16 $ 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] | |
9990 | 25 |
12487 | 26 Some sed versions appends newline, some don't, and some just fails |
27 | |
28 $ cat .hg/sharedpath; echo | |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12487
diff
changeset
|
29 $TESTTMP/repo1/.hg |
12487 | 30 |
31 commit in shared clone | |
32 | |
33 $ echo a >> a | |
34 $ hg commit -m'change in shared clone' | |
35 | |
36 check original | |
9990 | 37 |
12487 | 38 $ cd ../repo1 |
39 $ hg log | |
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 | |
9990 | 56 |
12487 | 57 commit in original |
58 | |
59 $ echo b > b | |
60 $ hg commit -A -m'another file' | |
61 adding b | |
62 | |
63 check in shared clone | |
9990 | 64 |
12487 | 65 $ cd ../repo2 |
66 $ hg log | |
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 | |
9990 | 87 |
12487 | 88 hg serve shared clone |
9990 | 89 |
12487 | 90 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid |
91 $ cat hg.pid >> $DAEMON_PIDS | |
92 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-file/' | |
93 200 Script output follows | |
94 | |
95 | |
96 -rw-r--r-- 4 a | |
97 -rw-r--r-- 2 b | |
98 | |
99 |