Show More
@@ -1,146 +1,147 b'' | |||
|
1 | 1 | $ hg init repo |
|
2 | 2 | $ cd repo |
|
3 | 3 | $ echo foo > foo |
|
4 | 4 | $ hg ci -qAm 'add foo' |
|
5 | 5 | $ echo >> foo |
|
6 | 6 | $ hg ci -m 'change foo' |
|
7 | 7 | $ hg up -qC 0 |
|
8 | 8 | $ echo bar > bar |
|
9 | 9 | $ hg ci -qAm 'add bar' |
|
10 | 10 | |
|
11 | 11 | $ hg log |
|
12 | 12 | changeset: 2:effea6de0384 |
|
13 | 13 | tag: tip |
|
14 | 14 | parent: 0:bbd179dfa0a7 |
|
15 | 15 | user: test |
|
16 | 16 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
17 | 17 | summary: add bar |
|
18 | 18 | |
|
19 | 19 | changeset: 1:ed1b79f46b9a |
|
20 | 20 | user: test |
|
21 | 21 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
22 | 22 | summary: change foo |
|
23 | 23 | |
|
24 | 24 | changeset: 0:bbd179dfa0a7 |
|
25 | 25 | user: test |
|
26 | 26 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
27 | 27 | summary: add foo |
|
28 | 28 | |
|
29 | 29 | $ cd .. |
|
30 | 30 | |
|
31 | 31 | don't show "(+1 heads)" message when pulling closed head |
|
32 | 32 | |
|
33 | 33 | $ hg clone -q repo repo2 |
|
34 | 34 | $ hg clone -q repo2 repo3 |
|
35 | 35 | $ cd repo2 |
|
36 | 36 | $ hg up -q 0 |
|
37 | 37 | $ echo hello >> foo |
|
38 | 38 | $ hg ci -mx1 |
|
39 | 39 | created new head |
|
40 | 40 | $ hg ci -mx2 --close-branch |
|
41 | 41 | $ cd ../repo3 |
|
42 | 42 | $ hg heads -q --closed |
|
43 | 43 | 2:effea6de0384 |
|
44 | 44 | 1:ed1b79f46b9a |
|
45 | 45 | $ hg pull |
|
46 | 46 | pulling from $TESTTMP/repo2 |
|
47 | 47 | searching for changes |
|
48 | 48 | adding changesets |
|
49 | 49 | adding manifests |
|
50 | 50 | adding file changes |
|
51 | 51 | added 2 changesets with 1 changes to 1 files |
|
52 | 52 | new changesets 8c900227dd5d:00cfe9073916 |
|
53 | 53 | (run 'hg update' to get a working copy) |
|
54 | 54 | $ hg heads -q --closed |
|
55 | 55 | 4:00cfe9073916 |
|
56 | 56 | 2:effea6de0384 |
|
57 | 57 | 1:ed1b79f46b9a |
|
58 | 58 | |
|
59 | 59 | $ cd .. |
|
60 | 60 | |
|
61 | 61 | $ hg init copy |
|
62 | 62 | $ cd copy |
|
63 | 63 | |
|
64 | 64 | Pull a missing revision: |
|
65 | 65 | |
|
66 | 66 | $ hg pull -qr missing ../repo |
|
67 | 67 | abort: unknown revision 'missing'! |
|
68 | 68 | [255] |
|
69 | 69 | |
|
70 | 70 | Pull multiple revisions with update: |
|
71 | 71 | |
|
72 | 72 | $ hg pull -qu -r 0 -r 1 ../repo |
|
73 | 73 | $ hg -q parents |
|
74 | 74 | 0:bbd179dfa0a7 |
|
75 | 75 | $ hg rollback |
|
76 | 76 | repository tip rolled back to revision -1 (undo pull) |
|
77 | 77 | working directory now based on revision -1 |
|
78 | 78 | |
|
79 | 79 | $ hg pull -qr 0 ../repo |
|
80 | 80 | $ hg log |
|
81 | 81 | changeset: 0:bbd179dfa0a7 |
|
82 | 82 | tag: tip |
|
83 | 83 | user: test |
|
84 | 84 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
85 | 85 | summary: add foo |
|
86 | 86 | |
|
87 | 87 | $ hg pull -qr 1 ../repo |
|
88 | 88 | $ hg log |
|
89 | 89 | changeset: 1:ed1b79f46b9a |
|
90 | 90 | tag: tip |
|
91 | 91 | user: test |
|
92 | 92 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
93 | 93 | summary: change foo |
|
94 | 94 | |
|
95 | 95 | changeset: 0:bbd179dfa0a7 |
|
96 | 96 | user: test |
|
97 | 97 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
98 | 98 | summary: add foo |
|
99 | 99 | |
|
100 | 100 | |
|
101 | 101 | This used to abort: received changelog group is empty: |
|
102 | 102 | |
|
103 | 103 | $ hg pull -qr 1 ../repo |
|
104 | 104 | |
|
105 | 105 | Test race condition with -r and -U (issue4707) |
|
106 | 106 | |
|
107 | 107 | We pull '-U -r <name>' and the name change right after/during the changegroup emission. |
|
108 | 108 | We use http because http is better is our racy-est option. |
|
109 | 109 | |
|
110 | 110 | |
|
111 | 111 | $ echo babar > ../repo/jungle |
|
112 | 112 | $ cat <<EOF > ../repo/.hg/hgrc |
|
113 | 113 | > [hooks] |
|
114 | 114 | > outgoing.makecommit = hg ci -Am 'racy commit'; echo committed in pull-race |
|
115 | 115 | > EOF |
|
116 | 116 | $ hg serve -R ../repo -p $HGPORT2 -d --pid-file=../repo.pid |
|
117 | 117 | $ cat ../repo.pid >> $DAEMON_PIDS |
|
118 | 118 | $ hg pull --rev default --update http://localhost:$HGPORT2/ |
|
119 | 119 | pulling from http://localhost:$HGPORT2/ |
|
120 | 120 | searching for changes |
|
121 | 121 | adding changesets |
|
122 | 122 | adding manifests |
|
123 | 123 | adding file changes |
|
124 | 124 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
125 | 125 | new changesets effea6de0384 |
|
126 | 126 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
127 | 127 | $ hg log -G |
|
128 | 128 | @ changeset: 2:effea6de0384 |
|
129 | 129 | | tag: tip |
|
130 | 130 | | parent: 0:bbd179dfa0a7 |
|
131 | 131 | | user: test |
|
132 | 132 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
133 | 133 | | summary: add bar |
|
134 | 134 | | |
|
135 | 135 | | o changeset: 1:ed1b79f46b9a |
|
136 | 136 | |/ user: test |
|
137 | 137 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
138 | 138 | | summary: change foo |
|
139 | 139 | | |
|
140 | 140 | o changeset: 0:bbd179dfa0a7 |
|
141 | 141 | user: test |
|
142 | 142 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
143 | 143 | summary: add foo |
|
144 | 144 | |
|
145 | 145 | |
|
146 | 146 | $ cd .. |
|
147 | $ killdaemons.py |
General Comments 0
You need to be logged in to leave comments.
Login now