Show More
@@ -1,38 +1,39 b'' | |||||
1 |
$ "$TESTDIR/hghave" |
|
1 | $ "$TESTDIR/hghave" killdaemons || exit 80 | |
2 |
|
2 | |||
3 | = Test the known() protocol function = |
|
3 | = Test the known() protocol function = | |
4 |
|
4 | |||
5 | Create a test repository: |
|
5 | Create a test repository: | |
6 |
|
6 | |||
7 | $ hg init repo |
|
7 | $ hg init repo | |
8 | $ cd repo |
|
8 | $ cd repo | |
9 | $ touch a ; hg add a ; hg ci -ma |
|
9 | $ touch a ; hg add a ; hg ci -ma | |
10 | $ touch b ; hg add b ; hg ci -mb |
|
10 | $ touch b ; hg add b ; hg ci -mb | |
11 | $ touch c ; hg add c ; hg ci -mc |
|
11 | $ touch c ; hg add c ; hg ci -mc | |
12 | $ hg log --template '{node}\n' |
|
12 | $ hg log --template '{node}\n' | |
13 | 991a3460af53952d10ec8a295d3d2cc2e5fa9690 |
|
13 | 991a3460af53952d10ec8a295d3d2cc2e5fa9690 | |
14 | 0e067c57feba1a5694ca4844f05588bb1bf82342 |
|
14 | 0e067c57feba1a5694ca4844f05588bb1bf82342 | |
15 | 3903775176ed42b1458a6281db4a0ccf4d9f287a |
|
15 | 3903775176ed42b1458a6281db4a0ccf4d9f287a | |
16 | $ cd .. |
|
16 | $ cd .. | |
17 |
|
17 | |||
18 | Test locally: |
|
18 | Test locally: | |
19 |
|
19 | |||
20 | $ hg debugknown repo 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 3903775176ed42b1458a6281db4a0ccf4d9f287a |
|
20 | $ hg debugknown repo 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 3903775176ed42b1458a6281db4a0ccf4d9f287a | |
21 | 111 |
|
21 | 111 | |
22 | $ hg debugknown repo 000a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 0003775176ed42b1458a6281db4a0ccf4d9f287a |
|
22 | $ hg debugknown repo 000a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 0003775176ed42b1458a6281db4a0ccf4d9f287a | |
23 | 010 |
|
23 | 010 | |
24 | $ hg debugknown repo |
|
24 | $ hg debugknown repo | |
25 |
|
25 | |||
26 |
|
26 | |||
27 | Test via HTTP: |
|
27 | Test via HTTP: | |
28 |
|
28 | |||
29 | $ hg serve -R repo -p $HGPORT -d --pid-file=hg.pid -E error.log -A access.log |
|
29 | $ hg serve -R repo -p $HGPORT -d --pid-file=hg.pid -E error.log -A access.log | |
30 | $ cat hg.pid >> $DAEMON_PIDS |
|
30 | $ cat hg.pid >> $DAEMON_PIDS | |
31 | $ hg debugknown http://localhost:$HGPORT/ 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 3903775176ed42b1458a6281db4a0ccf4d9f287a |
|
31 | $ hg debugknown http://localhost:$HGPORT/ 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 3903775176ed42b1458a6281db4a0ccf4d9f287a | |
32 | 111 |
|
32 | 111 | |
33 | $ hg debugknown http://localhost:$HGPORT/ 000a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 0003775176ed42b1458a6281db4a0ccf4d9f287a |
|
33 | $ hg debugknown http://localhost:$HGPORT/ 000a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 0003775176ed42b1458a6281db4a0ccf4d9f287a | |
34 | 010 |
|
34 | 010 | |
35 | $ hg debugknown http://localhost:$HGPORT/ |
|
35 | $ hg debugknown http://localhost:$HGPORT/ | |
36 |
|
36 | |||
37 | $ cat error.log |
|
37 | $ cat error.log | |
|
38 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |||
38 |
|
39 |
@@ -1,153 +1,156 b'' | |||||
1 |
$ "$TESTDIR/hghave" |
|
1 | $ "$TESTDIR/hghave" killdaemons || exit 80 | |
2 |
|
2 | |||
3 | hide outer repo |
|
3 | hide outer repo | |
4 | $ hg init |
|
4 | $ hg init | |
5 |
|
5 | |||
6 | $ echo "[extensions]" >> $HGRCPATH |
|
6 | $ echo "[extensions]" >> $HGRCPATH | |
7 | $ echo "mq=" >> $HGRCPATH |
|
7 | $ echo "mq=" >> $HGRCPATH | |
8 | $ mkdir webdir |
|
8 | $ mkdir webdir | |
9 | $ cd webdir |
|
9 | $ cd webdir | |
10 | $ hg init a |
|
10 | $ hg init a | |
11 | $ hg --cwd a qinit -c |
|
11 | $ hg --cwd a qinit -c | |
12 | $ echo a > a/a |
|
12 | $ echo a > a/a | |
13 | $ hg --cwd a ci -A -m a |
|
13 | $ hg --cwd a ci -A -m a | |
14 | adding a |
|
14 | adding a | |
15 | $ echo b > a/b |
|
15 | $ echo b > a/b | |
16 | $ hg --cwd a addremove |
|
16 | $ hg --cwd a addremove | |
17 | adding b |
|
17 | adding b | |
18 | $ hg --cwd a qnew -f b.patch |
|
18 | $ hg --cwd a qnew -f b.patch | |
19 | $ hg --cwd a qcommit -m b.patch |
|
19 | $ hg --cwd a qcommit -m b.patch | |
20 | $ hg --cwd a log --template "{desc}\n" |
|
20 | $ hg --cwd a log --template "{desc}\n" | |
21 | [mq]: b.patch |
|
21 | [mq]: b.patch | |
22 | a |
|
22 | a | |
23 | $ hg --cwd a/.hg/patches log --template "{desc}\n" |
|
23 | $ hg --cwd a/.hg/patches log --template "{desc}\n" | |
24 | b.patch |
|
24 | b.patch | |
25 | $ root=`pwd` |
|
25 | $ root=`pwd` | |
26 | $ cd .. |
|
26 | $ cd .. | |
27 |
|
27 | |||
28 | test with recursive collection |
|
28 | test with recursive collection | |
29 |
|
29 | |||
30 | $ cat > collections.conf <<EOF |
|
30 | $ cat > collections.conf <<EOF | |
31 | > [paths] |
|
31 | > [paths] | |
32 | > /=$root/** |
|
32 | > /=$root/** | |
33 | > EOF |
|
33 | > EOF | |
34 | $ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf collections.conf \ |
|
34 | $ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf collections.conf \ | |
35 | > -A access-paths.log -E error-paths-1.log |
|
35 | > -A access-paths.log -E error-paths-1.log | |
36 | $ cat hg.pid >> $DAEMON_PIDS |
|
36 | $ cat hg.pid >> $DAEMON_PIDS | |
37 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '?style=raw' |
|
37 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '?style=raw' | |
38 | 200 Script output follows |
|
38 | 200 Script output follows | |
39 |
|
39 | |||
40 |
|
40 | |||
41 | /a/ |
|
41 | /a/ | |
42 | /a/.hg/patches/ |
|
42 | /a/.hg/patches/ | |
43 |
|
43 | |||
44 | $ hg qclone http://localhost:$HGPORT/a b |
|
44 | $ hg qclone http://localhost:$HGPORT/a b | |
45 | requesting all changes |
|
45 | requesting all changes | |
46 | adding changesets |
|
46 | adding changesets | |
47 | adding manifests |
|
47 | adding manifests | |
48 | adding file changes |
|
48 | adding file changes | |
49 | added 2 changesets with 2 changes to 2 files |
|
49 | added 2 changesets with 2 changes to 2 files | |
50 | requesting all changes |
|
50 | requesting all changes | |
51 | adding changesets |
|
51 | adding changesets | |
52 | adding manifests |
|
52 | adding manifests | |
53 | adding file changes |
|
53 | adding file changes | |
54 | added 1 changesets with 3 changes to 3 files |
|
54 | added 1 changesets with 3 changes to 3 files | |
55 | updating to branch default |
|
55 | updating to branch default | |
56 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
56 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
57 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
57 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
58 | $ hg --cwd b log --template "{desc}\n" |
|
58 | $ hg --cwd b log --template "{desc}\n" | |
59 | a |
|
59 | a | |
60 | $ hg --cwd b qpush -a |
|
60 | $ hg --cwd b qpush -a | |
61 | applying b.patch |
|
61 | applying b.patch | |
62 | now at: b.patch |
|
62 | now at: b.patch | |
63 | $ hg --cwd b log --template "{desc}\n" |
|
63 | $ hg --cwd b log --template "{desc}\n" | |
64 | imported patch b.patch |
|
64 | imported patch b.patch | |
65 | a |
|
65 | a | |
66 |
|
66 | |||
67 | test with normal collection |
|
67 | test with normal collection | |
68 |
|
68 | |||
69 | $ cat > collections1.conf <<EOF |
|
69 | $ cat > collections1.conf <<EOF | |
70 | > [paths] |
|
70 | > [paths] | |
71 | > /=$root/* |
|
71 | > /=$root/* | |
72 | > EOF |
|
72 | > EOF | |
73 | $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf collections1.conf \ |
|
73 | $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf collections1.conf \ | |
74 | > -A access-paths.log -E error-paths-1.log |
|
74 | > -A access-paths.log -E error-paths-1.log | |
75 | $ cat hg.pid >> $DAEMON_PIDS |
|
75 | $ cat hg.pid >> $DAEMON_PIDS | |
76 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=raw' |
|
76 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=raw' | |
77 | 200 Script output follows |
|
77 | 200 Script output follows | |
78 |
|
78 | |||
79 |
|
79 | |||
80 | /a/ |
|
80 | /a/ | |
81 | /a/.hg/patches/ |
|
81 | /a/.hg/patches/ | |
82 |
|
82 | |||
83 | $ hg qclone http://localhost:$HGPORT1/a c |
|
83 | $ hg qclone http://localhost:$HGPORT1/a c | |
84 | requesting all changes |
|
84 | requesting all changes | |
85 | adding changesets |
|
85 | adding changesets | |
86 | adding manifests |
|
86 | adding manifests | |
87 | adding file changes |
|
87 | adding file changes | |
88 | added 2 changesets with 2 changes to 2 files |
|
88 | added 2 changesets with 2 changes to 2 files | |
89 | requesting all changes |
|
89 | requesting all changes | |
90 | adding changesets |
|
90 | adding changesets | |
91 | adding manifests |
|
91 | adding manifests | |
92 | adding file changes |
|
92 | adding file changes | |
93 | added 1 changesets with 3 changes to 3 files |
|
93 | added 1 changesets with 3 changes to 3 files | |
94 | updating to branch default |
|
94 | updating to branch default | |
95 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
95 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
96 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
96 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
97 | $ hg --cwd c log --template "{desc}\n" |
|
97 | $ hg --cwd c log --template "{desc}\n" | |
98 | a |
|
98 | a | |
99 | $ hg --cwd c qpush -a |
|
99 | $ hg --cwd c qpush -a | |
100 | applying b.patch |
|
100 | applying b.patch | |
101 | now at: b.patch |
|
101 | now at: b.patch | |
102 | $ hg --cwd c log --template "{desc}\n" |
|
102 | $ hg --cwd c log --template "{desc}\n" | |
103 | imported patch b.patch |
|
103 | imported patch b.patch | |
104 | a |
|
104 | a | |
105 |
|
105 | |||
106 | test with old-style collection |
|
106 | test with old-style collection | |
107 |
|
107 | |||
108 | $ cat > collections2.conf <<EOF |
|
108 | $ cat > collections2.conf <<EOF | |
109 | > [collections] |
|
109 | > [collections] | |
110 | > $root=$root |
|
110 | > $root=$root | |
111 | > EOF |
|
111 | > EOF | |
112 | $ hg serve -p $HGPORT2 -d --pid-file=hg.pid --webdir-conf collections2.conf \ |
|
112 | $ hg serve -p $HGPORT2 -d --pid-file=hg.pid --webdir-conf collections2.conf \ | |
113 | > -A access-paths.log -E error-paths-1.log |
|
113 | > -A access-paths.log -E error-paths-1.log | |
114 | $ cat hg.pid >> $DAEMON_PIDS |
|
114 | $ cat hg.pid >> $DAEMON_PIDS | |
115 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '?style=raw' |
|
115 | $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '?style=raw' | |
116 | 200 Script output follows |
|
116 | 200 Script output follows | |
117 |
|
117 | |||
118 |
|
118 | |||
119 | /a/ |
|
119 | /a/ | |
120 | /a/.hg/patches/ |
|
120 | /a/.hg/patches/ | |
121 |
|
121 | |||
122 | $ hg qclone http://localhost:$HGPORT2/a d |
|
122 | $ hg qclone http://localhost:$HGPORT2/a d | |
123 | requesting all changes |
|
123 | requesting all changes | |
124 | adding changesets |
|
124 | adding changesets | |
125 | adding manifests |
|
125 | adding manifests | |
126 | adding file changes |
|
126 | adding file changes | |
127 | added 2 changesets with 2 changes to 2 files |
|
127 | added 2 changesets with 2 changes to 2 files | |
128 | requesting all changes |
|
128 | requesting all changes | |
129 | adding changesets |
|
129 | adding changesets | |
130 | adding manifests |
|
130 | adding manifests | |
131 | adding file changes |
|
131 | adding file changes | |
132 | added 1 changesets with 3 changes to 3 files |
|
132 | added 1 changesets with 3 changes to 3 files | |
133 | updating to branch default |
|
133 | updating to branch default | |
134 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
134 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
135 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
135 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
136 | $ hg --cwd d log --template "{desc}\n" |
|
136 | $ hg --cwd d log --template "{desc}\n" | |
137 | a |
|
137 | a | |
138 | $ hg --cwd d qpush -a |
|
138 | $ hg --cwd d qpush -a | |
139 | applying b.patch |
|
139 | applying b.patch | |
140 | now at: b.patch |
|
140 | now at: b.patch | |
141 | $ hg --cwd d log --template "{desc}\n" |
|
141 | $ hg --cwd d log --template "{desc}\n" | |
142 | imported patch b.patch |
|
142 | imported patch b.patch | |
143 | a |
|
143 | a | |
144 |
|
144 | |||
145 | test --mq works and uses correct repository config |
|
145 | test --mq works and uses correct repository config | |
146 |
|
146 | |||
147 | $ hg --cwd d outgoing --mq |
|
147 | $ hg --cwd d outgoing --mq | |
148 | comparing with http://localhost:$HGPORT2/a/.hg/patches |
|
148 | comparing with http://localhost:$HGPORT2/a/.hg/patches | |
149 | searching for changes |
|
149 | searching for changes | |
150 | no changes found |
|
150 | no changes found | |
151 | [1] |
|
151 | [1] | |
152 | $ hg --cwd d log --mq --template '{rev} {desc|firstline}\n' |
|
152 | $ hg --cwd d log --mq --template '{rev} {desc|firstline}\n' | |
153 | 0 b.patch |
|
153 | 0 b.patch | |
|
154 | ||||
|
155 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |||
|
156 |
@@ -1,280 +1,282 b'' | |||||
1 |
$ "$TESTDIR/hghave" |
|
1 | $ "$TESTDIR/hghave" killdaemons || exit 80 | |
2 |
|
2 | |||
3 | $ cat > writelines.py <<EOF |
|
3 | $ cat > writelines.py <<EOF | |
4 | > import sys |
|
4 | > import sys | |
5 | > path = sys.argv[1] |
|
5 | > path = sys.argv[1] | |
6 | > args = sys.argv[2:] |
|
6 | > args = sys.argv[2:] | |
7 | > assert (len(args) % 2) == 0 |
|
7 | > assert (len(args) % 2) == 0 | |
8 | > |
|
8 | > | |
9 | > f = file(path, 'wb') |
|
9 | > f = file(path, 'wb') | |
10 | > for i in xrange(len(args)/2): |
|
10 | > for i in xrange(len(args)/2): | |
11 | > count, s = args[2*i:2*i+2] |
|
11 | > count, s = args[2*i:2*i+2] | |
12 | > count = int(count) |
|
12 | > count = int(count) | |
13 | > s = s.decode('string_escape') |
|
13 | > s = s.decode('string_escape') | |
14 | > f.write(s*count) |
|
14 | > f.write(s*count) | |
15 | > f.close() |
|
15 | > f.close() | |
16 | > |
|
16 | > | |
17 | > EOF |
|
17 | > EOF | |
18 | $ echo "[extensions]" >> $HGRCPATH |
|
18 | $ echo "[extensions]" >> $HGRCPATH | |
19 | $ echo "mq=" >> $HGRCPATH |
|
19 | $ echo "mq=" >> $HGRCPATH | |
20 | $ echo "[diff]" >> $HGRCPATH |
|
20 | $ echo "[diff]" >> $HGRCPATH | |
21 | $ echo "git=1" >> $HGRCPATH |
|
21 | $ echo "git=1" >> $HGRCPATH | |
22 | $ hg init repo |
|
22 | $ hg init repo | |
23 | $ cd repo |
|
23 | $ cd repo | |
24 |
|
24 | |||
25 | qimport without file or revision |
|
25 | qimport without file or revision | |
26 |
|
26 | |||
27 | $ hg qimport |
|
27 | $ hg qimport | |
28 | abort: no files or revisions specified |
|
28 | abort: no files or revisions specified | |
29 | [255] |
|
29 | [255] | |
30 |
|
30 | |||
31 | qimport non-existing-file |
|
31 | qimport non-existing-file | |
32 |
|
32 | |||
33 | $ hg qimport non-existing-file |
|
33 | $ hg qimport non-existing-file | |
34 | abort: unable to read file non-existing-file |
|
34 | abort: unable to read file non-existing-file | |
35 | [255] |
|
35 | [255] | |
36 |
|
36 | |||
37 | qimport null revision |
|
37 | qimport null revision | |
38 |
|
38 | |||
39 | $ hg qimport -r null |
|
39 | $ hg qimport -r null | |
40 | abort: revision -1 is not mutable |
|
40 | abort: revision -1 is not mutable | |
41 | (see "hg help phases" for details) |
|
41 | (see "hg help phases" for details) | |
42 | [255] |
|
42 | [255] | |
43 | $ hg qseries |
|
43 | $ hg qseries | |
44 |
|
44 | |||
45 | import email |
|
45 | import email | |
46 |
|
46 | |||
47 | $ hg qimport --push -n email - <<EOF |
|
47 | $ hg qimport --push -n email - <<EOF | |
48 | > From: Username in email <test@example.net> |
|
48 | > From: Username in email <test@example.net> | |
49 | > Subject: [PATCH] Message in email |
|
49 | > Subject: [PATCH] Message in email | |
50 | > Date: Fri, 02 Jan 1970 00:00:00 +0000 |
|
50 | > Date: Fri, 02 Jan 1970 00:00:00 +0000 | |
51 | > |
|
51 | > | |
52 | > Text before patch. |
|
52 | > Text before patch. | |
53 | > |
|
53 | > | |
54 | > # HG changeset patch |
|
54 | > # HG changeset patch | |
55 | > # User Username in patch <test@example.net> |
|
55 | > # User Username in patch <test@example.net> | |
56 | > # Date 0 0 |
|
56 | > # Date 0 0 | |
57 | > # Node ID 1a706973a7d84cb549823634a821d9bdf21c6220 |
|
57 | > # Node ID 1a706973a7d84cb549823634a821d9bdf21c6220 | |
58 | > # Parent 0000000000000000000000000000000000000000 |
|
58 | > # Parent 0000000000000000000000000000000000000000 | |
59 | > First line of commit message. |
|
59 | > First line of commit message. | |
60 | > |
|
60 | > | |
61 | > More text in commit message. |
|
61 | > More text in commit message. | |
62 | > --- confuse the diff detection |
|
62 | > --- confuse the diff detection | |
63 | > |
|
63 | > | |
64 | > diff --git a/x b/x |
|
64 | > diff --git a/x b/x | |
65 | > new file mode 100644 |
|
65 | > new file mode 100644 | |
66 | > --- /dev/null |
|
66 | > --- /dev/null | |
67 | > +++ b/x |
|
67 | > +++ b/x | |
68 | > @@ -0,0 +1,1 @@ |
|
68 | > @@ -0,0 +1,1 @@ | |
69 | > +new file |
|
69 | > +new file | |
70 | > Text after patch. |
|
70 | > Text after patch. | |
71 | > |
|
71 | > | |
72 | > EOF |
|
72 | > EOF | |
73 | adding email to series file |
|
73 | adding email to series file | |
74 | applying email |
|
74 | applying email | |
75 | now at: email |
|
75 | now at: email | |
76 |
|
76 | |||
77 | hg tip -v |
|
77 | hg tip -v | |
78 |
|
78 | |||
79 | $ hg tip -v |
|
79 | $ hg tip -v | |
80 | changeset: 0:1a706973a7d8 |
|
80 | changeset: 0:1a706973a7d8 | |
81 | tag: email |
|
81 | tag: email | |
82 | tag: qbase |
|
82 | tag: qbase | |
83 | tag: qtip |
|
83 | tag: qtip | |
84 | tag: tip |
|
84 | tag: tip | |
85 | user: Username in patch <test@example.net> |
|
85 | user: Username in patch <test@example.net> | |
86 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
86 | date: Thu Jan 01 00:00:00 1970 +0000 | |
87 | files: x |
|
87 | files: x | |
88 | description: |
|
88 | description: | |
89 | First line of commit message. |
|
89 | First line of commit message. | |
90 |
|
90 | |||
91 | More text in commit message. |
|
91 | More text in commit message. | |
92 |
|
92 | |||
93 |
|
93 | |||
94 | $ hg qpop |
|
94 | $ hg qpop | |
95 | popping email |
|
95 | popping email | |
96 | patch queue now empty |
|
96 | patch queue now empty | |
97 | $ hg qdelete email |
|
97 | $ hg qdelete email | |
98 |
|
98 | |||
99 | import URL |
|
99 | import URL | |
100 |
|
100 | |||
101 | $ echo foo >> foo |
|
101 | $ echo foo >> foo | |
102 | $ hg add foo |
|
102 | $ hg add foo | |
103 | $ hg diff > url.diff |
|
103 | $ hg diff > url.diff | |
104 | $ hg revert --no-backup foo |
|
104 | $ hg revert --no-backup foo | |
105 | $ rm foo |
|
105 | $ rm foo | |
106 |
|
106 | |||
107 | Under unix: file:///foobar/blah |
|
107 | Under unix: file:///foobar/blah | |
108 | Under windows: file:///c:/foobar/blah |
|
108 | Under windows: file:///c:/foobar/blah | |
109 |
|
109 | |||
110 | $ patchurl=`pwd | tr '\\\\' /`/url.diff |
|
110 | $ patchurl=`pwd | tr '\\\\' /`/url.diff | |
111 | $ expr "$patchurl" : "\/" > /dev/null || patchurl="/$patchurl" |
|
111 | $ expr "$patchurl" : "\/" > /dev/null || patchurl="/$patchurl" | |
112 | $ hg qimport file://"$patchurl" |
|
112 | $ hg qimport file://"$patchurl" | |
113 | adding url.diff to series file |
|
113 | adding url.diff to series file | |
114 | $ rm url.diff |
|
114 | $ rm url.diff | |
115 | $ hg qun |
|
115 | $ hg qun | |
116 | url.diff |
|
116 | url.diff | |
117 |
|
117 | |||
118 | import patch that already exists |
|
118 | import patch that already exists | |
119 |
|
119 | |||
120 | $ echo foo2 >> foo |
|
120 | $ echo foo2 >> foo | |
121 | $ hg add foo |
|
121 | $ hg add foo | |
122 | $ hg diff > ../url.diff |
|
122 | $ hg diff > ../url.diff | |
123 | $ hg revert --no-backup foo |
|
123 | $ hg revert --no-backup foo | |
124 | $ rm foo |
|
124 | $ rm foo | |
125 | $ hg qimport ../url.diff |
|
125 | $ hg qimport ../url.diff | |
126 | abort: patch "url.diff" already exists |
|
126 | abort: patch "url.diff" already exists | |
127 | [255] |
|
127 | [255] | |
128 | $ hg qpush |
|
128 | $ hg qpush | |
129 | applying url.diff |
|
129 | applying url.diff | |
130 | now at: url.diff |
|
130 | now at: url.diff | |
131 | $ cat foo |
|
131 | $ cat foo | |
132 | foo |
|
132 | foo | |
133 | $ hg qpop |
|
133 | $ hg qpop | |
134 | popping url.diff |
|
134 | popping url.diff | |
135 | patch queue now empty |
|
135 | patch queue now empty | |
136 |
|
136 | |||
137 | qimport -f |
|
137 | qimport -f | |
138 |
|
138 | |||
139 | $ hg qimport -f ../url.diff |
|
139 | $ hg qimport -f ../url.diff | |
140 | adding url.diff to series file |
|
140 | adding url.diff to series file | |
141 | $ hg qpush |
|
141 | $ hg qpush | |
142 | applying url.diff |
|
142 | applying url.diff | |
143 | now at: url.diff |
|
143 | now at: url.diff | |
144 | $ cat foo |
|
144 | $ cat foo | |
145 | foo2 |
|
145 | foo2 | |
146 | $ hg qpop |
|
146 | $ hg qpop | |
147 | popping url.diff |
|
147 | popping url.diff | |
148 | patch queue now empty |
|
148 | patch queue now empty | |
149 |
|
149 | |||
150 | build diff with CRLF |
|
150 | build diff with CRLF | |
151 |
|
151 | |||
152 | $ python ../writelines.py b 5 'a\n' 5 'a\r\n' |
|
152 | $ python ../writelines.py b 5 'a\n' 5 'a\r\n' | |
153 | $ hg ci -Am addb |
|
153 | $ hg ci -Am addb | |
154 | adding b |
|
154 | adding b | |
155 | $ python ../writelines.py b 2 'a\n' 10 'b\n' 2 'a\r\n' |
|
155 | $ python ../writelines.py b 2 'a\n' 10 'b\n' 2 'a\r\n' | |
156 | $ hg diff > b.diff |
|
156 | $ hg diff > b.diff | |
157 | $ hg up -C |
|
157 | $ hg up -C | |
158 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
158 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
159 |
|
159 | |||
160 | qimport CRLF diff |
|
160 | qimport CRLF diff | |
161 |
|
161 | |||
162 | $ hg qimport b.diff |
|
162 | $ hg qimport b.diff | |
163 | adding b.diff to series file |
|
163 | adding b.diff to series file | |
164 | $ hg qpush |
|
164 | $ hg qpush | |
165 | applying b.diff |
|
165 | applying b.diff | |
166 | now at: b.diff |
|
166 | now at: b.diff | |
167 |
|
167 | |||
168 | try to import --push |
|
168 | try to import --push | |
169 |
|
169 | |||
170 | $ cat > appendfoo.diff <<EOF |
|
170 | $ cat > appendfoo.diff <<EOF | |
171 | > append foo |
|
171 | > append foo | |
172 | > |
|
172 | > | |
173 | > diff -r 07f494440405 -r 261500830e46 baz |
|
173 | > diff -r 07f494440405 -r 261500830e46 baz | |
174 | > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
174 | > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
175 | > +++ b/baz Thu Jan 01 00:00:00 1970 +0000 |
|
175 | > +++ b/baz Thu Jan 01 00:00:00 1970 +0000 | |
176 | > @@ -0,0 +1,1 @@ |
|
176 | > @@ -0,0 +1,1 @@ | |
177 | > +foo |
|
177 | > +foo | |
178 | > EOF |
|
178 | > EOF | |
179 |
|
179 | |||
180 | $ cat > appendbar.diff <<EOF |
|
180 | $ cat > appendbar.diff <<EOF | |
181 | > append bar |
|
181 | > append bar | |
182 | > |
|
182 | > | |
183 | > diff -r 07f494440405 -r 261500830e46 baz |
|
183 | > diff -r 07f494440405 -r 261500830e46 baz | |
184 | > --- a/baz Thu Jan 01 00:00:00 1970 +0000 |
|
184 | > --- a/baz Thu Jan 01 00:00:00 1970 +0000 | |
185 | > +++ b/baz Thu Jan 01 00:00:00 1970 +0000 |
|
185 | > +++ b/baz Thu Jan 01 00:00:00 1970 +0000 | |
186 | > @@ -1,1 +1,2 @@ |
|
186 | > @@ -1,1 +1,2 @@ | |
187 | > foo |
|
187 | > foo | |
188 | > +bar |
|
188 | > +bar | |
189 | > EOF |
|
189 | > EOF | |
190 |
|
190 | |||
191 | $ hg qimport --push appendfoo.diff appendbar.diff |
|
191 | $ hg qimport --push appendfoo.diff appendbar.diff | |
192 | adding appendfoo.diff to series file |
|
192 | adding appendfoo.diff to series file | |
193 | adding appendbar.diff to series file |
|
193 | adding appendbar.diff to series file | |
194 | applying appendfoo.diff |
|
194 | applying appendfoo.diff | |
195 | applying appendbar.diff |
|
195 | applying appendbar.diff | |
196 | now at: appendbar.diff |
|
196 | now at: appendbar.diff | |
197 | $ hg qfin -a |
|
197 | $ hg qfin -a | |
198 | patch b.diff finalized without changeset message |
|
198 | patch b.diff finalized without changeset message | |
199 | $ hg qimport -r 'p1(.)::' -P |
|
199 | $ hg qimport -r 'p1(.)::' -P | |
200 | $ hg qpop -a |
|
200 | $ hg qpop -a | |
201 | popping 3.diff |
|
201 | popping 3.diff | |
202 | popping 2.diff |
|
202 | popping 2.diff | |
203 | patch queue now empty |
|
203 | patch queue now empty | |
204 | $ hg qdel 3.diff |
|
204 | $ hg qdel 3.diff | |
205 | $ hg qdel -k 2.diff |
|
205 | $ hg qdel -k 2.diff | |
206 |
|
206 | |||
207 | qimport -e |
|
207 | qimport -e | |
208 |
|
208 | |||
209 | $ hg qimport -e 2.diff |
|
209 | $ hg qimport -e 2.diff | |
210 | adding 2.diff to series file |
|
210 | adding 2.diff to series file | |
211 | $ hg qdel -k 2.diff |
|
211 | $ hg qdel -k 2.diff | |
212 |
|
212 | |||
213 | qimport -e --name newname oldexisitingpatch |
|
213 | qimport -e --name newname oldexisitingpatch | |
214 |
|
214 | |||
215 | $ hg qimport -e --name this-name-is-better 2.diff |
|
215 | $ hg qimport -e --name this-name-is-better 2.diff | |
216 | renaming 2.diff to this-name-is-better |
|
216 | renaming 2.diff to this-name-is-better | |
217 | adding this-name-is-better to series file |
|
217 | adding this-name-is-better to series file | |
218 | $ hg qser |
|
218 | $ hg qser | |
219 | this-name-is-better |
|
219 | this-name-is-better | |
220 | url.diff |
|
220 | url.diff | |
221 |
|
221 | |||
222 | qimport -e --name without --force |
|
222 | qimport -e --name without --force | |
223 |
|
223 | |||
224 | $ cp .hg/patches/this-name-is-better .hg/patches/3.diff |
|
224 | $ cp .hg/patches/this-name-is-better .hg/patches/3.diff | |
225 | $ hg qimport -e --name this-name-is-better 3.diff |
|
225 | $ hg qimport -e --name this-name-is-better 3.diff | |
226 | abort: patch "this-name-is-better" already exists |
|
226 | abort: patch "this-name-is-better" already exists | |
227 | [255] |
|
227 | [255] | |
228 | $ hg qser |
|
228 | $ hg qser | |
229 | this-name-is-better |
|
229 | this-name-is-better | |
230 | url.diff |
|
230 | url.diff | |
231 |
|
231 | |||
232 | qimport -e --name with --force |
|
232 | qimport -e --name with --force | |
233 |
|
233 | |||
234 | $ hg qimport --force -e --name this-name-is-better 3.diff |
|
234 | $ hg qimport --force -e --name this-name-is-better 3.diff | |
235 | renaming 3.diff to this-name-is-better |
|
235 | renaming 3.diff to this-name-is-better | |
236 | adding this-name-is-better to series file |
|
236 | adding this-name-is-better to series file | |
237 | $ hg qser |
|
237 | $ hg qser | |
238 | this-name-is-better |
|
238 | this-name-is-better | |
239 | url.diff |
|
239 | url.diff | |
240 |
|
240 | |||
241 | qimport with bad name, should abort before reading file |
|
241 | qimport with bad name, should abort before reading file | |
242 |
|
242 | |||
243 | $ hg qimport non-existent-file --name .hg |
|
243 | $ hg qimport non-existent-file --name .hg | |
244 | abort: patch name cannot begin with ".hg" |
|
244 | abort: patch name cannot begin with ".hg" | |
245 | [255] |
|
245 | [255] | |
246 |
|
246 | |||
247 | qimport http:// patch with leading slashes in url |
|
247 | qimport http:// patch with leading slashes in url | |
248 |
|
248 | |||
249 | set up hgweb |
|
249 | set up hgweb | |
250 |
|
250 | |||
251 | $ cd .. |
|
251 | $ cd .. | |
252 | $ hg init served |
|
252 | $ hg init served | |
253 | $ cd served |
|
253 | $ cd served | |
254 | $ echo a > a |
|
254 | $ echo a > a | |
255 | $ hg ci -Am patch |
|
255 | $ hg ci -Am patch | |
256 | adding a |
|
256 | adding a | |
257 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
257 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
258 | $ cat hg.pid >> $DAEMON_PIDS |
|
258 | $ cat hg.pid >> $DAEMON_PIDS | |
259 |
|
259 | |||
260 | $ cd ../repo |
|
260 | $ cd ../repo | |
261 | $ hg qimport http://localhost:$HGPORT/raw-rev/0/// |
|
261 | $ hg qimport http://localhost:$HGPORT/raw-rev/0/// | |
262 | adding 0 to series file |
|
262 | adding 0 to series file | |
263 |
|
263 | |||
264 | check qimport phase: |
|
264 | check qimport phase: | |
265 |
|
265 | |||
266 | $ hg -q qpush |
|
266 | $ hg -q qpush | |
267 | now at: 0 |
|
267 | now at: 0 | |
268 | $ hg phase qparent |
|
268 | $ hg phase qparent | |
269 | 1: draft |
|
269 | 1: draft | |
270 | $ hg qimport -r qparent |
|
270 | $ hg qimport -r qparent | |
271 | $ hg phase qbase |
|
271 | $ hg phase qbase | |
272 | 1: draft |
|
272 | 1: draft | |
273 | $ hg qfinish qbase |
|
273 | $ hg qfinish qbase | |
274 | $ echo '[mq]' >> $HGRCPATH |
|
274 | $ echo '[mq]' >> $HGRCPATH | |
275 | $ echo 'secret=true' >> $HGRCPATH |
|
275 | $ echo 'secret=true' >> $HGRCPATH | |
276 | $ hg qimport -r qparent |
|
276 | $ hg qimport -r qparent | |
277 | $ hg phase qbase |
|
277 | $ hg phase qbase | |
278 | 1: secret |
|
278 | 1: secret | |
279 |
|
279 | |||
280 | $ cd .. |
|
280 | $ cd .. | |
|
281 | ||||
|
282 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
@@ -1,1065 +1,1066 b'' | |||||
1 |
$ "$TESTDIR/hghave" |
|
1 | $ "$TESTDIR/hghave" killdaemons || exit 80 | |
2 |
|
2 | |||
3 | $ cat >> $HGRCPATH <<EOF |
|
3 | $ cat >> $HGRCPATH <<EOF | |
4 | > [extensions] |
|
4 | > [extensions] | |
5 | > graphlog= |
|
5 | > graphlog= | |
6 | > EOF |
|
6 | > EOF | |
7 | $ hgph() { hg log -G --template "{rev} {phase} {desc} - {node|short}\n" $*; } |
|
7 | $ hgph() { hg log -G --template "{rev} {phase} {desc} - {node|short}\n" $*; } | |
8 |
|
8 | |||
9 | $ mkcommit() { |
|
9 | $ mkcommit() { | |
10 | > echo "$1" > "$1" |
|
10 | > echo "$1" > "$1" | |
11 | > hg add "$1" |
|
11 | > hg add "$1" | |
12 | > message="$1" |
|
12 | > message="$1" | |
13 | > shift |
|
13 | > shift | |
14 | > hg ci -m "$message" $* |
|
14 | > hg ci -m "$message" $* | |
15 | > } |
|
15 | > } | |
16 |
|
16 | |||
17 | $ hg init alpha |
|
17 | $ hg init alpha | |
18 | $ cd alpha |
|
18 | $ cd alpha | |
19 | $ mkcommit a-A |
|
19 | $ mkcommit a-A | |
20 | $ mkcommit a-B |
|
20 | $ mkcommit a-B | |
21 | $ mkcommit a-C |
|
21 | $ mkcommit a-C | |
22 | $ mkcommit a-D |
|
22 | $ mkcommit a-D | |
23 | $ hgph |
|
23 | $ hgph | |
24 | @ 3 draft a-D - b555f63b6063 |
|
24 | @ 3 draft a-D - b555f63b6063 | |
25 | | |
|
25 | | | |
26 | o 2 draft a-C - 54acac6f23ab |
|
26 | o 2 draft a-C - 54acac6f23ab | |
27 | | |
|
27 | | | |
28 | o 1 draft a-B - 548a3d25dbf0 |
|
28 | o 1 draft a-B - 548a3d25dbf0 | |
29 | | |
|
29 | | | |
30 | o 0 draft a-A - 054250a37db4 |
|
30 | o 0 draft a-A - 054250a37db4 | |
31 |
|
31 | |||
32 |
|
32 | |||
33 | $ hg init ../beta |
|
33 | $ hg init ../beta | |
34 | $ hg push -r 1 ../beta |
|
34 | $ hg push -r 1 ../beta | |
35 | pushing to ../beta |
|
35 | pushing to ../beta | |
36 | searching for changes |
|
36 | searching for changes | |
37 | adding changesets |
|
37 | adding changesets | |
38 | adding manifests |
|
38 | adding manifests | |
39 | adding file changes |
|
39 | adding file changes | |
40 | added 2 changesets with 2 changes to 2 files |
|
40 | added 2 changesets with 2 changes to 2 files | |
41 | $ hgph |
|
41 | $ hgph | |
42 | @ 3 draft a-D - b555f63b6063 |
|
42 | @ 3 draft a-D - b555f63b6063 | |
43 | | |
|
43 | | | |
44 | o 2 draft a-C - 54acac6f23ab |
|
44 | o 2 draft a-C - 54acac6f23ab | |
45 | | |
|
45 | | | |
46 | o 1 public a-B - 548a3d25dbf0 |
|
46 | o 1 public a-B - 548a3d25dbf0 | |
47 | | |
|
47 | | | |
48 | o 0 public a-A - 054250a37db4 |
|
48 | o 0 public a-A - 054250a37db4 | |
49 |
|
49 | |||
50 |
|
50 | |||
51 | $ cd ../beta |
|
51 | $ cd ../beta | |
52 | $ hgph |
|
52 | $ hgph | |
53 | o 1 public a-B - 548a3d25dbf0 |
|
53 | o 1 public a-B - 548a3d25dbf0 | |
54 | | |
|
54 | | | |
55 | o 0 public a-A - 054250a37db4 |
|
55 | o 0 public a-A - 054250a37db4 | |
56 |
|
56 | |||
57 | $ hg up -q |
|
57 | $ hg up -q | |
58 | $ mkcommit b-A |
|
58 | $ mkcommit b-A | |
59 | $ hgph |
|
59 | $ hgph | |
60 | @ 2 draft b-A - f54f1bb90ff3 |
|
60 | @ 2 draft b-A - f54f1bb90ff3 | |
61 | | |
|
61 | | | |
62 | o 1 public a-B - 548a3d25dbf0 |
|
62 | o 1 public a-B - 548a3d25dbf0 | |
63 | | |
|
63 | | | |
64 | o 0 public a-A - 054250a37db4 |
|
64 | o 0 public a-A - 054250a37db4 | |
65 |
|
65 | |||
66 | $ hg pull ../alpha |
|
66 | $ hg pull ../alpha | |
67 | pulling from ../alpha |
|
67 | pulling from ../alpha | |
68 | searching for changes |
|
68 | searching for changes | |
69 | adding changesets |
|
69 | adding changesets | |
70 | adding manifests |
|
70 | adding manifests | |
71 | adding file changes |
|
71 | adding file changes | |
72 | added 2 changesets with 2 changes to 2 files (+1 heads) |
|
72 | added 2 changesets with 2 changes to 2 files (+1 heads) | |
73 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
73 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
74 | $ hgph |
|
74 | $ hgph | |
75 | o 4 public a-D - b555f63b6063 |
|
75 | o 4 public a-D - b555f63b6063 | |
76 | | |
|
76 | | | |
77 | o 3 public a-C - 54acac6f23ab |
|
77 | o 3 public a-C - 54acac6f23ab | |
78 | | |
|
78 | | | |
79 | | @ 2 draft b-A - f54f1bb90ff3 |
|
79 | | @ 2 draft b-A - f54f1bb90ff3 | |
80 | |/ |
|
80 | |/ | |
81 | o 1 public a-B - 548a3d25dbf0 |
|
81 | o 1 public a-B - 548a3d25dbf0 | |
82 | | |
|
82 | | | |
83 | o 0 public a-A - 054250a37db4 |
|
83 | o 0 public a-A - 054250a37db4 | |
84 |
|
84 | |||
85 |
|
85 | |||
86 | pull did not updated ../alpha state. |
|
86 | pull did not updated ../alpha state. | |
87 | push from alpha to beta should update phase even if nothing is transferred |
|
87 | push from alpha to beta should update phase even if nothing is transferred | |
88 |
|
88 | |||
89 | $ cd ../alpha |
|
89 | $ cd ../alpha | |
90 | $ hgph # not updated by remote pull |
|
90 | $ hgph # not updated by remote pull | |
91 | @ 3 draft a-D - b555f63b6063 |
|
91 | @ 3 draft a-D - b555f63b6063 | |
92 | | |
|
92 | | | |
93 | o 2 draft a-C - 54acac6f23ab |
|
93 | o 2 draft a-C - 54acac6f23ab | |
94 | | |
|
94 | | | |
95 | o 1 public a-B - 548a3d25dbf0 |
|
95 | o 1 public a-B - 548a3d25dbf0 | |
96 | | |
|
96 | | | |
97 | o 0 public a-A - 054250a37db4 |
|
97 | o 0 public a-A - 054250a37db4 | |
98 |
|
98 | |||
99 | $ hg push ../beta |
|
99 | $ hg push ../beta | |
100 | pushing to ../beta |
|
100 | pushing to ../beta | |
101 | searching for changes |
|
101 | searching for changes | |
102 | no changes found |
|
102 | no changes found | |
103 | [1] |
|
103 | [1] | |
104 | $ hgph |
|
104 | $ hgph | |
105 | @ 3 public a-D - b555f63b6063 |
|
105 | @ 3 public a-D - b555f63b6063 | |
106 | | |
|
106 | | | |
107 | o 2 public a-C - 54acac6f23ab |
|
107 | o 2 public a-C - 54acac6f23ab | |
108 | | |
|
108 | | | |
109 | o 1 public a-B - 548a3d25dbf0 |
|
109 | o 1 public a-B - 548a3d25dbf0 | |
110 | | |
|
110 | | | |
111 | o 0 public a-A - 054250a37db4 |
|
111 | o 0 public a-A - 054250a37db4 | |
112 |
|
112 | |||
113 |
|
113 | |||
114 | update must update phase of common changeset too |
|
114 | update must update phase of common changeset too | |
115 |
|
115 | |||
116 | $ hg pull ../beta # getting b-A |
|
116 | $ hg pull ../beta # getting b-A | |
117 | pulling from ../beta |
|
117 | pulling from ../beta | |
118 | searching for changes |
|
118 | searching for changes | |
119 | adding changesets |
|
119 | adding changesets | |
120 | adding manifests |
|
120 | adding manifests | |
121 | adding file changes |
|
121 | adding file changes | |
122 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
122 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
123 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
123 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
124 |
|
124 | |||
125 | $ cd ../beta |
|
125 | $ cd ../beta | |
126 | $ hgph # not updated by remote pull |
|
126 | $ hgph # not updated by remote pull | |
127 | o 4 public a-D - b555f63b6063 |
|
127 | o 4 public a-D - b555f63b6063 | |
128 | | |
|
128 | | | |
129 | o 3 public a-C - 54acac6f23ab |
|
129 | o 3 public a-C - 54acac6f23ab | |
130 | | |
|
130 | | | |
131 | | @ 2 draft b-A - f54f1bb90ff3 |
|
131 | | @ 2 draft b-A - f54f1bb90ff3 | |
132 | |/ |
|
132 | |/ | |
133 | o 1 public a-B - 548a3d25dbf0 |
|
133 | o 1 public a-B - 548a3d25dbf0 | |
134 | | |
|
134 | | | |
135 | o 0 public a-A - 054250a37db4 |
|
135 | o 0 public a-A - 054250a37db4 | |
136 |
|
136 | |||
137 | $ hg pull ../alpha |
|
137 | $ hg pull ../alpha | |
138 | pulling from ../alpha |
|
138 | pulling from ../alpha | |
139 | searching for changes |
|
139 | searching for changes | |
140 | no changes found |
|
140 | no changes found | |
141 | $ hgph |
|
141 | $ hgph | |
142 | o 4 public a-D - b555f63b6063 |
|
142 | o 4 public a-D - b555f63b6063 | |
143 | | |
|
143 | | | |
144 | o 3 public a-C - 54acac6f23ab |
|
144 | o 3 public a-C - 54acac6f23ab | |
145 | | |
|
145 | | | |
146 | | @ 2 public b-A - f54f1bb90ff3 |
|
146 | | @ 2 public b-A - f54f1bb90ff3 | |
147 | |/ |
|
147 | |/ | |
148 | o 1 public a-B - 548a3d25dbf0 |
|
148 | o 1 public a-B - 548a3d25dbf0 | |
149 | | |
|
149 | | | |
150 | o 0 public a-A - 054250a37db4 |
|
150 | o 0 public a-A - 054250a37db4 | |
151 |
|
151 | |||
152 |
|
152 | |||
153 | Publish configuration option |
|
153 | Publish configuration option | |
154 | ---------------------------- |
|
154 | ---------------------------- | |
155 |
|
155 | |||
156 | Pull |
|
156 | Pull | |
157 | ```` |
|
157 | ```` | |
158 |
|
158 | |||
159 | changegroup are added without phase movement |
|
159 | changegroup are added without phase movement | |
160 |
|
160 | |||
161 | $ hg bundle -a ../base.bundle |
|
161 | $ hg bundle -a ../base.bundle | |
162 | 5 changesets found |
|
162 | 5 changesets found | |
163 | $ cd .. |
|
163 | $ cd .. | |
164 | $ hg init mu |
|
164 | $ hg init mu | |
165 | $ cd mu |
|
165 | $ cd mu | |
166 | $ cat > .hg/hgrc << EOF |
|
166 | $ cat > .hg/hgrc << EOF | |
167 | > [phases] |
|
167 | > [phases] | |
168 | > publish=0 |
|
168 | > publish=0 | |
169 | > EOF |
|
169 | > EOF | |
170 | $ hg unbundle ../base.bundle |
|
170 | $ hg unbundle ../base.bundle | |
171 | adding changesets |
|
171 | adding changesets | |
172 | adding manifests |
|
172 | adding manifests | |
173 | adding file changes |
|
173 | adding file changes | |
174 | added 5 changesets with 5 changes to 5 files (+1 heads) |
|
174 | added 5 changesets with 5 changes to 5 files (+1 heads) | |
175 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
175 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
176 | $ hgph |
|
176 | $ hgph | |
177 | o 4 draft a-D - b555f63b6063 |
|
177 | o 4 draft a-D - b555f63b6063 | |
178 | | |
|
178 | | | |
179 | o 3 draft a-C - 54acac6f23ab |
|
179 | o 3 draft a-C - 54acac6f23ab | |
180 | | |
|
180 | | | |
181 | | o 2 draft b-A - f54f1bb90ff3 |
|
181 | | o 2 draft b-A - f54f1bb90ff3 | |
182 | |/ |
|
182 | |/ | |
183 | o 1 draft a-B - 548a3d25dbf0 |
|
183 | o 1 draft a-B - 548a3d25dbf0 | |
184 | | |
|
184 | | | |
185 | o 0 draft a-A - 054250a37db4 |
|
185 | o 0 draft a-A - 054250a37db4 | |
186 |
|
186 | |||
187 | $ cd .. |
|
187 | $ cd .. | |
188 |
|
188 | |||
189 | Pulling from publish=False to publish=False does not move boundary. |
|
189 | Pulling from publish=False to publish=False does not move boundary. | |
190 |
|
190 | |||
191 | $ hg init nu |
|
191 | $ hg init nu | |
192 | $ cd nu |
|
192 | $ cd nu | |
193 | $ cat > .hg/hgrc << EOF |
|
193 | $ cat > .hg/hgrc << EOF | |
194 | > [phases] |
|
194 | > [phases] | |
195 | > publish=0 |
|
195 | > publish=0 | |
196 | > EOF |
|
196 | > EOF | |
197 | $ hg pull ../mu -r 54acac6f23ab |
|
197 | $ hg pull ../mu -r 54acac6f23ab | |
198 | pulling from ../mu |
|
198 | pulling from ../mu | |
199 | adding changesets |
|
199 | adding changesets | |
200 | adding manifests |
|
200 | adding manifests | |
201 | adding file changes |
|
201 | adding file changes | |
202 | added 3 changesets with 3 changes to 3 files |
|
202 | added 3 changesets with 3 changes to 3 files | |
203 | (run 'hg update' to get a working copy) |
|
203 | (run 'hg update' to get a working copy) | |
204 | $ hgph |
|
204 | $ hgph | |
205 | o 2 draft a-C - 54acac6f23ab |
|
205 | o 2 draft a-C - 54acac6f23ab | |
206 | | |
|
206 | | | |
207 | o 1 draft a-B - 548a3d25dbf0 |
|
207 | o 1 draft a-B - 548a3d25dbf0 | |
208 | | |
|
208 | | | |
209 | o 0 draft a-A - 054250a37db4 |
|
209 | o 0 draft a-A - 054250a37db4 | |
210 |
|
210 | |||
211 |
|
211 | |||
212 | Even for common |
|
212 | Even for common | |
213 |
|
213 | |||
214 | $ hg pull ../mu -r f54f1bb90ff3 |
|
214 | $ hg pull ../mu -r f54f1bb90ff3 | |
215 | pulling from ../mu |
|
215 | pulling from ../mu | |
216 | searching for changes |
|
216 | searching for changes | |
217 | adding changesets |
|
217 | adding changesets | |
218 | adding manifests |
|
218 | adding manifests | |
219 | adding file changes |
|
219 | adding file changes | |
220 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
220 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
221 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
221 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
222 | $ hgph |
|
222 | $ hgph | |
223 | o 3 draft b-A - f54f1bb90ff3 |
|
223 | o 3 draft b-A - f54f1bb90ff3 | |
224 | | |
|
224 | | | |
225 | | o 2 draft a-C - 54acac6f23ab |
|
225 | | o 2 draft a-C - 54acac6f23ab | |
226 | |/ |
|
226 | |/ | |
227 | o 1 draft a-B - 548a3d25dbf0 |
|
227 | o 1 draft a-B - 548a3d25dbf0 | |
228 | | |
|
228 | | | |
229 | o 0 draft a-A - 054250a37db4 |
|
229 | o 0 draft a-A - 054250a37db4 | |
230 |
|
230 | |||
231 |
|
231 | |||
232 |
|
232 | |||
233 | Pulling from Publish=True to Publish=False move boundary in common set. |
|
233 | Pulling from Publish=True to Publish=False move boundary in common set. | |
234 | we are in nu |
|
234 | we are in nu | |
235 |
|
235 | |||
236 | $ hg pull ../alpha -r b555f63b6063 |
|
236 | $ hg pull ../alpha -r b555f63b6063 | |
237 | pulling from ../alpha |
|
237 | pulling from ../alpha | |
238 | searching for changes |
|
238 | searching for changes | |
239 | adding changesets |
|
239 | adding changesets | |
240 | adding manifests |
|
240 | adding manifests | |
241 | adding file changes |
|
241 | adding file changes | |
242 | added 1 changesets with 1 changes to 1 files |
|
242 | added 1 changesets with 1 changes to 1 files | |
243 | (run 'hg update' to get a working copy) |
|
243 | (run 'hg update' to get a working copy) | |
244 | $ hgph # f54f1bb90ff3 stay draft, not ancestor of -r |
|
244 | $ hgph # f54f1bb90ff3 stay draft, not ancestor of -r | |
245 | o 4 public a-D - b555f63b6063 |
|
245 | o 4 public a-D - b555f63b6063 | |
246 | | |
|
246 | | | |
247 | | o 3 draft b-A - f54f1bb90ff3 |
|
247 | | o 3 draft b-A - f54f1bb90ff3 | |
248 | | | |
|
248 | | | | |
249 | o | 2 public a-C - 54acac6f23ab |
|
249 | o | 2 public a-C - 54acac6f23ab | |
250 | |/ |
|
250 | |/ | |
251 | o 1 public a-B - 548a3d25dbf0 |
|
251 | o 1 public a-B - 548a3d25dbf0 | |
252 | | |
|
252 | | | |
253 | o 0 public a-A - 054250a37db4 |
|
253 | o 0 public a-A - 054250a37db4 | |
254 |
|
254 | |||
255 |
|
255 | |||
256 | pulling from Publish=False to publish=False with some public |
|
256 | pulling from Publish=False to publish=False with some public | |
257 |
|
257 | |||
258 | $ hg up -q f54f1bb90ff3 |
|
258 | $ hg up -q f54f1bb90ff3 | |
259 | $ mkcommit n-A |
|
259 | $ mkcommit n-A | |
260 | $ mkcommit n-B |
|
260 | $ mkcommit n-B | |
261 | $ hgph |
|
261 | $ hgph | |
262 | @ 6 draft n-B - 145e75495359 |
|
262 | @ 6 draft n-B - 145e75495359 | |
263 | | |
|
263 | | | |
264 | o 5 draft n-A - d6bcb4f74035 |
|
264 | o 5 draft n-A - d6bcb4f74035 | |
265 | | |
|
265 | | | |
266 | | o 4 public a-D - b555f63b6063 |
|
266 | | o 4 public a-D - b555f63b6063 | |
267 | | | |
|
267 | | | | |
268 | o | 3 draft b-A - f54f1bb90ff3 |
|
268 | o | 3 draft b-A - f54f1bb90ff3 | |
269 | | | |
|
269 | | | | |
270 | | o 2 public a-C - 54acac6f23ab |
|
270 | | o 2 public a-C - 54acac6f23ab | |
271 | |/ |
|
271 | |/ | |
272 | o 1 public a-B - 548a3d25dbf0 |
|
272 | o 1 public a-B - 548a3d25dbf0 | |
273 | | |
|
273 | | | |
274 | o 0 public a-A - 054250a37db4 |
|
274 | o 0 public a-A - 054250a37db4 | |
275 |
|
275 | |||
276 | $ cd ../mu |
|
276 | $ cd ../mu | |
277 | $ hg pull ../nu |
|
277 | $ hg pull ../nu | |
278 | pulling from ../nu |
|
278 | pulling from ../nu | |
279 | searching for changes |
|
279 | searching for changes | |
280 | adding changesets |
|
280 | adding changesets | |
281 | adding manifests |
|
281 | adding manifests | |
282 | adding file changes |
|
282 | adding file changes | |
283 | added 2 changesets with 2 changes to 2 files |
|
283 | added 2 changesets with 2 changes to 2 files | |
284 | (run 'hg update' to get a working copy) |
|
284 | (run 'hg update' to get a working copy) | |
285 | $ hgph |
|
285 | $ hgph | |
286 | o 6 draft n-B - 145e75495359 |
|
286 | o 6 draft n-B - 145e75495359 | |
287 | | |
|
287 | | | |
288 | o 5 draft n-A - d6bcb4f74035 |
|
288 | o 5 draft n-A - d6bcb4f74035 | |
289 | | |
|
289 | | | |
290 | | o 4 public a-D - b555f63b6063 |
|
290 | | o 4 public a-D - b555f63b6063 | |
291 | | | |
|
291 | | | | |
292 | | o 3 public a-C - 54acac6f23ab |
|
292 | | o 3 public a-C - 54acac6f23ab | |
293 | | | |
|
293 | | | | |
294 | o | 2 draft b-A - f54f1bb90ff3 |
|
294 | o | 2 draft b-A - f54f1bb90ff3 | |
295 | |/ |
|
295 | |/ | |
296 | o 1 public a-B - 548a3d25dbf0 |
|
296 | o 1 public a-B - 548a3d25dbf0 | |
297 | | |
|
297 | | | |
298 | o 0 public a-A - 054250a37db4 |
|
298 | o 0 public a-A - 054250a37db4 | |
299 |
|
299 | |||
300 | $ cd .. |
|
300 | $ cd .. | |
301 |
|
301 | |||
302 | pulling into publish=True |
|
302 | pulling into publish=True | |
303 |
|
303 | |||
304 | $ cd alpha |
|
304 | $ cd alpha | |
305 | $ hgph |
|
305 | $ hgph | |
306 | o 4 public b-A - f54f1bb90ff3 |
|
306 | o 4 public b-A - f54f1bb90ff3 | |
307 | | |
|
307 | | | |
308 | | @ 3 public a-D - b555f63b6063 |
|
308 | | @ 3 public a-D - b555f63b6063 | |
309 | | | |
|
309 | | | | |
310 | | o 2 public a-C - 54acac6f23ab |
|
310 | | o 2 public a-C - 54acac6f23ab | |
311 | |/ |
|
311 | |/ | |
312 | o 1 public a-B - 548a3d25dbf0 |
|
312 | o 1 public a-B - 548a3d25dbf0 | |
313 | | |
|
313 | | | |
314 | o 0 public a-A - 054250a37db4 |
|
314 | o 0 public a-A - 054250a37db4 | |
315 |
|
315 | |||
316 | $ hg pull ../mu |
|
316 | $ hg pull ../mu | |
317 | pulling from ../mu |
|
317 | pulling from ../mu | |
318 | searching for changes |
|
318 | searching for changes | |
319 | adding changesets |
|
319 | adding changesets | |
320 | adding manifests |
|
320 | adding manifests | |
321 | adding file changes |
|
321 | adding file changes | |
322 | added 2 changesets with 2 changes to 2 files |
|
322 | added 2 changesets with 2 changes to 2 files | |
323 | (run 'hg update' to get a working copy) |
|
323 | (run 'hg update' to get a working copy) | |
324 | $ hgph |
|
324 | $ hgph | |
325 | o 6 draft n-B - 145e75495359 |
|
325 | o 6 draft n-B - 145e75495359 | |
326 | | |
|
326 | | | |
327 | o 5 draft n-A - d6bcb4f74035 |
|
327 | o 5 draft n-A - d6bcb4f74035 | |
328 | | |
|
328 | | | |
329 | o 4 public b-A - f54f1bb90ff3 |
|
329 | o 4 public b-A - f54f1bb90ff3 | |
330 | | |
|
330 | | | |
331 | | @ 3 public a-D - b555f63b6063 |
|
331 | | @ 3 public a-D - b555f63b6063 | |
332 | | | |
|
332 | | | | |
333 | | o 2 public a-C - 54acac6f23ab |
|
333 | | o 2 public a-C - 54acac6f23ab | |
334 | |/ |
|
334 | |/ | |
335 | o 1 public a-B - 548a3d25dbf0 |
|
335 | o 1 public a-B - 548a3d25dbf0 | |
336 | | |
|
336 | | | |
337 | o 0 public a-A - 054250a37db4 |
|
337 | o 0 public a-A - 054250a37db4 | |
338 |
|
338 | |||
339 | $ cd .. |
|
339 | $ cd .. | |
340 |
|
340 | |||
341 | pulling back into original repo |
|
341 | pulling back into original repo | |
342 |
|
342 | |||
343 | $ cd nu |
|
343 | $ cd nu | |
344 | $ hg pull ../alpha |
|
344 | $ hg pull ../alpha | |
345 | pulling from ../alpha |
|
345 | pulling from ../alpha | |
346 | searching for changes |
|
346 | searching for changes | |
347 | no changes found |
|
347 | no changes found | |
348 | $ hgph |
|
348 | $ hgph | |
349 | @ 6 public n-B - 145e75495359 |
|
349 | @ 6 public n-B - 145e75495359 | |
350 | | |
|
350 | | | |
351 | o 5 public n-A - d6bcb4f74035 |
|
351 | o 5 public n-A - d6bcb4f74035 | |
352 | | |
|
352 | | | |
353 | | o 4 public a-D - b555f63b6063 |
|
353 | | o 4 public a-D - b555f63b6063 | |
354 | | | |
|
354 | | | | |
355 | o | 3 public b-A - f54f1bb90ff3 |
|
355 | o | 3 public b-A - f54f1bb90ff3 | |
356 | | | |
|
356 | | | | |
357 | | o 2 public a-C - 54acac6f23ab |
|
357 | | o 2 public a-C - 54acac6f23ab | |
358 | |/ |
|
358 | |/ | |
359 | o 1 public a-B - 548a3d25dbf0 |
|
359 | o 1 public a-B - 548a3d25dbf0 | |
360 | | |
|
360 | | | |
361 | o 0 public a-A - 054250a37db4 |
|
361 | o 0 public a-A - 054250a37db4 | |
362 |
|
362 | |||
363 |
|
363 | |||
364 | Push |
|
364 | Push | |
365 | ```` |
|
365 | ```` | |
366 |
|
366 | |||
367 | (inserted) |
|
367 | (inserted) | |
368 |
|
368 | |||
369 | Test that phase are pushed even when they are nothing to pus |
|
369 | Test that phase are pushed even when they are nothing to pus | |
370 | (this might be tested later bu are very convenient to not alter too much test) |
|
370 | (this might be tested later bu are very convenient to not alter too much test) | |
371 |
|
371 | |||
372 | Push back to alpha |
|
372 | Push back to alpha | |
373 |
|
373 | |||
374 | $ hg push ../alpha # from nu |
|
374 | $ hg push ../alpha # from nu | |
375 | pushing to ../alpha |
|
375 | pushing to ../alpha | |
376 | searching for changes |
|
376 | searching for changes | |
377 | no changes found |
|
377 | no changes found | |
378 | [1] |
|
378 | [1] | |
379 | $ cd .. |
|
379 | $ cd .. | |
380 | $ cd alpha |
|
380 | $ cd alpha | |
381 | $ hgph |
|
381 | $ hgph | |
382 | o 6 public n-B - 145e75495359 |
|
382 | o 6 public n-B - 145e75495359 | |
383 | | |
|
383 | | | |
384 | o 5 public n-A - d6bcb4f74035 |
|
384 | o 5 public n-A - d6bcb4f74035 | |
385 | | |
|
385 | | | |
386 | o 4 public b-A - f54f1bb90ff3 |
|
386 | o 4 public b-A - f54f1bb90ff3 | |
387 | | |
|
387 | | | |
388 | | @ 3 public a-D - b555f63b6063 |
|
388 | | @ 3 public a-D - b555f63b6063 | |
389 | | | |
|
389 | | | | |
390 | | o 2 public a-C - 54acac6f23ab |
|
390 | | o 2 public a-C - 54acac6f23ab | |
391 | |/ |
|
391 | |/ | |
392 | o 1 public a-B - 548a3d25dbf0 |
|
392 | o 1 public a-B - 548a3d25dbf0 | |
393 | | |
|
393 | | | |
394 | o 0 public a-A - 054250a37db4 |
|
394 | o 0 public a-A - 054250a37db4 | |
395 |
|
395 | |||
396 |
|
396 | |||
397 | (end insertion) |
|
397 | (end insertion) | |
398 |
|
398 | |||
399 |
|
399 | |||
400 | initial setup |
|
400 | initial setup | |
401 |
|
401 | |||
402 | $ hg glog # of alpha |
|
402 | $ hg glog # of alpha | |
403 | o changeset: 6:145e75495359 |
|
403 | o changeset: 6:145e75495359 | |
404 | | tag: tip |
|
404 | | tag: tip | |
405 | | user: test |
|
405 | | user: test | |
406 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
406 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
407 | | summary: n-B |
|
407 | | summary: n-B | |
408 | | |
|
408 | | | |
409 | o changeset: 5:d6bcb4f74035 |
|
409 | o changeset: 5:d6bcb4f74035 | |
410 | | user: test |
|
410 | | user: test | |
411 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
411 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
412 | | summary: n-A |
|
412 | | summary: n-A | |
413 | | |
|
413 | | | |
414 | o changeset: 4:f54f1bb90ff3 |
|
414 | o changeset: 4:f54f1bb90ff3 | |
415 | | parent: 1:548a3d25dbf0 |
|
415 | | parent: 1:548a3d25dbf0 | |
416 | | user: test |
|
416 | | user: test | |
417 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
417 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
418 | | summary: b-A |
|
418 | | summary: b-A | |
419 | | |
|
419 | | | |
420 | | @ changeset: 3:b555f63b6063 |
|
420 | | @ changeset: 3:b555f63b6063 | |
421 | | | user: test |
|
421 | | | user: test | |
422 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
422 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
423 | | | summary: a-D |
|
423 | | | summary: a-D | |
424 | | | |
|
424 | | | | |
425 | | o changeset: 2:54acac6f23ab |
|
425 | | o changeset: 2:54acac6f23ab | |
426 | |/ user: test |
|
426 | |/ user: test | |
427 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
427 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
428 | | summary: a-C |
|
428 | | summary: a-C | |
429 | | |
|
429 | | | |
430 | o changeset: 1:548a3d25dbf0 |
|
430 | o changeset: 1:548a3d25dbf0 | |
431 | | user: test |
|
431 | | user: test | |
432 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
432 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
433 | | summary: a-B |
|
433 | | summary: a-B | |
434 | | |
|
434 | | | |
435 | o changeset: 0:054250a37db4 |
|
435 | o changeset: 0:054250a37db4 | |
436 | user: test |
|
436 | user: test | |
437 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
437 | date: Thu Jan 01 00:00:00 1970 +0000 | |
438 | summary: a-A |
|
438 | summary: a-A | |
439 |
|
439 | |||
440 | $ mkcommit a-E |
|
440 | $ mkcommit a-E | |
441 | $ mkcommit a-F |
|
441 | $ mkcommit a-F | |
442 | $ mkcommit a-G |
|
442 | $ mkcommit a-G | |
443 | $ hg up d6bcb4f74035 -q |
|
443 | $ hg up d6bcb4f74035 -q | |
444 | $ mkcommit a-H |
|
444 | $ mkcommit a-H | |
445 | created new head |
|
445 | created new head | |
446 | $ hgph |
|
446 | $ hgph | |
447 | @ 10 draft a-H - 967b449fbc94 |
|
447 | @ 10 draft a-H - 967b449fbc94 | |
448 | | |
|
448 | | | |
449 | | o 9 draft a-G - 3e27b6f1eee1 |
|
449 | | o 9 draft a-G - 3e27b6f1eee1 | |
450 | | | |
|
450 | | | | |
451 | | o 8 draft a-F - b740e3e5c05d |
|
451 | | o 8 draft a-F - b740e3e5c05d | |
452 | | | |
|
452 | | | | |
453 | | o 7 draft a-E - e9f537e46dea |
|
453 | | o 7 draft a-E - e9f537e46dea | |
454 | | | |
|
454 | | | | |
455 | +---o 6 public n-B - 145e75495359 |
|
455 | +---o 6 public n-B - 145e75495359 | |
456 | | | |
|
456 | | | | |
457 | o | 5 public n-A - d6bcb4f74035 |
|
457 | o | 5 public n-A - d6bcb4f74035 | |
458 | | | |
|
458 | | | | |
459 | o | 4 public b-A - f54f1bb90ff3 |
|
459 | o | 4 public b-A - f54f1bb90ff3 | |
460 | | | |
|
460 | | | | |
461 | | o 3 public a-D - b555f63b6063 |
|
461 | | o 3 public a-D - b555f63b6063 | |
462 | | | |
|
462 | | | | |
463 | | o 2 public a-C - 54acac6f23ab |
|
463 | | o 2 public a-C - 54acac6f23ab | |
464 | |/ |
|
464 | |/ | |
465 | o 1 public a-B - 548a3d25dbf0 |
|
465 | o 1 public a-B - 548a3d25dbf0 | |
466 | | |
|
466 | | | |
467 | o 0 public a-A - 054250a37db4 |
|
467 | o 0 public a-A - 054250a37db4 | |
468 |
|
468 | |||
469 |
|
469 | |||
470 | Pulling from bundle does not alter phases of changeset not present in the bundle |
|
470 | Pulling from bundle does not alter phases of changeset not present in the bundle | |
471 |
|
471 | |||
472 | $ hg bundle --base 1 -r 6 -r 3 ../partial-bundle.hg |
|
472 | $ hg bundle --base 1 -r 6 -r 3 ../partial-bundle.hg | |
473 | 5 changesets found |
|
473 | 5 changesets found | |
474 | $ hg pull ../partial-bundle.hg |
|
474 | $ hg pull ../partial-bundle.hg | |
475 | pulling from ../partial-bundle.hg |
|
475 | pulling from ../partial-bundle.hg | |
476 | searching for changes |
|
476 | searching for changes | |
477 | no changes found |
|
477 | no changes found | |
478 | $ hgph |
|
478 | $ hgph | |
479 | @ 10 draft a-H - 967b449fbc94 |
|
479 | @ 10 draft a-H - 967b449fbc94 | |
480 | | |
|
480 | | | |
481 | | o 9 draft a-G - 3e27b6f1eee1 |
|
481 | | o 9 draft a-G - 3e27b6f1eee1 | |
482 | | | |
|
482 | | | | |
483 | | o 8 draft a-F - b740e3e5c05d |
|
483 | | o 8 draft a-F - b740e3e5c05d | |
484 | | | |
|
484 | | | | |
485 | | o 7 draft a-E - e9f537e46dea |
|
485 | | o 7 draft a-E - e9f537e46dea | |
486 | | | |
|
486 | | | | |
487 | +---o 6 public n-B - 145e75495359 |
|
487 | +---o 6 public n-B - 145e75495359 | |
488 | | | |
|
488 | | | | |
489 | o | 5 public n-A - d6bcb4f74035 |
|
489 | o | 5 public n-A - d6bcb4f74035 | |
490 | | | |
|
490 | | | | |
491 | o | 4 public b-A - f54f1bb90ff3 |
|
491 | o | 4 public b-A - f54f1bb90ff3 | |
492 | | | |
|
492 | | | | |
493 | | o 3 public a-D - b555f63b6063 |
|
493 | | o 3 public a-D - b555f63b6063 | |
494 | | | |
|
494 | | | | |
495 | | o 2 public a-C - 54acac6f23ab |
|
495 | | o 2 public a-C - 54acac6f23ab | |
496 | |/ |
|
496 | |/ | |
497 | o 1 public a-B - 548a3d25dbf0 |
|
497 | o 1 public a-B - 548a3d25dbf0 | |
498 | | |
|
498 | | | |
499 | o 0 public a-A - 054250a37db4 |
|
499 | o 0 public a-A - 054250a37db4 | |
500 |
|
500 | |||
501 |
|
501 | |||
502 | Pushing to Publish=False (unknown changeset) |
|
502 | Pushing to Publish=False (unknown changeset) | |
503 |
|
503 | |||
504 | $ hg push ../mu -r b740e3e5c05d # a-F |
|
504 | $ hg push ../mu -r b740e3e5c05d # a-F | |
505 | pushing to ../mu |
|
505 | pushing to ../mu | |
506 | searching for changes |
|
506 | searching for changes | |
507 | adding changesets |
|
507 | adding changesets | |
508 | adding manifests |
|
508 | adding manifests | |
509 | adding file changes |
|
509 | adding file changes | |
510 | added 2 changesets with 2 changes to 2 files |
|
510 | added 2 changesets with 2 changes to 2 files | |
511 | $ hgph |
|
511 | $ hgph | |
512 | @ 10 draft a-H - 967b449fbc94 |
|
512 | @ 10 draft a-H - 967b449fbc94 | |
513 | | |
|
513 | | | |
514 | | o 9 draft a-G - 3e27b6f1eee1 |
|
514 | | o 9 draft a-G - 3e27b6f1eee1 | |
515 | | | |
|
515 | | | | |
516 | | o 8 draft a-F - b740e3e5c05d |
|
516 | | o 8 draft a-F - b740e3e5c05d | |
517 | | | |
|
517 | | | | |
518 | | o 7 draft a-E - e9f537e46dea |
|
518 | | o 7 draft a-E - e9f537e46dea | |
519 | | | |
|
519 | | | | |
520 | +---o 6 public n-B - 145e75495359 |
|
520 | +---o 6 public n-B - 145e75495359 | |
521 | | | |
|
521 | | | | |
522 | o | 5 public n-A - d6bcb4f74035 |
|
522 | o | 5 public n-A - d6bcb4f74035 | |
523 | | | |
|
523 | | | | |
524 | o | 4 public b-A - f54f1bb90ff3 |
|
524 | o | 4 public b-A - f54f1bb90ff3 | |
525 | | | |
|
525 | | | | |
526 | | o 3 public a-D - b555f63b6063 |
|
526 | | o 3 public a-D - b555f63b6063 | |
527 | | | |
|
527 | | | | |
528 | | o 2 public a-C - 54acac6f23ab |
|
528 | | o 2 public a-C - 54acac6f23ab | |
529 | |/ |
|
529 | |/ | |
530 | o 1 public a-B - 548a3d25dbf0 |
|
530 | o 1 public a-B - 548a3d25dbf0 | |
531 | | |
|
531 | | | |
532 | o 0 public a-A - 054250a37db4 |
|
532 | o 0 public a-A - 054250a37db4 | |
533 |
|
533 | |||
534 |
|
534 | |||
535 | $ cd ../mu |
|
535 | $ cd ../mu | |
536 | $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft, |
|
536 | $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft, | |
537 | > # not ancestor of -r |
|
537 | > # not ancestor of -r | |
538 | o 8 draft a-F - b740e3e5c05d |
|
538 | o 8 draft a-F - b740e3e5c05d | |
539 | | |
|
539 | | | |
540 | o 7 draft a-E - e9f537e46dea |
|
540 | o 7 draft a-E - e9f537e46dea | |
541 | | |
|
541 | | | |
542 | | o 6 draft n-B - 145e75495359 |
|
542 | | o 6 draft n-B - 145e75495359 | |
543 | | | |
|
543 | | | | |
544 | | o 5 draft n-A - d6bcb4f74035 |
|
544 | | o 5 draft n-A - d6bcb4f74035 | |
545 | | | |
|
545 | | | | |
546 | o | 4 public a-D - b555f63b6063 |
|
546 | o | 4 public a-D - b555f63b6063 | |
547 | | | |
|
547 | | | | |
548 | o | 3 public a-C - 54acac6f23ab |
|
548 | o | 3 public a-C - 54acac6f23ab | |
549 | | | |
|
549 | | | | |
550 | | o 2 draft b-A - f54f1bb90ff3 |
|
550 | | o 2 draft b-A - f54f1bb90ff3 | |
551 | |/ |
|
551 | |/ | |
552 | o 1 public a-B - 548a3d25dbf0 |
|
552 | o 1 public a-B - 548a3d25dbf0 | |
553 | | |
|
553 | | | |
554 | o 0 public a-A - 054250a37db4 |
|
554 | o 0 public a-A - 054250a37db4 | |
555 |
|
555 | |||
556 |
|
556 | |||
557 | Pushing to Publish=True (unknown changeset) |
|
557 | Pushing to Publish=True (unknown changeset) | |
558 |
|
558 | |||
559 | $ hg push ../beta -r b740e3e5c05d |
|
559 | $ hg push ../beta -r b740e3e5c05d | |
560 | pushing to ../beta |
|
560 | pushing to ../beta | |
561 | searching for changes |
|
561 | searching for changes | |
562 | adding changesets |
|
562 | adding changesets | |
563 | adding manifests |
|
563 | adding manifests | |
564 | adding file changes |
|
564 | adding file changes | |
565 | added 2 changesets with 2 changes to 2 files |
|
565 | added 2 changesets with 2 changes to 2 files | |
566 | $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft, |
|
566 | $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft, | |
567 | > # not ancestor of -r |
|
567 | > # not ancestor of -r | |
568 | o 8 public a-F - b740e3e5c05d |
|
568 | o 8 public a-F - b740e3e5c05d | |
569 | | |
|
569 | | | |
570 | o 7 public a-E - e9f537e46dea |
|
570 | o 7 public a-E - e9f537e46dea | |
571 | | |
|
571 | | | |
572 | | o 6 draft n-B - 145e75495359 |
|
572 | | o 6 draft n-B - 145e75495359 | |
573 | | | |
|
573 | | | | |
574 | | o 5 draft n-A - d6bcb4f74035 |
|
574 | | o 5 draft n-A - d6bcb4f74035 | |
575 | | | |
|
575 | | | | |
576 | o | 4 public a-D - b555f63b6063 |
|
576 | o | 4 public a-D - b555f63b6063 | |
577 | | | |
|
577 | | | | |
578 | o | 3 public a-C - 54acac6f23ab |
|
578 | o | 3 public a-C - 54acac6f23ab | |
579 | | | |
|
579 | | | | |
580 | | o 2 draft b-A - f54f1bb90ff3 |
|
580 | | o 2 draft b-A - f54f1bb90ff3 | |
581 | |/ |
|
581 | |/ | |
582 | o 1 public a-B - 548a3d25dbf0 |
|
582 | o 1 public a-B - 548a3d25dbf0 | |
583 | | |
|
583 | | | |
584 | o 0 public a-A - 054250a37db4 |
|
584 | o 0 public a-A - 054250a37db4 | |
585 |
|
585 | |||
586 |
|
586 | |||
587 | Pushing to Publish=True (common changeset) |
|
587 | Pushing to Publish=True (common changeset) | |
588 |
|
588 | |||
589 | $ cd ../beta |
|
589 | $ cd ../beta | |
590 | $ hg push ../alpha |
|
590 | $ hg push ../alpha | |
591 | pushing to ../alpha |
|
591 | pushing to ../alpha | |
592 | searching for changes |
|
592 | searching for changes | |
593 | no changes found |
|
593 | no changes found | |
594 | [1] |
|
594 | [1] | |
595 | $ hgph |
|
595 | $ hgph | |
596 | o 6 public a-F - b740e3e5c05d |
|
596 | o 6 public a-F - b740e3e5c05d | |
597 | | |
|
597 | | | |
598 | o 5 public a-E - e9f537e46dea |
|
598 | o 5 public a-E - e9f537e46dea | |
599 | | |
|
599 | | | |
600 | o 4 public a-D - b555f63b6063 |
|
600 | o 4 public a-D - b555f63b6063 | |
601 | | |
|
601 | | | |
602 | o 3 public a-C - 54acac6f23ab |
|
602 | o 3 public a-C - 54acac6f23ab | |
603 | | |
|
603 | | | |
604 | | @ 2 public b-A - f54f1bb90ff3 |
|
604 | | @ 2 public b-A - f54f1bb90ff3 | |
605 | |/ |
|
605 | |/ | |
606 | o 1 public a-B - 548a3d25dbf0 |
|
606 | o 1 public a-B - 548a3d25dbf0 | |
607 | | |
|
607 | | | |
608 | o 0 public a-A - 054250a37db4 |
|
608 | o 0 public a-A - 054250a37db4 | |
609 |
|
609 | |||
610 | $ cd ../alpha |
|
610 | $ cd ../alpha | |
611 | $ hgph |
|
611 | $ hgph | |
612 | @ 10 draft a-H - 967b449fbc94 |
|
612 | @ 10 draft a-H - 967b449fbc94 | |
613 | | |
|
613 | | | |
614 | | o 9 draft a-G - 3e27b6f1eee1 |
|
614 | | o 9 draft a-G - 3e27b6f1eee1 | |
615 | | | |
|
615 | | | | |
616 | | o 8 public a-F - b740e3e5c05d |
|
616 | | o 8 public a-F - b740e3e5c05d | |
617 | | | |
|
617 | | | | |
618 | | o 7 public a-E - e9f537e46dea |
|
618 | | o 7 public a-E - e9f537e46dea | |
619 | | | |
|
619 | | | | |
620 | +---o 6 public n-B - 145e75495359 |
|
620 | +---o 6 public n-B - 145e75495359 | |
621 | | | |
|
621 | | | | |
622 | o | 5 public n-A - d6bcb4f74035 |
|
622 | o | 5 public n-A - d6bcb4f74035 | |
623 | | | |
|
623 | | | | |
624 | o | 4 public b-A - f54f1bb90ff3 |
|
624 | o | 4 public b-A - f54f1bb90ff3 | |
625 | | | |
|
625 | | | | |
626 | | o 3 public a-D - b555f63b6063 |
|
626 | | o 3 public a-D - b555f63b6063 | |
627 | | | |
|
627 | | | | |
628 | | o 2 public a-C - 54acac6f23ab |
|
628 | | o 2 public a-C - 54acac6f23ab | |
629 | |/ |
|
629 | |/ | |
630 | o 1 public a-B - 548a3d25dbf0 |
|
630 | o 1 public a-B - 548a3d25dbf0 | |
631 | | |
|
631 | | | |
632 | o 0 public a-A - 054250a37db4 |
|
632 | o 0 public a-A - 054250a37db4 | |
633 |
|
633 | |||
634 |
|
634 | |||
635 | Pushing to Publish=False (common changeset that change phase + unknown one) |
|
635 | Pushing to Publish=False (common changeset that change phase + unknown one) | |
636 |
|
636 | |||
637 | $ hg push ../mu -r 967b449fbc94 -f |
|
637 | $ hg push ../mu -r 967b449fbc94 -f | |
638 | pushing to ../mu |
|
638 | pushing to ../mu | |
639 | searching for changes |
|
639 | searching for changes | |
640 | adding changesets |
|
640 | adding changesets | |
641 | adding manifests |
|
641 | adding manifests | |
642 | adding file changes |
|
642 | adding file changes | |
643 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
643 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
644 | $ hgph |
|
644 | $ hgph | |
645 | @ 10 draft a-H - 967b449fbc94 |
|
645 | @ 10 draft a-H - 967b449fbc94 | |
646 | | |
|
646 | | | |
647 | | o 9 draft a-G - 3e27b6f1eee1 |
|
647 | | o 9 draft a-G - 3e27b6f1eee1 | |
648 | | | |
|
648 | | | | |
649 | | o 8 public a-F - b740e3e5c05d |
|
649 | | o 8 public a-F - b740e3e5c05d | |
650 | | | |
|
650 | | | | |
651 | | o 7 public a-E - e9f537e46dea |
|
651 | | o 7 public a-E - e9f537e46dea | |
652 | | | |
|
652 | | | | |
653 | +---o 6 public n-B - 145e75495359 |
|
653 | +---o 6 public n-B - 145e75495359 | |
654 | | | |
|
654 | | | | |
655 | o | 5 public n-A - d6bcb4f74035 |
|
655 | o | 5 public n-A - d6bcb4f74035 | |
656 | | | |
|
656 | | | | |
657 | o | 4 public b-A - f54f1bb90ff3 |
|
657 | o | 4 public b-A - f54f1bb90ff3 | |
658 | | | |
|
658 | | | | |
659 | | o 3 public a-D - b555f63b6063 |
|
659 | | o 3 public a-D - b555f63b6063 | |
660 | | | |
|
660 | | | | |
661 | | o 2 public a-C - 54acac6f23ab |
|
661 | | o 2 public a-C - 54acac6f23ab | |
662 | |/ |
|
662 | |/ | |
663 | o 1 public a-B - 548a3d25dbf0 |
|
663 | o 1 public a-B - 548a3d25dbf0 | |
664 | | |
|
664 | | | |
665 | o 0 public a-A - 054250a37db4 |
|
665 | o 0 public a-A - 054250a37db4 | |
666 |
|
666 | |||
667 | $ cd ../mu |
|
667 | $ cd ../mu | |
668 | $ hgph # d6bcb4f74035 should have changed phase |
|
668 | $ hgph # d6bcb4f74035 should have changed phase | |
669 | > # 145e75495359 is still draft. not ancestor of -r |
|
669 | > # 145e75495359 is still draft. not ancestor of -r | |
670 | o 9 draft a-H - 967b449fbc94 |
|
670 | o 9 draft a-H - 967b449fbc94 | |
671 | | |
|
671 | | | |
672 | | o 8 public a-F - b740e3e5c05d |
|
672 | | o 8 public a-F - b740e3e5c05d | |
673 | | | |
|
673 | | | | |
674 | | o 7 public a-E - e9f537e46dea |
|
674 | | o 7 public a-E - e9f537e46dea | |
675 | | | |
|
675 | | | | |
676 | +---o 6 draft n-B - 145e75495359 |
|
676 | +---o 6 draft n-B - 145e75495359 | |
677 | | | |
|
677 | | | | |
678 | o | 5 public n-A - d6bcb4f74035 |
|
678 | o | 5 public n-A - d6bcb4f74035 | |
679 | | | |
|
679 | | | | |
680 | | o 4 public a-D - b555f63b6063 |
|
680 | | o 4 public a-D - b555f63b6063 | |
681 | | | |
|
681 | | | | |
682 | | o 3 public a-C - 54acac6f23ab |
|
682 | | o 3 public a-C - 54acac6f23ab | |
683 | | | |
|
683 | | | | |
684 | o | 2 public b-A - f54f1bb90ff3 |
|
684 | o | 2 public b-A - f54f1bb90ff3 | |
685 | |/ |
|
685 | |/ | |
686 | o 1 public a-B - 548a3d25dbf0 |
|
686 | o 1 public a-B - 548a3d25dbf0 | |
687 | | |
|
687 | | | |
688 | o 0 public a-A - 054250a37db4 |
|
688 | o 0 public a-A - 054250a37db4 | |
689 |
|
689 | |||
690 |
|
690 | |||
691 |
|
691 | |||
692 | Pushing to Publish=True (common changeset from publish=False) |
|
692 | Pushing to Publish=True (common changeset from publish=False) | |
693 |
|
693 | |||
694 | (in mu) |
|
694 | (in mu) | |
695 | $ hg push ../alpha |
|
695 | $ hg push ../alpha | |
696 | pushing to ../alpha |
|
696 | pushing to ../alpha | |
697 | searching for changes |
|
697 | searching for changes | |
698 | no changes found |
|
698 | no changes found | |
699 | [1] |
|
699 | [1] | |
700 | $ hgph |
|
700 | $ hgph | |
701 | o 9 public a-H - 967b449fbc94 |
|
701 | o 9 public a-H - 967b449fbc94 | |
702 | | |
|
702 | | | |
703 | | o 8 public a-F - b740e3e5c05d |
|
703 | | o 8 public a-F - b740e3e5c05d | |
704 | | | |
|
704 | | | | |
705 | | o 7 public a-E - e9f537e46dea |
|
705 | | o 7 public a-E - e9f537e46dea | |
706 | | | |
|
706 | | | | |
707 | +---o 6 public n-B - 145e75495359 |
|
707 | +---o 6 public n-B - 145e75495359 | |
708 | | | |
|
708 | | | | |
709 | o | 5 public n-A - d6bcb4f74035 |
|
709 | o | 5 public n-A - d6bcb4f74035 | |
710 | | | |
|
710 | | | | |
711 | | o 4 public a-D - b555f63b6063 |
|
711 | | o 4 public a-D - b555f63b6063 | |
712 | | | |
|
712 | | | | |
713 | | o 3 public a-C - 54acac6f23ab |
|
713 | | o 3 public a-C - 54acac6f23ab | |
714 | | | |
|
714 | | | | |
715 | o | 2 public b-A - f54f1bb90ff3 |
|
715 | o | 2 public b-A - f54f1bb90ff3 | |
716 | |/ |
|
716 | |/ | |
717 | o 1 public a-B - 548a3d25dbf0 |
|
717 | o 1 public a-B - 548a3d25dbf0 | |
718 | | |
|
718 | | | |
719 | o 0 public a-A - 054250a37db4 |
|
719 | o 0 public a-A - 054250a37db4 | |
720 |
|
720 | |||
721 | $ hgph -R ../alpha # a-H should have been synced to 0 |
|
721 | $ hgph -R ../alpha # a-H should have been synced to 0 | |
722 | @ 10 public a-H - 967b449fbc94 |
|
722 | @ 10 public a-H - 967b449fbc94 | |
723 | | |
|
723 | | | |
724 | | o 9 draft a-G - 3e27b6f1eee1 |
|
724 | | o 9 draft a-G - 3e27b6f1eee1 | |
725 | | | |
|
725 | | | | |
726 | | o 8 public a-F - b740e3e5c05d |
|
726 | | o 8 public a-F - b740e3e5c05d | |
727 | | | |
|
727 | | | | |
728 | | o 7 public a-E - e9f537e46dea |
|
728 | | o 7 public a-E - e9f537e46dea | |
729 | | | |
|
729 | | | | |
730 | +---o 6 public n-B - 145e75495359 |
|
730 | +---o 6 public n-B - 145e75495359 | |
731 | | | |
|
731 | | | | |
732 | o | 5 public n-A - d6bcb4f74035 |
|
732 | o | 5 public n-A - d6bcb4f74035 | |
733 | | | |
|
733 | | | | |
734 | o | 4 public b-A - f54f1bb90ff3 |
|
734 | o | 4 public b-A - f54f1bb90ff3 | |
735 | | | |
|
735 | | | | |
736 | | o 3 public a-D - b555f63b6063 |
|
736 | | o 3 public a-D - b555f63b6063 | |
737 | | | |
|
737 | | | | |
738 | | o 2 public a-C - 54acac6f23ab |
|
738 | | o 2 public a-C - 54acac6f23ab | |
739 | |/ |
|
739 | |/ | |
740 | o 1 public a-B - 548a3d25dbf0 |
|
740 | o 1 public a-B - 548a3d25dbf0 | |
741 | | |
|
741 | | | |
742 | o 0 public a-A - 054250a37db4 |
|
742 | o 0 public a-A - 054250a37db4 | |
743 |
|
743 | |||
744 |
|
744 | |||
745 |
|
745 | |||
746 | Discovery locally secret changeset on a remote repository: |
|
746 | Discovery locally secret changeset on a remote repository: | |
747 |
|
747 | |||
748 | - should make it non-secret |
|
748 | - should make it non-secret | |
749 |
|
749 | |||
750 | $ cd ../alpha |
|
750 | $ cd ../alpha | |
751 | $ mkcommit A-secret --config phases.new-commit=2 |
|
751 | $ mkcommit A-secret --config phases.new-commit=2 | |
752 | $ hgph |
|
752 | $ hgph | |
753 | @ 11 secret A-secret - 435b5d83910c |
|
753 | @ 11 secret A-secret - 435b5d83910c | |
754 | | |
|
754 | | | |
755 | o 10 public a-H - 967b449fbc94 |
|
755 | o 10 public a-H - 967b449fbc94 | |
756 | | |
|
756 | | | |
757 | | o 9 draft a-G - 3e27b6f1eee1 |
|
757 | | o 9 draft a-G - 3e27b6f1eee1 | |
758 | | | |
|
758 | | | | |
759 | | o 8 public a-F - b740e3e5c05d |
|
759 | | o 8 public a-F - b740e3e5c05d | |
760 | | | |
|
760 | | | | |
761 | | o 7 public a-E - e9f537e46dea |
|
761 | | o 7 public a-E - e9f537e46dea | |
762 | | | |
|
762 | | | | |
763 | +---o 6 public n-B - 145e75495359 |
|
763 | +---o 6 public n-B - 145e75495359 | |
764 | | | |
|
764 | | | | |
765 | o | 5 public n-A - d6bcb4f74035 |
|
765 | o | 5 public n-A - d6bcb4f74035 | |
766 | | | |
|
766 | | | | |
767 | o | 4 public b-A - f54f1bb90ff3 |
|
767 | o | 4 public b-A - f54f1bb90ff3 | |
768 | | | |
|
768 | | | | |
769 | | o 3 public a-D - b555f63b6063 |
|
769 | | o 3 public a-D - b555f63b6063 | |
770 | | | |
|
770 | | | | |
771 | | o 2 public a-C - 54acac6f23ab |
|
771 | | o 2 public a-C - 54acac6f23ab | |
772 | |/ |
|
772 | |/ | |
773 | o 1 public a-B - 548a3d25dbf0 |
|
773 | o 1 public a-B - 548a3d25dbf0 | |
774 | | |
|
774 | | | |
775 | o 0 public a-A - 054250a37db4 |
|
775 | o 0 public a-A - 054250a37db4 | |
776 |
|
776 | |||
777 | $ hg bundle --base 'parents(.)' -r . ../secret-bundle.hg |
|
777 | $ hg bundle --base 'parents(.)' -r . ../secret-bundle.hg | |
778 | 1 changesets found |
|
778 | 1 changesets found | |
779 | $ hg -R ../mu unbundle ../secret-bundle.hg |
|
779 | $ hg -R ../mu unbundle ../secret-bundle.hg | |
780 | adding changesets |
|
780 | adding changesets | |
781 | adding manifests |
|
781 | adding manifests | |
782 | adding file changes |
|
782 | adding file changes | |
783 | added 1 changesets with 1 changes to 1 files |
|
783 | added 1 changesets with 1 changes to 1 files | |
784 | (run 'hg update' to get a working copy) |
|
784 | (run 'hg update' to get a working copy) | |
785 | $ hgph -R ../mu |
|
785 | $ hgph -R ../mu | |
786 | o 10 draft A-secret - 435b5d83910c |
|
786 | o 10 draft A-secret - 435b5d83910c | |
787 | | |
|
787 | | | |
788 | o 9 public a-H - 967b449fbc94 |
|
788 | o 9 public a-H - 967b449fbc94 | |
789 | | |
|
789 | | | |
790 | | o 8 public a-F - b740e3e5c05d |
|
790 | | o 8 public a-F - b740e3e5c05d | |
791 | | | |
|
791 | | | | |
792 | | o 7 public a-E - e9f537e46dea |
|
792 | | o 7 public a-E - e9f537e46dea | |
793 | | | |
|
793 | | | | |
794 | +---o 6 public n-B - 145e75495359 |
|
794 | +---o 6 public n-B - 145e75495359 | |
795 | | | |
|
795 | | | | |
796 | o | 5 public n-A - d6bcb4f74035 |
|
796 | o | 5 public n-A - d6bcb4f74035 | |
797 | | | |
|
797 | | | | |
798 | | o 4 public a-D - b555f63b6063 |
|
798 | | o 4 public a-D - b555f63b6063 | |
799 | | | |
|
799 | | | | |
800 | | o 3 public a-C - 54acac6f23ab |
|
800 | | o 3 public a-C - 54acac6f23ab | |
801 | | | |
|
801 | | | | |
802 | o | 2 public b-A - f54f1bb90ff3 |
|
802 | o | 2 public b-A - f54f1bb90ff3 | |
803 | |/ |
|
803 | |/ | |
804 | o 1 public a-B - 548a3d25dbf0 |
|
804 | o 1 public a-B - 548a3d25dbf0 | |
805 | | |
|
805 | | | |
806 | o 0 public a-A - 054250a37db4 |
|
806 | o 0 public a-A - 054250a37db4 | |
807 |
|
807 | |||
808 | $ hg pull ../mu |
|
808 | $ hg pull ../mu | |
809 | pulling from ../mu |
|
809 | pulling from ../mu | |
810 | searching for changes |
|
810 | searching for changes | |
811 | no changes found |
|
811 | no changes found | |
812 | $ hgph |
|
812 | $ hgph | |
813 | @ 11 draft A-secret - 435b5d83910c |
|
813 | @ 11 draft A-secret - 435b5d83910c | |
814 | | |
|
814 | | | |
815 | o 10 public a-H - 967b449fbc94 |
|
815 | o 10 public a-H - 967b449fbc94 | |
816 | | |
|
816 | | | |
817 | | o 9 draft a-G - 3e27b6f1eee1 |
|
817 | | o 9 draft a-G - 3e27b6f1eee1 | |
818 | | | |
|
818 | | | | |
819 | | o 8 public a-F - b740e3e5c05d |
|
819 | | o 8 public a-F - b740e3e5c05d | |
820 | | | |
|
820 | | | | |
821 | | o 7 public a-E - e9f537e46dea |
|
821 | | o 7 public a-E - e9f537e46dea | |
822 | | | |
|
822 | | | | |
823 | +---o 6 public n-B - 145e75495359 |
|
823 | +---o 6 public n-B - 145e75495359 | |
824 | | | |
|
824 | | | | |
825 | o | 5 public n-A - d6bcb4f74035 |
|
825 | o | 5 public n-A - d6bcb4f74035 | |
826 | | | |
|
826 | | | | |
827 | o | 4 public b-A - f54f1bb90ff3 |
|
827 | o | 4 public b-A - f54f1bb90ff3 | |
828 | | | |
|
828 | | | | |
829 | | o 3 public a-D - b555f63b6063 |
|
829 | | o 3 public a-D - b555f63b6063 | |
830 | | | |
|
830 | | | | |
831 | | o 2 public a-C - 54acac6f23ab |
|
831 | | o 2 public a-C - 54acac6f23ab | |
832 | |/ |
|
832 | |/ | |
833 | o 1 public a-B - 548a3d25dbf0 |
|
833 | o 1 public a-B - 548a3d25dbf0 | |
834 | | |
|
834 | | | |
835 | o 0 public a-A - 054250a37db4 |
|
835 | o 0 public a-A - 054250a37db4 | |
836 |
|
836 | |||
837 |
|
837 | |||
838 | pushing a locally public and draft changesets remotly secret should make them |
|
838 | pushing a locally public and draft changesets remotly secret should make them | |
839 | appear on the remote side. |
|
839 | appear on the remote side. | |
840 |
|
840 | |||
841 |
|
841 | |||
842 | $ hg -R ../mu phase --secret --force 967b449fbc94 |
|
842 | $ hg -R ../mu phase --secret --force 967b449fbc94 | |
843 | $ hg push -r 435b5d83910c ../mu |
|
843 | $ hg push -r 435b5d83910c ../mu | |
844 | pushing to ../mu |
|
844 | pushing to ../mu | |
845 | searching for changes |
|
845 | searching for changes | |
846 | abort: push creates new remote head 435b5d83910c! |
|
846 | abort: push creates new remote head 435b5d83910c! | |
847 | (did you forget to merge? use push -f to force) |
|
847 | (did you forget to merge? use push -f to force) | |
848 | [255] |
|
848 | [255] | |
849 | $ hg push -fr 435b5d83910c ../mu # because the push will create new visible head |
|
849 | $ hg push -fr 435b5d83910c ../mu # because the push will create new visible head | |
850 | pushing to ../mu |
|
850 | pushing to ../mu | |
851 | searching for changes |
|
851 | searching for changes | |
852 | adding changesets |
|
852 | adding changesets | |
853 | adding manifests |
|
853 | adding manifests | |
854 | adding file changes |
|
854 | adding file changes | |
855 | added 0 changesets with 0 changes to 2 files |
|
855 | added 0 changesets with 0 changes to 2 files | |
856 | $ hgph -R ../mu |
|
856 | $ hgph -R ../mu | |
857 | o 10 draft A-secret - 435b5d83910c |
|
857 | o 10 draft A-secret - 435b5d83910c | |
858 | | |
|
858 | | | |
859 | o 9 public a-H - 967b449fbc94 |
|
859 | o 9 public a-H - 967b449fbc94 | |
860 | | |
|
860 | | | |
861 | | o 8 public a-F - b740e3e5c05d |
|
861 | | o 8 public a-F - b740e3e5c05d | |
862 | | | |
|
862 | | | | |
863 | | o 7 public a-E - e9f537e46dea |
|
863 | | o 7 public a-E - e9f537e46dea | |
864 | | | |
|
864 | | | | |
865 | +---o 6 public n-B - 145e75495359 |
|
865 | +---o 6 public n-B - 145e75495359 | |
866 | | | |
|
866 | | | | |
867 | o | 5 public n-A - d6bcb4f74035 |
|
867 | o | 5 public n-A - d6bcb4f74035 | |
868 | | | |
|
868 | | | | |
869 | | o 4 public a-D - b555f63b6063 |
|
869 | | o 4 public a-D - b555f63b6063 | |
870 | | | |
|
870 | | | | |
871 | | o 3 public a-C - 54acac6f23ab |
|
871 | | o 3 public a-C - 54acac6f23ab | |
872 | | | |
|
872 | | | | |
873 | o | 2 public b-A - f54f1bb90ff3 |
|
873 | o | 2 public b-A - f54f1bb90ff3 | |
874 | |/ |
|
874 | |/ | |
875 | o 1 public a-B - 548a3d25dbf0 |
|
875 | o 1 public a-B - 548a3d25dbf0 | |
876 | | |
|
876 | | | |
877 | o 0 public a-A - 054250a37db4 |
|
877 | o 0 public a-A - 054250a37db4 | |
878 |
|
878 | |||
879 |
|
879 | |||
880 | pull new changeset with common draft locally |
|
880 | pull new changeset with common draft locally | |
881 |
|
881 | |||
882 | $ hg up -q 967b449fbc94 # create a new root for draft |
|
882 | $ hg up -q 967b449fbc94 # create a new root for draft | |
883 | $ mkcommit 'alpha-more' |
|
883 | $ mkcommit 'alpha-more' | |
884 | created new head |
|
884 | created new head | |
885 | $ hg push -fr . ../mu |
|
885 | $ hg push -fr . ../mu | |
886 | pushing to ../mu |
|
886 | pushing to ../mu | |
887 | searching for changes |
|
887 | searching for changes | |
888 | adding changesets |
|
888 | adding changesets | |
889 | adding manifests |
|
889 | adding manifests | |
890 | adding file changes |
|
890 | adding file changes | |
891 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
891 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
892 | $ cd ../mu |
|
892 | $ cd ../mu | |
893 | $ hg phase --secret --force 1c5cfd894796 |
|
893 | $ hg phase --secret --force 1c5cfd894796 | |
894 | $ hg up -q 435b5d83910c |
|
894 | $ hg up -q 435b5d83910c | |
895 | $ mkcommit 'mu-more' |
|
895 | $ mkcommit 'mu-more' | |
896 | $ cd ../alpha |
|
896 | $ cd ../alpha | |
897 | $ hg pull ../mu |
|
897 | $ hg pull ../mu | |
898 | pulling from ../mu |
|
898 | pulling from ../mu | |
899 | searching for changes |
|
899 | searching for changes | |
900 | adding changesets |
|
900 | adding changesets | |
901 | adding manifests |
|
901 | adding manifests | |
902 | adding file changes |
|
902 | adding file changes | |
903 | added 1 changesets with 1 changes to 1 files |
|
903 | added 1 changesets with 1 changes to 1 files | |
904 | (run 'hg update' to get a working copy) |
|
904 | (run 'hg update' to get a working copy) | |
905 | $ hgph |
|
905 | $ hgph | |
906 | o 13 draft mu-more - 5237fb433fc8 |
|
906 | o 13 draft mu-more - 5237fb433fc8 | |
907 | | |
|
907 | | | |
908 | | @ 12 draft alpha-more - 1c5cfd894796 |
|
908 | | @ 12 draft alpha-more - 1c5cfd894796 | |
909 | | | |
|
909 | | | | |
910 | o | 11 draft A-secret - 435b5d83910c |
|
910 | o | 11 draft A-secret - 435b5d83910c | |
911 | |/ |
|
911 | |/ | |
912 | o 10 public a-H - 967b449fbc94 |
|
912 | o 10 public a-H - 967b449fbc94 | |
913 | | |
|
913 | | | |
914 | | o 9 draft a-G - 3e27b6f1eee1 |
|
914 | | o 9 draft a-G - 3e27b6f1eee1 | |
915 | | | |
|
915 | | | | |
916 | | o 8 public a-F - b740e3e5c05d |
|
916 | | o 8 public a-F - b740e3e5c05d | |
917 | | | |
|
917 | | | | |
918 | | o 7 public a-E - e9f537e46dea |
|
918 | | o 7 public a-E - e9f537e46dea | |
919 | | | |
|
919 | | | | |
920 | +---o 6 public n-B - 145e75495359 |
|
920 | +---o 6 public n-B - 145e75495359 | |
921 | | | |
|
921 | | | | |
922 | o | 5 public n-A - d6bcb4f74035 |
|
922 | o | 5 public n-A - d6bcb4f74035 | |
923 | | | |
|
923 | | | | |
924 | o | 4 public b-A - f54f1bb90ff3 |
|
924 | o | 4 public b-A - f54f1bb90ff3 | |
925 | | | |
|
925 | | | | |
926 | | o 3 public a-D - b555f63b6063 |
|
926 | | o 3 public a-D - b555f63b6063 | |
927 | | | |
|
927 | | | | |
928 | | o 2 public a-C - 54acac6f23ab |
|
928 | | o 2 public a-C - 54acac6f23ab | |
929 | |/ |
|
929 | |/ | |
930 | o 1 public a-B - 548a3d25dbf0 |
|
930 | o 1 public a-B - 548a3d25dbf0 | |
931 | | |
|
931 | | | |
932 | o 0 public a-A - 054250a37db4 |
|
932 | o 0 public a-A - 054250a37db4 | |
933 |
|
933 | |||
934 |
|
934 | |||
935 | Test that test are properly ignored on remote event when existing locally |
|
935 | Test that test are properly ignored on remote event when existing locally | |
936 |
|
936 | |||
937 | $ cd .. |
|
937 | $ cd .. | |
938 | $ hg clone -qU -r b555f63b6063 -r f54f1bb90ff3 beta gamma |
|
938 | $ hg clone -qU -r b555f63b6063 -r f54f1bb90ff3 beta gamma | |
939 |
|
939 | |||
940 | # pathological case are |
|
940 | # pathological case are | |
941 | # |
|
941 | # | |
942 | # * secret remotely |
|
942 | # * secret remotely | |
943 | # * known locally |
|
943 | # * known locally | |
944 | # * repo have uncommon changeset |
|
944 | # * repo have uncommon changeset | |
945 |
|
945 | |||
946 | $ hg -R beta phase --secret --force f54f1bb90ff3 |
|
946 | $ hg -R beta phase --secret --force f54f1bb90ff3 | |
947 | $ hg -R gamma phase --draft --force f54f1bb90ff3 |
|
947 | $ hg -R gamma phase --draft --force f54f1bb90ff3 | |
948 |
|
948 | |||
949 | $ cd gamma |
|
949 | $ cd gamma | |
950 | $ hg pull ../beta |
|
950 | $ hg pull ../beta | |
951 | pulling from ../beta |
|
951 | pulling from ../beta | |
952 | searching for changes |
|
952 | searching for changes | |
953 | adding changesets |
|
953 | adding changesets | |
954 | adding manifests |
|
954 | adding manifests | |
955 | adding file changes |
|
955 | adding file changes | |
956 | added 2 changesets with 2 changes to 2 files |
|
956 | added 2 changesets with 2 changes to 2 files | |
957 | (run 'hg update' to get a working copy) |
|
957 | (run 'hg update' to get a working copy) | |
958 | $ hg phase f54f1bb90ff3 |
|
958 | $ hg phase f54f1bb90ff3 | |
959 | 2: draft |
|
959 | 2: draft | |
960 |
|
960 | |||
961 | same over the wire |
|
961 | same over the wire | |
962 |
|
962 | |||
963 | $ cd ../beta |
|
963 | $ cd ../beta | |
964 | $ hg serve -p $HGPORT -d --pid-file=../beta.pid -E ../beta-error.log |
|
964 | $ hg serve -p $HGPORT -d --pid-file=../beta.pid -E ../beta-error.log | |
965 | $ cat ../beta.pid >> $DAEMON_PIDS |
|
965 | $ cat ../beta.pid >> $DAEMON_PIDS | |
966 | $ cd ../gamma |
|
966 | $ cd ../gamma | |
967 |
|
967 | |||
968 | $ hg pull http://localhost:$HGPORT/ |
|
968 | $ hg pull http://localhost:$HGPORT/ | |
969 | pulling from http://localhost:$HGPORT/ |
|
969 | pulling from http://localhost:$HGPORT/ | |
970 | searching for changes |
|
970 | searching for changes | |
971 | no changes found |
|
971 | no changes found | |
972 | $ hg phase f54f1bb90ff3 |
|
972 | $ hg phase f54f1bb90ff3 | |
973 | 2: draft |
|
973 | 2: draft | |
974 |
|
974 | |||
975 | check that secret local on both side are not synced to public |
|
975 | check that secret local on both side are not synced to public | |
976 |
|
976 | |||
977 | $ hg push -r b555f63b6063 http://localhost:$HGPORT/ |
|
977 | $ hg push -r b555f63b6063 http://localhost:$HGPORT/ | |
978 | pushing to http://localhost:$HGPORT/ |
|
978 | pushing to http://localhost:$HGPORT/ | |
979 | searching for changes |
|
979 | searching for changes | |
980 | no changes found |
|
980 | no changes found | |
981 | [1] |
|
981 | [1] | |
982 | $ hg phase f54f1bb90ff3 |
|
982 | $ hg phase f54f1bb90ff3 | |
983 | 2: draft |
|
983 | 2: draft | |
984 |
|
984 | |||
985 | put the changeset in the draft state again |
|
985 | put the changeset in the draft state again | |
986 | (first test after this one expect to be able to copy) |
|
986 | (first test after this one expect to be able to copy) | |
987 |
|
987 | |||
988 | $ cd .. |
|
988 | $ cd .. | |
989 |
|
989 | |||
990 |
|
990 | |||
991 | Test Clone behavior |
|
991 | Test Clone behavior | |
992 |
|
992 | |||
993 | A. Clone without secret changeset |
|
993 | A. Clone without secret changeset | |
994 |
|
994 | |||
995 | 1. cloning non-publishing repository |
|
995 | 1. cloning non-publishing repository | |
996 | (Phase should be preserved) |
|
996 | (Phase should be preserved) | |
997 |
|
997 | |||
998 | # make sure there is no secret so we can use a copy clone |
|
998 | # make sure there is no secret so we can use a copy clone | |
999 |
|
999 | |||
1000 | $ hg -R mu phase --draft 'secret()' |
|
1000 | $ hg -R mu phase --draft 'secret()' | |
1001 |
|
1001 | |||
1002 | $ hg clone -U mu Tau |
|
1002 | $ hg clone -U mu Tau | |
1003 | $ hgph -R Tau |
|
1003 | $ hgph -R Tau | |
1004 | o 12 draft mu-more - 5237fb433fc8 |
|
1004 | o 12 draft mu-more - 5237fb433fc8 | |
1005 | | |
|
1005 | | | |
1006 | | o 11 draft alpha-more - 1c5cfd894796 |
|
1006 | | o 11 draft alpha-more - 1c5cfd894796 | |
1007 | | | |
|
1007 | | | | |
1008 | o | 10 draft A-secret - 435b5d83910c |
|
1008 | o | 10 draft A-secret - 435b5d83910c | |
1009 | |/ |
|
1009 | |/ | |
1010 | o 9 public a-H - 967b449fbc94 |
|
1010 | o 9 public a-H - 967b449fbc94 | |
1011 | | |
|
1011 | | | |
1012 | | o 8 public a-F - b740e3e5c05d |
|
1012 | | o 8 public a-F - b740e3e5c05d | |
1013 | | | |
|
1013 | | | | |
1014 | | o 7 public a-E - e9f537e46dea |
|
1014 | | o 7 public a-E - e9f537e46dea | |
1015 | | | |
|
1015 | | | | |
1016 | +---o 6 public n-B - 145e75495359 |
|
1016 | +---o 6 public n-B - 145e75495359 | |
1017 | | | |
|
1017 | | | | |
1018 | o | 5 public n-A - d6bcb4f74035 |
|
1018 | o | 5 public n-A - d6bcb4f74035 | |
1019 | | | |
|
1019 | | | | |
1020 | | o 4 public a-D - b555f63b6063 |
|
1020 | | o 4 public a-D - b555f63b6063 | |
1021 | | | |
|
1021 | | | | |
1022 | | o 3 public a-C - 54acac6f23ab |
|
1022 | | o 3 public a-C - 54acac6f23ab | |
1023 | | | |
|
1023 | | | | |
1024 | o | 2 public b-A - f54f1bb90ff3 |
|
1024 | o | 2 public b-A - f54f1bb90ff3 | |
1025 | |/ |
|
1025 | |/ | |
1026 | o 1 public a-B - 548a3d25dbf0 |
|
1026 | o 1 public a-B - 548a3d25dbf0 | |
1027 | | |
|
1027 | | | |
1028 | o 0 public a-A - 054250a37db4 |
|
1028 | o 0 public a-A - 054250a37db4 | |
1029 |
|
1029 | |||
1030 |
|
1030 | |||
1031 | 2. cloning publishing repository |
|
1031 | 2. cloning publishing repository | |
1032 |
|
1032 | |||
1033 | (everything should be public) |
|
1033 | (everything should be public) | |
1034 |
|
1034 | |||
1035 | $ hg clone -U alpha Upsilon |
|
1035 | $ hg clone -U alpha Upsilon | |
1036 | $ hgph -R Upsilon |
|
1036 | $ hgph -R Upsilon | |
1037 | o 13 public mu-more - 5237fb433fc8 |
|
1037 | o 13 public mu-more - 5237fb433fc8 | |
1038 | | |
|
1038 | | | |
1039 | | o 12 public alpha-more - 1c5cfd894796 |
|
1039 | | o 12 public alpha-more - 1c5cfd894796 | |
1040 | | | |
|
1040 | | | | |
1041 | o | 11 public A-secret - 435b5d83910c |
|
1041 | o | 11 public A-secret - 435b5d83910c | |
1042 | |/ |
|
1042 | |/ | |
1043 | o 10 public a-H - 967b449fbc94 |
|
1043 | o 10 public a-H - 967b449fbc94 | |
1044 | | |
|
1044 | | | |
1045 | | o 9 public a-G - 3e27b6f1eee1 |
|
1045 | | o 9 public a-G - 3e27b6f1eee1 | |
1046 | | | |
|
1046 | | | | |
1047 | | o 8 public a-F - b740e3e5c05d |
|
1047 | | o 8 public a-F - b740e3e5c05d | |
1048 | | | |
|
1048 | | | | |
1049 | | o 7 public a-E - e9f537e46dea |
|
1049 | | o 7 public a-E - e9f537e46dea | |
1050 | | | |
|
1050 | | | | |
1051 | +---o 6 public n-B - 145e75495359 |
|
1051 | +---o 6 public n-B - 145e75495359 | |
1052 | | | |
|
1052 | | | | |
1053 | o | 5 public n-A - d6bcb4f74035 |
|
1053 | o | 5 public n-A - d6bcb4f74035 | |
1054 | | | |
|
1054 | | | | |
1055 | o | 4 public b-A - f54f1bb90ff3 |
|
1055 | o | 4 public b-A - f54f1bb90ff3 | |
1056 | | | |
|
1056 | | | | |
1057 | | o 3 public a-D - b555f63b6063 |
|
1057 | | o 3 public a-D - b555f63b6063 | |
1058 | | | |
|
1058 | | | | |
1059 | | o 2 public a-C - 54acac6f23ab |
|
1059 | | o 2 public a-C - 54acac6f23ab | |
1060 | |/ |
|
1060 | |/ | |
1061 | o 1 public a-B - 548a3d25dbf0 |
|
1061 | o 1 public a-B - 548a3d25dbf0 | |
1062 | | |
|
1062 | | | |
1063 | o 0 public a-A - 054250a37db4 |
|
1063 | o 0 public a-A - 054250a37db4 | |
1064 |
|
1064 | |||
|
1065 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |||
1065 |
|
1066 |
@@ -1,65 +1,65 b'' | |||||
1 |
$ "$TESTDIR/hghave" |
|
1 | $ "$TESTDIR/hghave" killdaemons || exit 80 | |
2 |
|
2 | |||
3 | $ hg init test |
|
3 | $ hg init test | |
4 | $ cd test |
|
4 | $ cd test | |
5 | $ echo a > a |
|
5 | $ echo a > a | |
6 | $ hg ci -Ama |
|
6 | $ hg ci -Ama | |
7 | adding a |
|
7 | adding a | |
8 | $ cd .. |
|
8 | $ cd .. | |
9 | $ hg clone test test2 |
|
9 | $ hg clone test test2 | |
10 | updating to branch default |
|
10 | updating to branch default | |
11 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
11 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
12 | $ cd test2 |
|
12 | $ cd test2 | |
13 | $ echo a >> a |
|
13 | $ echo a >> a | |
14 | $ hg ci -mb |
|
14 | $ hg ci -mb | |
15 |
|
15 | |||
16 | Cloning with a password in the URL should not save the password in .hg/hgrc: |
|
16 | Cloning with a password in the URL should not save the password in .hg/hgrc: | |
17 |
|
17 | |||
18 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
18 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log | |
19 | $ cat hg.pid >> $DAEMON_PIDS |
|
19 | $ cat hg.pid >> $DAEMON_PIDS | |
20 | $ hg clone http://foo:xyzzy@localhost:$HGPORT/ test3 |
|
20 | $ hg clone http://foo:xyzzy@localhost:$HGPORT/ test3 | |
21 | requesting all changes |
|
21 | requesting all changes | |
22 | adding changesets |
|
22 | adding changesets | |
23 | adding manifests |
|
23 | adding manifests | |
24 | adding file changes |
|
24 | adding file changes | |
25 | added 2 changesets with 2 changes to 1 files |
|
25 | added 2 changesets with 2 changes to 1 files | |
26 | updating to branch default |
|
26 | updating to branch default | |
27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
28 | $ cat test3/.hg/hgrc |
|
28 | $ cat test3/.hg/hgrc | |
29 | [paths] |
|
29 | [paths] | |
30 | default = http://foo@localhost:$HGPORT/ |
|
30 | default = http://foo@localhost:$HGPORT/ | |
31 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
|
31 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |
32 |
|
32 | |||
33 | expect error, cloning not allowed |
|
33 | expect error, cloning not allowed | |
34 |
|
34 | |||
35 | $ echo '[web]' > .hg/hgrc |
|
35 | $ echo '[web]' > .hg/hgrc | |
36 | $ echo 'allowpull = false' >> .hg/hgrc |
|
36 | $ echo 'allowpull = false' >> .hg/hgrc | |
37 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
37 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log | |
38 | $ cat hg.pid >> $DAEMON_PIDS |
|
38 | $ cat hg.pid >> $DAEMON_PIDS | |
39 | $ hg clone http://localhost:$HGPORT/ test4 |
|
39 | $ hg clone http://localhost:$HGPORT/ test4 | |
40 | requesting all changes |
|
40 | requesting all changes | |
41 | abort: authorization failed |
|
41 | abort: authorization failed | |
42 | [255] |
|
42 | [255] | |
43 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
|
43 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |
44 |
|
44 | |||
45 | serve errors |
|
45 | serve errors | |
46 |
|
46 | |||
47 | $ cat errors.log |
|
47 | $ cat errors.log | |
48 | $ req() { |
|
48 | $ req() { | |
49 | > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
49 | > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log | |
50 | > cat hg.pid >> $DAEMON_PIDS |
|
50 | > cat hg.pid >> $DAEMON_PIDS | |
51 | > hg --cwd ../test pull http://localhost:$HGPORT/ |
|
51 | > hg --cwd ../test pull http://localhost:$HGPORT/ | |
52 |
> |
|
52 | > "$TESTDIR/killdaemons.py" hg.pid | |
53 | > echo % serve errors |
|
53 | > echo % serve errors | |
54 | > cat errors.log |
|
54 | > cat errors.log | |
55 | > } |
|
55 | > } | |
56 |
|
56 | |||
57 | expect error, pulling not allowed |
|
57 | expect error, pulling not allowed | |
58 |
|
58 | |||
59 | $ req |
|
59 | $ req | |
60 | pulling from http://localhost:$HGPORT/ |
|
60 | pulling from http://localhost:$HGPORT/ | |
61 | searching for changes |
|
61 | searching for changes | |
62 | abort: authorization failed |
|
62 | abort: authorization failed | |
63 | % serve errors |
|
63 | % serve errors | |
64 |
|
64 | |||
65 | $ cd .. |
|
65 | $ cd .. |
@@ -1,128 +1,128 b'' | |||||
1 |
$ "$TESTDIR/hghave" |
|
1 | $ "$TESTDIR/hghave" killdaemons || exit 80 | |
2 |
|
2 | |||
3 | $ hg init test |
|
3 | $ hg init test | |
4 | $ cd test |
|
4 | $ cd test | |
5 | $ echo a > a |
|
5 | $ echo a > a | |
6 | $ hg ci -Ama |
|
6 | $ hg ci -Ama | |
7 | adding a |
|
7 | adding a | |
8 | $ cd .. |
|
8 | $ cd .. | |
9 | $ hg clone test test2 |
|
9 | $ hg clone test test2 | |
10 | updating to branch default |
|
10 | updating to branch default | |
11 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
11 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
12 | $ cd test2 |
|
12 | $ cd test2 | |
13 | $ echo a >> a |
|
13 | $ echo a >> a | |
14 | $ hg ci -mb |
|
14 | $ hg ci -mb | |
15 | $ req() { |
|
15 | $ req() { | |
16 | > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
16 | > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log | |
17 | > cat hg.pid >> $DAEMON_PIDS |
|
17 | > cat hg.pid >> $DAEMON_PIDS | |
18 | > hg --cwd ../test2 push http://localhost:$HGPORT/ |
|
18 | > hg --cwd ../test2 push http://localhost:$HGPORT/ | |
19 | > exitstatus=$? |
|
19 | > exitstatus=$? | |
20 | > "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
|
20 | > "$TESTDIR/killdaemons.py" $DAEMON_PIDS | |
21 | > echo % serve errors |
|
21 | > echo % serve errors | |
22 | > cat errors.log |
|
22 | > cat errors.log | |
23 | > return $exitstatus |
|
23 | > return $exitstatus | |
24 | > } |
|
24 | > } | |
25 | $ cd ../test |
|
25 | $ cd ../test | |
26 |
|
26 | |||
27 | expect ssl error |
|
27 | expect ssl error | |
28 |
|
28 | |||
29 | $ req |
|
29 | $ req | |
30 | pushing to http://localhost:$HGPORT/ |
|
30 | pushing to http://localhost:$HGPORT/ | |
31 | searching for changes |
|
31 | searching for changes | |
32 | abort: HTTP Error 403: ssl required |
|
32 | abort: HTTP Error 403: ssl required | |
33 | % serve errors |
|
33 | % serve errors | |
34 | [255] |
|
34 | [255] | |
35 |
|
35 | |||
36 | expect authorization error |
|
36 | expect authorization error | |
37 |
|
37 | |||
38 | $ echo '[web]' > .hg/hgrc |
|
38 | $ echo '[web]' > .hg/hgrc | |
39 | $ echo 'push_ssl = false' >> .hg/hgrc |
|
39 | $ echo 'push_ssl = false' >> .hg/hgrc | |
40 | $ req |
|
40 | $ req | |
41 | pushing to http://localhost:$HGPORT/ |
|
41 | pushing to http://localhost:$HGPORT/ | |
42 | searching for changes |
|
42 | searching for changes | |
43 | abort: authorization failed |
|
43 | abort: authorization failed | |
44 | % serve errors |
|
44 | % serve errors | |
45 | [255] |
|
45 | [255] | |
46 |
|
46 | |||
47 | expect authorization error: must have authorized user |
|
47 | expect authorization error: must have authorized user | |
48 |
|
48 | |||
49 | $ echo 'allow_push = unperson' >> .hg/hgrc |
|
49 | $ echo 'allow_push = unperson' >> .hg/hgrc | |
50 | $ req |
|
50 | $ req | |
51 | pushing to http://localhost:$HGPORT/ |
|
51 | pushing to http://localhost:$HGPORT/ | |
52 | searching for changes |
|
52 | searching for changes | |
53 | abort: authorization failed |
|
53 | abort: authorization failed | |
54 | % serve errors |
|
54 | % serve errors | |
55 | [255] |
|
55 | [255] | |
56 |
|
56 | |||
57 | expect success |
|
57 | expect success | |
58 |
|
58 | |||
59 | $ echo 'allow_push = *' >> .hg/hgrc |
|
59 | $ echo 'allow_push = *' >> .hg/hgrc | |
60 | $ echo '[hooks]' >> .hg/hgrc |
|
60 | $ echo '[hooks]' >> .hg/hgrc | |
61 | $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup 0" >> .hg/hgrc |
|
61 | $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup 0" >> .hg/hgrc | |
62 | $ req |
|
62 | $ req | |
63 | pushing to http://localhost:$HGPORT/ |
|
63 | pushing to http://localhost:$HGPORT/ | |
64 | searching for changes |
|
64 | searching for changes | |
65 | remote: adding changesets |
|
65 | remote: adding changesets | |
66 | remote: adding manifests |
|
66 | remote: adding manifests | |
67 | remote: adding file changes |
|
67 | remote: adding file changes | |
68 | remote: added 1 changesets with 1 changes to 1 files |
|
68 | remote: added 1 changesets with 1 changes to 1 files | |
69 | remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob) |
|
69 | remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob) | |
70 | % serve errors |
|
70 | % serve errors | |
71 | $ hg rollback |
|
71 | $ hg rollback | |
72 | repository tip rolled back to revision 0 (undo serve) |
|
72 | repository tip rolled back to revision 0 (undo serve) | |
73 |
|
73 | |||
74 | expect success, server lacks the httpheader capability |
|
74 | expect success, server lacks the httpheader capability | |
75 |
|
75 | |||
76 | $ CAP=httpheader |
|
76 | $ CAP=httpheader | |
77 | $ . "$TESTDIR/notcapable" |
|
77 | $ . "$TESTDIR/notcapable" | |
78 | $ req |
|
78 | $ req | |
79 | pushing to http://localhost:$HGPORT/ |
|
79 | pushing to http://localhost:$HGPORT/ | |
80 | searching for changes |
|
80 | searching for changes | |
81 | remote: adding changesets |
|
81 | remote: adding changesets | |
82 | remote: adding manifests |
|
82 | remote: adding manifests | |
83 | remote: adding file changes |
|
83 | remote: adding file changes | |
84 | remote: added 1 changesets with 1 changes to 1 files |
|
84 | remote: added 1 changesets with 1 changes to 1 files | |
85 | remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob) |
|
85 | remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob) | |
86 | % serve errors |
|
86 | % serve errors | |
87 | $ hg rollback |
|
87 | $ hg rollback | |
88 | repository tip rolled back to revision 0 (undo serve) |
|
88 | repository tip rolled back to revision 0 (undo serve) | |
89 |
|
89 | |||
90 | expect success, server lacks the unbundlehash capability |
|
90 | expect success, server lacks the unbundlehash capability | |
91 |
|
91 | |||
92 | $ CAP=unbundlehash |
|
92 | $ CAP=unbundlehash | |
93 | $ . "$TESTDIR/notcapable" |
|
93 | $ . "$TESTDIR/notcapable" | |
94 | $ req |
|
94 | $ req | |
95 | pushing to http://localhost:$HGPORT/ |
|
95 | pushing to http://localhost:$HGPORT/ | |
96 | searching for changes |
|
96 | searching for changes | |
97 | remote: adding changesets |
|
97 | remote: adding changesets | |
98 | remote: adding manifests |
|
98 | remote: adding manifests | |
99 | remote: adding file changes |
|
99 | remote: adding file changes | |
100 | remote: added 1 changesets with 1 changes to 1 files |
|
100 | remote: added 1 changesets with 1 changes to 1 files | |
101 | remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob) |
|
101 | remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob) | |
102 | % serve errors |
|
102 | % serve errors | |
103 | $ hg rollback |
|
103 | $ hg rollback | |
104 | repository tip rolled back to revision 0 (undo serve) |
|
104 | repository tip rolled back to revision 0 (undo serve) | |
105 |
|
105 | |||
106 | expect authorization error: all users denied |
|
106 | expect authorization error: all users denied | |
107 |
|
107 | |||
108 | $ echo '[web]' > .hg/hgrc |
|
108 | $ echo '[web]' > .hg/hgrc | |
109 | $ echo 'push_ssl = false' >> .hg/hgrc |
|
109 | $ echo 'push_ssl = false' >> .hg/hgrc | |
110 | $ echo 'deny_push = *' >> .hg/hgrc |
|
110 | $ echo 'deny_push = *' >> .hg/hgrc | |
111 | $ req |
|
111 | $ req | |
112 | pushing to http://localhost:$HGPORT/ |
|
112 | pushing to http://localhost:$HGPORT/ | |
113 | searching for changes |
|
113 | searching for changes | |
114 | abort: authorization failed |
|
114 | abort: authorization failed | |
115 | % serve errors |
|
115 | % serve errors | |
116 | [255] |
|
116 | [255] | |
117 |
|
117 | |||
118 | expect authorization error: some users denied, users must be authenticated |
|
118 | expect authorization error: some users denied, users must be authenticated | |
119 |
|
119 | |||
120 | $ echo 'deny_push = unperson' >> .hg/hgrc |
|
120 | $ echo 'deny_push = unperson' >> .hg/hgrc | |
121 | $ req |
|
121 | $ req | |
122 | pushing to http://localhost:$HGPORT/ |
|
122 | pushing to http://localhost:$HGPORT/ | |
123 | searching for changes |
|
123 | searching for changes | |
124 | abort: authorization failed |
|
124 | abort: authorization failed | |
125 | % serve errors |
|
125 | % serve errors | |
126 | [255] |
|
126 | [255] | |
127 |
|
127 | |||
128 | $ cd .. |
|
128 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now