Show More
@@ -1,1136 +1,1136 b'' | |||||
1 | Test exchange of common information using bundle2 |
|
1 | Test exchange of common information using bundle2 | |
2 |
|
2 | |||
3 |
|
3 | |||
4 | $ getmainid() { |
|
4 | $ getmainid() { | |
5 | > hg -R main log --template '{node}\n' --rev "$1" |
|
5 | > hg -R main log --template '{node}\n' --rev "$1" | |
6 | > } |
|
6 | > } | |
7 |
|
7 | |||
8 | enable obsolescence |
|
8 | enable obsolescence | |
9 |
|
9 | |||
10 | $ cp $HGRCPATH $TESTTMP/hgrc.orig |
|
10 | $ cp $HGRCPATH $TESTTMP/hgrc.orig | |
11 | $ cat > $TESTTMP/bundle2-pushkey-hook.sh << EOF |
|
11 | $ cat > $TESTTMP/bundle2-pushkey-hook.sh << EOF | |
12 | > echo pushkey: lock state after \"\$HG_NAMESPACE\" |
|
12 | > echo pushkey: lock state after \"\$HG_NAMESPACE\" | |
13 | > hg debuglock |
|
13 | > hg debuglock | |
14 | > EOF |
|
14 | > EOF | |
15 |
|
15 | |||
16 | $ cat >> $HGRCPATH << EOF |
|
16 | $ cat >> $HGRCPATH << EOF | |
17 | > [experimental] |
|
17 | > [experimental] | |
18 | > evolution.createmarkers=True |
|
18 | > evolution.createmarkers=True | |
19 | > evolution.exchange=True |
|
19 | > evolution.exchange=True | |
20 | > bundle2-output-capture=True |
|
20 | > bundle2-output-capture=True | |
21 | > [command-templates] |
|
21 | > [command-templates] | |
22 | > log={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} |
|
22 | > log={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} | |
23 | > [web] |
|
23 | > [web] | |
24 | > push_ssl = false |
|
24 | > push_ssl = false | |
25 | > allow_push = * |
|
25 | > allow_push = * | |
26 | > [phases] |
|
26 | > [phases] | |
27 | > publish=False |
|
27 | > publish=False | |
28 | > [hooks] |
|
28 | > [hooks] | |
29 | > pretxnclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n" |
|
29 | > pretxnclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n" | |
30 | > txnclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n" |
|
30 | > txnclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n" | |
31 | > txnclose.env = sh -c "HG_LOCAL= printenv.py txnclose" |
|
31 | > txnclose.env = sh -c "HG_LOCAL= printenv.py txnclose" | |
32 | > pushkey= sh "$TESTTMP/bundle2-pushkey-hook.sh" |
|
32 | > pushkey= sh "$TESTTMP/bundle2-pushkey-hook.sh" | |
33 | > EOF |
|
33 | > EOF | |
34 |
|
34 | |||
35 | The extension requires a repo (currently unused) |
|
35 | The extension requires a repo (currently unused) | |
36 |
|
36 | |||
37 | $ hg init main |
|
37 | $ hg init main | |
38 | $ cd main |
|
38 | $ cd main | |
39 | $ touch a |
|
39 | $ touch a | |
40 | $ hg add a |
|
40 | $ hg add a | |
41 | $ hg commit -m 'a' |
|
41 | $ hg commit -m 'a' | |
42 | pre-close-tip:3903775176ed draft |
|
42 | pre-close-tip:3903775176ed draft | |
43 | postclose-tip:3903775176ed draft |
|
43 | postclose-tip:3903775176ed draft | |
44 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=commit |
|
44 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=commit | |
45 |
|
45 | |||
46 | $ hg unbundle $TESTDIR/bundles/rebase.hg |
|
46 | $ hg unbundle $TESTDIR/bundles/rebase.hg | |
47 | adding changesets |
|
47 | adding changesets | |
48 | adding manifests |
|
48 | adding manifests | |
49 | adding file changes |
|
49 | adding file changes | |
50 | pre-close-tip:02de42196ebe draft |
|
50 | pre-close-tip:02de42196ebe draft | |
51 | added 8 changesets with 7 changes to 7 files (+3 heads) |
|
51 | added 8 changesets with 7 changes to 7 files (+3 heads) | |
52 | new changesets cd010b8cd998:02de42196ebe (8 drafts) |
|
52 | new changesets cd010b8cd998:02de42196ebe (8 drafts) | |
53 | postclose-tip:02de42196ebe draft |
|
53 | postclose-tip:02de42196ebe draft | |
54 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=unbundle HG_TXNID=TXN:$ID$ HG_TXNNAME=unbundle |
|
54 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=unbundle HG_TXNID=TXN:$ID$ HG_TXNNAME=unbundle | |
55 | bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob) |
|
55 | bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob) | |
56 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
56 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
57 |
|
57 | |||
58 | $ cd .. |
|
58 | $ cd .. | |
59 |
|
59 | |||
60 | Real world exchange |
|
60 | Real world exchange | |
61 | ===================== |
|
61 | ===================== | |
62 |
|
62 | |||
63 | Add more obsolescence information |
|
63 | Add more obsolescence information | |
64 |
|
64 | |||
65 | $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc` |
|
65 | $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc` | |
66 | pre-close-tip:02de42196ebe draft |
|
66 | pre-close-tip:02de42196ebe draft | |
67 | 1 new obsolescence markers |
|
67 | 1 new obsolescence markers | |
68 | postclose-tip:02de42196ebe draft |
|
68 | postclose-tip:02de42196ebe draft | |
69 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
69 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
70 | $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c` |
|
70 | $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c` | |
71 | pre-close-tip:02de42196ebe draft |
|
71 | pre-close-tip:02de42196ebe draft | |
72 | 1 new obsolescence markers |
|
72 | 1 new obsolescence markers | |
73 | postclose-tip:02de42196ebe draft |
|
73 | postclose-tip:02de42196ebe draft | |
74 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
74 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
75 |
|
75 | |||
76 | clone --pull |
|
76 | clone --pull | |
77 |
|
77 | |||
78 | $ hg -R main phase --public cd010b8cd998 |
|
78 | $ hg -R main phase --public cd010b8cd998 | |
79 | pre-close-tip:02de42196ebe draft |
|
79 | pre-close-tip:02de42196ebe draft | |
80 | postclose-tip:02de42196ebe draft |
|
80 | postclose-tip:02de42196ebe draft | |
81 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase |
|
81 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase | |
82 | $ hg clone main other --pull --rev 9520eea781bc |
|
82 | $ hg clone main other --pull --rev 9520eea781bc | |
83 | adding changesets |
|
83 | adding changesets | |
84 | adding manifests |
|
84 | adding manifests | |
85 | adding file changes |
|
85 | adding file changes | |
86 | pre-close-tip:9520eea781bc draft |
|
86 | pre-close-tip:9520eea781bc draft | |
87 | added 2 changesets with 2 changes to 2 files |
|
87 | added 2 changesets with 2 changes to 2 files | |
88 | 1 new obsolescence markers |
|
88 | 1 new obsolescence markers | |
89 | new changesets cd010b8cd998:9520eea781bc (1 drafts) |
|
89 | new changesets cd010b8cd998:9520eea781bc (1 drafts) | |
90 | postclose-tip:9520eea781bc draft |
|
90 | postclose-tip:9520eea781bc draft | |
91 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=9520eea781bcca16c1e15acc0ba14335a0e8e5ba HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull |
|
91 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=9520eea781bcca16c1e15acc0ba14335a0e8e5ba HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull | |
92 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
92 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
93 | updating to branch default |
|
93 | updating to branch default | |
94 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
94 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
95 | $ hg -R other log -G |
|
95 | $ hg -R other log -G | |
96 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
96 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
97 | | |
|
97 | | | |
98 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
98 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
99 |
|
99 | |||
100 | $ hg -R other debugobsolete |
|
100 | $ hg -R other debugobsolete | |
101 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
101 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
102 |
|
102 | |||
103 | pull |
|
103 | pull | |
104 |
|
104 | |||
105 | $ hg -R main phase --public 9520eea781bc |
|
105 | $ hg -R main phase --public 9520eea781bc | |
106 | pre-close-tip:02de42196ebe draft |
|
106 | pre-close-tip:02de42196ebe draft | |
107 | postclose-tip:02de42196ebe draft |
|
107 | postclose-tip:02de42196ebe draft | |
108 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase |
|
108 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase | |
109 | $ hg -R other pull -r 24b6387c8c8c |
|
109 | $ hg -R other pull -r 24b6387c8c8c | |
110 | pulling from $TESTTMP/main |
|
110 | pulling from $TESTTMP/main | |
111 | searching for changes |
|
111 | searching for changes | |
112 | adding changesets |
|
112 | adding changesets | |
113 | adding manifests |
|
113 | adding manifests | |
114 | adding file changes |
|
114 | adding file changes | |
115 | pre-close-tip:24b6387c8c8c draft |
|
115 | pre-close-tip:24b6387c8c8c draft | |
116 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
116 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
117 | 1 new obsolescence markers |
|
117 | 1 new obsolescence markers | |
118 | new changesets 24b6387c8c8c (1 drafts) |
|
118 | new changesets 24b6387c8c8c (1 drafts) | |
119 | postclose-tip:24b6387c8c8c draft |
|
119 | postclose-tip:24b6387c8c8c draft | |
120 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_NODE_LAST=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull |
|
120 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_NODE_LAST=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull | |
121 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
121 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
122 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
122 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
123 | $ hg -R other log -G |
|
123 | $ hg -R other log -G | |
124 | o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
124 | o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
125 | | |
|
125 | | | |
126 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
126 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
127 | |/ |
|
127 | |/ | |
128 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
128 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
129 |
|
129 | |||
130 | $ hg -R other debugobsolete |
|
130 | $ hg -R other debugobsolete | |
131 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
131 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
132 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
132 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
133 |
|
133 | |||
134 | pull empty (with phase movement) |
|
134 | pull empty (with phase movement) | |
135 |
|
135 | |||
136 | $ hg -R main phase --public 24b6387c8c8c |
|
136 | $ hg -R main phase --public 24b6387c8c8c | |
137 | pre-close-tip:02de42196ebe draft |
|
137 | pre-close-tip:02de42196ebe draft | |
138 | postclose-tip:02de42196ebe draft |
|
138 | postclose-tip:02de42196ebe draft | |
139 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase |
|
139 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase | |
140 | $ hg -R other pull -r 24b6387c8c8c |
|
140 | $ hg -R other pull -r 24b6387c8c8c | |
141 | pulling from $TESTTMP/main |
|
141 | pulling from $TESTTMP/main | |
142 | no changes found |
|
142 | no changes found | |
143 | pre-close-tip:24b6387c8c8c public |
|
143 | pre-close-tip:24b6387c8c8c public | |
144 | 1 local changesets published |
|
144 | 1 local changesets published | |
145 | postclose-tip:24b6387c8c8c public |
|
145 | postclose-tip:24b6387c8c8c public | |
146 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull |
|
146 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull | |
147 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
147 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
148 | $ hg -R other log -G |
|
148 | $ hg -R other log -G | |
149 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
149 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
150 | | |
|
150 | | | |
151 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
151 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
152 | |/ |
|
152 | |/ | |
153 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
153 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
154 |
|
154 | |||
155 | $ hg -R other debugobsolete |
|
155 | $ hg -R other debugobsolete | |
156 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
156 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
157 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
157 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
158 |
|
158 | |||
159 | pull empty |
|
159 | pull empty | |
160 |
|
160 | |||
161 | $ hg -R other pull -r 24b6387c8c8c |
|
161 | $ hg -R other pull -r 24b6387c8c8c | |
162 | pulling from $TESTTMP/main |
|
162 | pulling from $TESTTMP/main | |
163 | no changes found |
|
163 | no changes found | |
164 | pre-close-tip:24b6387c8c8c public |
|
164 | pre-close-tip:24b6387c8c8c public | |
165 | postclose-tip:24b6387c8c8c public |
|
165 | postclose-tip:24b6387c8c8c public | |
166 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull |
|
166 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull | |
167 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) |
|
167 | file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) | |
168 | $ hg -R other log -G |
|
168 | $ hg -R other log -G | |
169 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
169 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
170 | | |
|
170 | | | |
171 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
171 | | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
172 | |/ |
|
172 | |/ | |
173 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
173 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
174 |
|
174 | |||
175 | $ hg -R other debugobsolete |
|
175 | $ hg -R other debugobsolete | |
176 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
176 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
177 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
177 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
178 |
|
178 | |||
179 | add extra data to test their exchange during push |
|
179 | add extra data to test their exchange during push | |
180 |
|
180 | |||
181 | $ hg -R main bookmark --rev eea13746799a book_eea1 |
|
181 | $ hg -R main bookmark --rev eea13746799a book_eea1 | |
182 | pre-close-tip:02de42196ebe draft |
|
182 | pre-close-tip:02de42196ebe draft | |
183 | postclose-tip:02de42196ebe draft |
|
183 | postclose-tip:02de42196ebe draft | |
184 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
184 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
185 | $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a` |
|
185 | $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a` | |
186 | pre-close-tip:02de42196ebe draft |
|
186 | pre-close-tip:02de42196ebe draft | |
187 | 1 new obsolescence markers |
|
187 | 1 new obsolescence markers | |
188 | postclose-tip:02de42196ebe draft |
|
188 | postclose-tip:02de42196ebe draft | |
189 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
189 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
190 | $ hg -R main bookmark --rev 02de42196ebe book_02de |
|
190 | $ hg -R main bookmark --rev 02de42196ebe book_02de | |
191 | pre-close-tip:02de42196ebe draft book_02de |
|
191 | pre-close-tip:02de42196ebe draft book_02de | |
192 | postclose-tip:02de42196ebe draft book_02de |
|
192 | postclose-tip:02de42196ebe draft book_02de | |
193 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
193 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
194 | $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe` |
|
194 | $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe` | |
195 | pre-close-tip:02de42196ebe draft book_02de |
|
195 | pre-close-tip:02de42196ebe draft book_02de | |
196 | 1 new obsolescence markers |
|
196 | 1 new obsolescence markers | |
197 | postclose-tip:02de42196ebe draft book_02de |
|
197 | postclose-tip:02de42196ebe draft book_02de | |
198 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
198 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
199 | $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc |
|
199 | $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc | |
200 | pre-close-tip:02de42196ebe draft book_02de |
|
200 | pre-close-tip:02de42196ebe draft book_02de | |
201 | postclose-tip:02de42196ebe draft book_02de |
|
201 | postclose-tip:02de42196ebe draft book_02de | |
202 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
202 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
203 | $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16` |
|
203 | $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16` | |
204 | pre-close-tip:02de42196ebe draft book_02de |
|
204 | pre-close-tip:02de42196ebe draft book_02de | |
205 | 1 new obsolescence markers |
|
205 | 1 new obsolescence markers | |
206 | postclose-tip:02de42196ebe draft book_02de |
|
206 | postclose-tip:02de42196ebe draft book_02de | |
207 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
207 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
208 | $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd |
|
208 | $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd | |
209 | pre-close-tip:02de42196ebe draft book_02de |
|
209 | pre-close-tip:02de42196ebe draft book_02de | |
210 | postclose-tip:02de42196ebe draft book_02de |
|
210 | postclose-tip:02de42196ebe draft book_02de | |
211 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
211 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
212 | $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8` |
|
212 | $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8` | |
213 | pre-close-tip:02de42196ebe draft book_02de |
|
213 | pre-close-tip:02de42196ebe draft book_02de | |
214 | 1 new obsolescence markers |
|
214 | 1 new obsolescence markers | |
215 | postclose-tip:02de42196ebe draft book_02de |
|
215 | postclose-tip:02de42196ebe draft book_02de | |
216 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
216 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
217 | $ hg -R main bookmark --rev 32af7686d403 book_32af |
|
217 | $ hg -R main bookmark --rev 32af7686d403 book_32af | |
218 | pre-close-tip:02de42196ebe draft book_02de |
|
218 | pre-close-tip:02de42196ebe draft book_02de | |
219 | postclose-tip:02de42196ebe draft book_02de |
|
219 | postclose-tip:02de42196ebe draft book_02de | |
220 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
220 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
221 | $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403` |
|
221 | $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403` | |
222 | pre-close-tip:02de42196ebe draft book_02de |
|
222 | pre-close-tip:02de42196ebe draft book_02de | |
223 | 1 new obsolescence markers |
|
223 | 1 new obsolescence markers | |
224 | postclose-tip:02de42196ebe draft book_02de |
|
224 | postclose-tip:02de42196ebe draft book_02de | |
225 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete |
|
225 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete | |
226 |
|
226 | |||
227 | $ hg -R other bookmark --rev cd010b8cd998 book_eea1 |
|
227 | $ hg -R other bookmark --rev cd010b8cd998 book_eea1 | |
228 | pre-close-tip:24b6387c8c8c public |
|
228 | pre-close-tip:24b6387c8c8c public | |
229 | postclose-tip:24b6387c8c8c public |
|
229 | postclose-tip:24b6387c8c8c public | |
230 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
230 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
231 | $ hg -R other bookmark --rev cd010b8cd998 book_02de |
|
231 | $ hg -R other bookmark --rev cd010b8cd998 book_02de | |
232 | pre-close-tip:24b6387c8c8c public |
|
232 | pre-close-tip:24b6387c8c8c public | |
233 | postclose-tip:24b6387c8c8c public |
|
233 | postclose-tip:24b6387c8c8c public | |
234 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
234 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
235 | $ hg -R other bookmark --rev cd010b8cd998 book_42cc |
|
235 | $ hg -R other bookmark --rev cd010b8cd998 book_42cc | |
236 | pre-close-tip:24b6387c8c8c public |
|
236 | pre-close-tip:24b6387c8c8c public | |
237 | postclose-tip:24b6387c8c8c public |
|
237 | postclose-tip:24b6387c8c8c public | |
238 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
238 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
239 | $ hg -R other bookmark --rev cd010b8cd998 book_5fdd |
|
239 | $ hg -R other bookmark --rev cd010b8cd998 book_5fdd | |
240 | pre-close-tip:24b6387c8c8c public |
|
240 | pre-close-tip:24b6387c8c8c public | |
241 | postclose-tip:24b6387c8c8c public |
|
241 | postclose-tip:24b6387c8c8c public | |
242 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
242 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
243 | $ hg -R other bookmark --rev cd010b8cd998 book_32af |
|
243 | $ hg -R other bookmark --rev cd010b8cd998 book_32af | |
244 | pre-close-tip:24b6387c8c8c public |
|
244 | pre-close-tip:24b6387c8c8c public | |
245 | postclose-tip:24b6387c8c8c public |
|
245 | postclose-tip:24b6387c8c8c public | |
246 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark |
|
246 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark | |
247 |
|
247 | |||
248 | $ hg -R main phase --public eea13746799a |
|
248 | $ hg -R main phase --public eea13746799a | |
249 | pre-close-tip:02de42196ebe draft book_02de |
|
249 | pre-close-tip:02de42196ebe draft book_02de | |
250 | postclose-tip:02de42196ebe draft book_02de |
|
250 | postclose-tip:02de42196ebe draft book_02de | |
251 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase |
|
251 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase | |
252 |
|
252 | |||
253 | push |
|
253 | push | |
254 | $ hg -R main push other --rev eea13746799a --bookmark book_eea1 |
|
254 | $ hg -R main push other --rev eea13746799a --bookmark book_eea1 | |
255 | pushing to other |
|
255 | pushing to other | |
256 | searching for changes |
|
256 | searching for changes | |
257 | remote: adding changesets |
|
257 | remote: adding changesets | |
258 | remote: adding manifests |
|
258 | remote: adding manifests | |
259 | remote: adding file changes |
|
259 | remote: adding file changes | |
260 | remote: pre-close-tip:eea13746799a public book_eea1 |
|
260 | remote: pre-close-tip:eea13746799a public book_eea1 | |
261 | remote: added 1 changesets with 0 changes to 0 files (-1 heads) |
|
261 | remote: added 1 changesets with 0 changes to 0 files (-1 heads) | |
262 | remote: 1 new obsolescence markers |
|
262 | remote: 1 new obsolescence markers | |
263 | remote: pushkey: lock state after "bookmarks" |
|
263 | remote: pushkey: lock state after "bookmarks" | |
264 | remote: lock: free |
|
264 | remote: lock: free | |
265 | remote: wlock: free |
|
265 | remote: wlock: free | |
266 | remote: postclose-tip:eea13746799a public book_eea1 |
|
266 | remote: postclose-tip:eea13746799a public book_eea1 | |
267 | remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_NODE_LAST=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_PHASES_MOVED=1 HG_SOURCE=push HG_TXNID=TXN:$ID$ HG_TXNNAME=push HG_URL=file:$TESTTMP/other |
|
267 | remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_NODE_LAST=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_PHASES_MOVED=1 HG_SOURCE=push HG_TXNID=TXN:$ID$ HG_TXNNAME=push HG_URL=file:$TESTTMP/other | |
268 | updating bookmark book_eea1 |
|
268 | updating bookmark book_eea1 | |
269 | pre-close-tip:02de42196ebe draft book_02de |
|
269 | pre-close-tip:02de42196ebe draft book_02de | |
270 | postclose-tip:02de42196ebe draft book_02de |
|
270 | postclose-tip:02de42196ebe draft book_02de | |
271 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response |
|
271 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response | |
272 | file:/*/$TESTTMP/other HG_URL=file:$TESTTMP/other (glob) |
|
272 | file:/*/$TESTTMP/other HG_URL=file:$TESTTMP/other (glob) | |
273 | $ hg -R other log -G |
|
273 | $ hg -R other log -G | |
274 | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |
|
274 | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G | |
275 | |\ |
|
275 | |\ | |
276 | | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
276 | | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
277 | | | |
|
277 | | | | |
278 | @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
278 | @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
279 | |/ |
|
279 | |/ | |
280 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A |
|
280 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A | |
281 |
|
281 | |||
282 | $ hg -R other debugobsolete |
|
282 | $ hg -R other debugobsolete | |
283 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
283 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
284 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
284 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
285 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
285 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
286 |
|
286 | |||
287 | pull over ssh |
|
287 | pull over ssh | |
288 |
|
288 | |||
289 | $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de |
|
289 | $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de | |
290 | pulling from ssh://user@dummy/main |
|
290 | pulling from ssh://user@dummy/main | |
291 | searching for changes |
|
291 | searching for changes | |
292 | adding changesets |
|
292 | adding changesets | |
293 | adding manifests |
|
293 | adding manifests | |
294 | adding file changes |
|
294 | adding file changes | |
295 | updating bookmark book_02de |
|
295 | updating bookmark book_02de | |
296 | pre-close-tip:02de42196ebe draft book_02de |
|
296 | pre-close-tip:02de42196ebe draft book_02de | |
297 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
297 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
298 | 1 new obsolescence markers |
|
298 | 1 new obsolescence markers | |
299 | new changesets 02de42196ebe (1 drafts) |
|
299 | new changesets 02de42196ebe (1 drafts) | |
300 | postclose-tip:02de42196ebe draft book_02de |
|
300 | postclose-tip:02de42196ebe draft book_02de | |
301 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull |
|
301 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull | |
302 | ssh://user@dummy/main HG_URL=ssh://user@dummy/main |
|
302 | ssh://user@dummy/main HG_URL=ssh://user@dummy/main | |
303 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
303 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
304 | $ hg -R other debugobsolete |
|
304 | $ hg -R other debugobsolete | |
305 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
305 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
306 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
306 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
307 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
307 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
308 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
308 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
309 |
|
309 | |||
310 | pull over http |
|
310 | pull over http | |
311 |
|
311 | |||
312 | $ hg serve -R main -p $HGPORT -d --pid-file=main.pid -E main-error.log |
|
312 | $ hg serve -R main -p $HGPORT -d --pid-file=main.pid -E main-error.log | |
313 | $ cat main.pid >> $DAEMON_PIDS |
|
313 | $ cat main.pid >> $DAEMON_PIDS | |
314 |
|
314 | |||
315 | $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc |
|
315 | $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc | |
316 | pulling from http://localhost:$HGPORT/ |
|
316 | pulling from http://localhost:$HGPORT/ | |
317 | searching for changes |
|
317 | searching for changes | |
318 | adding changesets |
|
318 | adding changesets | |
319 | adding manifests |
|
319 | adding manifests | |
320 | adding file changes |
|
320 | adding file changes | |
321 | updating bookmark book_42cc |
|
321 | updating bookmark book_42cc | |
322 | pre-close-tip:42ccdea3bb16 draft book_42cc |
|
322 | pre-close-tip:42ccdea3bb16 draft book_42cc | |
323 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
323 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
324 | 1 new obsolescence markers |
|
324 | 1 new obsolescence markers | |
325 | new changesets 42ccdea3bb16 (1 drafts) |
|
325 | new changesets 42ccdea3bb16 (1 drafts) | |
326 | postclose-tip:42ccdea3bb16 draft book_42cc |
|
326 | postclose-tip:42ccdea3bb16 draft book_42cc | |
327 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_NODE_LAST=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull |
|
327 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_NODE_LAST=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull | |
328 | http://localhost:$HGPORT/ HG_URL=http://localhost:$HGPORT/ |
|
328 | http://localhost:$HGPORT/ HG_URL=http://localhost:$HGPORT/ | |
329 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
329 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
330 | $ cat main-error.log |
|
330 | $ cat main-error.log | |
331 | $ hg -R other debugobsolete |
|
331 | $ hg -R other debugobsolete | |
332 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
332 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
333 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
333 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
334 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
334 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
335 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
335 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
336 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
336 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
337 |
|
337 | |||
338 | push over ssh |
|
338 | push over ssh | |
339 |
|
339 | |||
340 | $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd |
|
340 | $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd | |
341 | pushing to ssh://user@dummy/other |
|
341 | pushing to ssh://user@dummy/other | |
342 | searching for changes |
|
342 | searching for changes | |
343 | remote: adding changesets |
|
343 | remote: adding changesets | |
344 | remote: adding manifests |
|
344 | remote: adding manifests | |
345 | remote: adding file changes |
|
345 | remote: adding file changes | |
346 | remote: pre-close-tip:5fddd98957c8 draft book_5fdd |
|
346 | remote: pre-close-tip:5fddd98957c8 draft book_5fdd | |
347 | remote: added 1 changesets with 1 changes to 1 files |
|
347 | remote: added 1 changesets with 1 changes to 1 files | |
348 | remote: 1 new obsolescence markers |
|
348 | remote: 1 new obsolescence markers | |
349 | remote: pushkey: lock state after "bookmarks" |
|
349 | remote: pushkey: lock state after "bookmarks" | |
350 | remote: lock: free |
|
350 | remote: lock: free | |
351 | remote: wlock: free |
|
351 | remote: wlock: free | |
352 | remote: postclose-tip:5fddd98957c8 draft book_5fdd |
|
352 | remote: postclose-tip:5fddd98957c8 draft book_5fdd | |
353 | remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_NODE_LAST=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_TXNNAME=serve HG_URL=remote:ssh:$LOCALIP |
|
353 | remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_NODE_LAST=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_TXNNAME=serve HG_URL=remote:ssh:$LOCALIP | |
354 | updating bookmark book_5fdd |
|
354 | updating bookmark book_5fdd | |
355 | pre-close-tip:02de42196ebe draft book_02de |
|
355 | pre-close-tip:02de42196ebe draft book_02de | |
356 | postclose-tip:02de42196ebe draft book_02de |
|
356 | postclose-tip:02de42196ebe draft book_02de | |
357 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response |
|
357 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response | |
358 | ssh://user@dummy/other HG_URL=ssh://user@dummy/other |
|
358 | ssh://user@dummy/other HG_URL=ssh://user@dummy/other | |
359 | $ hg -R other log -G |
|
359 | $ hg -R other log -G | |
360 | o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C |
|
360 | o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C | |
361 | | |
|
361 | | | |
362 | o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B |
|
362 | o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B | |
363 | | |
|
363 | | | |
364 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H |
|
364 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H | |
365 | | | |
|
365 | | | | |
366 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |
|
366 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G | |
367 | | |/| |
|
367 | | |/| | |
368 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
368 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
369 | |/ / |
|
369 | |/ / | |
370 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
370 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
371 | |/ |
|
371 | |/ | |
372 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A |
|
372 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A | |
373 |
|
373 | |||
374 | $ hg -R other debugobsolete |
|
374 | $ hg -R other debugobsolete | |
375 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
375 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
376 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
376 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
377 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
377 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
378 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
378 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
379 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
379 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
380 | 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
380 | 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
381 |
|
381 | |||
382 | push over http |
|
382 | push over http | |
383 |
|
383 | |||
384 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
384 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
385 | $ cat other.pid >> $DAEMON_PIDS |
|
385 | $ cat other.pid >> $DAEMON_PIDS | |
386 |
|
386 | |||
387 | $ hg -R main phase --public 32af7686d403 |
|
387 | $ hg -R main phase --public 32af7686d403 | |
388 | pre-close-tip:02de42196ebe draft book_02de |
|
388 | pre-close-tip:02de42196ebe draft book_02de | |
389 | postclose-tip:02de42196ebe draft book_02de |
|
389 | postclose-tip:02de42196ebe draft book_02de | |
390 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase |
|
390 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase | |
391 | $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af |
|
391 | $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af | |
392 | pushing to http://localhost:$HGPORT2/ |
|
392 | pushing to http://localhost:$HGPORT2/ | |
393 | searching for changes |
|
393 | searching for changes | |
394 | remote: adding changesets |
|
394 | remote: adding changesets | |
395 | remote: adding manifests |
|
395 | remote: adding manifests | |
396 | remote: adding file changes |
|
396 | remote: adding file changes | |
397 | remote: pre-close-tip:32af7686d403 public book_32af |
|
397 | remote: pre-close-tip:32af7686d403 public book_32af | |
398 | remote: added 1 changesets with 1 changes to 1 files |
|
398 | remote: added 1 changesets with 1 changes to 1 files | |
399 | remote: 1 new obsolescence markers |
|
399 | remote: 1 new obsolescence markers | |
400 | remote: pushkey: lock state after "bookmarks" |
|
400 | remote: pushkey: lock state after "bookmarks" | |
401 | remote: lock: free |
|
401 | remote: lock: free | |
402 | remote: wlock: free |
|
402 | remote: wlock: free | |
403 | remote: postclose-tip:32af7686d403 public book_32af |
|
403 | remote: postclose-tip:32af7686d403 public book_32af | |
404 | remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=32af7686d403cf45b5d95f2d70cebea587ac806a HG_NODE_LAST=32af7686d403cf45b5d95f2d70cebea587ac806a HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_TXNNAME=serve HG_URL=remote:http:$LOCALIP: (glob) |
|
404 | remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=32af7686d403cf45b5d95f2d70cebea587ac806a HG_NODE_LAST=32af7686d403cf45b5d95f2d70cebea587ac806a HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_TXNNAME=serve HG_URL=remote:http:$LOCALIP: (glob) | |
405 | updating bookmark book_32af |
|
405 | updating bookmark book_32af | |
406 | pre-close-tip:02de42196ebe draft book_02de |
|
406 | pre-close-tip:02de42196ebe draft book_02de | |
407 | postclose-tip:02de42196ebe draft book_02de |
|
407 | postclose-tip:02de42196ebe draft book_02de | |
408 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response |
|
408 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response | |
409 | http://localhost:$HGPORT2/ HG_URL=http://localhost:$HGPORT2/ |
|
409 | http://localhost:$HGPORT2/ HG_URL=http://localhost:$HGPORT2/ | |
410 | $ cat other-error.log |
|
410 | $ cat other-error.log | |
411 |
|
411 | |||
412 | Check final content. |
|
412 | Check final content. | |
413 |
|
413 | |||
414 | $ hg -R other log -G |
|
414 | $ hg -R other log -G | |
415 | o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D |
|
415 | o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D | |
416 | | |
|
416 | | | |
417 | o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C |
|
417 | o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C | |
418 | | |
|
418 | | | |
419 | o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B |
|
419 | o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B | |
420 | | |
|
420 | | | |
421 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H |
|
421 | | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H | |
422 | | | |
|
422 | | | | |
423 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |
|
423 | | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G | |
424 | | |/| |
|
424 | | |/| | |
425 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |
|
425 | | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | |
426 | |/ / |
|
426 | |/ / | |
427 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |
|
427 | | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E | |
428 | |/ |
|
428 | |/ | |
429 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A |
|
429 | o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A | |
430 |
|
430 | |||
431 | $ hg -R other debugobsolete |
|
431 | $ hg -R other debugobsolete | |
432 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
432 | 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
433 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
433 | 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
434 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
434 | 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
435 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
435 | 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
436 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
436 | 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
437 | 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
437 | 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
438 | 7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
438 | 7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
439 |
|
439 | |||
440 | (check that no 'pending' files remain) |
|
440 | (check that no 'pending' files remain) | |
441 |
|
441 | |||
442 | $ ls -1 other/.hg/bookmarks* |
|
442 | $ ls -1 other/.hg/bookmarks* | |
443 | other/.hg/bookmarks |
|
443 | other/.hg/bookmarks | |
444 | $ ls -1 other/.hg/store/phaseroots* |
|
444 | $ ls -1 other/.hg/store/phaseroots* | |
445 | other/.hg/store/phaseroots |
|
445 | other/.hg/store/phaseroots | |
446 | $ ls -1 other/.hg/store/00changelog.i* |
|
446 | $ ls -1 other/.hg/store/00changelog.i* | |
447 | other/.hg/store/00changelog.i |
|
447 | other/.hg/store/00changelog.i | |
448 |
|
448 | |||
449 | Error Handling |
|
449 | Error Handling | |
450 | ============== |
|
450 | ============== | |
451 |
|
451 | |||
452 | Check that errors are properly returned to the client during push. |
|
452 | Check that errors are properly returned to the client during push. | |
453 |
|
453 | |||
454 | Setting up |
|
454 | Setting up | |
455 |
|
455 | |||
456 | $ cat > failpush.py << EOF |
|
456 | $ cat > failpush.py << EOF | |
457 | > """A small extension that makes push fails when using bundle2 |
|
457 | > """A small extension that makes push fails when using bundle2 | |
458 | > |
|
458 | > | |
459 | > used to test error handling in bundle2 |
|
459 | > used to test error handling in bundle2 | |
460 | > """ |
|
460 | > """ | |
461 | > |
|
461 | > | |
462 | > from mercurial import error |
|
462 | > from mercurial import error | |
463 | > from mercurial import bundle2 |
|
463 | > from mercurial import bundle2 | |
464 | > from mercurial import exchange |
|
464 | > from mercurial import exchange | |
465 | > from mercurial import extensions |
|
465 | > from mercurial import extensions | |
466 | > from mercurial import registrar |
|
466 | > from mercurial import registrar | |
467 | > cmdtable = {} |
|
467 | > cmdtable = {} | |
468 | > command = registrar.command(cmdtable) |
|
468 | > command = registrar.command(cmdtable) | |
469 | > |
|
469 | > | |
470 | > configtable = {} |
|
470 | > configtable = {} | |
471 | > configitem = registrar.configitem(configtable) |
|
471 | > configitem = registrar.configitem(configtable) | |
472 | > configitem(b'failpush', b'reason', |
|
472 | > configitem(b'failpush', b'reason', | |
473 | > default=None, |
|
473 | > default=None, | |
474 | > ) |
|
474 | > ) | |
475 | > |
|
475 | > | |
476 | > def _pushbundle2failpart(pushop, bundler): |
|
476 | > def _pushbundle2failpart(pushop, bundler): | |
477 | > reason = pushop.ui.config(b'failpush', b'reason') |
|
477 | > reason = pushop.ui.config(b'failpush', b'reason') | |
478 | > part = None |
|
478 | > part = None | |
479 | > if reason == b'abort': |
|
479 | > if reason == b'abort': | |
480 | > bundler.newpart(b'test:abort') |
|
480 | > bundler.newpart(b'test:abort') | |
481 | > if reason == b'unknown': |
|
481 | > if reason == b'unknown': | |
482 | > bundler.newpart(b'test:unknown') |
|
482 | > bundler.newpart(b'test:unknown') | |
483 | > if reason == b'race': |
|
483 | > if reason == b'race': | |
484 | > # 20 Bytes of crap |
|
484 | > # 20 Bytes of crap | |
485 | > bundler.newpart(b'check:heads', data=b'01234567890123456789') |
|
485 | > bundler.newpart(b'check:heads', data=b'01234567890123456789') | |
486 | > |
|
486 | > | |
487 | > @bundle2.parthandler(b"test:abort") |
|
487 | > @bundle2.parthandler(b"test:abort") | |
488 | > def handleabort(op, part): |
|
488 | > def handleabort(op, part): | |
489 | > raise error.Abort(b'Abandon ship!', hint=b"don't panic") |
|
489 | > raise error.Abort(b'Abandon ship!', hint=b"don't panic") | |
490 | > |
|
490 | > | |
491 | > def uisetup(ui): |
|
491 | > def uisetup(ui): | |
492 | > exchange.b2partsgenmapping[b'failpart'] = _pushbundle2failpart |
|
492 | > exchange.b2partsgenmapping[b'failpart'] = _pushbundle2failpart | |
493 | > exchange.b2partsgenorder.insert(0, b'failpart') |
|
493 | > exchange.b2partsgenorder.insert(0, b'failpart') | |
494 | > |
|
494 | > | |
495 | > EOF |
|
495 | > EOF | |
496 |
|
496 | |||
497 | $ cd main |
|
497 | $ cd main | |
498 | $ hg up tip |
|
498 | $ hg up tip | |
499 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
499 | 3 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
500 | $ echo 'I' > I |
|
500 | $ echo 'I' > I | |
501 | $ hg add I |
|
501 | $ hg add I | |
502 | $ hg ci -m 'I' |
|
502 | $ hg ci -m 'I' | |
503 | pre-close-tip:e7ec4e813ba6 draft |
|
503 | pre-close-tip:e7ec4e813ba6 draft | |
504 | postclose-tip:e7ec4e813ba6 draft |
|
504 | postclose-tip:e7ec4e813ba6 draft | |
505 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit |
|
505 | txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit | |
506 | $ hg id |
|
506 | $ hg id | |
507 | e7ec4e813ba6 tip |
|
507 | e7ec4e813ba6 tip | |
508 | $ cd .. |
|
508 | $ cd .. | |
509 |
|
509 | |||
510 | $ cat << EOF >> $HGRCPATH |
|
510 | $ cat << EOF >> $HGRCPATH | |
511 | > [extensions] |
|
511 | > [extensions] | |
512 | > failpush=$TESTTMP/failpush.py |
|
512 | > failpush=$TESTTMP/failpush.py | |
513 | > EOF |
|
513 | > EOF | |
514 |
|
514 | |||
515 | $ killdaemons.py |
|
515 | $ killdaemons.py | |
516 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
516 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
517 | $ cat other.pid >> $DAEMON_PIDS |
|
517 | $ cat other.pid >> $DAEMON_PIDS | |
518 |
|
518 | |||
519 | Doing the actual push: Abort error |
|
519 | Doing the actual push: Abort error | |
520 |
|
520 | |||
521 | $ cat << EOF >> $HGRCPATH |
|
521 | $ cat << EOF >> $HGRCPATH | |
522 | > [failpush] |
|
522 | > [failpush] | |
523 | > reason = abort |
|
523 | > reason = abort | |
524 | > EOF |
|
524 | > EOF | |
525 |
|
525 | |||
526 | $ hg -R main push other -r e7ec4e813ba6 |
|
526 | $ hg -R main push other -r e7ec4e813ba6 | |
527 | pushing to other |
|
527 | pushing to other | |
528 | searching for changes |
|
528 | searching for changes | |
529 | abort: Abandon ship! |
|
529 | abort: Abandon ship! | |
530 | (don't panic) |
|
530 | (don't panic) | |
531 | [255] |
|
531 | [255] | |
532 |
|
532 | |||
533 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
533 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
534 | pushing to ssh://user@dummy/other |
|
534 | pushing to ssh://user@dummy/other | |
535 | searching for changes |
|
535 | searching for changes | |
536 | remote: Abandon ship! |
|
536 | remote: Abandon ship! | |
537 | remote: (don't panic) |
|
537 | remote: (don't panic) | |
538 | abort: push failed on remote |
|
538 | abort: push failed on remote | |
539 | [100] |
|
539 | [100] | |
540 |
|
540 | |||
541 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
541 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
542 | pushing to http://localhost:$HGPORT2/ |
|
542 | pushing to http://localhost:$HGPORT2/ | |
543 | searching for changes |
|
543 | searching for changes | |
544 | remote: Abandon ship! |
|
544 | remote: Abandon ship! | |
545 | remote: (don't panic) |
|
545 | remote: (don't panic) | |
546 | abort: push failed on remote |
|
546 | abort: push failed on remote | |
547 | [100] |
|
547 | [100] | |
548 |
|
548 | |||
549 |
|
549 | |||
550 | Doing the actual push: unknown mandatory parts |
|
550 | Doing the actual push: unknown mandatory parts | |
551 |
|
551 | |||
552 | $ cat << EOF >> $HGRCPATH |
|
552 | $ cat << EOF >> $HGRCPATH | |
553 | > [failpush] |
|
553 | > [failpush] | |
554 | > reason = unknown |
|
554 | > reason = unknown | |
555 | > EOF |
|
555 | > EOF | |
556 |
|
556 | |||
557 | $ hg -R main push other -r e7ec4e813ba6 |
|
557 | $ hg -R main push other -r e7ec4e813ba6 | |
558 | pushing to other |
|
558 | pushing to other | |
559 | searching for changes |
|
559 | searching for changes | |
560 | abort: missing support for test:unknown |
|
560 | abort: missing support for test:unknown | |
561 | [100] |
|
561 | [100] | |
562 |
|
562 | |||
563 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
563 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
564 | pushing to ssh://user@dummy/other |
|
564 | pushing to ssh://user@dummy/other | |
565 | searching for changes |
|
565 | searching for changes | |
566 | abort: missing support for test:unknown |
|
566 | abort: missing support for test:unknown | |
567 | [100] |
|
567 | [100] | |
568 |
|
568 | |||
569 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
569 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
570 | pushing to http://localhost:$HGPORT2/ |
|
570 | pushing to http://localhost:$HGPORT2/ | |
571 | searching for changes |
|
571 | searching for changes | |
572 | abort: missing support for test:unknown |
|
572 | abort: missing support for test:unknown | |
573 | [100] |
|
573 | [100] | |
574 |
|
574 | |||
575 | Doing the actual push: race |
|
575 | Doing the actual push: race | |
576 |
|
576 | |||
577 | $ cat << EOF >> $HGRCPATH |
|
577 | $ cat << EOF >> $HGRCPATH | |
578 | > [failpush] |
|
578 | > [failpush] | |
579 | > reason = race |
|
579 | > reason = race | |
580 | > EOF |
|
580 | > EOF | |
581 |
|
581 | |||
582 | $ hg -R main push other -r e7ec4e813ba6 |
|
582 | $ hg -R main push other -r e7ec4e813ba6 | |
583 | pushing to other |
|
583 | pushing to other | |
584 | searching for changes |
|
584 | searching for changes | |
585 | abort: push failed: |
|
585 | abort: push failed: | |
586 | 'remote repository changed while pushing - please try again' |
|
586 | 'remote repository changed while pushing - please try again' | |
587 | [255] |
|
587 | [255] | |
588 |
|
588 | |||
589 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
589 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
590 | pushing to ssh://user@dummy/other |
|
590 | pushing to ssh://user@dummy/other | |
591 | searching for changes |
|
591 | searching for changes | |
592 | abort: push failed: |
|
592 | abort: push failed: | |
593 | 'remote repository changed while pushing - please try again' |
|
593 | 'remote repository changed while pushing - please try again' | |
594 | [255] |
|
594 | [255] | |
595 |
|
595 | |||
596 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
596 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
597 | pushing to http://localhost:$HGPORT2/ |
|
597 | pushing to http://localhost:$HGPORT2/ | |
598 | searching for changes |
|
598 | searching for changes | |
599 | abort: push failed: |
|
599 | abort: push failed: | |
600 | 'remote repository changed while pushing - please try again' |
|
600 | 'remote repository changed while pushing - please try again' | |
601 | [255] |
|
601 | [255] | |
602 |
|
602 | |||
603 | Doing the actual push: hook abort |
|
603 | Doing the actual push: hook abort | |
604 |
|
604 | |||
605 | $ cat << EOF >> $HGRCPATH |
|
605 | $ cat << EOF >> $HGRCPATH | |
606 | > [failpush] |
|
606 | > [failpush] | |
607 | > reason = |
|
607 | > reason = | |
608 | > [hooks] |
|
608 | > [hooks] | |
609 | > pretxnclose.failpush = sh -c "echo 'You shall not pass!'; false" |
|
609 | > pretxnclose.failpush = sh -c "echo 'You shall not pass!'; false" | |
610 | > txnabort.failpush = sh -c "echo 'Cleaning up the mess...'" |
|
610 | > txnabort.failpush = sh -c "echo 'Cleaning up the mess...'" | |
611 | > EOF |
|
611 | > EOF | |
612 |
|
612 | |||
613 | $ killdaemons.py |
|
613 | $ killdaemons.py | |
614 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
614 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
615 | $ cat other.pid >> $DAEMON_PIDS |
|
615 | $ cat other.pid >> $DAEMON_PIDS | |
616 |
|
616 | |||
617 | $ hg -R main push other -r e7ec4e813ba6 |
|
617 | $ hg -R main push other -r e7ec4e813ba6 | |
618 | pushing to other |
|
618 | pushing to other | |
619 | searching for changes |
|
619 | searching for changes | |
620 | remote: adding changesets |
|
620 | remote: adding changesets | |
621 | remote: adding manifests |
|
621 | remote: adding manifests | |
622 | remote: adding file changes |
|
622 | remote: adding file changes | |
623 | remote: pre-close-tip:e7ec4e813ba6 draft |
|
623 | remote: pre-close-tip:e7ec4e813ba6 draft | |
624 | remote: You shall not pass! |
|
624 | remote: You shall not pass! | |
625 | remote: transaction abort! |
|
625 | remote: transaction abort! | |
626 | remote: Cleaning up the mess... |
|
626 | remote: Cleaning up the mess... | |
627 | remote: rollback completed |
|
627 | remote: rollback completed | |
628 | abort: pretxnclose.failpush hook exited with status 1 |
|
628 | abort: pretxnclose.failpush hook exited with status 1 | |
629 | [40] |
|
629 | [40] | |
630 |
|
630 | |||
631 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
631 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
632 | pushing to ssh://user@dummy/other |
|
632 | pushing to ssh://user@dummy/other | |
633 | searching for changes |
|
633 | searching for changes | |
634 | remote: adding changesets |
|
634 | remote: adding changesets | |
635 | remote: adding manifests |
|
635 | remote: adding manifests | |
636 | remote: adding file changes |
|
636 | remote: adding file changes | |
637 | remote: pre-close-tip:e7ec4e813ba6 draft |
|
637 | remote: pre-close-tip:e7ec4e813ba6 draft | |
638 | remote: You shall not pass! |
|
638 | remote: You shall not pass! | |
639 | remote: transaction abort! |
|
639 | remote: transaction abort! | |
640 | remote: Cleaning up the mess... |
|
640 | remote: Cleaning up the mess... | |
641 | remote: rollback completed |
|
641 | remote: rollback completed | |
642 | remote: pretxnclose.failpush hook exited with status 1 |
|
642 | remote: pretxnclose.failpush hook exited with status 1 | |
643 | abort: push failed on remote |
|
643 | abort: push failed on remote | |
644 | [100] |
|
644 | [100] | |
645 |
|
645 | |||
646 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
646 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
647 | pushing to http://localhost:$HGPORT2/ |
|
647 | pushing to http://localhost:$HGPORT2/ | |
648 | searching for changes |
|
648 | searching for changes | |
649 | remote: adding changesets |
|
649 | remote: adding changesets | |
650 | remote: adding manifests |
|
650 | remote: adding manifests | |
651 | remote: adding file changes |
|
651 | remote: adding file changes | |
652 | remote: pre-close-tip:e7ec4e813ba6 draft |
|
652 | remote: pre-close-tip:e7ec4e813ba6 draft | |
653 | remote: You shall not pass! |
|
653 | remote: You shall not pass! | |
654 | remote: transaction abort! |
|
654 | remote: transaction abort! | |
655 | remote: Cleaning up the mess... |
|
655 | remote: Cleaning up the mess... | |
656 | remote: rollback completed |
|
656 | remote: rollback completed | |
657 | remote: pretxnclose.failpush hook exited with status 1 |
|
657 | remote: pretxnclose.failpush hook exited with status 1 | |
658 | abort: push failed on remote |
|
658 | abort: push failed on remote | |
659 | [100] |
|
659 | [100] | |
660 |
|
660 | |||
661 | (check that no 'pending' files remain) |
|
661 | (check that no 'pending' files remain) | |
662 |
|
662 | |||
663 | $ ls -1 other/.hg/bookmarks* |
|
663 | $ ls -1 other/.hg/bookmarks* | |
664 | other/.hg/bookmarks |
|
664 | other/.hg/bookmarks | |
665 | $ ls -1 other/.hg/store/phaseroots* |
|
665 | $ ls -1 other/.hg/store/phaseroots* | |
666 | other/.hg/store/phaseroots |
|
666 | other/.hg/store/phaseroots | |
667 | $ ls -1 other/.hg/store/00changelog.i* |
|
667 | $ ls -1 other/.hg/store/00changelog.i* | |
668 | other/.hg/store/00changelog.i |
|
668 | other/.hg/store/00changelog.i | |
669 |
|
669 | |||
670 | Check error from hook during the unbundling process itself |
|
670 | Check error from hook during the unbundling process itself | |
671 |
|
671 | |||
672 | $ cat << EOF >> $HGRCPATH |
|
672 | $ cat << EOF >> $HGRCPATH | |
673 | > pretxnchangegroup = sh -c "echo 'Fail early!'; false" |
|
673 | > pretxnchangegroup = sh -c "echo 'Fail early!'; false" | |
674 | > EOF |
|
674 | > EOF | |
675 | $ killdaemons.py # reload http config |
|
675 | $ killdaemons.py # reload http config | |
676 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
676 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
677 | $ cat other.pid >> $DAEMON_PIDS |
|
677 | $ cat other.pid >> $DAEMON_PIDS | |
678 |
|
678 | |||
679 | $ hg -R main push other -r e7ec4e813ba6 |
|
679 | $ hg -R main push other -r e7ec4e813ba6 | |
680 | pushing to other |
|
680 | pushing to other | |
681 | searching for changes |
|
681 | searching for changes | |
682 | remote: adding changesets |
|
682 | remote: adding changesets | |
683 | remote: adding manifests |
|
683 | remote: adding manifests | |
684 | remote: adding file changes |
|
684 | remote: adding file changes | |
685 | remote: Fail early! |
|
685 | remote: Fail early! | |
686 | remote: transaction abort! |
|
686 | remote: transaction abort! | |
687 | remote: Cleaning up the mess... |
|
687 | remote: Cleaning up the mess... | |
688 | remote: rollback completed |
|
688 | remote: rollback completed | |
689 | abort: pretxnchangegroup hook exited with status 1 |
|
689 | abort: pretxnchangegroup hook exited with status 1 | |
690 | [40] |
|
690 | [40] | |
691 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
691 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
692 | pushing to ssh://user@dummy/other |
|
692 | pushing to ssh://user@dummy/other | |
693 | searching for changes |
|
693 | searching for changes | |
694 | remote: adding changesets |
|
694 | remote: adding changesets | |
695 | remote: adding manifests |
|
695 | remote: adding manifests | |
696 | remote: adding file changes |
|
696 | remote: adding file changes | |
697 | remote: Fail early! |
|
697 | remote: Fail early! | |
698 | remote: transaction abort! |
|
698 | remote: transaction abort! | |
699 | remote: Cleaning up the mess... |
|
699 | remote: Cleaning up the mess... | |
700 | remote: rollback completed |
|
700 | remote: rollback completed | |
701 | remote: pretxnchangegroup hook exited with status 1 |
|
701 | remote: pretxnchangegroup hook exited with status 1 | |
702 | abort: push failed on remote |
|
702 | abort: push failed on remote | |
703 | [100] |
|
703 | [100] | |
704 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
704 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
705 | pushing to http://localhost:$HGPORT2/ |
|
705 | pushing to http://localhost:$HGPORT2/ | |
706 | searching for changes |
|
706 | searching for changes | |
707 | remote: adding changesets |
|
707 | remote: adding changesets | |
708 | remote: adding manifests |
|
708 | remote: adding manifests | |
709 | remote: adding file changes |
|
709 | remote: adding file changes | |
710 | remote: Fail early! |
|
710 | remote: Fail early! | |
711 | remote: transaction abort! |
|
711 | remote: transaction abort! | |
712 | remote: Cleaning up the mess... |
|
712 | remote: Cleaning up the mess... | |
713 | remote: rollback completed |
|
713 | remote: rollback completed | |
714 | remote: pretxnchangegroup hook exited with status 1 |
|
714 | remote: pretxnchangegroup hook exited with status 1 | |
715 | abort: push failed on remote |
|
715 | abort: push failed on remote | |
716 | [100] |
|
716 | [100] | |
717 |
|
717 | |||
718 | Check output capture control. |
|
718 | Check output capture control. | |
719 |
|
719 | |||
720 | (should be still forced for http, disabled for local and ssh) |
|
720 | (should be still forced for http, disabled for local and ssh) | |
721 |
|
721 | |||
722 | $ cat >> $HGRCPATH << EOF |
|
722 | $ cat >> $HGRCPATH << EOF | |
723 | > [experimental] |
|
723 | > [experimental] | |
724 | > bundle2-output-capture=False |
|
724 | > bundle2-output-capture=False | |
725 | > EOF |
|
725 | > EOF | |
726 |
|
726 | |||
727 | $ hg -R main push other -r e7ec4e813ba6 |
|
727 | $ hg -R main push other -r e7ec4e813ba6 | |
728 | pushing to other |
|
728 | pushing to other | |
729 | searching for changes |
|
729 | searching for changes | |
730 | adding changesets |
|
730 | adding changesets | |
731 | adding manifests |
|
731 | adding manifests | |
732 | adding file changes |
|
732 | adding file changes | |
733 | Fail early! |
|
733 | Fail early! | |
734 | transaction abort! |
|
734 | transaction abort! | |
735 | Cleaning up the mess... |
|
735 | Cleaning up the mess... | |
736 | rollback completed |
|
736 | rollback completed | |
737 | abort: pretxnchangegroup hook exited with status 1 |
|
737 | abort: pretxnchangegroup hook exited with status 1 | |
738 | [40] |
|
738 | [40] | |
739 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
739 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
740 | pushing to ssh://user@dummy/other |
|
740 | pushing to ssh://user@dummy/other | |
741 | searching for changes |
|
741 | searching for changes | |
742 | remote: adding changesets |
|
742 | remote: adding changesets | |
743 | remote: adding manifests |
|
743 | remote: adding manifests | |
744 | remote: adding file changes |
|
744 | remote: adding file changes | |
745 | remote: Fail early! |
|
745 | remote: Fail early! | |
746 | remote: transaction abort! |
|
746 | remote: transaction abort! | |
747 | remote: Cleaning up the mess... |
|
747 | remote: Cleaning up the mess... | |
748 | remote: rollback completed |
|
748 | remote: rollback completed | |
749 | remote: pretxnchangegroup hook exited with status 1 |
|
749 | remote: pretxnchangegroup hook exited with status 1 | |
750 | abort: push failed on remote |
|
750 | abort: push failed on remote | |
751 | [100] |
|
751 | [100] | |
752 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
752 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
753 | pushing to http://localhost:$HGPORT2/ |
|
753 | pushing to http://localhost:$HGPORT2/ | |
754 | searching for changes |
|
754 | searching for changes | |
755 | remote: adding changesets |
|
755 | remote: adding changesets | |
756 | remote: adding manifests |
|
756 | remote: adding manifests | |
757 | remote: adding file changes |
|
757 | remote: adding file changes | |
758 | remote: Fail early! |
|
758 | remote: Fail early! | |
759 | remote: transaction abort! |
|
759 | remote: transaction abort! | |
760 | remote: Cleaning up the mess... |
|
760 | remote: Cleaning up the mess... | |
761 | remote: rollback completed |
|
761 | remote: rollback completed | |
762 | remote: pretxnchangegroup hook exited with status 1 |
|
762 | remote: pretxnchangegroup hook exited with status 1 | |
763 | abort: push failed on remote |
|
763 | abort: push failed on remote | |
764 | [100] |
|
764 | [100] | |
765 |
|
765 | |||
766 | Check abort from mandatory pushkey |
|
766 | Check abort from mandatory pushkey | |
767 |
|
767 | |||
768 | $ cat > mandatorypart.py << EOF |
|
768 | $ cat > mandatorypart.py << EOF | |
769 | > from mercurial import exchange |
|
769 | > from mercurial import exchange | |
770 | > from mercurial import pushkey |
|
770 | > from mercurial import pushkey | |
771 | > from mercurial import node |
|
771 | > from mercurial import node | |
772 | > from mercurial import error |
|
772 | > from mercurial import error | |
773 | > @exchange.b2partsgenerator(b'failingpuskey') |
|
773 | > @exchange.b2partsgenerator(b'failingpuskey') | |
774 | > def addfailingpushey(pushop, bundler): |
|
774 | > def addfailingpushey(pushop, bundler): | |
775 | > enc = pushkey.encode |
|
775 | > enc = pushkey.encode | |
776 | > part = bundler.newpart(b'pushkey') |
|
776 | > part = bundler.newpart(b'pushkey') | |
777 | > part.addparam(b'namespace', enc(b'phases')) |
|
777 | > part.addparam(b'namespace', enc(b'phases')) | |
778 | > part.addparam(b'key', enc(b'cd010b8cd998f3981a5a8115f94f8da4ab506089')) |
|
778 | > part.addparam(b'key', enc(b'cd010b8cd998f3981a5a8115f94f8da4ab506089')) | |
779 | > part.addparam(b'old', enc(b'0')) # successful update |
|
779 | > part.addparam(b'old', enc(b'0')) # successful update | |
780 | > part.addparam(b'new', enc(b'0')) |
|
780 | > part.addparam(b'new', enc(b'0')) | |
781 | > def fail(pushop, exc): |
|
781 | > def fail(pushop, exc): | |
782 | > raise error.Abort(b'Correct phase push failed (because hooks)') |
|
782 | > raise error.Abort(b'Correct phase push failed (because hooks)') | |
783 | > pushop.pkfailcb[part.id] = fail |
|
783 | > pushop.pkfailcb[part.id] = fail | |
784 | > EOF |
|
784 | > EOF | |
785 | $ cat >> $HGRCPATH << EOF |
|
785 | $ cat >> $HGRCPATH << EOF | |
786 | > [hooks] |
|
786 | > [hooks] | |
787 | > pretxnchangegroup= |
|
787 | > pretxnchangegroup= | |
788 | > pretxnclose.failpush= |
|
788 | > pretxnclose.failpush= | |
789 | > prepushkey.failpush = sh -c "echo 'do not push the key !'; false" |
|
789 | > prepushkey.failpush = sh -c "echo 'do not push the key !'; false" | |
790 | > [extensions] |
|
790 | > [extensions] | |
791 | > mandatorypart=$TESTTMP/mandatorypart.py |
|
791 | > mandatorypart=$TESTTMP/mandatorypart.py | |
792 | > EOF |
|
792 | > EOF | |
793 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config |
|
793 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config | |
794 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
794 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
795 | $ cat other.pid >> $DAEMON_PIDS |
|
795 | $ cat other.pid >> $DAEMON_PIDS | |
796 |
|
796 | |||
797 | (Failure from a hook) |
|
797 | (Failure from a hook) | |
798 |
|
798 | |||
799 | $ hg -R main push other -r e7ec4e813ba6 |
|
799 | $ hg -R main push other -r e7ec4e813ba6 | |
800 | pushing to other |
|
800 | pushing to other | |
801 | searching for changes |
|
801 | searching for changes | |
802 | adding changesets |
|
802 | adding changesets | |
803 | adding manifests |
|
803 | adding manifests | |
804 | adding file changes |
|
804 | adding file changes | |
805 | do not push the key ! |
|
805 | do not push the key ! | |
806 | pushkey-abort: prepushkey.failpush hook exited with status 1 |
|
806 | pushkey-abort: prepushkey.failpush hook exited with status 1 | |
807 | transaction abort! |
|
807 | transaction abort! | |
808 | Cleaning up the mess... |
|
808 | Cleaning up the mess... | |
809 | rollback completed |
|
809 | rollback completed | |
810 | abort: Correct phase push failed (because hooks) |
|
810 | abort: Correct phase push failed (because hooks) | |
811 | [255] |
|
811 | [255] | |
812 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
812 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
813 | pushing to ssh://user@dummy/other |
|
813 | pushing to ssh://user@dummy/other | |
814 | searching for changes |
|
814 | searching for changes | |
815 | remote: adding changesets |
|
815 | remote: adding changesets | |
816 | remote: adding manifests |
|
816 | remote: adding manifests | |
817 | remote: adding file changes |
|
817 | remote: adding file changes | |
818 | remote: do not push the key ! |
|
818 | remote: do not push the key ! | |
819 | remote: pushkey-abort: prepushkey.failpush hook exited with status 1 |
|
819 | remote: pushkey-abort: prepushkey.failpush hook exited with status 1 | |
820 | remote: transaction abort! |
|
820 | remote: transaction abort! | |
821 | remote: Cleaning up the mess... |
|
821 | remote: Cleaning up the mess... | |
822 | remote: rollback completed |
|
822 | remote: rollback completed | |
823 | abort: Correct phase push failed (because hooks) |
|
823 | abort: Correct phase push failed (because hooks) | |
824 | [255] |
|
824 | [255] | |
825 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
825 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
826 | pushing to http://localhost:$HGPORT2/ |
|
826 | pushing to http://localhost:$HGPORT2/ | |
827 | searching for changes |
|
827 | searching for changes | |
828 | remote: adding changesets |
|
828 | remote: adding changesets | |
829 | remote: adding manifests |
|
829 | remote: adding manifests | |
830 | remote: adding file changes |
|
830 | remote: adding file changes | |
831 | remote: do not push the key ! |
|
831 | remote: do not push the key ! | |
832 | remote: pushkey-abort: prepushkey.failpush hook exited with status 1 |
|
832 | remote: pushkey-abort: prepushkey.failpush hook exited with status 1 | |
833 | remote: transaction abort! |
|
833 | remote: transaction abort! | |
834 | remote: Cleaning up the mess... |
|
834 | remote: Cleaning up the mess... | |
835 | remote: rollback completed |
|
835 | remote: rollback completed | |
836 | abort: Correct phase push failed (because hooks) |
|
836 | abort: Correct phase push failed (because hooks) | |
837 | [255] |
|
837 | [255] | |
838 |
|
838 | |||
839 | (Failure from a the pushkey) |
|
839 | (Failure from a the pushkey) | |
840 |
|
840 | |||
841 | $ cat > mandatorypart.py << EOF |
|
841 | $ cat > mandatorypart.py << EOF | |
842 | > from mercurial import exchange |
|
842 | > from mercurial import exchange | |
843 | > from mercurial import pushkey |
|
843 | > from mercurial import pushkey | |
844 | > from mercurial import node |
|
844 | > from mercurial import node | |
845 | > from mercurial import error |
|
845 | > from mercurial import error | |
846 | > @exchange.b2partsgenerator(b'failingpuskey') |
|
846 | > @exchange.b2partsgenerator(b'failingpuskey') | |
847 | > def addfailingpushey(pushop, bundler): |
|
847 | > def addfailingpushey(pushop, bundler): | |
848 | > enc = pushkey.encode |
|
848 | > enc = pushkey.encode | |
849 | > part = bundler.newpart(b'pushkey') |
|
849 | > part = bundler.newpart(b'pushkey') | |
850 | > part.addparam(b'namespace', enc(b'phases')) |
|
850 | > part.addparam(b'namespace', enc(b'phases')) | |
851 | > part.addparam(b'key', enc(b'cd010b8cd998f3981a5a8115f94f8da4ab506089')) |
|
851 | > part.addparam(b'key', enc(b'cd010b8cd998f3981a5a8115f94f8da4ab506089')) | |
852 | > part.addparam(b'old', enc(b'4')) # will fail |
|
852 | > part.addparam(b'old', enc(b'4')) # will fail | |
853 | > part.addparam(b'new', enc(b'3')) |
|
853 | > part.addparam(b'new', enc(b'3')) | |
854 | > def fail(pushop, exc): |
|
854 | > def fail(pushop, exc): | |
855 | > raise error.Abort(b'Clown phase push failed') |
|
855 | > raise error.Abort(b'Clown phase push failed') | |
856 | > pushop.pkfailcb[part.id] = fail |
|
856 | > pushop.pkfailcb[part.id] = fail | |
857 | > EOF |
|
857 | > EOF | |
858 | $ cat >> $HGRCPATH << EOF |
|
858 | $ cat >> $HGRCPATH << EOF | |
859 | > [hooks] |
|
859 | > [hooks] | |
860 | > prepushkey.failpush = |
|
860 | > prepushkey.failpush = | |
861 | > EOF |
|
861 | > EOF | |
862 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config |
|
862 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config | |
863 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log |
|
863 | $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log | |
864 | $ cat other.pid >> $DAEMON_PIDS |
|
864 | $ cat other.pid >> $DAEMON_PIDS | |
865 |
|
865 | |||
866 | $ hg -R main push other -r e7ec4e813ba6 |
|
866 | $ hg -R main push other -r e7ec4e813ba6 | |
867 | pushing to other |
|
867 | pushing to other | |
868 | searching for changes |
|
868 | searching for changes | |
869 | adding changesets |
|
869 | adding changesets | |
870 | adding manifests |
|
870 | adding manifests | |
871 | adding file changes |
|
871 | adding file changes | |
872 | transaction abort! |
|
872 | transaction abort! | |
873 | Cleaning up the mess... |
|
873 | Cleaning up the mess... | |
874 | rollback completed |
|
874 | rollback completed | |
875 | pushkey: lock state after "phases" |
|
875 | pushkey: lock state after "phases" | |
876 | lock: free |
|
876 | lock: free | |
877 | wlock: free |
|
877 | wlock: free | |
878 | abort: Clown phase push failed |
|
878 | abort: Clown phase push failed | |
879 | [255] |
|
879 | [255] | |
880 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 |
|
880 | $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 | |
881 | pushing to ssh://user@dummy/other |
|
881 | pushing to ssh://user@dummy/other | |
882 | searching for changes |
|
882 | searching for changes | |
883 | remote: adding changesets |
|
883 | remote: adding changesets | |
884 | remote: adding manifests |
|
884 | remote: adding manifests | |
885 | remote: adding file changes |
|
885 | remote: adding file changes | |
886 | remote: transaction abort! |
|
886 | remote: transaction abort! | |
887 | remote: Cleaning up the mess... |
|
887 | remote: Cleaning up the mess... | |
888 | remote: rollback completed |
|
888 | remote: rollback completed | |
889 | remote: pushkey: lock state after "phases" |
|
889 | remote: pushkey: lock state after "phases" | |
890 | remote: lock: free |
|
890 | remote: lock: free | |
891 | remote: wlock: free |
|
891 | remote: wlock: free | |
892 | abort: Clown phase push failed |
|
892 | abort: Clown phase push failed | |
893 | [255] |
|
893 | [255] | |
894 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 |
|
894 | $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 | |
895 | pushing to http://localhost:$HGPORT2/ |
|
895 | pushing to http://localhost:$HGPORT2/ | |
896 | searching for changes |
|
896 | searching for changes | |
897 | remote: adding changesets |
|
897 | remote: adding changesets | |
898 | remote: adding manifests |
|
898 | remote: adding manifests | |
899 | remote: adding file changes |
|
899 | remote: adding file changes | |
900 | remote: transaction abort! |
|
900 | remote: transaction abort! | |
901 | remote: Cleaning up the mess... |
|
901 | remote: Cleaning up the mess... | |
902 | remote: rollback completed |
|
902 | remote: rollback completed | |
903 | remote: pushkey: lock state after "phases" |
|
903 | remote: pushkey: lock state after "phases" | |
904 | remote: lock: free |
|
904 | remote: lock: free | |
905 | remote: wlock: free |
|
905 | remote: wlock: free | |
906 | abort: Clown phase push failed |
|
906 | abort: Clown phase push failed | |
907 | [255] |
|
907 | [255] | |
908 |
|
908 | |||
909 | Test lazily acquiring the lock during unbundle |
|
909 | Test lazily acquiring the lock during unbundle | |
910 | $ cp $TESTTMP/hgrc.orig $HGRCPATH |
|
910 | $ cp $TESTTMP/hgrc.orig $HGRCPATH | |
911 |
|
911 | |||
912 | $ cat >> $TESTTMP/locktester.py <<EOF |
|
912 | $ cat >> $TESTTMP/locktester.py <<EOF | |
913 | > import os |
|
913 | > import os | |
914 | > from mercurial import bundle2, error, extensions |
|
914 | > from mercurial import bundle2, error, extensions | |
915 | > def checklock(orig, repo, *args, **kwargs): |
|
915 | > def checklock(orig, repo, *args, **kwargs): | |
916 | > if repo.svfs.lexists(b"lock"): |
|
916 | > if repo.svfs.lexists(b"lock"): | |
917 | > raise error.Abort(b"Lock should not be taken") |
|
917 | > raise error.Abort(b"Lock should not be taken") | |
918 | > return orig(repo, *args, **kwargs) |
|
918 | > return orig(repo, *args, **kwargs) | |
919 | > def extsetup(ui): |
|
919 | > def extsetup(ui): | |
920 |
> extensions.wrapfunction(bundle2, |
|
920 | > extensions.wrapfunction(bundle2, 'processbundle', checklock) | |
921 |
|
|
921 | > EOF | |
922 |
|
922 | |||
923 | $ hg init lazylock |
|
923 | $ hg init lazylock | |
924 | $ cat >> lazylock/.hg/hgrc <<EOF |
|
924 | $ cat >> lazylock/.hg/hgrc <<EOF | |
925 | > [extensions] |
|
925 | > [extensions] | |
926 | > locktester=$TESTTMP/locktester.py |
|
926 | > locktester=$TESTTMP/locktester.py | |
927 | > EOF |
|
927 | > EOF | |
928 |
|
928 | |||
929 | $ hg clone -q ssh://user@dummy/lazylock lazylockclient |
|
929 | $ hg clone -q ssh://user@dummy/lazylock lazylockclient | |
930 | $ cd lazylockclient |
|
930 | $ cd lazylockclient | |
931 | $ touch a && hg ci -Aqm a |
|
931 | $ touch a && hg ci -Aqm a | |
932 | $ hg push |
|
932 | $ hg push | |
933 | pushing to ssh://user@dummy/lazylock |
|
933 | pushing to ssh://user@dummy/lazylock | |
934 | searching for changes |
|
934 | searching for changes | |
935 | remote: Lock should not be taken |
|
935 | remote: Lock should not be taken | |
936 | abort: push failed on remote |
|
936 | abort: push failed on remote | |
937 | [100] |
|
937 | [100] | |
938 |
|
938 | |||
939 | $ cat >> ../lazylock/.hg/hgrc <<EOF |
|
939 | $ cat >> ../lazylock/.hg/hgrc <<EOF | |
940 | > [experimental] |
|
940 | > [experimental] | |
941 | > bundle2lazylocking=True |
|
941 | > bundle2lazylocking=True | |
942 | > EOF |
|
942 | > EOF | |
943 | $ hg push |
|
943 | $ hg push | |
944 | pushing to ssh://user@dummy/lazylock |
|
944 | pushing to ssh://user@dummy/lazylock | |
945 | searching for changes |
|
945 | searching for changes | |
946 | remote: adding changesets |
|
946 | remote: adding changesets | |
947 | remote: adding manifests |
|
947 | remote: adding manifests | |
948 | remote: adding file changes |
|
948 | remote: adding file changes | |
949 | remote: added 1 changesets with 1 changes to 1 files |
|
949 | remote: added 1 changesets with 1 changes to 1 files | |
950 |
|
950 | |||
951 | $ cd .. |
|
951 | $ cd .. | |
952 |
|
952 | |||
953 | Servers can disable bundle1 for clone/pull operations |
|
953 | Servers can disable bundle1 for clone/pull operations | |
954 |
|
954 | |||
955 | $ killdaemons.py |
|
955 | $ killdaemons.py | |
956 | $ hg init bundle2onlyserver |
|
956 | $ hg init bundle2onlyserver | |
957 | $ cd bundle2onlyserver |
|
957 | $ cd bundle2onlyserver | |
958 | $ cat > .hg/hgrc << EOF |
|
958 | $ cat > .hg/hgrc << EOF | |
959 | > [server] |
|
959 | > [server] | |
960 | > bundle1.pull = false |
|
960 | > bundle1.pull = false | |
961 | > EOF |
|
961 | > EOF | |
962 |
|
962 | |||
963 | $ touch foo |
|
963 | $ touch foo | |
964 | $ hg -q commit -A -m initial |
|
964 | $ hg -q commit -A -m initial | |
965 |
|
965 | |||
966 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
966 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
967 | $ cat hg.pid >> $DAEMON_PIDS |
|
967 | $ cat hg.pid >> $DAEMON_PIDS | |
968 |
|
968 | |||
969 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2 |
|
969 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2 | |
970 | requesting all changes |
|
970 | requesting all changes | |
971 | abort: remote error: |
|
971 | abort: remote error: | |
972 | incompatible Mercurial client; bundle2 required |
|
972 | incompatible Mercurial client; bundle2 required | |
973 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
973 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
974 | [100] |
|
974 | [100] | |
975 | $ killdaemons.py |
|
975 | $ killdaemons.py | |
976 | $ cd .. |
|
976 | $ cd .. | |
977 |
|
977 | |||
978 | bundle1 can still pull non-generaldelta repos when generaldelta bundle1 disabled |
|
978 | bundle1 can still pull non-generaldelta repos when generaldelta bundle1 disabled | |
979 |
|
979 | |||
980 | $ hg --config format.usegeneraldelta=false init notgdserver |
|
980 | $ hg --config format.usegeneraldelta=false init notgdserver | |
981 | $ cd notgdserver |
|
981 | $ cd notgdserver | |
982 | $ cat > .hg/hgrc << EOF |
|
982 | $ cat > .hg/hgrc << EOF | |
983 | > [server] |
|
983 | > [server] | |
984 | > bundle1gd.pull = false |
|
984 | > bundle1gd.pull = false | |
985 | > EOF |
|
985 | > EOF | |
986 |
|
986 | |||
987 | $ touch foo |
|
987 | $ touch foo | |
988 | $ hg -q commit -A -m initial |
|
988 | $ hg -q commit -A -m initial | |
989 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
989 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
990 | $ cat hg.pid >> $DAEMON_PIDS |
|
990 | $ cat hg.pid >> $DAEMON_PIDS | |
991 |
|
991 | |||
992 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-1 |
|
992 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-1 | |
993 | requesting all changes |
|
993 | requesting all changes | |
994 | adding changesets |
|
994 | adding changesets | |
995 | adding manifests |
|
995 | adding manifests | |
996 | adding file changes |
|
996 | adding file changes | |
997 | added 1 changesets with 1 changes to 1 files |
|
997 | added 1 changesets with 1 changes to 1 files | |
998 | new changesets 96ee1d7354c4 |
|
998 | new changesets 96ee1d7354c4 | |
999 | updating to branch default |
|
999 | updating to branch default | |
1000 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1000 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1001 |
|
1001 | |||
1002 | $ killdaemons.py |
|
1002 | $ killdaemons.py | |
1003 | $ cd ../bundle2onlyserver |
|
1003 | $ cd ../bundle2onlyserver | |
1004 |
|
1004 | |||
1005 | bundle1 pull can be disabled for generaldelta repos only |
|
1005 | bundle1 pull can be disabled for generaldelta repos only | |
1006 |
|
1006 | |||
1007 | $ cat > .hg/hgrc << EOF |
|
1007 | $ cat > .hg/hgrc << EOF | |
1008 | > [server] |
|
1008 | > [server] | |
1009 | > bundle1gd.pull = false |
|
1009 | > bundle1gd.pull = false | |
1010 | > EOF |
|
1010 | > EOF | |
1011 |
|
1011 | |||
1012 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
1012 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
1013 | $ cat hg.pid >> $DAEMON_PIDS |
|
1013 | $ cat hg.pid >> $DAEMON_PIDS | |
1014 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2 |
|
1014 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2 | |
1015 | requesting all changes |
|
1015 | requesting all changes | |
1016 | abort: remote error: |
|
1016 | abort: remote error: | |
1017 | incompatible Mercurial client; bundle2 required |
|
1017 | incompatible Mercurial client; bundle2 required | |
1018 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
1018 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
1019 | [100] |
|
1019 | [100] | |
1020 |
|
1020 | |||
1021 | $ killdaemons.py |
|
1021 | $ killdaemons.py | |
1022 |
|
1022 | |||
1023 | Verify the global server.bundle1 option works |
|
1023 | Verify the global server.bundle1 option works | |
1024 |
|
1024 | |||
1025 | $ cd .. |
|
1025 | $ cd .. | |
1026 | $ cat > bundle2onlyserver/.hg/hgrc << EOF |
|
1026 | $ cat > bundle2onlyserver/.hg/hgrc << EOF | |
1027 | > [server] |
|
1027 | > [server] | |
1028 | > bundle1 = false |
|
1028 | > bundle1 = false | |
1029 | > EOF |
|
1029 | > EOF | |
1030 | $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid |
|
1030 | $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid | |
1031 | $ cat hg.pid >> $DAEMON_PIDS |
|
1031 | $ cat hg.pid >> $DAEMON_PIDS | |
1032 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT not-bundle2 |
|
1032 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT not-bundle2 | |
1033 | requesting all changes |
|
1033 | requesting all changes | |
1034 | abort: remote error: |
|
1034 | abort: remote error: | |
1035 | incompatible Mercurial client; bundle2 required |
|
1035 | incompatible Mercurial client; bundle2 required | |
1036 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
1036 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
1037 | [100] |
|
1037 | [100] | |
1038 | $ killdaemons.py |
|
1038 | $ killdaemons.py | |
1039 |
|
1039 | |||
1040 | $ hg --config devel.legacy.exchange=bundle1 clone ssh://user@dummy/bundle2onlyserver not-bundle2-ssh |
|
1040 | $ hg --config devel.legacy.exchange=bundle1 clone ssh://user@dummy/bundle2onlyserver not-bundle2-ssh | |
1041 | requesting all changes |
|
1041 | requesting all changes | |
1042 | adding changesets |
|
1042 | adding changesets | |
1043 | remote: abort: incompatible Mercurial client; bundle2 required |
|
1043 | remote: abort: incompatible Mercurial client; bundle2 required | |
1044 | remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
1044 | remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
1045 | transaction abort! |
|
1045 | transaction abort! | |
1046 | rollback completed |
|
1046 | rollback completed | |
1047 | abort: stream ended unexpectedly (got 0 bytes, expected 4) |
|
1047 | abort: stream ended unexpectedly (got 0 bytes, expected 4) | |
1048 | [255] |
|
1048 | [255] | |
1049 |
|
1049 | |||
1050 | $ cat > bundle2onlyserver/.hg/hgrc << EOF |
|
1050 | $ cat > bundle2onlyserver/.hg/hgrc << EOF | |
1051 | > [server] |
|
1051 | > [server] | |
1052 | > bundle1gd = false |
|
1052 | > bundle1gd = false | |
1053 | > EOF |
|
1053 | > EOF | |
1054 | $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid |
|
1054 | $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid | |
1055 | $ cat hg.pid >> $DAEMON_PIDS |
|
1055 | $ cat hg.pid >> $DAEMON_PIDS | |
1056 |
|
1056 | |||
1057 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2 |
|
1057 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2 | |
1058 | requesting all changes |
|
1058 | requesting all changes | |
1059 | abort: remote error: |
|
1059 | abort: remote error: | |
1060 | incompatible Mercurial client; bundle2 required |
|
1060 | incompatible Mercurial client; bundle2 required | |
1061 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
1061 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
1062 | [100] |
|
1062 | [100] | |
1063 |
|
1063 | |||
1064 | $ killdaemons.py |
|
1064 | $ killdaemons.py | |
1065 |
|
1065 | |||
1066 | $ cd notgdserver |
|
1066 | $ cd notgdserver | |
1067 | $ cat > .hg/hgrc << EOF |
|
1067 | $ cat > .hg/hgrc << EOF | |
1068 | > [server] |
|
1068 | > [server] | |
1069 | > bundle1gd = false |
|
1069 | > bundle1gd = false | |
1070 | > EOF |
|
1070 | > EOF | |
1071 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
1071 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
1072 | $ cat hg.pid >> $DAEMON_PIDS |
|
1072 | $ cat hg.pid >> $DAEMON_PIDS | |
1073 |
|
1073 | |||
1074 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-2 |
|
1074 | $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-2 | |
1075 | requesting all changes |
|
1075 | requesting all changes | |
1076 | adding changesets |
|
1076 | adding changesets | |
1077 | adding manifests |
|
1077 | adding manifests | |
1078 | adding file changes |
|
1078 | adding file changes | |
1079 | added 1 changesets with 1 changes to 1 files |
|
1079 | added 1 changesets with 1 changes to 1 files | |
1080 | new changesets 96ee1d7354c4 |
|
1080 | new changesets 96ee1d7354c4 | |
1081 | updating to branch default |
|
1081 | updating to branch default | |
1082 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1082 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1083 |
|
1083 | |||
1084 | $ killdaemons.py |
|
1084 | $ killdaemons.py | |
1085 | $ cd ../bundle2onlyserver |
|
1085 | $ cd ../bundle2onlyserver | |
1086 |
|
1086 | |||
1087 | Verify bundle1 pushes can be disabled |
|
1087 | Verify bundle1 pushes can be disabled | |
1088 |
|
1088 | |||
1089 | $ cat > .hg/hgrc << EOF |
|
1089 | $ cat > .hg/hgrc << EOF | |
1090 | > [server] |
|
1090 | > [server] | |
1091 | > bundle1.push = false |
|
1091 | > bundle1.push = false | |
1092 | > [web] |
|
1092 | > [web] | |
1093 | > allow_push = * |
|
1093 | > allow_push = * | |
1094 | > push_ssl = false |
|
1094 | > push_ssl = false | |
1095 | > EOF |
|
1095 | > EOF | |
1096 |
|
1096 | |||
1097 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
1097 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -E error.log | |
1098 | $ cat hg.pid >> $DAEMON_PIDS |
|
1098 | $ cat hg.pid >> $DAEMON_PIDS | |
1099 | $ cd .. |
|
1099 | $ cd .. | |
1100 |
|
1100 | |||
1101 | $ hg clone http://localhost:$HGPORT bundle2-only |
|
1101 | $ hg clone http://localhost:$HGPORT bundle2-only | |
1102 | requesting all changes |
|
1102 | requesting all changes | |
1103 | adding changesets |
|
1103 | adding changesets | |
1104 | adding manifests |
|
1104 | adding manifests | |
1105 | adding file changes |
|
1105 | adding file changes | |
1106 | added 1 changesets with 1 changes to 1 files |
|
1106 | added 1 changesets with 1 changes to 1 files | |
1107 | new changesets 96ee1d7354c4 |
|
1107 | new changesets 96ee1d7354c4 | |
1108 | updating to branch default |
|
1108 | updating to branch default | |
1109 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1109 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1110 | $ cd bundle2-only |
|
1110 | $ cd bundle2-only | |
1111 | $ echo commit > foo |
|
1111 | $ echo commit > foo | |
1112 | $ hg commit -m commit |
|
1112 | $ hg commit -m commit | |
1113 | $ hg --config devel.legacy.exchange=bundle1 push |
|
1113 | $ hg --config devel.legacy.exchange=bundle1 push | |
1114 | pushing to http://localhost:$HGPORT/ |
|
1114 | pushing to http://localhost:$HGPORT/ | |
1115 | searching for changes |
|
1115 | searching for changes | |
1116 | abort: remote error: |
|
1116 | abort: remote error: | |
1117 | incompatible Mercurial client; bundle2 required |
|
1117 | incompatible Mercurial client; bundle2 required | |
1118 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
1118 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
1119 | [100] |
|
1119 | [100] | |
1120 |
|
1120 | |||
1121 | (also check with ssh) |
|
1121 | (also check with ssh) | |
1122 |
|
1122 | |||
1123 | $ hg --config devel.legacy.exchange=bundle1 push ssh://user@dummy/bundle2onlyserver |
|
1123 | $ hg --config devel.legacy.exchange=bundle1 push ssh://user@dummy/bundle2onlyserver | |
1124 | pushing to ssh://user@dummy/bundle2onlyserver |
|
1124 | pushing to ssh://user@dummy/bundle2onlyserver | |
1125 | searching for changes |
|
1125 | searching for changes | |
1126 | remote: abort: incompatible Mercurial client; bundle2 required |
|
1126 | remote: abort: incompatible Mercurial client; bundle2 required | |
1127 | remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
1127 | remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
1128 | [1] |
|
1128 | [1] | |
1129 |
|
1129 | |||
1130 | $ hg push |
|
1130 | $ hg push | |
1131 | pushing to http://localhost:$HGPORT/ |
|
1131 | pushing to http://localhost:$HGPORT/ | |
1132 | searching for changes |
|
1132 | searching for changes | |
1133 | remote: adding changesets |
|
1133 | remote: adding changesets | |
1134 | remote: adding manifests |
|
1134 | remote: adding manifests | |
1135 | remote: adding file changes |
|
1135 | remote: adding file changes | |
1136 | remote: added 1 changesets with 1 changes to 1 files |
|
1136 | remote: added 1 changesets with 1 changes to 1 files |
@@ -1,1175 +1,1175 b'' | |||||
1 | #require no-rhg no-chg |
|
1 | #require no-rhg no-chg | |
2 |
|
2 | |||
3 | XXX-RHG this test hangs if `hg` is really `rhg`. This was hidden by the use of |
|
3 | XXX-RHG this test hangs if `hg` is really `rhg`. This was hidden by the use of | |
4 | `alias hg=rhg` by run-tests.py. With such alias removed, this test is revealed |
|
4 | `alias hg=rhg` by run-tests.py. With such alias removed, this test is revealed | |
5 | buggy. This need to be resolved sooner than later. |
|
5 | buggy. This need to be resolved sooner than later. | |
6 |
|
6 | |||
7 | XXX-CHG this test hangs if `hg` is really `chg`. This was hidden by the use of |
|
7 | XXX-CHG this test hangs if `hg` is really `chg`. This was hidden by the use of | |
8 | `alias hg=chg` by run-tests.py. With such alias removed, this test is revealed |
|
8 | `alias hg=chg` by run-tests.py. With such alias removed, this test is revealed | |
9 | buggy. This need to be resolved sooner than later. |
|
9 | buggy. This need to be resolved sooner than later. | |
10 |
|
10 | |||
11 | #if windows |
|
11 | #if windows | |
12 | $ PYTHONPATH="$TESTDIR/../contrib;$PYTHONPATH" |
|
12 | $ PYTHONPATH="$TESTDIR/../contrib;$PYTHONPATH" | |
13 | #else |
|
13 | #else | |
14 | $ PYTHONPATH="$TESTDIR/../contrib:$PYTHONPATH" |
|
14 | $ PYTHONPATH="$TESTDIR/../contrib:$PYTHONPATH" | |
15 | #endif |
|
15 | #endif | |
16 | $ export PYTHONPATH |
|
16 | $ export PYTHONPATH | |
17 |
|
17 | |||
18 | typical client does not want echo-back messages, so test without it: |
|
18 | typical client does not want echo-back messages, so test without it: | |
19 |
|
19 | |||
20 | $ grep -v '^promptecho ' < $HGRCPATH >> $HGRCPATH.new |
|
20 | $ grep -v '^promptecho ' < $HGRCPATH >> $HGRCPATH.new | |
21 | $ mv $HGRCPATH.new $HGRCPATH |
|
21 | $ mv $HGRCPATH.new $HGRCPATH | |
22 |
|
22 | |||
23 | $ hg init repo |
|
23 | $ hg init repo | |
24 | $ cd repo |
|
24 | $ cd repo | |
25 |
|
25 | |||
26 | >>> import os |
|
26 | >>> import os | |
27 | >>> import sys |
|
27 | >>> import sys | |
28 | >>> from hgclient import bprint, check, readchannel, runcommand |
|
28 | >>> from hgclient import bprint, check, readchannel, runcommand | |
29 | >>> @check |
|
29 | >>> @check | |
30 | ... def hellomessage(server): |
|
30 | ... def hellomessage(server): | |
31 | ... ch, data = readchannel(server) |
|
31 | ... ch, data = readchannel(server) | |
32 | ... bprint(b'%c, %r' % (ch, data)) |
|
32 | ... bprint(b'%c, %r' % (ch, data)) | |
33 | ... # run an arbitrary command to make sure the next thing the server |
|
33 | ... # run an arbitrary command to make sure the next thing the server | |
34 | ... # sends isn't part of the hello message |
|
34 | ... # sends isn't part of the hello message | |
35 | ... runcommand(server, [b'id']) |
|
35 | ... runcommand(server, [b'id']) | |
36 | o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob) |
|
36 | o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob) | |
37 | *** runcommand id |
|
37 | *** runcommand id | |
38 | 000000000000 tip |
|
38 | 000000000000 tip | |
39 |
|
39 | |||
40 | >>> from hgclient import check |
|
40 | >>> from hgclient import check | |
41 | >>> @check |
|
41 | >>> @check | |
42 | ... def unknowncommand(server): |
|
42 | ... def unknowncommand(server): | |
43 | ... server.stdin.write(b'unknowncommand\n') |
|
43 | ... server.stdin.write(b'unknowncommand\n') | |
44 | abort: unknown command unknowncommand |
|
44 | abort: unknown command unknowncommand | |
45 |
|
45 | |||
46 | >>> from hgclient import check, readchannel, runcommand |
|
46 | >>> from hgclient import check, readchannel, runcommand | |
47 | >>> @check |
|
47 | >>> @check | |
48 | ... def checkruncommand(server): |
|
48 | ... def checkruncommand(server): | |
49 | ... # hello block |
|
49 | ... # hello block | |
50 | ... readchannel(server) |
|
50 | ... readchannel(server) | |
51 | ... |
|
51 | ... | |
52 | ... # no args |
|
52 | ... # no args | |
53 | ... runcommand(server, []) |
|
53 | ... runcommand(server, []) | |
54 | ... |
|
54 | ... | |
55 | ... # global options |
|
55 | ... # global options | |
56 | ... runcommand(server, [b'id', b'--quiet']) |
|
56 | ... runcommand(server, [b'id', b'--quiet']) | |
57 | ... |
|
57 | ... | |
58 | ... # make sure global options don't stick through requests |
|
58 | ... # make sure global options don't stick through requests | |
59 | ... runcommand(server, [b'id']) |
|
59 | ... runcommand(server, [b'id']) | |
60 | ... |
|
60 | ... | |
61 | ... # --config |
|
61 | ... # --config | |
62 | ... runcommand(server, [b'id', b'--config', b'ui.quiet=True']) |
|
62 | ... runcommand(server, [b'id', b'--config', b'ui.quiet=True']) | |
63 | ... |
|
63 | ... | |
64 | ... # make sure --config doesn't stick |
|
64 | ... # make sure --config doesn't stick | |
65 | ... runcommand(server, [b'id']) |
|
65 | ... runcommand(server, [b'id']) | |
66 | ... |
|
66 | ... | |
67 | ... # negative return code should be masked |
|
67 | ... # negative return code should be masked | |
68 | ... runcommand(server, [b'id', b'-runknown']) |
|
68 | ... runcommand(server, [b'id', b'-runknown']) | |
69 | *** runcommand |
|
69 | *** runcommand | |
70 | Mercurial Distributed SCM |
|
70 | Mercurial Distributed SCM | |
71 |
|
71 | |||
72 | basic commands: |
|
72 | basic commands: | |
73 |
|
73 | |||
74 | add add the specified files on the next commit |
|
74 | add add the specified files on the next commit | |
75 | annotate show changeset information by line for each file |
|
75 | annotate show changeset information by line for each file | |
76 | clone make a copy of an existing repository |
|
76 | clone make a copy of an existing repository | |
77 | commit commit the specified files or all outstanding changes |
|
77 | commit commit the specified files or all outstanding changes | |
78 | diff diff repository (or selected files) |
|
78 | diff diff repository (or selected files) | |
79 | export dump the header and diffs for one or more changesets |
|
79 | export dump the header and diffs for one or more changesets | |
80 | forget forget the specified files on the next commit |
|
80 | forget forget the specified files on the next commit | |
81 | init create a new repository in the given directory |
|
81 | init create a new repository in the given directory | |
82 | log show revision history of entire repository or files |
|
82 | log show revision history of entire repository or files | |
83 | merge merge another revision into working directory |
|
83 | merge merge another revision into working directory | |
84 | pull pull changes from the specified source |
|
84 | pull pull changes from the specified source | |
85 | push push changes to the specified destination |
|
85 | push push changes to the specified destination | |
86 | remove remove the specified files on the next commit |
|
86 | remove remove the specified files on the next commit | |
87 | serve start stand-alone webserver |
|
87 | serve start stand-alone webserver | |
88 | status show changed files in the working directory |
|
88 | status show changed files in the working directory | |
89 | summary summarize working directory state |
|
89 | summary summarize working directory state | |
90 | update update working directory (or switch revisions) |
|
90 | update update working directory (or switch revisions) | |
91 |
|
91 | |||
92 | (use 'hg help' for the full list of commands or 'hg -v' for details) |
|
92 | (use 'hg help' for the full list of commands or 'hg -v' for details) | |
93 | *** runcommand id --quiet |
|
93 | *** runcommand id --quiet | |
94 | 000000000000 |
|
94 | 000000000000 | |
95 | *** runcommand id |
|
95 | *** runcommand id | |
96 | 000000000000 tip |
|
96 | 000000000000 tip | |
97 | *** runcommand id --config ui.quiet=True |
|
97 | *** runcommand id --config ui.quiet=True | |
98 | 000000000000 |
|
98 | 000000000000 | |
99 | *** runcommand id |
|
99 | *** runcommand id | |
100 | 000000000000 tip |
|
100 | 000000000000 tip | |
101 | *** runcommand id -runknown |
|
101 | *** runcommand id -runknown | |
102 | abort: unknown revision 'unknown' |
|
102 | abort: unknown revision 'unknown' | |
103 | [10] |
|
103 | [10] | |
104 |
|
104 | |||
105 | >>> from hgclient import bprint, check, readchannel |
|
105 | >>> from hgclient import bprint, check, readchannel | |
106 | >>> @check |
|
106 | >>> @check | |
107 | ... def inputeof(server): |
|
107 | ... def inputeof(server): | |
108 | ... readchannel(server) |
|
108 | ... readchannel(server) | |
109 | ... server.stdin.write(b'runcommand\n') |
|
109 | ... server.stdin.write(b'runcommand\n') | |
110 | ... # close stdin while server is waiting for input |
|
110 | ... # close stdin while server is waiting for input | |
111 | ... server.stdin.close() |
|
111 | ... server.stdin.close() | |
112 | ... |
|
112 | ... | |
113 | ... # server exits with 1 if the pipe closed while reading the command |
|
113 | ... # server exits with 1 if the pipe closed while reading the command | |
114 | ... bprint(b'server exit code =', b'%d' % server.wait()) |
|
114 | ... bprint(b'server exit code =', b'%d' % server.wait()) | |
115 | server exit code = 1 |
|
115 | server exit code = 1 | |
116 |
|
116 | |||
117 | >>> from hgclient import check, readchannel, runcommand, stringio |
|
117 | >>> from hgclient import check, readchannel, runcommand, stringio | |
118 | >>> @check |
|
118 | >>> @check | |
119 | ... def serverinput(server): |
|
119 | ... def serverinput(server): | |
120 | ... readchannel(server) |
|
120 | ... readchannel(server) | |
121 | ... |
|
121 | ... | |
122 | ... patch = b""" |
|
122 | ... patch = b""" | |
123 | ... # HG changeset patch |
|
123 | ... # HG changeset patch | |
124 | ... # User test |
|
124 | ... # User test | |
125 | ... # Date 0 0 |
|
125 | ... # Date 0 0 | |
126 | ... # Node ID c103a3dec114d882c98382d684d8af798d09d857 |
|
126 | ... # Node ID c103a3dec114d882c98382d684d8af798d09d857 | |
127 | ... # Parent 0000000000000000000000000000000000000000 |
|
127 | ... # Parent 0000000000000000000000000000000000000000 | |
128 | ... 1 |
|
128 | ... 1 | |
129 | ... |
|
129 | ... | |
130 | ... diff -r 000000000000 -r c103a3dec114 a |
|
130 | ... diff -r 000000000000 -r c103a3dec114 a | |
131 | ... --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
131 | ... --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
132 | ... +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
132 | ... +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
133 | ... @@ -0,0 +1,1 @@ |
|
133 | ... @@ -0,0 +1,1 @@ | |
134 | ... +1 |
|
134 | ... +1 | |
135 | ... """ |
|
135 | ... """ | |
136 | ... |
|
136 | ... | |
137 | ... runcommand(server, [b'import', b'-'], input=stringio(patch)) |
|
137 | ... runcommand(server, [b'import', b'-'], input=stringio(patch)) | |
138 | ... runcommand(server, [b'log']) |
|
138 | ... runcommand(server, [b'log']) | |
139 | *** runcommand import - |
|
139 | *** runcommand import - | |
140 | applying patch from stdin |
|
140 | applying patch from stdin | |
141 | *** runcommand log |
|
141 | *** runcommand log | |
142 | changeset: 0:eff892de26ec |
|
142 | changeset: 0:eff892de26ec | |
143 | tag: tip |
|
143 | tag: tip | |
144 | user: test |
|
144 | user: test | |
145 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
145 | date: Thu Jan 01 00:00:00 1970 +0000 | |
146 | summary: 1 |
|
146 | summary: 1 | |
147 |
|
147 | |||
148 |
|
148 | |||
149 | check strict parsing of early options: |
|
149 | check strict parsing of early options: | |
150 |
|
150 | |||
151 | >>> import os |
|
151 | >>> import os | |
152 | >>> from hgclient import check, readchannel, runcommand |
|
152 | >>> from hgclient import check, readchannel, runcommand | |
153 | >>> os.environ['HGPLAIN'] = '+strictflags' |
|
153 | >>> os.environ['HGPLAIN'] = '+strictflags' | |
154 | >>> @check |
|
154 | >>> @check | |
155 | ... def cwd(server): |
|
155 | ... def cwd(server): | |
156 | ... readchannel(server) |
|
156 | ... readchannel(server) | |
157 | ... runcommand(server, [b'log', b'-b', b'--config=alias.log=!echo pwned', |
|
157 | ... runcommand(server, [b'log', b'-b', b'--config=alias.log=!echo pwned', | |
158 | ... b'default']) |
|
158 | ... b'default']) | |
159 | *** runcommand log -b --config=alias.log=!echo pwned default |
|
159 | *** runcommand log -b --config=alias.log=!echo pwned default | |
160 | abort: unknown revision '--config=alias.log=!echo pwned' |
|
160 | abort: unknown revision '--config=alias.log=!echo pwned' | |
161 | [10] |
|
161 | [10] | |
162 |
|
162 | |||
163 | check that "histedit --commands=-" can read rules from the input channel: |
|
163 | check that "histedit --commands=-" can read rules from the input channel: | |
164 |
|
164 | |||
165 | >>> from hgclient import check, readchannel, runcommand, stringio |
|
165 | >>> from hgclient import check, readchannel, runcommand, stringio | |
166 | >>> @check |
|
166 | >>> @check | |
167 | ... def serverinput(server): |
|
167 | ... def serverinput(server): | |
168 | ... readchannel(server) |
|
168 | ... readchannel(server) | |
169 | ... rules = b'pick eff892de26ec\n' |
|
169 | ... rules = b'pick eff892de26ec\n' | |
170 | ... runcommand(server, [b'histedit', b'0', b'--commands=-', |
|
170 | ... runcommand(server, [b'histedit', b'0', b'--commands=-', | |
171 | ... b'--config', b'extensions.histedit='], |
|
171 | ... b'--config', b'extensions.histedit='], | |
172 | ... input=stringio(rules)) |
|
172 | ... input=stringio(rules)) | |
173 | *** runcommand histedit 0 --commands=- --config extensions.histedit= |
|
173 | *** runcommand histedit 0 --commands=- --config extensions.histedit= | |
174 |
|
174 | |||
175 | check that --cwd doesn't persist between requests: |
|
175 | check that --cwd doesn't persist between requests: | |
176 |
|
176 | |||
177 | $ mkdir foo |
|
177 | $ mkdir foo | |
178 | $ touch foo/bar |
|
178 | $ touch foo/bar | |
179 | >>> from hgclient import check, readchannel, runcommand |
|
179 | >>> from hgclient import check, readchannel, runcommand | |
180 | >>> @check |
|
180 | >>> @check | |
181 | ... def cwd(server): |
|
181 | ... def cwd(server): | |
182 | ... readchannel(server) |
|
182 | ... readchannel(server) | |
183 | ... runcommand(server, [b'--cwd', b'foo', b'st', b'bar']) |
|
183 | ... runcommand(server, [b'--cwd', b'foo', b'st', b'bar']) | |
184 | ... runcommand(server, [b'st', b'foo/bar']) |
|
184 | ... runcommand(server, [b'st', b'foo/bar']) | |
185 | *** runcommand --cwd foo st bar |
|
185 | *** runcommand --cwd foo st bar | |
186 | ? bar |
|
186 | ? bar | |
187 | *** runcommand st foo/bar |
|
187 | *** runcommand st foo/bar | |
188 | ? foo/bar |
|
188 | ? foo/bar | |
189 |
|
189 | |||
190 | $ rm foo/bar |
|
190 | $ rm foo/bar | |
191 |
|
191 | |||
192 |
|
192 | |||
193 | check that local configs for the cached repo aren't inherited when -R is used: |
|
193 | check that local configs for the cached repo aren't inherited when -R is used: | |
194 |
|
194 | |||
195 | $ cat <<EOF >> .hg/hgrc |
|
195 | $ cat <<EOF >> .hg/hgrc | |
196 | > [ui] |
|
196 | > [ui] | |
197 | > foo = bar |
|
197 | > foo = bar | |
198 | > EOF |
|
198 | > EOF | |
199 |
|
199 | |||
200 | #if no-extraextensions |
|
200 | #if no-extraextensions | |
201 |
|
201 | |||
202 | >>> from hgclient import check, readchannel, runcommand, sep |
|
202 | >>> from hgclient import check, readchannel, runcommand, sep | |
203 | >>> @check |
|
203 | >>> @check | |
204 | ... def localhgrc(server): |
|
204 | ... def localhgrc(server): | |
205 | ... readchannel(server) |
|
205 | ... readchannel(server) | |
206 | ... |
|
206 | ... | |
207 | ... # the cached repo local hgrc contains ui.foo=bar, so showconfig should |
|
207 | ... # the cached repo local hgrc contains ui.foo=bar, so showconfig should | |
208 | ... # show it |
|
208 | ... # show it | |
209 | ... runcommand(server, [b'showconfig'], outfilter=sep) |
|
209 | ... runcommand(server, [b'showconfig'], outfilter=sep) | |
210 | ... |
|
210 | ... | |
211 | ... # but not for this repo |
|
211 | ... # but not for this repo | |
212 | ... runcommand(server, [b'init', b'foo']) |
|
212 | ... runcommand(server, [b'init', b'foo']) | |
213 | ... runcommand(server, [b'-R', b'foo', b'showconfig', b'ui', b'defaults']) |
|
213 | ... runcommand(server, [b'-R', b'foo', b'showconfig', b'ui', b'defaults']) | |
214 | *** runcommand showconfig |
|
214 | *** runcommand showconfig | |
215 | bundle.mainreporoot=$TESTTMP/repo |
|
215 | bundle.mainreporoot=$TESTTMP/repo | |
216 | chgserver.idletimeout=60 |
|
216 | chgserver.idletimeout=60 | |
217 | devel.all-warnings=true |
|
217 | devel.all-warnings=true | |
218 | devel.default-date=0 0 |
|
218 | devel.default-date=0 0 | |
219 | extensions.fsmonitor= (fsmonitor !) |
|
219 | extensions.fsmonitor= (fsmonitor !) | |
220 | format.use-dirstate-v2=1 (dirstate-v2 !) |
|
220 | format.use-dirstate-v2=1 (dirstate-v2 !) | |
221 | largefiles.usercache=$TESTTMP/.cache/largefiles |
|
221 | largefiles.usercache=$TESTTMP/.cache/largefiles | |
222 | lfs.usercache=$TESTTMP/.cache/lfs |
|
222 | lfs.usercache=$TESTTMP/.cache/lfs | |
223 | ui.slash=True |
|
223 | ui.slash=True | |
224 | ui.interactive=False |
|
224 | ui.interactive=False | |
225 | ui.detailed-exit-code=True |
|
225 | ui.detailed-exit-code=True | |
226 | ui.merge=internal:merge |
|
226 | ui.merge=internal:merge | |
227 | ui.mergemarkers=detailed |
|
227 | ui.mergemarkers=detailed | |
228 | ui.ssh=* (glob) |
|
228 | ui.ssh=* (glob) | |
229 | ui.timeout.warn=15 |
|
229 | ui.timeout.warn=15 | |
230 | ui.foo=bar |
|
230 | ui.foo=bar | |
231 | ui.nontty=true |
|
231 | ui.nontty=true | |
232 | web.address=localhost |
|
232 | web.address=localhost | |
233 | web\.ipv6=(?:True|False) (re) |
|
233 | web\.ipv6=(?:True|False) (re) | |
234 | web.server-header=testing stub value |
|
234 | web.server-header=testing stub value | |
235 | *** runcommand init foo |
|
235 | *** runcommand init foo | |
236 | *** runcommand -R foo showconfig ui defaults |
|
236 | *** runcommand -R foo showconfig ui defaults | |
237 | ui.slash=True |
|
237 | ui.slash=True | |
238 | ui.interactive=False |
|
238 | ui.interactive=False | |
239 | ui.detailed-exit-code=True |
|
239 | ui.detailed-exit-code=True | |
240 | ui.merge=internal:merge |
|
240 | ui.merge=internal:merge | |
241 | ui.mergemarkers=detailed |
|
241 | ui.mergemarkers=detailed | |
242 | ui.ssh=* (glob) |
|
242 | ui.ssh=* (glob) | |
243 | ui.timeout.warn=15 |
|
243 | ui.timeout.warn=15 | |
244 | ui.nontty=true |
|
244 | ui.nontty=true | |
245 | #endif |
|
245 | #endif | |
246 |
|
246 | |||
247 | $ rm -R foo |
|
247 | $ rm -R foo | |
248 |
|
248 | |||
249 | #if windows |
|
249 | #if windows | |
250 | $ PYTHONPATH="$TESTTMP/repo;$PYTHONPATH" |
|
250 | $ PYTHONPATH="$TESTTMP/repo;$PYTHONPATH" | |
251 | #else |
|
251 | #else | |
252 | $ PYTHONPATH="$TESTTMP/repo:$PYTHONPATH" |
|
252 | $ PYTHONPATH="$TESTTMP/repo:$PYTHONPATH" | |
253 | #endif |
|
253 | #endif | |
254 |
|
254 | |||
255 | $ cat <<EOF > hook.py |
|
255 | $ cat <<EOF > hook.py | |
256 | > import sys |
|
256 | > import sys | |
257 | > from hgclient import bprint |
|
257 | > from hgclient import bprint | |
258 | > def hook(**args): |
|
258 | > def hook(**args): | |
259 | > bprint(b'hook talking') |
|
259 | > bprint(b'hook talking') | |
260 | > bprint(b'now try to read something: %r' % sys.stdin.read()) |
|
260 | > bprint(b'now try to read something: %r' % sys.stdin.read()) | |
261 | > EOF |
|
261 | > EOF | |
262 |
|
262 | |||
263 | >>> from hgclient import check, readchannel, runcommand, stringio |
|
263 | >>> from hgclient import check, readchannel, runcommand, stringio | |
264 | >>> @check |
|
264 | >>> @check | |
265 | ... def hookoutput(server): |
|
265 | ... def hookoutput(server): | |
266 | ... readchannel(server) |
|
266 | ... readchannel(server) | |
267 | ... runcommand(server, [b'--config', |
|
267 | ... runcommand(server, [b'--config', | |
268 | ... b'hooks.pre-identify=python:hook.hook', |
|
268 | ... b'hooks.pre-identify=python:hook.hook', | |
269 | ... b'id'], |
|
269 | ... b'id'], | |
270 | ... input=stringio(b'some input')) |
|
270 | ... input=stringio(b'some input')) | |
271 | *** runcommand --config hooks.pre-identify=python:hook.hook id |
|
271 | *** runcommand --config hooks.pre-identify=python:hook.hook id | |
272 | eff892de26ec tip |
|
272 | eff892de26ec tip | |
273 | hook talking |
|
273 | hook talking | |
274 | now try to read something: '' |
|
274 | now try to read something: '' | |
275 |
|
275 | |||
276 | Clean hook cached version |
|
276 | Clean hook cached version | |
277 | $ rm hook.py* |
|
277 | $ rm hook.py* | |
278 | $ rm -Rf __pycache__ |
|
278 | $ rm -Rf __pycache__ | |
279 |
|
279 | |||
280 | $ echo a >> a |
|
280 | $ echo a >> a | |
281 | >>> import os |
|
281 | >>> import os | |
282 | >>> from hgclient import check, readchannel, runcommand |
|
282 | >>> from hgclient import check, readchannel, runcommand | |
283 | >>> @check |
|
283 | >>> @check | |
284 | ... def outsidechanges(server): |
|
284 | ... def outsidechanges(server): | |
285 | ... readchannel(server) |
|
285 | ... readchannel(server) | |
286 | ... runcommand(server, [b'status']) |
|
286 | ... runcommand(server, [b'status']) | |
287 | ... os.system('hg ci -Am2') |
|
287 | ... os.system('hg ci -Am2') | |
288 | ... runcommand(server, [b'tip']) |
|
288 | ... runcommand(server, [b'tip']) | |
289 | ... runcommand(server, [b'status']) |
|
289 | ... runcommand(server, [b'status']) | |
290 | *** runcommand status |
|
290 | *** runcommand status | |
291 | M a |
|
291 | M a | |
292 | *** runcommand tip |
|
292 | *** runcommand tip | |
293 | changeset: 1:d3a0a68be6de |
|
293 | changeset: 1:d3a0a68be6de | |
294 | tag: tip |
|
294 | tag: tip | |
295 | user: test |
|
295 | user: test | |
296 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
296 | date: Thu Jan 01 00:00:00 1970 +0000 | |
297 | summary: 2 |
|
297 | summary: 2 | |
298 |
|
298 | |||
299 | *** runcommand status |
|
299 | *** runcommand status | |
300 |
|
300 | |||
301 | >>> import os |
|
301 | >>> import os | |
302 | >>> from hgclient import bprint, check, readchannel, runcommand |
|
302 | >>> from hgclient import bprint, check, readchannel, runcommand | |
303 | >>> @check |
|
303 | >>> @check | |
304 | ... def bookmarks(server): |
|
304 | ... def bookmarks(server): | |
305 | ... readchannel(server) |
|
305 | ... readchannel(server) | |
306 | ... runcommand(server, [b'bookmarks']) |
|
306 | ... runcommand(server, [b'bookmarks']) | |
307 | ... |
|
307 | ... | |
308 | ... # changes .hg/bookmarks |
|
308 | ... # changes .hg/bookmarks | |
309 | ... os.system('hg bookmark -i bm1') |
|
309 | ... os.system('hg bookmark -i bm1') | |
310 | ... os.system('hg bookmark -i bm2') |
|
310 | ... os.system('hg bookmark -i bm2') | |
311 | ... runcommand(server, [b'bookmarks']) |
|
311 | ... runcommand(server, [b'bookmarks']) | |
312 | ... |
|
312 | ... | |
313 | ... # changes .hg/bookmarks.current |
|
313 | ... # changes .hg/bookmarks.current | |
314 | ... os.system('hg upd bm1 -q') |
|
314 | ... os.system('hg upd bm1 -q') | |
315 | ... runcommand(server, [b'bookmarks']) |
|
315 | ... runcommand(server, [b'bookmarks']) | |
316 | ... |
|
316 | ... | |
317 | ... runcommand(server, [b'bookmarks', b'bm3']) |
|
317 | ... runcommand(server, [b'bookmarks', b'bm3']) | |
318 | ... f = open('a', 'ab') |
|
318 | ... f = open('a', 'ab') | |
319 | ... f.write(b'a\n') and None |
|
319 | ... f.write(b'a\n') and None | |
320 | ... f.close() |
|
320 | ... f.close() | |
321 | ... runcommand(server, [b'commit', b'-Amm']) |
|
321 | ... runcommand(server, [b'commit', b'-Amm']) | |
322 | ... runcommand(server, [b'bookmarks']) |
|
322 | ... runcommand(server, [b'bookmarks']) | |
323 | ... bprint(b'') |
|
323 | ... bprint(b'') | |
324 | *** runcommand bookmarks |
|
324 | *** runcommand bookmarks | |
325 | no bookmarks set |
|
325 | no bookmarks set | |
326 | *** runcommand bookmarks |
|
326 | *** runcommand bookmarks | |
327 | bm1 1:d3a0a68be6de |
|
327 | bm1 1:d3a0a68be6de | |
328 | bm2 1:d3a0a68be6de |
|
328 | bm2 1:d3a0a68be6de | |
329 | *** runcommand bookmarks |
|
329 | *** runcommand bookmarks | |
330 | * bm1 1:d3a0a68be6de |
|
330 | * bm1 1:d3a0a68be6de | |
331 | bm2 1:d3a0a68be6de |
|
331 | bm2 1:d3a0a68be6de | |
332 | *** runcommand bookmarks bm3 |
|
332 | *** runcommand bookmarks bm3 | |
333 | *** runcommand commit -Amm |
|
333 | *** runcommand commit -Amm | |
334 | *** runcommand bookmarks |
|
334 | *** runcommand bookmarks | |
335 | bm1 1:d3a0a68be6de |
|
335 | bm1 1:d3a0a68be6de | |
336 | bm2 1:d3a0a68be6de |
|
336 | bm2 1:d3a0a68be6de | |
337 | * bm3 2:aef17e88f5f0 |
|
337 | * bm3 2:aef17e88f5f0 | |
338 |
|
338 | |||
339 |
|
339 | |||
340 | >>> import os |
|
340 | >>> import os | |
341 | >>> from hgclient import check, readchannel, runcommand |
|
341 | >>> from hgclient import check, readchannel, runcommand | |
342 | >>> @check |
|
342 | >>> @check | |
343 | ... def tagscache(server): |
|
343 | ... def tagscache(server): | |
344 | ... readchannel(server) |
|
344 | ... readchannel(server) | |
345 | ... runcommand(server, [b'id', b'-t', b'-r', b'0']) |
|
345 | ... runcommand(server, [b'id', b'-t', b'-r', b'0']) | |
346 | ... os.system('hg tag -r 0 foo') |
|
346 | ... os.system('hg tag -r 0 foo') | |
347 | ... runcommand(server, [b'id', b'-t', b'-r', b'0']) |
|
347 | ... runcommand(server, [b'id', b'-t', b'-r', b'0']) | |
348 | *** runcommand id -t -r 0 |
|
348 | *** runcommand id -t -r 0 | |
349 |
|
349 | |||
350 | *** runcommand id -t -r 0 |
|
350 | *** runcommand id -t -r 0 | |
351 | foo |
|
351 | foo | |
352 |
|
352 | |||
353 | >>> import os |
|
353 | >>> import os | |
354 | >>> from hgclient import check, readchannel, runcommand |
|
354 | >>> from hgclient import check, readchannel, runcommand | |
355 | >>> @check |
|
355 | >>> @check | |
356 | ... def setphase(server): |
|
356 | ... def setphase(server): | |
357 | ... readchannel(server) |
|
357 | ... readchannel(server) | |
358 | ... runcommand(server, [b'phase', b'-r', b'.']) |
|
358 | ... runcommand(server, [b'phase', b'-r', b'.']) | |
359 | ... os.system('hg phase -r . -p') |
|
359 | ... os.system('hg phase -r . -p') | |
360 | ... runcommand(server, [b'phase', b'-r', b'.']) |
|
360 | ... runcommand(server, [b'phase', b'-r', b'.']) | |
361 | *** runcommand phase -r . |
|
361 | *** runcommand phase -r . | |
362 | 3: draft |
|
362 | 3: draft | |
363 | *** runcommand phase -r . |
|
363 | *** runcommand phase -r . | |
364 | 3: public |
|
364 | 3: public | |
365 |
|
365 | |||
366 | $ echo a >> a |
|
366 | $ echo a >> a | |
367 | >>> from hgclient import bprint, check, readchannel, runcommand |
|
367 | >>> from hgclient import bprint, check, readchannel, runcommand | |
368 | >>> @check |
|
368 | >>> @check | |
369 | ... def rollback(server): |
|
369 | ... def rollback(server): | |
370 | ... readchannel(server) |
|
370 | ... readchannel(server) | |
371 | ... runcommand(server, [b'phase', b'-r', b'.', b'-p']) |
|
371 | ... runcommand(server, [b'phase', b'-r', b'.', b'-p']) | |
372 | ... runcommand(server, [b'commit', b'-Am.']) |
|
372 | ... runcommand(server, [b'commit', b'-Am.']) | |
373 | ... runcommand(server, [b'rollback']) |
|
373 | ... runcommand(server, [b'rollback']) | |
374 | ... runcommand(server, [b'phase', b'-r', b'.']) |
|
374 | ... runcommand(server, [b'phase', b'-r', b'.']) | |
375 | ... bprint(b'') |
|
375 | ... bprint(b'') | |
376 | *** runcommand phase -r . -p |
|
376 | *** runcommand phase -r . -p | |
377 | no phases changed |
|
377 | no phases changed | |
378 | *** runcommand commit -Am. |
|
378 | *** runcommand commit -Am. | |
379 | *** runcommand rollback |
|
379 | *** runcommand rollback | |
380 | repository tip rolled back to revision 3 (undo commit) |
|
380 | repository tip rolled back to revision 3 (undo commit) | |
381 | working directory now based on revision 3 |
|
381 | working directory now based on revision 3 | |
382 | *** runcommand phase -r . |
|
382 | *** runcommand phase -r . | |
383 | 3: public |
|
383 | 3: public | |
384 |
|
384 | |||
385 |
|
385 | |||
386 | >>> import os |
|
386 | >>> import os | |
387 | >>> from hgclient import check, readchannel, runcommand |
|
387 | >>> from hgclient import check, readchannel, runcommand | |
388 | >>> @check |
|
388 | >>> @check | |
389 | ... def branch(server): |
|
389 | ... def branch(server): | |
390 | ... readchannel(server) |
|
390 | ... readchannel(server) | |
391 | ... runcommand(server, [b'branch']) |
|
391 | ... runcommand(server, [b'branch']) | |
392 | ... os.system('hg branch foo') |
|
392 | ... os.system('hg branch foo') | |
393 | ... runcommand(server, [b'branch']) |
|
393 | ... runcommand(server, [b'branch']) | |
394 | ... os.system('hg branch default') |
|
394 | ... os.system('hg branch default') | |
395 | *** runcommand branch |
|
395 | *** runcommand branch | |
396 | default |
|
396 | default | |
397 | marked working directory as branch foo |
|
397 | marked working directory as branch foo | |
398 | (branches are permanent and global, did you want a bookmark?) |
|
398 | (branches are permanent and global, did you want a bookmark?) | |
399 | *** runcommand branch |
|
399 | *** runcommand branch | |
400 | foo |
|
400 | foo | |
401 | marked working directory as branch default |
|
401 | marked working directory as branch default | |
402 | (branches are permanent and global, did you want a bookmark?) |
|
402 | (branches are permanent and global, did you want a bookmark?) | |
403 |
|
403 | |||
404 | $ touch .hgignore |
|
404 | $ touch .hgignore | |
405 | >>> import os |
|
405 | >>> import os | |
406 | >>> from hgclient import bprint, check, readchannel, runcommand |
|
406 | >>> from hgclient import bprint, check, readchannel, runcommand | |
407 | >>> @check |
|
407 | >>> @check | |
408 | ... def hgignore(server): |
|
408 | ... def hgignore(server): | |
409 | ... readchannel(server) |
|
409 | ... readchannel(server) | |
410 | ... runcommand(server, [b'commit', b'-Am.']) |
|
410 | ... runcommand(server, [b'commit', b'-Am.']) | |
411 | ... f = open('ignored-file', 'ab') |
|
411 | ... f = open('ignored-file', 'ab') | |
412 | ... f.write(b'') and None |
|
412 | ... f.write(b'') and None | |
413 | ... f.close() |
|
413 | ... f.close() | |
414 | ... f = open('.hgignore', 'ab') |
|
414 | ... f = open('.hgignore', 'ab') | |
415 | ... f.write(b'ignored-file') |
|
415 | ... f.write(b'ignored-file') | |
416 | ... f.close() |
|
416 | ... f.close() | |
417 | ... runcommand(server, [b'status', b'-i', b'-u']) |
|
417 | ... runcommand(server, [b'status', b'-i', b'-u']) | |
418 | ... bprint(b'') |
|
418 | ... bprint(b'') | |
419 | *** runcommand commit -Am. |
|
419 | *** runcommand commit -Am. | |
420 | adding .hgignore |
|
420 | adding .hgignore | |
421 | *** runcommand status -i -u |
|
421 | *** runcommand status -i -u | |
422 | I ignored-file |
|
422 | I ignored-file | |
423 |
|
423 | |||
424 |
|
424 | |||
425 | cache of non-public revisions should be invalidated on repository change |
|
425 | cache of non-public revisions should be invalidated on repository change | |
426 | (issue4855): |
|
426 | (issue4855): | |
427 |
|
427 | |||
428 | >>> import os |
|
428 | >>> import os | |
429 | >>> from hgclient import bprint, check, readchannel, runcommand |
|
429 | >>> from hgclient import bprint, check, readchannel, runcommand | |
430 | >>> @check |
|
430 | >>> @check | |
431 | ... def phasesetscacheaftercommit(server): |
|
431 | ... def phasesetscacheaftercommit(server): | |
432 | ... readchannel(server) |
|
432 | ... readchannel(server) | |
433 | ... # load _phasecache._phaserevs and _phasesets |
|
433 | ... # load _phasecache._phaserevs and _phasesets | |
434 | ... runcommand(server, [b'log', b'-qr', b'draft()']) |
|
434 | ... runcommand(server, [b'log', b'-qr', b'draft()']) | |
435 | ... # create draft commits by another process |
|
435 | ... # create draft commits by another process | |
436 | ... for i in range(5, 7): |
|
436 | ... for i in range(5, 7): | |
437 | ... f = open('a', 'ab') |
|
437 | ... f = open('a', 'ab') | |
438 | ... f.seek(0, os.SEEK_END) |
|
438 | ... f.seek(0, os.SEEK_END) | |
439 | ... f.write(b'a\n') and None |
|
439 | ... f.write(b'a\n') and None | |
440 | ... f.close() |
|
440 | ... f.close() | |
441 | ... os.system('hg commit -Aqm%d' % i) |
|
441 | ... os.system('hg commit -Aqm%d' % i) | |
442 | ... # new commits should be listed as draft revisions |
|
442 | ... # new commits should be listed as draft revisions | |
443 | ... runcommand(server, [b'log', b'-qr', b'draft()']) |
|
443 | ... runcommand(server, [b'log', b'-qr', b'draft()']) | |
444 | ... bprint(b'') |
|
444 | ... bprint(b'') | |
445 | *** runcommand log -qr draft() |
|
445 | *** runcommand log -qr draft() | |
446 | 4:7966c8e3734d |
|
446 | 4:7966c8e3734d | |
447 | *** runcommand log -qr draft() |
|
447 | *** runcommand log -qr draft() | |
448 | 4:7966c8e3734d |
|
448 | 4:7966c8e3734d | |
449 | 5:41f6602d1c4f |
|
449 | 5:41f6602d1c4f | |
450 | 6:10501e202c35 |
|
450 | 6:10501e202c35 | |
451 |
|
451 | |||
452 |
|
452 | |||
453 | >>> import os |
|
453 | >>> import os | |
454 | >>> from hgclient import bprint, check, readchannel, runcommand |
|
454 | >>> from hgclient import bprint, check, readchannel, runcommand | |
455 | >>> @check |
|
455 | >>> @check | |
456 | ... def phasesetscacheafterstrip(server): |
|
456 | ... def phasesetscacheafterstrip(server): | |
457 | ... readchannel(server) |
|
457 | ... readchannel(server) | |
458 | ... # load _phasecache._phaserevs and _phasesets |
|
458 | ... # load _phasecache._phaserevs and _phasesets | |
459 | ... runcommand(server, [b'log', b'-qr', b'draft()']) |
|
459 | ... runcommand(server, [b'log', b'-qr', b'draft()']) | |
460 | ... # strip cached revisions by another process |
|
460 | ... # strip cached revisions by another process | |
461 | ... os.system('hg --config extensions.strip= strip -q 5') |
|
461 | ... os.system('hg --config extensions.strip= strip -q 5') | |
462 | ... # shouldn't abort by "unknown revision '6'" |
|
462 | ... # shouldn't abort by "unknown revision '6'" | |
463 | ... runcommand(server, [b'log', b'-qr', b'draft()']) |
|
463 | ... runcommand(server, [b'log', b'-qr', b'draft()']) | |
464 | ... bprint(b'') |
|
464 | ... bprint(b'') | |
465 | *** runcommand log -qr draft() |
|
465 | *** runcommand log -qr draft() | |
466 | 4:7966c8e3734d |
|
466 | 4:7966c8e3734d | |
467 | 5:41f6602d1c4f |
|
467 | 5:41f6602d1c4f | |
468 | 6:10501e202c35 |
|
468 | 6:10501e202c35 | |
469 | *** runcommand log -qr draft() |
|
469 | *** runcommand log -qr draft() | |
470 | 4:7966c8e3734d |
|
470 | 4:7966c8e3734d | |
471 |
|
471 | |||
472 |
|
472 | |||
473 | cache of phase roots should be invalidated on strip (issue3827): |
|
473 | cache of phase roots should be invalidated on strip (issue3827): | |
474 |
|
474 | |||
475 | >>> import os |
|
475 | >>> import os | |
476 | >>> from hgclient import check, readchannel, runcommand, sep |
|
476 | >>> from hgclient import check, readchannel, runcommand, sep | |
477 | >>> @check |
|
477 | >>> @check | |
478 | ... def phasecacheafterstrip(server): |
|
478 | ... def phasecacheafterstrip(server): | |
479 | ... readchannel(server) |
|
479 | ... readchannel(server) | |
480 | ... |
|
480 | ... | |
481 | ... # create new head, 5:731265503d86 |
|
481 | ... # create new head, 5:731265503d86 | |
482 | ... runcommand(server, [b'update', b'-C', b'0']) |
|
482 | ... runcommand(server, [b'update', b'-C', b'0']) | |
483 | ... f = open('a', 'ab') |
|
483 | ... f = open('a', 'ab') | |
484 | ... f.write(b'a\n') and None |
|
484 | ... f.write(b'a\n') and None | |
485 | ... f.close() |
|
485 | ... f.close() | |
486 | ... runcommand(server, [b'commit', b'-Am.', b'a']) |
|
486 | ... runcommand(server, [b'commit', b'-Am.', b'a']) | |
487 | ... runcommand(server, [b'log', b'-Gq']) |
|
487 | ... runcommand(server, [b'log', b'-Gq']) | |
488 | ... |
|
488 | ... | |
489 | ... # make it public; draft marker moves to 4:7966c8e3734d |
|
489 | ... # make it public; draft marker moves to 4:7966c8e3734d | |
490 | ... runcommand(server, [b'phase', b'-p', b'.']) |
|
490 | ... runcommand(server, [b'phase', b'-p', b'.']) | |
491 | ... # load _phasecache.phaseroots |
|
491 | ... # load _phasecache.phaseroots | |
492 | ... runcommand(server, [b'phase', b'.'], outfilter=sep) |
|
492 | ... runcommand(server, [b'phase', b'.'], outfilter=sep) | |
493 | ... |
|
493 | ... | |
494 | ... # strip 1::4 outside server |
|
494 | ... # strip 1::4 outside server | |
495 | ... os.system('hg -q --config extensions.mq= strip 1') |
|
495 | ... os.system('hg -q --config extensions.mq= strip 1') | |
496 | ... |
|
496 | ... | |
497 | ... # shouldn't raise "7966c8e3734d: no node!" |
|
497 | ... # shouldn't raise "7966c8e3734d: no node!" | |
498 | ... runcommand(server, [b'branches']) |
|
498 | ... runcommand(server, [b'branches']) | |
499 | *** runcommand update -C 0 |
|
499 | *** runcommand update -C 0 | |
500 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
500 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
501 | (leaving bookmark bm3) |
|
501 | (leaving bookmark bm3) | |
502 | *** runcommand commit -Am. a |
|
502 | *** runcommand commit -Am. a | |
503 | created new head |
|
503 | created new head | |
504 | *** runcommand log -Gq |
|
504 | *** runcommand log -Gq | |
505 | @ 5:731265503d86 |
|
505 | @ 5:731265503d86 | |
506 | | |
|
506 | | | |
507 | | o 4:7966c8e3734d |
|
507 | | o 4:7966c8e3734d | |
508 | | | |
|
508 | | | | |
509 | | o 3:b9b85890c400 |
|
509 | | o 3:b9b85890c400 | |
510 | | | |
|
510 | | | | |
511 | | o 2:aef17e88f5f0 |
|
511 | | o 2:aef17e88f5f0 | |
512 | | | |
|
512 | | | | |
513 | | o 1:d3a0a68be6de |
|
513 | | o 1:d3a0a68be6de | |
514 | |/ |
|
514 | |/ | |
515 | o 0:eff892de26ec |
|
515 | o 0:eff892de26ec | |
516 |
|
516 | |||
517 | *** runcommand phase -p . |
|
517 | *** runcommand phase -p . | |
518 | *** runcommand phase . |
|
518 | *** runcommand phase . | |
519 | 5: public |
|
519 | 5: public | |
520 | *** runcommand branches |
|
520 | *** runcommand branches | |
521 | default 1:731265503d86 |
|
521 | default 1:731265503d86 | |
522 |
|
522 | |||
523 | in-memory cache must be reloaded if transaction is aborted. otherwise |
|
523 | in-memory cache must be reloaded if transaction is aborted. otherwise | |
524 | changelog and manifest would have invalid node: |
|
524 | changelog and manifest would have invalid node: | |
525 |
|
525 | |||
526 | $ echo a >> a |
|
526 | $ echo a >> a | |
527 | >>> from hgclient import check, readchannel, runcommand |
|
527 | >>> from hgclient import check, readchannel, runcommand | |
528 | >>> @check |
|
528 | >>> @check | |
529 | ... def txabort(server): |
|
529 | ... def txabort(server): | |
530 | ... readchannel(server) |
|
530 | ... readchannel(server) | |
531 | ... runcommand(server, [b'commit', b'--config', b'hooks.pretxncommit=false', |
|
531 | ... runcommand(server, [b'commit', b'--config', b'hooks.pretxncommit=false', | |
532 | ... b'-mfoo']) |
|
532 | ... b'-mfoo']) | |
533 | ... runcommand(server, [b'verify']) |
|
533 | ... runcommand(server, [b'verify']) | |
534 | *** runcommand commit --config hooks.pretxncommit=false -mfoo |
|
534 | *** runcommand commit --config hooks.pretxncommit=false -mfoo | |
535 | transaction abort! |
|
535 | transaction abort! | |
536 | rollback completed |
|
536 | rollback completed | |
537 | abort: pretxncommit hook exited with status 1 |
|
537 | abort: pretxncommit hook exited with status 1 | |
538 | [40] |
|
538 | [40] | |
539 | *** runcommand verify |
|
539 | *** runcommand verify | |
540 | checking changesets |
|
540 | checking changesets | |
541 | checking manifests |
|
541 | checking manifests | |
542 | crosschecking files in changesets and manifests |
|
542 | crosschecking files in changesets and manifests | |
543 | checking files |
|
543 | checking files | |
544 | checking dirstate |
|
544 | checking dirstate | |
545 | checked 2 changesets with 2 changes to 1 files |
|
545 | checked 2 changesets with 2 changes to 1 files | |
546 | $ hg revert --no-backup -aq |
|
546 | $ hg revert --no-backup -aq | |
547 |
|
547 | |||
548 | $ cat >> .hg/hgrc << EOF |
|
548 | $ cat >> .hg/hgrc << EOF | |
549 | > [experimental] |
|
549 | > [experimental] | |
550 | > evolution.createmarkers=True |
|
550 | > evolution.createmarkers=True | |
551 | > EOF |
|
551 | > EOF | |
552 |
|
552 | |||
553 | >>> import os |
|
553 | >>> import os | |
554 | >>> from hgclient import check, readchannel, runcommand |
|
554 | >>> from hgclient import check, readchannel, runcommand | |
555 | >>> @check |
|
555 | >>> @check | |
556 | ... def obsolete(server): |
|
556 | ... def obsolete(server): | |
557 | ... readchannel(server) |
|
557 | ... readchannel(server) | |
558 | ... |
|
558 | ... | |
559 | ... runcommand(server, [b'up', b'null']) |
|
559 | ... runcommand(server, [b'up', b'null']) | |
560 | ... runcommand(server, [b'phase', b'-df', b'tip']) |
|
560 | ... runcommand(server, [b'phase', b'-df', b'tip']) | |
561 | ... cmd = 'hg debugobsolete `hg log -r tip --template {node}`' |
|
561 | ... cmd = 'hg debugobsolete `hg log -r tip --template {node}`' | |
562 | ... if os.name == 'nt': |
|
562 | ... if os.name == 'nt': | |
563 | ... cmd = 'sh -c "%s"' % cmd # run in sh, not cmd.exe |
|
563 | ... cmd = 'sh -c "%s"' % cmd # run in sh, not cmd.exe | |
564 | ... os.system(cmd) |
|
564 | ... os.system(cmd) | |
565 | ... runcommand(server, [b'log', b'--hidden']) |
|
565 | ... runcommand(server, [b'log', b'--hidden']) | |
566 | ... runcommand(server, [b'log']) |
|
566 | ... runcommand(server, [b'log']) | |
567 | *** runcommand up null |
|
567 | *** runcommand up null | |
568 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
568 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
569 | *** runcommand phase -df tip |
|
569 | *** runcommand phase -df tip | |
570 | 1 new obsolescence markers |
|
570 | 1 new obsolescence markers | |
571 | obsoleted 1 changesets |
|
571 | obsoleted 1 changesets | |
572 | *** runcommand log --hidden |
|
572 | *** runcommand log --hidden | |
573 | changeset: 1:731265503d86 |
|
573 | changeset: 1:731265503d86 | |
574 | tag: tip |
|
574 | tag: tip | |
575 | user: test |
|
575 | user: test | |
576 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
576 | date: Thu Jan 01 00:00:00 1970 +0000 | |
577 | obsolete: pruned |
|
577 | obsolete: pruned | |
578 | summary: . |
|
578 | summary: . | |
579 |
|
579 | |||
580 | changeset: 0:eff892de26ec |
|
580 | changeset: 0:eff892de26ec | |
581 | bookmark: bm1 |
|
581 | bookmark: bm1 | |
582 | bookmark: bm2 |
|
582 | bookmark: bm2 | |
583 | bookmark: bm3 |
|
583 | bookmark: bm3 | |
584 | user: test |
|
584 | user: test | |
585 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
585 | date: Thu Jan 01 00:00:00 1970 +0000 | |
586 | summary: 1 |
|
586 | summary: 1 | |
587 |
|
587 | |||
588 | *** runcommand log |
|
588 | *** runcommand log | |
589 | changeset: 0:eff892de26ec |
|
589 | changeset: 0:eff892de26ec | |
590 | bookmark: bm1 |
|
590 | bookmark: bm1 | |
591 | bookmark: bm2 |
|
591 | bookmark: bm2 | |
592 | bookmark: bm3 |
|
592 | bookmark: bm3 | |
593 | tag: tip |
|
593 | tag: tip | |
594 | user: test |
|
594 | user: test | |
595 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
595 | date: Thu Jan 01 00:00:00 1970 +0000 | |
596 | summary: 1 |
|
596 | summary: 1 | |
597 |
|
597 | |||
598 |
|
598 | |||
599 | $ cat <<EOF >> .hg/hgrc |
|
599 | $ cat <<EOF >> .hg/hgrc | |
600 | > [extensions] |
|
600 | > [extensions] | |
601 | > mq = |
|
601 | > mq = | |
602 | > EOF |
|
602 | > EOF | |
603 |
|
603 | |||
604 | >>> import os |
|
604 | >>> import os | |
605 | >>> from hgclient import check, readchannel, runcommand |
|
605 | >>> from hgclient import check, readchannel, runcommand | |
606 | >>> @check |
|
606 | >>> @check | |
607 | ... def mqoutsidechanges(server): |
|
607 | ... def mqoutsidechanges(server): | |
608 | ... readchannel(server) |
|
608 | ... readchannel(server) | |
609 | ... |
|
609 | ... | |
610 | ... # load repo.mq |
|
610 | ... # load repo.mq | |
611 | ... runcommand(server, [b'qapplied']) |
|
611 | ... runcommand(server, [b'qapplied']) | |
612 | ... os.system('hg qnew 0.diff') |
|
612 | ... os.system('hg qnew 0.diff') | |
613 | ... # repo.mq should be invalidated |
|
613 | ... # repo.mq should be invalidated | |
614 | ... runcommand(server, [b'qapplied']) |
|
614 | ... runcommand(server, [b'qapplied']) | |
615 | ... |
|
615 | ... | |
616 | ... runcommand(server, [b'qpop', b'--all']) |
|
616 | ... runcommand(server, [b'qpop', b'--all']) | |
617 | ... os.system('hg qqueue --create foo') |
|
617 | ... os.system('hg qqueue --create foo') | |
618 | ... # repo.mq should be recreated to point to new queue |
|
618 | ... # repo.mq should be recreated to point to new queue | |
619 | ... runcommand(server, [b'qqueue', b'--active']) |
|
619 | ... runcommand(server, [b'qqueue', b'--active']) | |
620 | *** runcommand qapplied |
|
620 | *** runcommand qapplied | |
621 | *** runcommand qapplied |
|
621 | *** runcommand qapplied | |
622 | 0.diff |
|
622 | 0.diff | |
623 | *** runcommand qpop --all |
|
623 | *** runcommand qpop --all | |
624 | popping 0.diff |
|
624 | popping 0.diff | |
625 | patch queue now empty |
|
625 | patch queue now empty | |
626 | *** runcommand qqueue --active |
|
626 | *** runcommand qqueue --active | |
627 | foo |
|
627 | foo | |
628 |
|
628 | |||
629 | $ cat <<'EOF' > ../dbgui.py |
|
629 | $ cat <<'EOF' > ../dbgui.py | |
630 | > import os |
|
630 | > import os | |
631 | > import sys |
|
631 | > import sys | |
632 | > from mercurial import commands, registrar |
|
632 | > from mercurial import commands, registrar | |
633 | > cmdtable = {} |
|
633 | > cmdtable = {} | |
634 | > command = registrar.command(cmdtable) |
|
634 | > command = registrar.command(cmdtable) | |
635 | > @command(b"debuggetpass", norepo=True) |
|
635 | > @command(b"debuggetpass", norepo=True) | |
636 | > def debuggetpass(ui): |
|
636 | > def debuggetpass(ui): | |
637 | > ui.write(b"%s\n" % ui.getpass()) |
|
637 | > ui.write(b"%s\n" % ui.getpass()) | |
638 | > @command(b"debugprompt", norepo=True) |
|
638 | > @command(b"debugprompt", norepo=True) | |
639 | > def debugprompt(ui): |
|
639 | > def debugprompt(ui): | |
640 | > ui.write(b"%s\n" % ui.prompt(b"prompt:")) |
|
640 | > ui.write(b"%s\n" % ui.prompt(b"prompt:")) | |
641 | > @command(b"debugpromptchoice", norepo=True) |
|
641 | > @command(b"debugpromptchoice", norepo=True) | |
642 | > def debugpromptchoice(ui): |
|
642 | > def debugpromptchoice(ui): | |
643 | > msg = b"promptchoice (y/n)? $$ &Yes $$ &No" |
|
643 | > msg = b"promptchoice (y/n)? $$ &Yes $$ &No" | |
644 | > ui.write(b"%d\n" % ui.promptchoice(msg)) |
|
644 | > ui.write(b"%d\n" % ui.promptchoice(msg)) | |
645 | > @command(b"debugreadstdin", norepo=True) |
|
645 | > @command(b"debugreadstdin", norepo=True) | |
646 | > def debugreadstdin(ui): |
|
646 | > def debugreadstdin(ui): | |
647 | > ui.write(b"read: %r\n" % sys.stdin.read(1)) |
|
647 | > ui.write(b"read: %r\n" % sys.stdin.read(1)) | |
648 | > @command(b"debugwritestdout", norepo=True) |
|
648 | > @command(b"debugwritestdout", norepo=True) | |
649 | > def debugwritestdout(ui): |
|
649 | > def debugwritestdout(ui): | |
650 | > os.write(1, b"low-level stdout fd and\n") |
|
650 | > os.write(1, b"low-level stdout fd and\n") | |
651 | > sys.stdout.write("stdout should be redirected to stderr\n") |
|
651 | > sys.stdout.write("stdout should be redirected to stderr\n") | |
652 | > sys.stdout.flush() |
|
652 | > sys.stdout.flush() | |
653 | > EOF |
|
653 | > EOF | |
654 | $ cat <<EOF >> .hg/hgrc |
|
654 | $ cat <<EOF >> .hg/hgrc | |
655 | > [extensions] |
|
655 | > [extensions] | |
656 | > dbgui = ../dbgui.py |
|
656 | > dbgui = ../dbgui.py | |
657 | > EOF |
|
657 | > EOF | |
658 |
|
658 | |||
659 | >>> from hgclient import check, readchannel, runcommand, stringio |
|
659 | >>> from hgclient import check, readchannel, runcommand, stringio | |
660 | >>> @check |
|
660 | >>> @check | |
661 | ... def getpass(server): |
|
661 | ... def getpass(server): | |
662 | ... readchannel(server) |
|
662 | ... readchannel(server) | |
663 | ... runcommand(server, [b'debuggetpass', b'--config', |
|
663 | ... runcommand(server, [b'debuggetpass', b'--config', | |
664 | ... b'ui.interactive=True'], |
|
664 | ... b'ui.interactive=True'], | |
665 | ... input=stringio(b'1234\n')) |
|
665 | ... input=stringio(b'1234\n')) | |
666 | ... runcommand(server, [b'debuggetpass', b'--config', |
|
666 | ... runcommand(server, [b'debuggetpass', b'--config', | |
667 | ... b'ui.interactive=True'], |
|
667 | ... b'ui.interactive=True'], | |
668 | ... input=stringio(b'\n')) |
|
668 | ... input=stringio(b'\n')) | |
669 | ... runcommand(server, [b'debuggetpass', b'--config', |
|
669 | ... runcommand(server, [b'debuggetpass', b'--config', | |
670 | ... b'ui.interactive=True'], |
|
670 | ... b'ui.interactive=True'], | |
671 | ... input=stringio(b'')) |
|
671 | ... input=stringio(b'')) | |
672 | ... runcommand(server, [b'debugprompt', b'--config', |
|
672 | ... runcommand(server, [b'debugprompt', b'--config', | |
673 | ... b'ui.interactive=True'], |
|
673 | ... b'ui.interactive=True'], | |
674 | ... input=stringio(b'5678\n')) |
|
674 | ... input=stringio(b'5678\n')) | |
675 | ... runcommand(server, [b'debugprompt', b'--config', |
|
675 | ... runcommand(server, [b'debugprompt', b'--config', | |
676 | ... b'ui.interactive=True'], |
|
676 | ... b'ui.interactive=True'], | |
677 | ... input=stringio(b'\nremainder\nshould\nnot\nbe\nread\n')) |
|
677 | ... input=stringio(b'\nremainder\nshould\nnot\nbe\nread\n')) | |
678 | ... runcommand(server, [b'debugreadstdin']) |
|
678 | ... runcommand(server, [b'debugreadstdin']) | |
679 | ... runcommand(server, [b'debugwritestdout']) |
|
679 | ... runcommand(server, [b'debugwritestdout']) | |
680 | *** runcommand debuggetpass --config ui.interactive=True |
|
680 | *** runcommand debuggetpass --config ui.interactive=True | |
681 | password: 1234 |
|
681 | password: 1234 | |
682 | *** runcommand debuggetpass --config ui.interactive=True |
|
682 | *** runcommand debuggetpass --config ui.interactive=True | |
683 | password: |
|
683 | password: | |
684 | *** runcommand debuggetpass --config ui.interactive=True |
|
684 | *** runcommand debuggetpass --config ui.interactive=True | |
685 | password: abort: response expected |
|
685 | password: abort: response expected | |
686 | [255] |
|
686 | [255] | |
687 | *** runcommand debugprompt --config ui.interactive=True |
|
687 | *** runcommand debugprompt --config ui.interactive=True | |
688 | prompt: 5678 |
|
688 | prompt: 5678 | |
689 | *** runcommand debugprompt --config ui.interactive=True |
|
689 | *** runcommand debugprompt --config ui.interactive=True | |
690 | prompt: y |
|
690 | prompt: y | |
691 | *** runcommand debugreadstdin |
|
691 | *** runcommand debugreadstdin | |
692 | read: '' |
|
692 | read: '' | |
693 | *** runcommand debugwritestdout |
|
693 | *** runcommand debugwritestdout | |
694 | low-level stdout fd and |
|
694 | low-level stdout fd and | |
695 | stdout should be redirected to stderr |
|
695 | stdout should be redirected to stderr | |
696 |
|
696 | |||
697 |
|
697 | |||
698 | run commandserver in commandserver, which is silly but should work: |
|
698 | run commandserver in commandserver, which is silly but should work: | |
699 |
|
699 | |||
700 | >>> from hgclient import bprint, check, readchannel, runcommand, stringio |
|
700 | >>> from hgclient import bprint, check, readchannel, runcommand, stringio | |
701 | >>> @check |
|
701 | >>> @check | |
702 | ... def nested(server): |
|
702 | ... def nested(server): | |
703 | ... bprint(b'%c, %r' % readchannel(server)) |
|
703 | ... bprint(b'%c, %r' % readchannel(server)) | |
704 | ... class nestedserver(object): |
|
704 | ... class nestedserver(object): | |
705 | ... stdin = stringio(b'getencoding\n') |
|
705 | ... stdin = stringio(b'getencoding\n') | |
706 | ... stdout = stringio() |
|
706 | ... stdout = stringio() | |
707 | ... runcommand(server, [b'serve', b'--cmdserver', b'pipe'], |
|
707 | ... runcommand(server, [b'serve', b'--cmdserver', b'pipe'], | |
708 | ... output=nestedserver.stdout, input=nestedserver.stdin) |
|
708 | ... output=nestedserver.stdout, input=nestedserver.stdin) | |
709 | ... nestedserver.stdout.seek(0) |
|
709 | ... nestedserver.stdout.seek(0) | |
710 | ... bprint(b'%c, %r' % readchannel(nestedserver)) # hello |
|
710 | ... bprint(b'%c, %r' % readchannel(nestedserver)) # hello | |
711 | ... bprint(b'%c, %r' % readchannel(nestedserver)) # getencoding |
|
711 | ... bprint(b'%c, %r' % readchannel(nestedserver)) # getencoding | |
712 | o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob) |
|
712 | o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob) | |
713 | *** runcommand serve --cmdserver pipe |
|
713 | *** runcommand serve --cmdserver pipe | |
714 | o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob) |
|
714 | o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob) | |
715 | r, '*' (glob) |
|
715 | r, '*' (glob) | |
716 |
|
716 | |||
717 |
|
717 | |||
718 | start without repository: |
|
718 | start without repository: | |
719 |
|
719 | |||
720 | $ cd .. |
|
720 | $ cd .. | |
721 |
|
721 | |||
722 | >>> from hgclient import bprint, check, readchannel, runcommand |
|
722 | >>> from hgclient import bprint, check, readchannel, runcommand | |
723 | >>> @check |
|
723 | >>> @check | |
724 | ... def hellomessage(server): |
|
724 | ... def hellomessage(server): | |
725 | ... ch, data = readchannel(server) |
|
725 | ... ch, data = readchannel(server) | |
726 | ... bprint(b'%c, %r' % (ch, data)) |
|
726 | ... bprint(b'%c, %r' % (ch, data)) | |
727 | ... # run an arbitrary command to make sure the next thing the server |
|
727 | ... # run an arbitrary command to make sure the next thing the server | |
728 | ... # sends isn't part of the hello message |
|
728 | ... # sends isn't part of the hello message | |
729 | ... runcommand(server, [b'id']) |
|
729 | ... runcommand(server, [b'id']) | |
730 | o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob) |
|
730 | o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob) | |
731 | *** runcommand id |
|
731 | *** runcommand id | |
732 | abort: there is no Mercurial repository here (.hg not found) |
|
732 | abort: there is no Mercurial repository here (.hg not found) | |
733 | [10] |
|
733 | [10] | |
734 |
|
734 | |||
735 | >>> from hgclient import check, readchannel, runcommand |
|
735 | >>> from hgclient import check, readchannel, runcommand | |
736 | >>> @check |
|
736 | >>> @check | |
737 | ... def startwithoutrepo(server): |
|
737 | ... def startwithoutrepo(server): | |
738 | ... readchannel(server) |
|
738 | ... readchannel(server) | |
739 | ... runcommand(server, [b'init', b'repo2']) |
|
739 | ... runcommand(server, [b'init', b'repo2']) | |
740 | ... runcommand(server, [b'id', b'-R', b'repo2']) |
|
740 | ... runcommand(server, [b'id', b'-R', b'repo2']) | |
741 | *** runcommand init repo2 |
|
741 | *** runcommand init repo2 | |
742 | *** runcommand id -R repo2 |
|
742 | *** runcommand id -R repo2 | |
743 | 000000000000 tip |
|
743 | 000000000000 tip | |
744 |
|
744 | |||
745 |
|
745 | |||
746 | don't fall back to cwd if invalid -R path is specified (issue4805): |
|
746 | don't fall back to cwd if invalid -R path is specified (issue4805): | |
747 |
|
747 | |||
748 | $ cd repo |
|
748 | $ cd repo | |
749 | $ hg serve --cmdserver pipe -R ../nonexistent |
|
749 | $ hg serve --cmdserver pipe -R ../nonexistent | |
750 | abort: repository ../nonexistent not found |
|
750 | abort: repository ../nonexistent not found | |
751 | [255] |
|
751 | [255] | |
752 | $ cd .. |
|
752 | $ cd .. | |
753 |
|
753 | |||
754 |
|
754 | |||
755 | #if no-windows |
|
755 | #if no-windows | |
756 |
|
756 | |||
757 | option to not shutdown on SIGINT: |
|
757 | option to not shutdown on SIGINT: | |
758 |
|
758 | |||
759 | $ cat <<'EOF' > dbgint.py |
|
759 | $ cat <<'EOF' > dbgint.py | |
760 | > import os |
|
760 | > import os | |
761 | > import signal |
|
761 | > import signal | |
762 | > import time |
|
762 | > import time | |
763 | > from mercurial import commands, registrar |
|
763 | > from mercurial import commands, registrar | |
764 | > cmdtable = {} |
|
764 | > cmdtable = {} | |
765 | > command = registrar.command(cmdtable) |
|
765 | > command = registrar.command(cmdtable) | |
766 | > @command(b"debugsleep", norepo=True) |
|
766 | > @command(b"debugsleep", norepo=True) | |
767 | > def debugsleep(ui): |
|
767 | > def debugsleep(ui): | |
768 | > time.sleep(1) |
|
768 | > time.sleep(1) | |
769 | > @command(b"debugsuicide", norepo=True) |
|
769 | > @command(b"debugsuicide", norepo=True) | |
770 | > def debugsuicide(ui): |
|
770 | > def debugsuicide(ui): | |
771 | > os.kill(os.getpid(), signal.SIGINT) |
|
771 | > os.kill(os.getpid(), signal.SIGINT) | |
772 | > time.sleep(1) |
|
772 | > time.sleep(1) | |
773 | > EOF |
|
773 | > EOF | |
774 |
|
774 | |||
775 | >>> import signal |
|
775 | >>> import signal | |
776 | >>> import time |
|
776 | >>> import time | |
777 | >>> from hgclient import checkwith, readchannel, runcommand |
|
777 | >>> from hgclient import checkwith, readchannel, runcommand | |
778 | >>> @checkwith(extraargs=[b'--config', b'cmdserver.shutdown-on-interrupt=False', |
|
778 | >>> @checkwith(extraargs=[b'--config', b'cmdserver.shutdown-on-interrupt=False', | |
779 | ... b'--config', b'extensions.dbgint=dbgint.py']) |
|
779 | ... b'--config', b'extensions.dbgint=dbgint.py']) | |
780 | ... def nointr(server): |
|
780 | ... def nointr(server): | |
781 | ... readchannel(server) |
|
781 | ... readchannel(server) | |
782 | ... server.send_signal(signal.SIGINT) # server won't be terminated |
|
782 | ... server.send_signal(signal.SIGINT) # server won't be terminated | |
783 | ... time.sleep(1) |
|
783 | ... time.sleep(1) | |
784 | ... runcommand(server, [b'debugsleep']) |
|
784 | ... runcommand(server, [b'debugsleep']) | |
785 | ... server.send_signal(signal.SIGINT) # server won't be terminated |
|
785 | ... server.send_signal(signal.SIGINT) # server won't be terminated | |
786 | ... runcommand(server, [b'debugsleep']) |
|
786 | ... runcommand(server, [b'debugsleep']) | |
787 | ... runcommand(server, [b'debugsuicide']) # command can be interrupted |
|
787 | ... runcommand(server, [b'debugsuicide']) # command can be interrupted | |
788 | ... server.send_signal(signal.SIGTERM) # server will be terminated |
|
788 | ... server.send_signal(signal.SIGTERM) # server will be terminated | |
789 | ... time.sleep(1) |
|
789 | ... time.sleep(1) | |
790 | *** runcommand debugsleep |
|
790 | *** runcommand debugsleep | |
791 | *** runcommand debugsleep |
|
791 | *** runcommand debugsleep | |
792 | *** runcommand debugsuicide |
|
792 | *** runcommand debugsuicide | |
793 | interrupted! |
|
793 | interrupted! | |
794 | killed! |
|
794 | killed! | |
795 | [255] |
|
795 | [255] | |
796 |
|
796 | |||
797 | #endif |
|
797 | #endif | |
798 |
|
798 | |||
799 |
|
799 | |||
800 | structured message channel: |
|
800 | structured message channel: | |
801 |
|
801 | |||
802 | $ cat <<'EOF' >> repo2/.hg/hgrc |
|
802 | $ cat <<'EOF' >> repo2/.hg/hgrc | |
803 | > [ui] |
|
803 | > [ui] | |
804 | > # server --config should precede repository option |
|
804 | > # server --config should precede repository option | |
805 | > message-output = stdio |
|
805 | > message-output = stdio | |
806 | > EOF |
|
806 | > EOF | |
807 |
|
807 | |||
808 | >>> from hgclient import bprint, checkwith, readchannel, runcommand |
|
808 | >>> from hgclient import bprint, checkwith, readchannel, runcommand | |
809 | >>> @checkwith(extraargs=[b'--config', b'ui.message-output=channel', |
|
809 | >>> @checkwith(extraargs=[b'--config', b'ui.message-output=channel', | |
810 | ... b'--config', b'cmdserver.message-encodings=foo cbor']) |
|
810 | ... b'--config', b'cmdserver.message-encodings=foo cbor']) | |
811 | ... def verify(server): |
|
811 | ... def verify(server): | |
812 | ... _ch, data = readchannel(server) |
|
812 | ... _ch, data = readchannel(server) | |
813 | ... bprint(data) |
|
813 | ... bprint(data) | |
814 | ... runcommand(server, [b'-R', b'repo2', b'verify']) |
|
814 | ... runcommand(server, [b'-R', b'repo2', b'verify']) | |
815 | capabilities: getencoding runcommand |
|
815 | capabilities: getencoding runcommand | |
816 | encoding: ascii |
|
816 | encoding: ascii | |
817 | message-encoding: cbor |
|
817 | message-encoding: cbor | |
818 | pid: * (glob) |
|
818 | pid: * (glob) | |
819 | pgid: * (glob) (no-windows !) |
|
819 | pgid: * (glob) (no-windows !) | |
820 | *** runcommand -R repo2 verify |
|
820 | *** runcommand -R repo2 verify | |
821 | message: '\xa2DdataTchecking changesets\nDtypeFstatus' |
|
821 | message: '\xa2DdataTchecking changesets\nDtypeFstatus' | |
822 | message: '\xa6Ditem@Cpos\xf6EtopicHcheckingEtotal\xf6DtypeHprogressDunit@' |
|
822 | message: '\xa6Ditem@Cpos\xf6EtopicHcheckingEtotal\xf6DtypeHprogressDunit@' | |
823 | message: '\xa2DdataSchecking manifests\nDtypeFstatus' |
|
823 | message: '\xa2DdataSchecking manifests\nDtypeFstatus' | |
824 | message: '\xa6Ditem@Cpos\xf6EtopicHcheckingEtotal\xf6DtypeHprogressDunit@' |
|
824 | message: '\xa6Ditem@Cpos\xf6EtopicHcheckingEtotal\xf6DtypeHprogressDunit@' | |
825 | message: '\xa2DdataX0crosschecking files in changesets and manifests\nDtypeFstatus' |
|
825 | message: '\xa2DdataX0crosschecking files in changesets and manifests\nDtypeFstatus' | |
826 | message: '\xa6Ditem@Cpos\xf6EtopicMcrosscheckingEtotal\xf6DtypeHprogressDunit@' |
|
826 | message: '\xa6Ditem@Cpos\xf6EtopicMcrosscheckingEtotal\xf6DtypeHprogressDunit@' | |
827 | message: '\xa2DdataOchecking files\nDtypeFstatus' |
|
827 | message: '\xa2DdataOchecking files\nDtypeFstatus' | |
828 | message: '\xa6Ditem@Cpos\xf6EtopicHcheckingEtotal\xf6DtypeHprogressDunit@' |
|
828 | message: '\xa6Ditem@Cpos\xf6EtopicHcheckingEtotal\xf6DtypeHprogressDunit@' | |
829 | message: '\xa2DdataRchecking dirstate\nDtypeFstatus' |
|
829 | message: '\xa2DdataRchecking dirstate\nDtypeFstatus' | |
830 | message: '\xa2DdataX/checked 0 changesets with 0 changes to 0 files\nDtypeFstatus' |
|
830 | message: '\xa2DdataX/checked 0 changesets with 0 changes to 0 files\nDtypeFstatus' | |
831 |
|
831 | |||
832 | >>> from hgclient import checkwith, readchannel, runcommand, stringio |
|
832 | >>> from hgclient import checkwith, readchannel, runcommand, stringio | |
833 | >>> @checkwith(extraargs=[b'--config', b'ui.message-output=channel', |
|
833 | >>> @checkwith(extraargs=[b'--config', b'ui.message-output=channel', | |
834 | ... b'--config', b'cmdserver.message-encodings=cbor', |
|
834 | ... b'--config', b'cmdserver.message-encodings=cbor', | |
835 | ... b'--config', b'extensions.dbgui=dbgui.py']) |
|
835 | ... b'--config', b'extensions.dbgui=dbgui.py']) | |
836 | ... def prompt(server): |
|
836 | ... def prompt(server): | |
837 | ... readchannel(server) |
|
837 | ... readchannel(server) | |
838 | ... interactive = [b'--config', b'ui.interactive=True'] |
|
838 | ... interactive = [b'--config', b'ui.interactive=True'] | |
839 | ... runcommand(server, [b'debuggetpass'] + interactive, |
|
839 | ... runcommand(server, [b'debuggetpass'] + interactive, | |
840 | ... input=stringio(b'1234\n')) |
|
840 | ... input=stringio(b'1234\n')) | |
841 | ... runcommand(server, [b'debugprompt'] + interactive, |
|
841 | ... runcommand(server, [b'debugprompt'] + interactive, | |
842 | ... input=stringio(b'5678\n')) |
|
842 | ... input=stringio(b'5678\n')) | |
843 | ... runcommand(server, [b'debugpromptchoice'] + interactive, |
|
843 | ... runcommand(server, [b'debugpromptchoice'] + interactive, | |
844 | ... input=stringio(b'n\n')) |
|
844 | ... input=stringio(b'n\n')) | |
845 | *** runcommand debuggetpass --config ui.interactive=True |
|
845 | *** runcommand debuggetpass --config ui.interactive=True | |
846 | message: '\xa3DdataJpassword: Hpassword\xf5DtypeFprompt' |
|
846 | message: '\xa3DdataJpassword: Hpassword\xf5DtypeFprompt' | |
847 | 1234 |
|
847 | 1234 | |
848 | *** runcommand debugprompt --config ui.interactive=True |
|
848 | *** runcommand debugprompt --config ui.interactive=True | |
849 | message: '\xa3DdataGprompt:GdefaultAyDtypeFprompt' |
|
849 | message: '\xa3DdataGprompt:GdefaultAyDtypeFprompt' | |
850 | 5678 |
|
850 | 5678 | |
851 | *** runcommand debugpromptchoice --config ui.interactive=True |
|
851 | *** runcommand debugpromptchoice --config ui.interactive=True | |
852 | message: '\xa4Gchoices\x82\x82AyCYes\x82AnBNoDdataTpromptchoice (y/n)? GdefaultAyDtypeFprompt' |
|
852 | message: '\xa4Gchoices\x82\x82AyCYes\x82AnBNoDdataTpromptchoice (y/n)? GdefaultAyDtypeFprompt' | |
853 | 1 |
|
853 | 1 | |
854 |
|
854 | |||
855 | bad message encoding: |
|
855 | bad message encoding: | |
856 |
|
856 | |||
857 | $ hg serve --cmdserver pipe --config ui.message-output=channel |
|
857 | $ hg serve --cmdserver pipe --config ui.message-output=channel | |
858 | abort: no supported message encodings: |
|
858 | abort: no supported message encodings: | |
859 | [255] |
|
859 | [255] | |
860 | $ hg serve --cmdserver pipe --config ui.message-output=channel \ |
|
860 | $ hg serve --cmdserver pipe --config ui.message-output=channel \ | |
861 | > --config cmdserver.message-encodings='foo bar' |
|
861 | > --config cmdserver.message-encodings='foo bar' | |
862 | abort: no supported message encodings: foo bar |
|
862 | abort: no supported message encodings: foo bar | |
863 | [255] |
|
863 | [255] | |
864 |
|
864 | |||
865 | unix domain socket: |
|
865 | unix domain socket: | |
866 |
|
866 | |||
867 | $ cd repo |
|
867 | $ cd repo | |
868 | $ hg update -q |
|
868 | $ hg update -q | |
869 |
|
869 | |||
870 | #if unix-socket unix-permissions |
|
870 | #if unix-socket unix-permissions | |
871 |
|
871 | |||
872 | >>> from hgclient import bprint, check, readchannel, runcommand, stringio, unixserver |
|
872 | >>> from hgclient import bprint, check, readchannel, runcommand, stringio, unixserver | |
873 | >>> server = unixserver(b'.hg/server.sock', b'.hg/server.log') |
|
873 | >>> server = unixserver(b'.hg/server.sock', b'.hg/server.log') | |
874 | >>> def hellomessage(conn): |
|
874 | >>> def hellomessage(conn): | |
875 | ... ch, data = readchannel(conn) |
|
875 | ... ch, data = readchannel(conn) | |
876 | ... bprint(b'%c, %r' % (ch, data)) |
|
876 | ... bprint(b'%c, %r' % (ch, data)) | |
877 | ... runcommand(conn, [b'id']) |
|
877 | ... runcommand(conn, [b'id']) | |
878 | >>> check(hellomessage, server.connect) |
|
878 | >>> check(hellomessage, server.connect) | |
879 | o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob) |
|
879 | o, 'capabilities: getencoding runcommand\nencoding: *\npid: *' (glob) | |
880 | *** runcommand id |
|
880 | *** runcommand id | |
881 | eff892de26ec tip bm1/bm2/bm3 |
|
881 | eff892de26ec tip bm1/bm2/bm3 | |
882 | >>> def unknowncommand(conn): |
|
882 | >>> def unknowncommand(conn): | |
883 | ... readchannel(conn) |
|
883 | ... readchannel(conn) | |
884 | ... conn.stdin.write(b'unknowncommand\n') |
|
884 | ... conn.stdin.write(b'unknowncommand\n') | |
885 | >>> check(unknowncommand, server.connect) # error sent to server.log |
|
885 | >>> check(unknowncommand, server.connect) # error sent to server.log | |
886 | >>> def serverinput(conn): |
|
886 | >>> def serverinput(conn): | |
887 | ... readchannel(conn) |
|
887 | ... readchannel(conn) | |
888 | ... patch = b""" |
|
888 | ... patch = b""" | |
889 | ... # HG changeset patch |
|
889 | ... # HG changeset patch | |
890 | ... # User test |
|
890 | ... # User test | |
891 | ... # Date 0 0 |
|
891 | ... # Date 0 0 | |
892 | ... 2 |
|
892 | ... 2 | |
893 | ... |
|
893 | ... | |
894 | ... diff -r eff892de26ec -r 1ed24be7e7a0 a |
|
894 | ... diff -r eff892de26ec -r 1ed24be7e7a0 a | |
895 | ... --- a/a |
|
895 | ... --- a/a | |
896 | ... +++ b/a |
|
896 | ... +++ b/a | |
897 | ... @@ -1,1 +1,2 @@ |
|
897 | ... @@ -1,1 +1,2 @@ | |
898 | ... 1 |
|
898 | ... 1 | |
899 | ... +2 |
|
899 | ... +2 | |
900 | ... """ |
|
900 | ... """ | |
901 | ... runcommand(conn, [b'import', b'-'], input=stringio(patch)) |
|
901 | ... runcommand(conn, [b'import', b'-'], input=stringio(patch)) | |
902 | ... runcommand(conn, [b'log', b'-rtip', b'-q']) |
|
902 | ... runcommand(conn, [b'log', b'-rtip', b'-q']) | |
903 | >>> check(serverinput, server.connect) |
|
903 | >>> check(serverinput, server.connect) | |
904 | *** runcommand import - |
|
904 | *** runcommand import - | |
905 | applying patch from stdin |
|
905 | applying patch from stdin | |
906 | *** runcommand log -rtip -q |
|
906 | *** runcommand log -rtip -q | |
907 | 2:1ed24be7e7a0 |
|
907 | 2:1ed24be7e7a0 | |
908 | >>> server.shutdown() |
|
908 | >>> server.shutdown() | |
909 |
|
909 | |||
910 | $ cat .hg/server.log |
|
910 | $ cat .hg/server.log | |
911 | listening at .hg/server.sock |
|
911 | listening at .hg/server.sock | |
912 | abort: unknown command unknowncommand |
|
912 | abort: unknown command unknowncommand | |
913 | killed! |
|
913 | killed! | |
914 | $ rm .hg/server.log |
|
914 | $ rm .hg/server.log | |
915 |
|
915 | |||
916 | if server crashed before hello, traceback will be sent to 'e' channel as |
|
916 | if server crashed before hello, traceback will be sent to 'e' channel as | |
917 | last ditch: |
|
917 | last ditch: | |
918 |
|
918 | |||
919 | $ cat <<'EOF' > ../earlycrasher.py |
|
919 | $ cat <<'EOF' > ../earlycrasher.py | |
920 | > from mercurial import commandserver, extensions |
|
920 | > from mercurial import commandserver, extensions | |
921 | > def _serverequest(orig, ui, repo, conn, createcmdserver, prereposetups): |
|
921 | > def _serverequest(orig, ui, repo, conn, createcmdserver, prereposetups): | |
922 | > def createcmdserver(*args, **kwargs): |
|
922 | > def createcmdserver(*args, **kwargs): | |
923 | > raise Exception('crash') |
|
923 | > raise Exception('crash') | |
924 | > return orig(ui, repo, conn, createcmdserver, prereposetups) |
|
924 | > return orig(ui, repo, conn, createcmdserver, prereposetups) | |
925 | > def extsetup(ui): |
|
925 | > def extsetup(ui): | |
926 |
> extensions.wrapfunction(commandserver, |
|
926 | > extensions.wrapfunction(commandserver, '_serverequest', _serverequest) | |
927 |
|
|
927 | > EOF | |
928 | $ cat <<EOF >> .hg/hgrc |
|
928 | $ cat <<EOF >> .hg/hgrc | |
929 | > [extensions] |
|
929 | > [extensions] | |
930 | > earlycrasher = ../earlycrasher.py |
|
930 | > earlycrasher = ../earlycrasher.py | |
931 | > EOF |
|
931 | > EOF | |
932 | >>> from hgclient import bprint, check, readchannel, unixserver |
|
932 | >>> from hgclient import bprint, check, readchannel, unixserver | |
933 | >>> server = unixserver(b'.hg/server.sock', b'.hg/server.log') |
|
933 | >>> server = unixserver(b'.hg/server.sock', b'.hg/server.log') | |
934 | >>> def earlycrash(conn): |
|
934 | >>> def earlycrash(conn): | |
935 | ... while True: |
|
935 | ... while True: | |
936 | ... try: |
|
936 | ... try: | |
937 | ... ch, data = readchannel(conn) |
|
937 | ... ch, data = readchannel(conn) | |
938 | ... for l in data.splitlines(True): |
|
938 | ... for l in data.splitlines(True): | |
939 | ... if not l.startswith(b' '): |
|
939 | ... if not l.startswith(b' '): | |
940 | ... bprint(b'%c, %r' % (ch, l)) |
|
940 | ... bprint(b'%c, %r' % (ch, l)) | |
941 | ... except EOFError: |
|
941 | ... except EOFError: | |
942 | ... break |
|
942 | ... break | |
943 | >>> check(earlycrash, server.connect) |
|
943 | >>> check(earlycrash, server.connect) | |
944 | e, 'Traceback (most recent call last):\n' |
|
944 | e, 'Traceback (most recent call last):\n' | |
945 | e, 'Exception: crash\n' |
|
945 | e, 'Exception: crash\n' | |
946 | >>> server.shutdown() |
|
946 | >>> server.shutdown() | |
947 |
|
947 | |||
948 | $ cat .hg/server.log | grep -v '^ ' |
|
948 | $ cat .hg/server.log | grep -v '^ ' | |
949 | listening at .hg/server.sock |
|
949 | listening at .hg/server.sock | |
950 | Traceback (most recent call last): |
|
950 | Traceback (most recent call last): | |
951 | Exception: crash |
|
951 | Exception: crash | |
952 | killed! |
|
952 | killed! | |
953 | #endif |
|
953 | #endif | |
954 | #if no-unix-socket |
|
954 | #if no-unix-socket | |
955 |
|
955 | |||
956 | $ hg serve --cmdserver unix -a .hg/server.sock |
|
956 | $ hg serve --cmdserver unix -a .hg/server.sock | |
957 | abort: unsupported platform |
|
957 | abort: unsupported platform | |
958 | [255] |
|
958 | [255] | |
959 |
|
959 | |||
960 | #endif |
|
960 | #endif | |
961 |
|
961 | |||
962 | $ cd .. |
|
962 | $ cd .. | |
963 |
|
963 | |||
964 | Test that accessing to invalid changelog cache is avoided at |
|
964 | Test that accessing to invalid changelog cache is avoided at | |
965 | subsequent operations even if repo object is reused even after failure |
|
965 | subsequent operations even if repo object is reused even after failure | |
966 | of transaction (see 0a7610758c42 also) |
|
966 | of transaction (see 0a7610758c42 also) | |
967 |
|
967 | |||
968 | "hg log" after failure of transaction is needed to detect invalid |
|
968 | "hg log" after failure of transaction is needed to detect invalid | |
969 | cache in repoview: this can't detect by "hg verify" only. |
|
969 | cache in repoview: this can't detect by "hg verify" only. | |
970 |
|
970 | |||
971 | Combination of "finalization" and "empty-ness of changelog" (2 x 2 = |
|
971 | Combination of "finalization" and "empty-ness of changelog" (2 x 2 = | |
972 | 4) are tested, because '00changelog.i' are differently changed in each |
|
972 | 4) are tested, because '00changelog.i' are differently changed in each | |
973 | cases. |
|
973 | cases. | |
974 |
|
974 | |||
975 | $ cat > $TESTTMP/failafterfinalize.py <<EOF |
|
975 | $ cat > $TESTTMP/failafterfinalize.py <<EOF | |
976 | > # extension to abort transaction after finalization forcibly |
|
976 | > # extension to abort transaction after finalization forcibly | |
977 | > from mercurial import commands, error, extensions, lock as lockmod |
|
977 | > from mercurial import commands, error, extensions, lock as lockmod | |
978 | > from mercurial import registrar |
|
978 | > from mercurial import registrar | |
979 | > cmdtable = {} |
|
979 | > cmdtable = {} | |
980 | > command = registrar.command(cmdtable) |
|
980 | > command = registrar.command(cmdtable) | |
981 | > configtable = {} |
|
981 | > configtable = {} | |
982 | > configitem = registrar.configitem(configtable) |
|
982 | > configitem = registrar.configitem(configtable) | |
983 | > configitem(b'failafterfinalize', b'fail', |
|
983 | > configitem(b'failafterfinalize', b'fail', | |
984 | > default=None, |
|
984 | > default=None, | |
985 | > ) |
|
985 | > ) | |
986 | > def fail(tr): |
|
986 | > def fail(tr): | |
987 | > raise error.Abort(b'fail after finalization') |
|
987 | > raise error.Abort(b'fail after finalization') | |
988 | > def reposetup(ui, repo): |
|
988 | > def reposetup(ui, repo): | |
989 | > class failrepo(repo.__class__): |
|
989 | > class failrepo(repo.__class__): | |
990 | > def commitctx(self, ctx, error=False, origctx=None): |
|
990 | > def commitctx(self, ctx, error=False, origctx=None): | |
991 | > if self.ui.configbool(b'failafterfinalize', b'fail'): |
|
991 | > if self.ui.configbool(b'failafterfinalize', b'fail'): | |
992 | > # 'sorted()' by ASCII code on category names causes |
|
992 | > # 'sorted()' by ASCII code on category names causes | |
993 | > # invoking 'fail' after finalization of changelog |
|
993 | > # invoking 'fail' after finalization of changelog | |
994 | > # using "'cl-%i' % id(self)" as category name |
|
994 | > # using "'cl-%i' % id(self)" as category name | |
995 | > self.currenttransaction().addfinalize(b'zzzzzzzz', fail) |
|
995 | > self.currenttransaction().addfinalize(b'zzzzzzzz', fail) | |
996 | > return super(failrepo, self).commitctx(ctx, error, origctx) |
|
996 | > return super(failrepo, self).commitctx(ctx, error, origctx) | |
997 | > repo.__class__ = failrepo |
|
997 | > repo.__class__ = failrepo | |
998 | > EOF |
|
998 | > EOF | |
999 |
|
999 | |||
1000 | $ hg init repo3 |
|
1000 | $ hg init repo3 | |
1001 | $ cd repo3 |
|
1001 | $ cd repo3 | |
1002 |
|
1002 | |||
1003 | $ cat <<EOF >> $HGRCPATH |
|
1003 | $ cat <<EOF >> $HGRCPATH | |
1004 | > [command-templates] |
|
1004 | > [command-templates] | |
1005 | > log = {rev} {desc|firstline} ({files})\n |
|
1005 | > log = {rev} {desc|firstline} ({files})\n | |
1006 | > |
|
1006 | > | |
1007 | > [extensions] |
|
1007 | > [extensions] | |
1008 | > failafterfinalize = $TESTTMP/failafterfinalize.py |
|
1008 | > failafterfinalize = $TESTTMP/failafterfinalize.py | |
1009 | > EOF |
|
1009 | > EOF | |
1010 |
|
1010 | |||
1011 | - test failure with "empty changelog" |
|
1011 | - test failure with "empty changelog" | |
1012 |
|
1012 | |||
1013 | $ echo foo > foo |
|
1013 | $ echo foo > foo | |
1014 | $ hg add foo |
|
1014 | $ hg add foo | |
1015 |
|
1015 | |||
1016 | (failure before finalization) |
|
1016 | (failure before finalization) | |
1017 |
|
1017 | |||
1018 | >>> from hgclient import check, readchannel, runcommand |
|
1018 | >>> from hgclient import check, readchannel, runcommand | |
1019 | >>> @check |
|
1019 | >>> @check | |
1020 | ... def abort(server): |
|
1020 | ... def abort(server): | |
1021 | ... readchannel(server) |
|
1021 | ... readchannel(server) | |
1022 | ... runcommand(server, [b'commit', |
|
1022 | ... runcommand(server, [b'commit', | |
1023 | ... b'--config', b'hooks.pretxncommit=false', |
|
1023 | ... b'--config', b'hooks.pretxncommit=false', | |
1024 | ... b'-mfoo']) |
|
1024 | ... b'-mfoo']) | |
1025 | ... runcommand(server, [b'log']) |
|
1025 | ... runcommand(server, [b'log']) | |
1026 | ... runcommand(server, [b'verify', b'-q']) |
|
1026 | ... runcommand(server, [b'verify', b'-q']) | |
1027 | *** runcommand commit --config hooks.pretxncommit=false -mfoo |
|
1027 | *** runcommand commit --config hooks.pretxncommit=false -mfoo | |
1028 | transaction abort! |
|
1028 | transaction abort! | |
1029 | rollback completed |
|
1029 | rollback completed | |
1030 | abort: pretxncommit hook exited with status 1 |
|
1030 | abort: pretxncommit hook exited with status 1 | |
1031 | [40] |
|
1031 | [40] | |
1032 | *** runcommand log |
|
1032 | *** runcommand log | |
1033 | *** runcommand verify -q |
|
1033 | *** runcommand verify -q | |
1034 |
|
1034 | |||
1035 | (failure after finalization) |
|
1035 | (failure after finalization) | |
1036 |
|
1036 | |||
1037 | >>> from hgclient import check, readchannel, runcommand |
|
1037 | >>> from hgclient import check, readchannel, runcommand | |
1038 | >>> @check |
|
1038 | >>> @check | |
1039 | ... def abort(server): |
|
1039 | ... def abort(server): | |
1040 | ... readchannel(server) |
|
1040 | ... readchannel(server) | |
1041 | ... runcommand(server, [b'commit', |
|
1041 | ... runcommand(server, [b'commit', | |
1042 | ... b'--config', b'failafterfinalize.fail=true', |
|
1042 | ... b'--config', b'failafterfinalize.fail=true', | |
1043 | ... b'-mfoo']) |
|
1043 | ... b'-mfoo']) | |
1044 | ... runcommand(server, [b'log']) |
|
1044 | ... runcommand(server, [b'log']) | |
1045 | ... runcommand(server, [b'verify', b'-q']) |
|
1045 | ... runcommand(server, [b'verify', b'-q']) | |
1046 | *** runcommand commit --config failafterfinalize.fail=true -mfoo |
|
1046 | *** runcommand commit --config failafterfinalize.fail=true -mfoo | |
1047 | transaction abort! |
|
1047 | transaction abort! | |
1048 | rollback completed |
|
1048 | rollback completed | |
1049 | abort: fail after finalization |
|
1049 | abort: fail after finalization | |
1050 | [255] |
|
1050 | [255] | |
1051 | *** runcommand log |
|
1051 | *** runcommand log | |
1052 | *** runcommand verify -q |
|
1052 | *** runcommand verify -q | |
1053 |
|
1053 | |||
1054 | - test failure with "not-empty changelog" |
|
1054 | - test failure with "not-empty changelog" | |
1055 |
|
1055 | |||
1056 | $ echo bar > bar |
|
1056 | $ echo bar > bar | |
1057 | $ hg add bar |
|
1057 | $ hg add bar | |
1058 | $ hg commit -mbar bar |
|
1058 | $ hg commit -mbar bar | |
1059 |
|
1059 | |||
1060 | (failure before finalization) |
|
1060 | (failure before finalization) | |
1061 |
|
1061 | |||
1062 | >>> from hgclient import check, readchannel, runcommand |
|
1062 | >>> from hgclient import check, readchannel, runcommand | |
1063 | >>> @check |
|
1063 | >>> @check | |
1064 | ... def abort(server): |
|
1064 | ... def abort(server): | |
1065 | ... readchannel(server) |
|
1065 | ... readchannel(server) | |
1066 | ... runcommand(server, [b'commit', |
|
1066 | ... runcommand(server, [b'commit', | |
1067 | ... b'--config', b'hooks.pretxncommit=false', |
|
1067 | ... b'--config', b'hooks.pretxncommit=false', | |
1068 | ... b'-mfoo', b'foo']) |
|
1068 | ... b'-mfoo', b'foo']) | |
1069 | ... runcommand(server, [b'log']) |
|
1069 | ... runcommand(server, [b'log']) | |
1070 | ... runcommand(server, [b'verify', b'-q']) |
|
1070 | ... runcommand(server, [b'verify', b'-q']) | |
1071 | *** runcommand commit --config hooks.pretxncommit=false -mfoo foo |
|
1071 | *** runcommand commit --config hooks.pretxncommit=false -mfoo foo | |
1072 | transaction abort! |
|
1072 | transaction abort! | |
1073 | rollback completed |
|
1073 | rollback completed | |
1074 | abort: pretxncommit hook exited with status 1 |
|
1074 | abort: pretxncommit hook exited with status 1 | |
1075 | [40] |
|
1075 | [40] | |
1076 | *** runcommand log |
|
1076 | *** runcommand log | |
1077 | 0 bar (bar) |
|
1077 | 0 bar (bar) | |
1078 | *** runcommand verify -q |
|
1078 | *** runcommand verify -q | |
1079 |
|
1079 | |||
1080 | (failure after finalization) |
|
1080 | (failure after finalization) | |
1081 |
|
1081 | |||
1082 | >>> from hgclient import check, readchannel, runcommand |
|
1082 | >>> from hgclient import check, readchannel, runcommand | |
1083 | >>> @check |
|
1083 | >>> @check | |
1084 | ... def abort(server): |
|
1084 | ... def abort(server): | |
1085 | ... readchannel(server) |
|
1085 | ... readchannel(server) | |
1086 | ... runcommand(server, [b'commit', |
|
1086 | ... runcommand(server, [b'commit', | |
1087 | ... b'--config', b'failafterfinalize.fail=true', |
|
1087 | ... b'--config', b'failafterfinalize.fail=true', | |
1088 | ... b'-mfoo', b'foo']) |
|
1088 | ... b'-mfoo', b'foo']) | |
1089 | ... runcommand(server, [b'log']) |
|
1089 | ... runcommand(server, [b'log']) | |
1090 | ... runcommand(server, [b'verify', b'-q']) |
|
1090 | ... runcommand(server, [b'verify', b'-q']) | |
1091 | *** runcommand commit --config failafterfinalize.fail=true -mfoo foo |
|
1091 | *** runcommand commit --config failafterfinalize.fail=true -mfoo foo | |
1092 | transaction abort! |
|
1092 | transaction abort! | |
1093 | rollback completed |
|
1093 | rollback completed | |
1094 | abort: fail after finalization |
|
1094 | abort: fail after finalization | |
1095 | [255] |
|
1095 | [255] | |
1096 | *** runcommand log |
|
1096 | *** runcommand log | |
1097 | 0 bar (bar) |
|
1097 | 0 bar (bar) | |
1098 | *** runcommand verify -q |
|
1098 | *** runcommand verify -q | |
1099 |
|
1099 | |||
1100 | $ cd .. |
|
1100 | $ cd .. | |
1101 |
|
1101 | |||
1102 | Test symlink traversal over cached audited paths: |
|
1102 | Test symlink traversal over cached audited paths: | |
1103 | ------------------------------------------------- |
|
1103 | ------------------------------------------------- | |
1104 |
|
1104 | |||
1105 | #if symlink |
|
1105 | #if symlink | |
1106 |
|
1106 | |||
1107 | set up symlink hell |
|
1107 | set up symlink hell | |
1108 |
|
1108 | |||
1109 | $ mkdir merge-symlink-out |
|
1109 | $ mkdir merge-symlink-out | |
1110 | $ hg init merge-symlink |
|
1110 | $ hg init merge-symlink | |
1111 | $ cd merge-symlink |
|
1111 | $ cd merge-symlink | |
1112 | $ touch base |
|
1112 | $ touch base | |
1113 | $ hg commit -qAm base |
|
1113 | $ hg commit -qAm base | |
1114 | $ ln -s ../merge-symlink-out a |
|
1114 | $ ln -s ../merge-symlink-out a | |
1115 | $ hg commit -qAm 'symlink a -> ../merge-symlink-out' |
|
1115 | $ hg commit -qAm 'symlink a -> ../merge-symlink-out' | |
1116 | $ hg up -q 0 |
|
1116 | $ hg up -q 0 | |
1117 | $ mkdir a |
|
1117 | $ mkdir a | |
1118 | $ touch a/poisoned |
|
1118 | $ touch a/poisoned | |
1119 | $ hg commit -qAm 'file a/poisoned' |
|
1119 | $ hg commit -qAm 'file a/poisoned' | |
1120 | $ hg log -G -T '{rev}: {desc}\n' |
|
1120 | $ hg log -G -T '{rev}: {desc}\n' | |
1121 | @ 2: file a/poisoned |
|
1121 | @ 2: file a/poisoned | |
1122 | | |
|
1122 | | | |
1123 | | o 1: symlink a -> ../merge-symlink-out |
|
1123 | | o 1: symlink a -> ../merge-symlink-out | |
1124 | |/ |
|
1124 | |/ | |
1125 | o 0: base |
|
1125 | o 0: base | |
1126 |
|
1126 | |||
1127 |
|
1127 | |||
1128 | try trivial merge after update: cache of audited paths should be discarded, |
|
1128 | try trivial merge after update: cache of audited paths should be discarded, | |
1129 | and the merge should fail (issue5628) |
|
1129 | and the merge should fail (issue5628) | |
1130 |
|
1130 | |||
1131 | $ hg up -q null |
|
1131 | $ hg up -q null | |
1132 | >>> from hgclient import check, readchannel, runcommand |
|
1132 | >>> from hgclient import check, readchannel, runcommand | |
1133 | >>> @check |
|
1133 | >>> @check | |
1134 | ... def merge(server): |
|
1134 | ... def merge(server): | |
1135 | ... readchannel(server) |
|
1135 | ... readchannel(server) | |
1136 | ... # audit a/poisoned as a good path |
|
1136 | ... # audit a/poisoned as a good path | |
1137 | ... runcommand(server, [b'up', b'-qC', b'2']) |
|
1137 | ... runcommand(server, [b'up', b'-qC', b'2']) | |
1138 | ... runcommand(server, [b'up', b'-qC', b'1']) |
|
1138 | ... runcommand(server, [b'up', b'-qC', b'1']) | |
1139 | ... # here a is a symlink, so a/poisoned is bad |
|
1139 | ... # here a is a symlink, so a/poisoned is bad | |
1140 | ... runcommand(server, [b'merge', b'2']) |
|
1140 | ... runcommand(server, [b'merge', b'2']) | |
1141 | *** runcommand up -qC 2 |
|
1141 | *** runcommand up -qC 2 | |
1142 | *** runcommand up -qC 1 |
|
1142 | *** runcommand up -qC 1 | |
1143 | *** runcommand merge 2 |
|
1143 | *** runcommand merge 2 | |
1144 | abort: path 'a/poisoned' traverses symbolic link 'a' |
|
1144 | abort: path 'a/poisoned' traverses symbolic link 'a' | |
1145 | [255] |
|
1145 | [255] | |
1146 | $ ls ../merge-symlink-out |
|
1146 | $ ls ../merge-symlink-out | |
1147 |
|
1147 | |||
1148 | cache of repo.auditor should be discarded, so matcher would never traverse |
|
1148 | cache of repo.auditor should be discarded, so matcher would never traverse | |
1149 | symlinks: |
|
1149 | symlinks: | |
1150 |
|
1150 | |||
1151 | $ hg up -qC 0 |
|
1151 | $ hg up -qC 0 | |
1152 | $ touch ../merge-symlink-out/poisoned |
|
1152 | $ touch ../merge-symlink-out/poisoned | |
1153 | >>> from hgclient import check, readchannel, runcommand |
|
1153 | >>> from hgclient import check, readchannel, runcommand | |
1154 | >>> @check |
|
1154 | >>> @check | |
1155 | ... def files(server): |
|
1155 | ... def files(server): | |
1156 | ... readchannel(server) |
|
1156 | ... readchannel(server) | |
1157 | ... runcommand(server, [b'up', b'-qC', b'2']) |
|
1157 | ... runcommand(server, [b'up', b'-qC', b'2']) | |
1158 | ... # audit a/poisoned as a good path |
|
1158 | ... # audit a/poisoned as a good path | |
1159 | ... runcommand(server, [b'files', b'a/poisoned']) |
|
1159 | ... runcommand(server, [b'files', b'a/poisoned']) | |
1160 | ... runcommand(server, [b'up', b'-qC', b'0']) |
|
1160 | ... runcommand(server, [b'up', b'-qC', b'0']) | |
1161 | ... runcommand(server, [b'up', b'-qC', b'1']) |
|
1161 | ... runcommand(server, [b'up', b'-qC', b'1']) | |
1162 | ... # here 'a' is a symlink, so a/poisoned should be warned |
|
1162 | ... # here 'a' is a symlink, so a/poisoned should be warned | |
1163 | ... runcommand(server, [b'files', b'a/poisoned']) |
|
1163 | ... runcommand(server, [b'files', b'a/poisoned']) | |
1164 | *** runcommand up -qC 2 |
|
1164 | *** runcommand up -qC 2 | |
1165 | *** runcommand files a/poisoned |
|
1165 | *** runcommand files a/poisoned | |
1166 | a/poisoned |
|
1166 | a/poisoned | |
1167 | *** runcommand up -qC 0 |
|
1167 | *** runcommand up -qC 0 | |
1168 | *** runcommand up -qC 1 |
|
1168 | *** runcommand up -qC 1 | |
1169 | *** runcommand files a/poisoned |
|
1169 | *** runcommand files a/poisoned | |
1170 | abort: path 'a/poisoned' traverses symbolic link 'a' |
|
1170 | abort: path 'a/poisoned' traverses symbolic link 'a' | |
1171 | [255] |
|
1171 | [255] | |
1172 |
|
1172 | |||
1173 | $ cd .. |
|
1173 | $ cd .. | |
1174 |
|
1174 | |||
1175 | #endif |
|
1175 | #endif |
@@ -1,532 +1,532 b'' | |||||
1 | #require repofncache |
|
1 | #require repofncache | |
2 |
|
2 | |||
3 | An extension which will set fncache chunksize to 1 byte to make sure that logic |
|
3 | An extension which will set fncache chunksize to 1 byte to make sure that logic | |
4 | does not break |
|
4 | does not break | |
5 |
|
5 | |||
6 | $ cat > chunksize.py <<EOF |
|
6 | $ cat > chunksize.py <<EOF | |
7 | > from mercurial import store |
|
7 | > from mercurial import store | |
8 | > store.fncache_chunksize = 1 |
|
8 | > store.fncache_chunksize = 1 | |
9 | > EOF |
|
9 | > EOF | |
10 |
|
10 | |||
11 | $ cat >> $HGRCPATH <<EOF |
|
11 | $ cat >> $HGRCPATH <<EOF | |
12 | > [extensions] |
|
12 | > [extensions] | |
13 | > chunksize = $TESTTMP/chunksize.py |
|
13 | > chunksize = $TESTTMP/chunksize.py | |
14 | > EOF |
|
14 | > EOF | |
15 |
|
15 | |||
16 | Init repo1: |
|
16 | Init repo1: | |
17 |
|
17 | |||
18 | $ hg init repo1 |
|
18 | $ hg init repo1 | |
19 | $ cd repo1 |
|
19 | $ cd repo1 | |
20 | $ echo "some text" > a |
|
20 | $ echo "some text" > a | |
21 | $ hg add |
|
21 | $ hg add | |
22 | adding a |
|
22 | adding a | |
23 | $ hg ci -m first |
|
23 | $ hg ci -m first | |
24 | $ cat .hg/store/fncache | sort |
|
24 | $ cat .hg/store/fncache | sort | |
25 | data/a.i |
|
25 | data/a.i | |
26 |
|
26 | |||
27 | Testing a.i/b: |
|
27 | Testing a.i/b: | |
28 |
|
28 | |||
29 | $ mkdir a.i |
|
29 | $ mkdir a.i | |
30 | $ echo "some other text" > a.i/b |
|
30 | $ echo "some other text" > a.i/b | |
31 | $ hg add |
|
31 | $ hg add | |
32 | adding a.i/b |
|
32 | adding a.i/b | |
33 | $ hg ci -m second |
|
33 | $ hg ci -m second | |
34 | $ cat .hg/store/fncache | sort |
|
34 | $ cat .hg/store/fncache | sort | |
35 | data/a.i |
|
35 | data/a.i | |
36 | data/a.i.hg/b.i |
|
36 | data/a.i.hg/b.i | |
37 |
|
37 | |||
38 | Testing a.i.hg/c: |
|
38 | Testing a.i.hg/c: | |
39 |
|
39 | |||
40 | $ mkdir a.i.hg |
|
40 | $ mkdir a.i.hg | |
41 | $ echo "yet another text" > a.i.hg/c |
|
41 | $ echo "yet another text" > a.i.hg/c | |
42 | $ hg add |
|
42 | $ hg add | |
43 | adding a.i.hg/c |
|
43 | adding a.i.hg/c | |
44 | $ hg ci -m third |
|
44 | $ hg ci -m third | |
45 | $ cat .hg/store/fncache | sort |
|
45 | $ cat .hg/store/fncache | sort | |
46 | data/a.i |
|
46 | data/a.i | |
47 | data/a.i.hg.hg/c.i |
|
47 | data/a.i.hg.hg/c.i | |
48 | data/a.i.hg/b.i |
|
48 | data/a.i.hg/b.i | |
49 |
|
49 | |||
50 | Testing verify: |
|
50 | Testing verify: | |
51 |
|
51 | |||
52 | $ hg verify -q |
|
52 | $ hg verify -q | |
53 |
|
53 | |||
54 | $ rm .hg/store/fncache |
|
54 | $ rm .hg/store/fncache | |
55 |
|
55 | |||
56 | $ hg verify |
|
56 | $ hg verify | |
57 | checking changesets |
|
57 | checking changesets | |
58 | checking manifests |
|
58 | checking manifests | |
59 | crosschecking files in changesets and manifests |
|
59 | crosschecking files in changesets and manifests | |
60 | checking files |
|
60 | checking files | |
61 | warning: revlog 'data/a.i' not in fncache! |
|
61 | warning: revlog 'data/a.i' not in fncache! | |
62 | warning: revlog 'data/a.i.hg/c.i' not in fncache! |
|
62 | warning: revlog 'data/a.i.hg/c.i' not in fncache! | |
63 | warning: revlog 'data/a.i/b.i' not in fncache! |
|
63 | warning: revlog 'data/a.i/b.i' not in fncache! | |
64 | checking dirstate |
|
64 | checking dirstate | |
65 | checked 3 changesets with 3 changes to 3 files |
|
65 | checked 3 changesets with 3 changes to 3 files | |
66 | 3 warnings encountered! |
|
66 | 3 warnings encountered! | |
67 | hint: run "hg debugrebuildfncache" to recover from corrupt fncache |
|
67 | hint: run "hg debugrebuildfncache" to recover from corrupt fncache | |
68 |
|
68 | |||
69 | Follow the hint to make sure it works |
|
69 | Follow the hint to make sure it works | |
70 |
|
70 | |||
71 | $ hg debugrebuildfncache |
|
71 | $ hg debugrebuildfncache | |
72 | adding data/a.i |
|
72 | adding data/a.i | |
73 | adding data/a.i.hg/c.i |
|
73 | adding data/a.i.hg/c.i | |
74 | adding data/a.i/b.i |
|
74 | adding data/a.i/b.i | |
75 | 3 items added, 0 removed from fncache |
|
75 | 3 items added, 0 removed from fncache | |
76 |
|
76 | |||
77 | $ hg verify -q |
|
77 | $ hg verify -q | |
78 |
|
78 | |||
79 | $ cd .. |
|
79 | $ cd .. | |
80 |
|
80 | |||
81 | Non store repo: |
|
81 | Non store repo: | |
82 |
|
82 | |||
83 | $ hg --config format.usestore=False init foo |
|
83 | $ hg --config format.usestore=False init foo | |
84 | $ cd foo |
|
84 | $ cd foo | |
85 | $ mkdir tst.d |
|
85 | $ mkdir tst.d | |
86 | $ echo foo > tst.d/foo |
|
86 | $ echo foo > tst.d/foo | |
87 | $ hg ci -Amfoo |
|
87 | $ hg ci -Amfoo | |
88 | adding tst.d/foo |
|
88 | adding tst.d/foo | |
89 | $ find .hg | sort |
|
89 | $ find .hg | sort | |
90 | .hg |
|
90 | .hg | |
91 | .hg/00changelog.i |
|
91 | .hg/00changelog.i | |
92 | .hg/00manifest.i |
|
92 | .hg/00manifest.i | |
93 | .hg/branch |
|
93 | .hg/branch | |
94 | .hg/cache |
|
94 | .hg/cache | |
95 | .hg/cache/branch2-served |
|
95 | .hg/cache/branch2-served | |
96 | .hg/cache/rbc-names-v1 |
|
96 | .hg/cache/rbc-names-v1 | |
97 | .hg/cache/rbc-revs-v1 |
|
97 | .hg/cache/rbc-revs-v1 | |
98 | .hg/data |
|
98 | .hg/data | |
99 | .hg/data/tst.d.hg |
|
99 | .hg/data/tst.d.hg | |
100 | .hg/data/tst.d.hg/foo.i |
|
100 | .hg/data/tst.d.hg/foo.i | |
101 | .hg/dirstate |
|
101 | .hg/dirstate | |
102 | .hg/fsmonitor.state (fsmonitor !) |
|
102 | .hg/fsmonitor.state (fsmonitor !) | |
103 | .hg/last-message.txt |
|
103 | .hg/last-message.txt | |
104 | .hg/phaseroots |
|
104 | .hg/phaseroots | |
105 | .hg/requires |
|
105 | .hg/requires | |
106 | .hg/undo |
|
106 | .hg/undo | |
107 | .hg/undo.backup.branch.bck |
|
107 | .hg/undo.backup.branch.bck | |
108 | .hg/undo.backupfiles |
|
108 | .hg/undo.backupfiles | |
109 | .hg/undo.desc |
|
109 | .hg/undo.desc | |
110 | .hg/wcache |
|
110 | .hg/wcache | |
111 | .hg/wcache/checkisexec (execbit !) |
|
111 | .hg/wcache/checkisexec (execbit !) | |
112 | .hg/wcache/checklink (symlink !) |
|
112 | .hg/wcache/checklink (symlink !) | |
113 | .hg/wcache/checklink-target (symlink !) |
|
113 | .hg/wcache/checklink-target (symlink !) | |
114 | .hg/wcache/manifestfulltextcache (reporevlogstore !) |
|
114 | .hg/wcache/manifestfulltextcache (reporevlogstore !) | |
115 | $ cd .. |
|
115 | $ cd .. | |
116 |
|
116 | |||
117 | Non fncache repo: |
|
117 | Non fncache repo: | |
118 |
|
118 | |||
119 | $ hg --config format.usefncache=False init bar |
|
119 | $ hg --config format.usefncache=False init bar | |
120 | $ cd bar |
|
120 | $ cd bar | |
121 | $ mkdir tst.d |
|
121 | $ mkdir tst.d | |
122 | $ echo foo > tst.d/Foo |
|
122 | $ echo foo > tst.d/Foo | |
123 | $ hg ci -Amfoo |
|
123 | $ hg ci -Amfoo | |
124 | adding tst.d/Foo |
|
124 | adding tst.d/Foo | |
125 | $ find .hg | sort |
|
125 | $ find .hg | sort | |
126 | .hg |
|
126 | .hg | |
127 | .hg/00changelog.i |
|
127 | .hg/00changelog.i | |
128 | .hg/branch |
|
128 | .hg/branch | |
129 | .hg/cache |
|
129 | .hg/cache | |
130 | .hg/cache/branch2-served |
|
130 | .hg/cache/branch2-served | |
131 | .hg/cache/rbc-names-v1 |
|
131 | .hg/cache/rbc-names-v1 | |
132 | .hg/cache/rbc-revs-v1 |
|
132 | .hg/cache/rbc-revs-v1 | |
133 | .hg/dirstate |
|
133 | .hg/dirstate | |
134 | .hg/fsmonitor.state (fsmonitor !) |
|
134 | .hg/fsmonitor.state (fsmonitor !) | |
135 | .hg/last-message.txt |
|
135 | .hg/last-message.txt | |
136 | .hg/requires |
|
136 | .hg/requires | |
137 | .hg/store |
|
137 | .hg/store | |
138 | .hg/store/00changelog.i |
|
138 | .hg/store/00changelog.i | |
139 | .hg/store/00manifest.i |
|
139 | .hg/store/00manifest.i | |
140 | .hg/store/data |
|
140 | .hg/store/data | |
141 | .hg/store/data/tst.d.hg |
|
141 | .hg/store/data/tst.d.hg | |
142 | .hg/store/data/tst.d.hg/_foo.i |
|
142 | .hg/store/data/tst.d.hg/_foo.i | |
143 | .hg/store/phaseroots |
|
143 | .hg/store/phaseroots | |
144 | .hg/store/requires |
|
144 | .hg/store/requires | |
145 | .hg/store/undo |
|
145 | .hg/store/undo | |
146 | .hg/store/undo.backupfiles |
|
146 | .hg/store/undo.backupfiles | |
147 | .hg/undo.backup.branch.bck |
|
147 | .hg/undo.backup.branch.bck | |
148 | .hg/undo.desc |
|
148 | .hg/undo.desc | |
149 | .hg/wcache |
|
149 | .hg/wcache | |
150 | .hg/wcache/checkisexec (execbit !) |
|
150 | .hg/wcache/checkisexec (execbit !) | |
151 | .hg/wcache/checklink (symlink !) |
|
151 | .hg/wcache/checklink (symlink !) | |
152 | .hg/wcache/checklink-target (symlink !) |
|
152 | .hg/wcache/checklink-target (symlink !) | |
153 | .hg/wcache/manifestfulltextcache (reporevlogstore !) |
|
153 | .hg/wcache/manifestfulltextcache (reporevlogstore !) | |
154 | $ cd .. |
|
154 | $ cd .. | |
155 |
|
155 | |||
156 | Encoding of reserved / long paths in the store |
|
156 | Encoding of reserved / long paths in the store | |
157 |
|
157 | |||
158 | $ hg init r2 |
|
158 | $ hg init r2 | |
159 | $ cd r2 |
|
159 | $ cd r2 | |
160 | $ cat <<EOF > .hg/hgrc |
|
160 | $ cat <<EOF > .hg/hgrc | |
161 | > [ui] |
|
161 | > [ui] | |
162 | > portablefilenames = ignore |
|
162 | > portablefilenames = ignore | |
163 | > EOF |
|
163 | > EOF | |
164 |
|
164 | |||
165 | $ hg import -q --bypass - <<EOF |
|
165 | $ hg import -q --bypass - <<EOF | |
166 | > # HG changeset patch |
|
166 | > # HG changeset patch | |
167 | > # User test |
|
167 | > # User test | |
168 | > # Date 0 0 |
|
168 | > # Date 0 0 | |
169 | > # Node ID 1c7a2f7cb77be1a0def34e4c7cabc562ad98fbd7 |
|
169 | > # Node ID 1c7a2f7cb77be1a0def34e4c7cabc562ad98fbd7 | |
170 | > # Parent 0000000000000000000000000000000000000000 |
|
170 | > # Parent 0000000000000000000000000000000000000000 | |
171 | > 1 |
|
171 | > 1 | |
172 | > |
|
172 | > | |
173 | > diff --git a/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz b/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz |
|
173 | > diff --git a/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz b/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz | |
174 | > new file mode 100644 |
|
174 | > new file mode 100644 | |
175 | > --- /dev/null |
|
175 | > --- /dev/null | |
176 | > +++ b/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz |
|
176 | > +++ b/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz | |
177 | > @@ -0,0 +1,1 @@ |
|
177 | > @@ -0,0 +1,1 @@ | |
178 | > +foo |
|
178 | > +foo | |
179 | > diff --git a/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/TENTH/ELEVENTH/LOREMIPSUM.TXT b/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/TENTH/ELEVENTH/LOREMIPSUM.TXT |
|
179 | > diff --git a/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/TENTH/ELEVENTH/LOREMIPSUM.TXT b/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/TENTH/ELEVENTH/LOREMIPSUM.TXT | |
180 | > new file mode 100644 |
|
180 | > new file mode 100644 | |
181 | > --- /dev/null |
|
181 | > --- /dev/null | |
182 | > +++ b/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/TENTH/ELEVENTH/LOREMIPSUM.TXT |
|
182 | > +++ b/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/TENTH/ELEVENTH/LOREMIPSUM.TXT | |
183 | > @@ -0,0 +1,1 @@ |
|
183 | > @@ -0,0 +1,1 @@ | |
184 | > +foo |
|
184 | > +foo | |
185 | > diff --git a/Project Planning/Resources/AnotherLongDirectoryName/Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt b/Project Planning/Resources/AnotherLongDirectoryName/Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt |
|
185 | > diff --git a/Project Planning/Resources/AnotherLongDirectoryName/Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt b/Project Planning/Resources/AnotherLongDirectoryName/Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt | |
186 | > new file mode 100644 |
|
186 | > new file mode 100644 | |
187 | > --- /dev/null |
|
187 | > --- /dev/null | |
188 | > +++ b/Project Planning/Resources/AnotherLongDirectoryName/Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt |
|
188 | > +++ b/Project Planning/Resources/AnotherLongDirectoryName/Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt | |
189 | > @@ -0,0 +1,1 @@ |
|
189 | > @@ -0,0 +1,1 @@ | |
190 | > +foo |
|
190 | > +foo | |
191 | > diff --git a/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c b/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c |
|
191 | > diff --git a/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c b/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c | |
192 | > new file mode 100644 |
|
192 | > new file mode 100644 | |
193 | > --- /dev/null |
|
193 | > --- /dev/null | |
194 | > +++ b/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c |
|
194 | > +++ b/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c | |
195 | > @@ -0,0 +1,1 @@ |
|
195 | > @@ -0,0 +1,1 @@ | |
196 | > +foo |
|
196 | > +foo | |
197 | > diff --git a/enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/wsdlExtension/src/main/java/META-INF/services/org.netbeans.modules.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider b/enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/wsdlExtension/src/main/java/META-INF/services/org.netbeans.modules.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider |
|
197 | > diff --git a/enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/wsdlExtension/src/main/java/META-INF/services/org.netbeans.modules.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider b/enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/wsdlExtension/src/main/java/META-INF/services/org.netbeans.modules.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider | |
198 | > new file mode 100644 |
|
198 | > new file mode 100644 | |
199 | > --- /dev/null |
|
199 | > --- /dev/null | |
200 | > +++ b/enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/wsdlExtension/src/main/java/META-INF/services/org.netbeans.modules.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider |
|
200 | > +++ b/enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/wsdlExtension/src/main/java/META-INF/services/org.netbeans.modules.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider | |
201 | > @@ -0,0 +1,1 @@ |
|
201 | > @@ -0,0 +1,1 @@ | |
202 | > +foo |
|
202 | > +foo | |
203 | > EOF |
|
203 | > EOF | |
204 |
|
204 | |||
205 | $ find .hg/store -name *.i | sort |
|
205 | $ find .hg/store -name *.i | sort | |
206 | .hg/store/00changelog.i |
|
206 | .hg/store/00changelog.i | |
207 | .hg/store/00manifest.i |
|
207 | .hg/store/00manifest.i | |
208 | .hg/store/data/bla.aux/pr~6e/_p_r_n/lpt/co~6d3/nu~6c/coma/foo._n_u_l/normal.c.i |
|
208 | .hg/store/data/bla.aux/pr~6e/_p_r_n/lpt/co~6d3/nu~6c/coma/foo._n_u_l/normal.c.i | |
209 | .hg/store/dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxx168e07b38e65eff86ab579afaaa8e30bfbe0f35f.i |
|
209 | .hg/store/dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxx168e07b38e65eff86ab579afaaa8e30bfbe0f35f.i | |
210 | .hg/store/dh/au~78/second/x.prn/fourth/fi~3afth/sixth/seventh/eighth/nineth/tenth/loremia20419e358ddff1bf8751e38288aff1d7c32ec05.i |
|
210 | .hg/store/dh/au~78/second/x.prn/fourth/fi~3afth/sixth/seventh/eighth/nineth/tenth/loremia20419e358ddff1bf8751e38288aff1d7c32ec05.i | |
211 | .hg/store/dh/enterpri/openesba/contrib-/corba-bc/netbeans/wsdlexte/src/main/java/org.net7018f27961fdf338a598a40c4683429e7ffb9743.i |
|
211 | .hg/store/dh/enterpri/openesba/contrib-/corba-bc/netbeans/wsdlexte/src/main/java/org.net7018f27961fdf338a598a40c4683429e7ffb9743.i | |
212 | .hg/store/dh/project_/resource/anotherl/followed/andanoth/andthenanextremelylongfilename0d8e1f4187c650e2f1fdca9fd90f786bc0976b6b.i |
|
212 | .hg/store/dh/project_/resource/anotherl/followed/andanoth/andthenanextremelylongfilename0d8e1f4187c650e2f1fdca9fd90f786bc0976b6b.i | |
213 |
|
213 | |||
214 | $ cd .. |
|
214 | $ cd .. | |
215 |
|
215 | |||
216 | Aborting lock does not prevent fncache writes |
|
216 | Aborting lock does not prevent fncache writes | |
217 |
|
217 | |||
218 | $ cat > exceptionext.py <<EOF |
|
218 | $ cat > exceptionext.py <<EOF | |
219 | > import os |
|
219 | > import os | |
220 | > from mercurial import commands, error, extensions |
|
220 | > from mercurial import commands, error, extensions | |
221 | > |
|
221 | > | |
222 | > def lockexception(orig, vfs, lockname, wait, releasefn, *args, **kwargs): |
|
222 | > def lockexception(orig, vfs, lockname, wait, releasefn, *args, **kwargs): | |
223 | > def releasewrap(): |
|
223 | > def releasewrap(): | |
224 | > l.held = False # ensure __del__ is a noop |
|
224 | > l.held = False # ensure __del__ is a noop | |
225 | > raise error.Abort(b"forced lock failure") |
|
225 | > raise error.Abort(b"forced lock failure") | |
226 | > l = orig(vfs, lockname, wait, releasewrap, *args, **kwargs) |
|
226 | > l = orig(vfs, lockname, wait, releasewrap, *args, **kwargs) | |
227 | > return l |
|
227 | > return l | |
228 | > |
|
228 | > | |
229 | > def reposetup(ui, repo): |
|
229 | > def reposetup(ui, repo): | |
230 | > extensions.wrapfunction(repo, '_lock', lockexception) |
|
230 | > extensions.wrapfunction(repo, '_lock', lockexception) | |
231 | > |
|
231 | > | |
232 | > cmdtable = {} |
|
232 | > cmdtable = {} | |
233 | > |
|
233 | > | |
234 | > # wrap "commit" command to prevent wlock from being '__del__()'-ed |
|
234 | > # wrap "commit" command to prevent wlock from being '__del__()'-ed | |
235 | > # at the end of dispatching (for intentional "forced lcok failure") |
|
235 | > # at the end of dispatching (for intentional "forced lcok failure") | |
236 | > def commitwrap(orig, ui, repo, *pats, **opts): |
|
236 | > def commitwrap(orig, ui, repo, *pats, **opts): | |
237 | > repo = repo.unfiltered() # to use replaced repo._lock certainly |
|
237 | > repo = repo.unfiltered() # to use replaced repo._lock certainly | |
238 | > wlock = repo.wlock() |
|
238 | > wlock = repo.wlock() | |
239 | > try: |
|
239 | > try: | |
240 | > return orig(ui, repo, *pats, **opts) |
|
240 | > return orig(ui, repo, *pats, **opts) | |
241 | > finally: |
|
241 | > finally: | |
242 | > # multiple 'relase()' is needed for complete releasing wlock, |
|
242 | > # multiple 'relase()' is needed for complete releasing wlock, | |
243 | > # because "forced" abort at last releasing store lock |
|
243 | > # because "forced" abort at last releasing store lock | |
244 | > # prevents wlock from being released at same 'lockmod.release()' |
|
244 | > # prevents wlock from being released at same 'lockmod.release()' | |
245 | > for i in range(wlock.held): |
|
245 | > for i in range(wlock.held): | |
246 | > wlock.release() |
|
246 | > wlock.release() | |
247 | > |
|
247 | > | |
248 | > def extsetup(ui): |
|
248 | > def extsetup(ui): | |
249 | > extensions.wrapcommand(commands.table, b"commit", commitwrap) |
|
249 | > extensions.wrapcommand(commands.table, b"commit", commitwrap) | |
250 | > EOF |
|
250 | > EOF | |
251 | $ extpath=`pwd`/exceptionext.py |
|
251 | $ extpath=`pwd`/exceptionext.py | |
252 | $ hg init fncachetxn |
|
252 | $ hg init fncachetxn | |
253 | $ cd fncachetxn |
|
253 | $ cd fncachetxn | |
254 | $ printf "[extensions]\nexceptionext=$extpath\n" >> .hg/hgrc |
|
254 | $ printf "[extensions]\nexceptionext=$extpath\n" >> .hg/hgrc | |
255 | $ touch y |
|
255 | $ touch y | |
256 | $ hg ci -qAm y |
|
256 | $ hg ci -qAm y | |
257 | abort: forced lock failure |
|
257 | abort: forced lock failure | |
258 | [255] |
|
258 | [255] | |
259 | $ cat .hg/store/fncache |
|
259 | $ cat .hg/store/fncache | |
260 | data/y.i |
|
260 | data/y.i | |
261 |
|
261 | |||
262 | Aborting transaction prevents fncache change |
|
262 | Aborting transaction prevents fncache change | |
263 |
|
263 | |||
264 | $ cat > ../exceptionext.py <<EOF |
|
264 | $ cat > ../exceptionext.py <<EOF | |
265 | > import os |
|
265 | > import os | |
266 | > from mercurial import commands, error, extensions, localrepo |
|
266 | > from mercurial import commands, error, extensions, localrepo | |
267 | > |
|
267 | > | |
268 | > def wrapper(orig, self, *args, **kwargs): |
|
268 | > def wrapper(orig, self, *args, **kwargs): | |
269 | > tr = orig(self, *args, **kwargs) |
|
269 | > tr = orig(self, *args, **kwargs) | |
270 | > def fail(tr): |
|
270 | > def fail(tr): | |
271 | > raise error.Abort(b"forced transaction failure") |
|
271 | > raise error.Abort(b"forced transaction failure") | |
272 | > # zzz prefix to ensure it sorted after store.write |
|
272 | > # zzz prefix to ensure it sorted after store.write | |
273 | > tr.addfinalize(b'zzz-forcefails', fail) |
|
273 | > tr.addfinalize(b'zzz-forcefails', fail) | |
274 | > return tr |
|
274 | > return tr | |
275 | > |
|
275 | > | |
276 | > def uisetup(ui): |
|
276 | > def uisetup(ui): | |
277 | > extensions.wrapfunction( |
|
277 | > extensions.wrapfunction( | |
278 |
> localrepo.localrepository, |
|
278 | > localrepo.localrepository, 'transaction', wrapper) | |
279 |
|
|
279 | > | |
280 | > cmdtable = {} |
|
280 | > cmdtable = {} | |
281 | > |
|
281 | > | |
282 | > EOF |
|
282 | > EOF | |
283 |
|
283 | |||
284 | Clean cached version |
|
284 | Clean cached version | |
285 | $ rm -f "${extpath}c" |
|
285 | $ rm -f "${extpath}c" | |
286 | $ rm -Rf "`dirname $extpath`/__pycache__" |
|
286 | $ rm -Rf "`dirname $extpath`/__pycache__" | |
287 |
|
287 | |||
288 | $ touch z |
|
288 | $ touch z | |
289 | $ hg ci -qAm z |
|
289 | $ hg ci -qAm z | |
290 | transaction abort! |
|
290 | transaction abort! | |
291 | rollback completed |
|
291 | rollback completed | |
292 | abort: forced transaction failure |
|
292 | abort: forced transaction failure | |
293 | [255] |
|
293 | [255] | |
294 | $ cat .hg/store/fncache |
|
294 | $ cat .hg/store/fncache | |
295 | data/y.i |
|
295 | data/y.i | |
296 |
|
296 | |||
297 | Aborted transactions can be recovered later |
|
297 | Aborted transactions can be recovered later | |
298 |
|
298 | |||
299 | $ cat > ../exceptionext.py <<EOF |
|
299 | $ cat > ../exceptionext.py <<EOF | |
300 | > import os |
|
300 | > import os | |
301 | > import signal |
|
301 | > import signal | |
302 | > from mercurial import ( |
|
302 | > from mercurial import ( | |
303 | > commands, |
|
303 | > commands, | |
304 | > error, |
|
304 | > error, | |
305 | > extensions, |
|
305 | > extensions, | |
306 | > localrepo, |
|
306 | > localrepo, | |
307 | > transaction, |
|
307 | > transaction, | |
308 | > ) |
|
308 | > ) | |
309 | > |
|
309 | > | |
310 | > def trwrapper(orig, self, *args, **kwargs): |
|
310 | > def trwrapper(orig, self, *args, **kwargs): | |
311 | > tr = orig(self, *args, **kwargs) |
|
311 | > tr = orig(self, *args, **kwargs) | |
312 | > def fail(tr): |
|
312 | > def fail(tr): | |
313 | > os.kill(os.getpid(), signal.SIGKILL) |
|
313 | > os.kill(os.getpid(), signal.SIGKILL) | |
314 | > # zzz prefix to ensure it sorted after store.write |
|
314 | > # zzz prefix to ensure it sorted after store.write | |
315 | > tr.addfinalize(b'zzz-forcefails', fail) |
|
315 | > tr.addfinalize(b'zzz-forcefails', fail) | |
316 | > return tr |
|
316 | > return tr | |
317 | > |
|
317 | > | |
318 | > def uisetup(ui): |
|
318 | > def uisetup(ui): | |
319 | > extensions.wrapfunction(localrepo.localrepository, 'transaction', |
|
319 | > extensions.wrapfunction(localrepo.localrepository, 'transaction', | |
320 | > trwrapper) |
|
320 | > trwrapper) | |
321 | > |
|
321 | > | |
322 | > cmdtable = {} |
|
322 | > cmdtable = {} | |
323 | > |
|
323 | > | |
324 | > EOF |
|
324 | > EOF | |
325 |
|
325 | |||
326 | Clean cached versions |
|
326 | Clean cached versions | |
327 | $ rm -f "${extpath}c" |
|
327 | $ rm -f "${extpath}c" | |
328 | $ rm -Rf "`dirname $extpath`/__pycache__" |
|
328 | $ rm -Rf "`dirname $extpath`/__pycache__" | |
329 |
|
329 | |||
330 | $ hg up -q 1 |
|
330 | $ hg up -q 1 | |
331 | $ touch z |
|
331 | $ touch z | |
332 | # Cannot rely on the return code value as chg use a different one. |
|
332 | # Cannot rely on the return code value as chg use a different one. | |
333 | # So we use a `|| echo` trick |
|
333 | # So we use a `|| echo` trick | |
334 | # XXX-CHG fixing chg behavior would be nice here. |
|
334 | # XXX-CHG fixing chg behavior would be nice here. | |
335 | $ hg ci -qAm z || echo "He's Dead, Jim." 2>/dev/null |
|
335 | $ hg ci -qAm z || echo "He's Dead, Jim." 2>/dev/null | |
336 | *Killed* (glob) (?) |
|
336 | *Killed* (glob) (?) | |
337 | He's Dead, Jim. |
|
337 | He's Dead, Jim. | |
338 | $ cat .hg/store/fncache | sort |
|
338 | $ cat .hg/store/fncache | sort | |
339 | data/y.i |
|
339 | data/y.i | |
340 | data/z.i |
|
340 | data/z.i | |
341 | $ hg recover --verify |
|
341 | $ hg recover --verify | |
342 | rolling back interrupted transaction |
|
342 | rolling back interrupted transaction | |
343 | checking changesets |
|
343 | checking changesets | |
344 | checking manifests |
|
344 | checking manifests | |
345 | crosschecking files in changesets and manifests |
|
345 | crosschecking files in changesets and manifests | |
346 | checking files |
|
346 | checking files | |
347 | checking dirstate |
|
347 | checking dirstate | |
348 | checked 1 changesets with 1 changes to 1 files |
|
348 | checked 1 changesets with 1 changes to 1 files | |
349 | $ cat .hg/store/fncache |
|
349 | $ cat .hg/store/fncache | |
350 | data/y.i |
|
350 | data/y.i | |
351 |
|
351 | |||
352 | $ cd .. |
|
352 | $ cd .. | |
353 |
|
353 | |||
354 | debugrebuildfncache does nothing unless repo has fncache requirement |
|
354 | debugrebuildfncache does nothing unless repo has fncache requirement | |
355 |
|
355 | |||
356 | $ hg --config format.usefncache=false init nofncache |
|
356 | $ hg --config format.usefncache=false init nofncache | |
357 | $ cd nofncache |
|
357 | $ cd nofncache | |
358 | $ hg debugrebuildfncache |
|
358 | $ hg debugrebuildfncache | |
359 | (not rebuilding fncache because repository does not support fncache) |
|
359 | (not rebuilding fncache because repository does not support fncache) | |
360 |
|
360 | |||
361 | $ cd .. |
|
361 | $ cd .. | |
362 |
|
362 | |||
363 | debugrebuildfncache works on empty repository |
|
363 | debugrebuildfncache works on empty repository | |
364 |
|
364 | |||
365 | $ hg init empty |
|
365 | $ hg init empty | |
366 | $ cd empty |
|
366 | $ cd empty | |
367 | $ hg debugrebuildfncache |
|
367 | $ hg debugrebuildfncache | |
368 | fncache already up to date |
|
368 | fncache already up to date | |
369 | $ cd .. |
|
369 | $ cd .. | |
370 |
|
370 | |||
371 | debugrebuildfncache on an up to date repository no-ops |
|
371 | debugrebuildfncache on an up to date repository no-ops | |
372 |
|
372 | |||
373 | $ hg init repo |
|
373 | $ hg init repo | |
374 | $ cd repo |
|
374 | $ cd repo | |
375 | $ echo initial > foo |
|
375 | $ echo initial > foo | |
376 | $ echo initial > .bar |
|
376 | $ echo initial > .bar | |
377 | $ hg commit -A -m initial |
|
377 | $ hg commit -A -m initial | |
378 | adding .bar |
|
378 | adding .bar | |
379 | adding foo |
|
379 | adding foo | |
380 |
|
380 | |||
381 | $ cat .hg/store/fncache | sort |
|
381 | $ cat .hg/store/fncache | sort | |
382 | data/.bar.i |
|
382 | data/.bar.i | |
383 | data/foo.i |
|
383 | data/foo.i | |
384 |
|
384 | |||
385 | $ hg debugrebuildfncache |
|
385 | $ hg debugrebuildfncache | |
386 | fncache already up to date |
|
386 | fncache already up to date | |
387 |
|
387 | |||
388 | debugrebuildfncache restores deleted fncache file |
|
388 | debugrebuildfncache restores deleted fncache file | |
389 |
|
389 | |||
390 | $ rm -f .hg/store/fncache |
|
390 | $ rm -f .hg/store/fncache | |
391 | $ hg debugrebuildfncache |
|
391 | $ hg debugrebuildfncache | |
392 | adding data/.bar.i |
|
392 | adding data/.bar.i | |
393 | adding data/foo.i |
|
393 | adding data/foo.i | |
394 | 2 items added, 0 removed from fncache |
|
394 | 2 items added, 0 removed from fncache | |
395 |
|
395 | |||
396 | $ cat .hg/store/fncache | sort |
|
396 | $ cat .hg/store/fncache | sort | |
397 | data/.bar.i |
|
397 | data/.bar.i | |
398 | data/foo.i |
|
398 | data/foo.i | |
399 |
|
399 | |||
400 | Rebuild after rebuild should no-op |
|
400 | Rebuild after rebuild should no-op | |
401 |
|
401 | |||
402 | $ hg debugrebuildfncache |
|
402 | $ hg debugrebuildfncache | |
403 | fncache already up to date |
|
403 | fncache already up to date | |
404 |
|
404 | |||
405 | A single missing file should get restored, an extra file should be removed |
|
405 | A single missing file should get restored, an extra file should be removed | |
406 |
|
406 | |||
407 | $ cat > .hg/store/fncache << EOF |
|
407 | $ cat > .hg/store/fncache << EOF | |
408 | > data/foo.i |
|
408 | > data/foo.i | |
409 | > data/bad-entry.i |
|
409 | > data/bad-entry.i | |
410 | > EOF |
|
410 | > EOF | |
411 |
|
411 | |||
412 | $ hg debugrebuildfncache |
|
412 | $ hg debugrebuildfncache | |
413 | removing data/bad-entry.i |
|
413 | removing data/bad-entry.i | |
414 | adding data/.bar.i |
|
414 | adding data/.bar.i | |
415 | 1 items added, 1 removed from fncache |
|
415 | 1 items added, 1 removed from fncache | |
416 |
|
416 | |||
417 | $ cat .hg/store/fncache | sort |
|
417 | $ cat .hg/store/fncache | sort | |
418 | data/.bar.i |
|
418 | data/.bar.i | |
419 | data/foo.i |
|
419 | data/foo.i | |
420 |
|
420 | |||
421 | debugrebuildfncache recovers from truncated line in fncache |
|
421 | debugrebuildfncache recovers from truncated line in fncache | |
422 |
|
422 | |||
423 | $ printf a > .hg/store/fncache |
|
423 | $ printf a > .hg/store/fncache | |
424 | $ hg debugrebuildfncache |
|
424 | $ hg debugrebuildfncache | |
425 | fncache does not ends with a newline |
|
425 | fncache does not ends with a newline | |
426 | adding data/.bar.i |
|
426 | adding data/.bar.i | |
427 | adding data/foo.i |
|
427 | adding data/foo.i | |
428 | 2 items added, 0 removed from fncache |
|
428 | 2 items added, 0 removed from fncache | |
429 |
|
429 | |||
430 | $ cat .hg/store/fncache | sort |
|
430 | $ cat .hg/store/fncache | sort | |
431 | data/.bar.i |
|
431 | data/.bar.i | |
432 | data/foo.i |
|
432 | data/foo.i | |
433 |
|
433 | |||
434 | $ cd .. |
|
434 | $ cd .. | |
435 |
|
435 | |||
436 | Try a simple variation without dotencode to ensure fncache is ignorant of encoding |
|
436 | Try a simple variation without dotencode to ensure fncache is ignorant of encoding | |
437 |
|
437 | |||
438 | $ hg --config format.dotencode=false init nodotencode |
|
438 | $ hg --config format.dotencode=false init nodotencode | |
439 | $ cd nodotencode |
|
439 | $ cd nodotencode | |
440 | $ echo initial > foo |
|
440 | $ echo initial > foo | |
441 | $ echo initial > .bar |
|
441 | $ echo initial > .bar | |
442 | $ hg commit -A -m initial |
|
442 | $ hg commit -A -m initial | |
443 | adding .bar |
|
443 | adding .bar | |
444 | adding foo |
|
444 | adding foo | |
445 |
|
445 | |||
446 | $ cat .hg/store/fncache | sort |
|
446 | $ cat .hg/store/fncache | sort | |
447 | data/.bar.i |
|
447 | data/.bar.i | |
448 | data/foo.i |
|
448 | data/foo.i | |
449 |
|
449 | |||
450 | $ rm .hg/store/fncache |
|
450 | $ rm .hg/store/fncache | |
451 | $ hg debugrebuildfncache |
|
451 | $ hg debugrebuildfncache | |
452 | adding data/.bar.i |
|
452 | adding data/.bar.i | |
453 | adding data/foo.i |
|
453 | adding data/foo.i | |
454 | 2 items added, 0 removed from fncache |
|
454 | 2 items added, 0 removed from fncache | |
455 |
|
455 | |||
456 | $ cat .hg/store/fncache | sort |
|
456 | $ cat .hg/store/fncache | sort | |
457 | data/.bar.i |
|
457 | data/.bar.i | |
458 | data/foo.i |
|
458 | data/foo.i | |
459 |
|
459 | |||
460 | $ cd .. |
|
460 | $ cd .. | |
461 |
|
461 | |||
462 | In repositories that have accumulated a large number of files over time, the |
|
462 | In repositories that have accumulated a large number of files over time, the | |
463 | fncache file is going to be large. If we possibly can avoid loading it, so much the better. |
|
463 | fncache file is going to be large. If we possibly can avoid loading it, so much the better. | |
464 | The cache should not loaded when committing changes to existing files, or when unbundling |
|
464 | The cache should not loaded when committing changes to existing files, or when unbundling | |
465 | changesets that only contain changes to existing files: |
|
465 | changesets that only contain changes to existing files: | |
466 |
|
466 | |||
467 | $ cat > fncacheloadwarn.py << EOF |
|
467 | $ cat > fncacheloadwarn.py << EOF | |
468 | > from mercurial import extensions, localrepo |
|
468 | > from mercurial import extensions, localrepo | |
469 | > |
|
469 | > | |
470 | > def extsetup(ui): |
|
470 | > def extsetup(ui): | |
471 | > def wrapstore(orig, requirements, *args): |
|
471 | > def wrapstore(orig, requirements, *args): | |
472 | > store = orig(requirements, *args) |
|
472 | > store = orig(requirements, *args) | |
473 | > if b'store' in requirements and b'fncache' in requirements: |
|
473 | > if b'store' in requirements and b'fncache' in requirements: | |
474 | > instrumentfncachestore(store, ui) |
|
474 | > instrumentfncachestore(store, ui) | |
475 | > return store |
|
475 | > return store | |
476 | > extensions.wrapfunction(localrepo, 'makestore', wrapstore) |
|
476 | > extensions.wrapfunction(localrepo, 'makestore', wrapstore) | |
477 | > |
|
477 | > | |
478 | > def instrumentfncachestore(fncachestore, ui): |
|
478 | > def instrumentfncachestore(fncachestore, ui): | |
479 | > class instrumentedfncache(type(fncachestore.fncache)): |
|
479 | > class instrumentedfncache(type(fncachestore.fncache)): | |
480 | > def _load(self): |
|
480 | > def _load(self): | |
481 | > ui.warn(b'fncache load triggered!\n') |
|
481 | > ui.warn(b'fncache load triggered!\n') | |
482 | > super(instrumentedfncache, self)._load() |
|
482 | > super(instrumentedfncache, self)._load() | |
483 | > fncachestore.fncache.__class__ = instrumentedfncache |
|
483 | > fncachestore.fncache.__class__ = instrumentedfncache | |
484 | > EOF |
|
484 | > EOF | |
485 |
|
485 | |||
486 | $ fncachextpath=`pwd`/fncacheloadwarn.py |
|
486 | $ fncachextpath=`pwd`/fncacheloadwarn.py | |
487 | $ hg init nofncacheload |
|
487 | $ hg init nofncacheload | |
488 | $ cd nofncacheload |
|
488 | $ cd nofncacheload | |
489 | $ printf "[extensions]\nfncacheloadwarn=$fncachextpath\n" >> .hg/hgrc |
|
489 | $ printf "[extensions]\nfncacheloadwarn=$fncachextpath\n" >> .hg/hgrc | |
490 |
|
490 | |||
491 | A new file should trigger a load, as we'd want to update the fncache set in that case: |
|
491 | A new file should trigger a load, as we'd want to update the fncache set in that case: | |
492 |
|
492 | |||
493 | $ touch foo |
|
493 | $ touch foo | |
494 | $ hg ci -qAm foo |
|
494 | $ hg ci -qAm foo | |
495 | fncache load triggered! |
|
495 | fncache load triggered! | |
496 |
|
496 | |||
497 | But modifying that file should not: |
|
497 | But modifying that file should not: | |
498 |
|
498 | |||
499 | $ echo bar >> foo |
|
499 | $ echo bar >> foo | |
500 | $ hg ci -qm foo |
|
500 | $ hg ci -qm foo | |
501 |
|
501 | |||
502 | If a transaction has been aborted, the zero-size truncated index file will |
|
502 | If a transaction has been aborted, the zero-size truncated index file will | |
503 | not prevent the fncache from being loaded; rather than actually abort |
|
503 | not prevent the fncache from being loaded; rather than actually abort | |
504 | a transaction, we simulate the situation by creating a zero-size index file: |
|
504 | a transaction, we simulate the situation by creating a zero-size index file: | |
505 |
|
505 | |||
506 | $ touch .hg/store/data/bar.i |
|
506 | $ touch .hg/store/data/bar.i | |
507 | $ touch bar |
|
507 | $ touch bar | |
508 | $ hg ci -qAm bar |
|
508 | $ hg ci -qAm bar | |
509 | fncache load triggered! |
|
509 | fncache load triggered! | |
510 |
|
510 | |||
511 | Unbundling should follow the same rules; existing files should not cause a load: |
|
511 | Unbundling should follow the same rules; existing files should not cause a load: | |
512 |
|
512 | |||
513 | (loading during the clone is expected) |
|
513 | (loading during the clone is expected) | |
514 | $ hg clone -q . tobundle |
|
514 | $ hg clone -q . tobundle | |
515 | fncache load triggered! |
|
515 | fncache load triggered! | |
516 | fncache load triggered! |
|
516 | fncache load triggered! | |
517 | fncache load triggered! |
|
517 | fncache load triggered! | |
518 |
|
518 | |||
519 | $ echo 'new line' > tobundle/bar |
|
519 | $ echo 'new line' > tobundle/bar | |
520 | $ hg -R tobundle ci -qm bar |
|
520 | $ hg -R tobundle ci -qm bar | |
521 | $ hg -R tobundle bundle -q barupdated.hg |
|
521 | $ hg -R tobundle bundle -q barupdated.hg | |
522 | $ hg unbundle -q barupdated.hg |
|
522 | $ hg unbundle -q barupdated.hg | |
523 |
|
523 | |||
524 | but adding new files should: |
|
524 | but adding new files should: | |
525 |
|
525 | |||
526 | $ touch tobundle/newfile |
|
526 | $ touch tobundle/newfile | |
527 | $ hg -R tobundle ci -qAm newfile |
|
527 | $ hg -R tobundle ci -qAm newfile | |
528 | $ hg -R tobundle bundle -q newfile.hg |
|
528 | $ hg -R tobundle bundle -q newfile.hg | |
529 | $ hg unbundle -q newfile.hg |
|
529 | $ hg unbundle -q newfile.hg | |
530 | fncache load triggered! |
|
530 | fncache load triggered! | |
531 |
|
531 | |||
532 | $ cd .. |
|
532 | $ cd .. |
@@ -1,967 +1,967 b'' | |||||
1 | #require serve |
|
1 | #require serve | |
2 |
|
2 | |||
3 | Some tests for hgweb. Tests static files, plain files and different 404's. |
|
3 | Some tests for hgweb. Tests static files, plain files and different 404's. | |
4 |
|
4 | |||
5 | $ hg init test |
|
5 | $ hg init test | |
6 | $ cd test |
|
6 | $ cd test | |
7 | $ mkdir da |
|
7 | $ mkdir da | |
8 | $ echo foo > da/foo |
|
8 | $ echo foo > da/foo | |
9 | $ echo foo > foo |
|
9 | $ echo foo > foo | |
10 | $ hg ci -Ambase |
|
10 | $ hg ci -Ambase | |
11 | adding da/foo |
|
11 | adding da/foo | |
12 | adding foo |
|
12 | adding foo | |
13 | $ hg bookmark -r0 '@' |
|
13 | $ hg bookmark -r0 '@' | |
14 | $ hg bookmark -r0 'a b c' |
|
14 | $ hg bookmark -r0 'a b c' | |
15 | $ hg bookmark -r0 'd/e/f' |
|
15 | $ hg bookmark -r0 'd/e/f' | |
16 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
16 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
17 | $ cat hg.pid >> $DAEMON_PIDS |
|
17 | $ cat hg.pid >> $DAEMON_PIDS | |
18 |
|
18 | |||
19 | manifest |
|
19 | manifest | |
20 |
|
20 | |||
21 | $ (get-with-headers.py localhost:$HGPORT 'file/tip/?style=raw') |
|
21 | $ (get-with-headers.py localhost:$HGPORT 'file/tip/?style=raw') | |
22 | 200 Script output follows |
|
22 | 200 Script output follows | |
23 |
|
23 | |||
24 |
|
24 | |||
25 | drwxr-xr-x da |
|
25 | drwxr-xr-x da | |
26 | -rw-r--r-- 4 foo |
|
26 | -rw-r--r-- 4 foo | |
27 |
|
27 | |||
28 |
|
28 | |||
29 | $ (get-with-headers.py localhost:$HGPORT 'file/tip/da?style=raw') |
|
29 | $ (get-with-headers.py localhost:$HGPORT 'file/tip/da?style=raw') | |
30 | 200 Script output follows |
|
30 | 200 Script output follows | |
31 |
|
31 | |||
32 |
|
32 | |||
33 | -rw-r--r-- 4 foo |
|
33 | -rw-r--r-- 4 foo | |
34 |
|
34 | |||
35 |
|
35 | |||
36 |
|
36 | |||
37 | plain file |
|
37 | plain file | |
38 |
|
38 | |||
39 | $ get-with-headers.py localhost:$HGPORT 'file/tip/foo?style=raw' |
|
39 | $ get-with-headers.py localhost:$HGPORT 'file/tip/foo?style=raw' | |
40 | 200 Script output follows |
|
40 | 200 Script output follows | |
41 |
|
41 | |||
42 | foo |
|
42 | foo | |
43 |
|
43 | |||
44 | should give a 404 - static file that does not exist |
|
44 | should give a 404 - static file that does not exist | |
45 |
|
45 | |||
46 | $ get-with-headers.py localhost:$HGPORT 'static/bogus' |
|
46 | $ get-with-headers.py localhost:$HGPORT 'static/bogus' | |
47 | 404 Not Found |
|
47 | 404 Not Found | |
48 |
|
48 | |||
49 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
49 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
50 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
50 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
51 | <head> |
|
51 | <head> | |
52 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
52 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
53 | <meta name="robots" content="index, nofollow" /> |
|
53 | <meta name="robots" content="index, nofollow" /> | |
54 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
54 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
55 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
55 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
56 |
|
56 | |||
57 | <title>test: error</title> |
|
57 | <title>test: error</title> | |
58 | </head> |
|
58 | </head> | |
59 | <body> |
|
59 | <body> | |
60 |
|
60 | |||
61 | <div class="container"> |
|
61 | <div class="container"> | |
62 | <div class="menu"> |
|
62 | <div class="menu"> | |
63 | <div class="logo"> |
|
63 | <div class="logo"> | |
64 | <a href="https://mercurial-scm.org/"> |
|
64 | <a href="https://mercurial-scm.org/"> | |
65 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> |
|
65 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> | |
66 | </div> |
|
66 | </div> | |
67 | <ul> |
|
67 | <ul> | |
68 | <li><a href="/shortlog">log</a></li> |
|
68 | <li><a href="/shortlog">log</a></li> | |
69 | <li><a href="/graph">graph</a></li> |
|
69 | <li><a href="/graph">graph</a></li> | |
70 | <li><a href="/tags">tags</a></li> |
|
70 | <li><a href="/tags">tags</a></li> | |
71 | <li><a href="/bookmarks">bookmarks</a></li> |
|
71 | <li><a href="/bookmarks">bookmarks</a></li> | |
72 | <li><a href="/branches">branches</a></li> |
|
72 | <li><a href="/branches">branches</a></li> | |
73 | </ul> |
|
73 | </ul> | |
74 | <ul> |
|
74 | <ul> | |
75 | <li><a href="/help">help</a></li> |
|
75 | <li><a href="/help">help</a></li> | |
76 | </ul> |
|
76 | </ul> | |
77 | </div> |
|
77 | </div> | |
78 |
|
78 | |||
79 | <div class="main"> |
|
79 | <div class="main"> | |
80 |
|
80 | |||
81 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
81 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
82 | <h3>error</h3> |
|
82 | <h3>error</h3> | |
83 |
|
83 | |||
84 |
|
84 | |||
85 | <form class="search" action="/log"> |
|
85 | <form class="search" action="/log"> | |
86 |
|
86 | |||
87 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
87 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
88 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
88 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
89 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
89 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
90 | </form> |
|
90 | </form> | |
91 |
|
91 | |||
92 | <div class="description"> |
|
92 | <div class="description"> | |
93 | <p> |
|
93 | <p> | |
94 | An error occurred while processing your request: |
|
94 | An error occurred while processing your request: | |
95 | </p> |
|
95 | </p> | |
96 | <p> |
|
96 | <p> | |
97 | Not Found |
|
97 | Not Found | |
98 | </p> |
|
98 | </p> | |
99 | </div> |
|
99 | </div> | |
100 | </div> |
|
100 | </div> | |
101 | </div> |
|
101 | </div> | |
102 |
|
102 | |||
103 |
|
103 | |||
104 |
|
104 | |||
105 | </body> |
|
105 | </body> | |
106 | </html> |
|
106 | </html> | |
107 |
|
107 | |||
108 | [1] |
|
108 | [1] | |
109 |
|
109 | |||
110 | should give a 404 - bad revision |
|
110 | should give a 404 - bad revision | |
111 |
|
111 | |||
112 | $ get-with-headers.py localhost:$HGPORT 'file/spam/foo?style=raw' |
|
112 | $ get-with-headers.py localhost:$HGPORT 'file/spam/foo?style=raw' | |
113 | 404 Not Found |
|
113 | 404 Not Found | |
114 |
|
114 | |||
115 |
|
115 | |||
116 | error: revision not found: spam |
|
116 | error: revision not found: spam | |
117 | [1] |
|
117 | [1] | |
118 |
|
118 | |||
119 | should give a 400 - bad command |
|
119 | should give a 400 - bad command | |
120 |
|
120 | |||
121 | $ get-with-headers.py localhost:$HGPORT 'file/tip/foo?cmd=spam&style=raw' |
|
121 | $ get-with-headers.py localhost:$HGPORT 'file/tip/foo?cmd=spam&style=raw' | |
122 | 400* (glob) |
|
122 | 400* (glob) | |
123 |
|
123 | |||
124 |
|
124 | |||
125 | error: no such method: spam |
|
125 | error: no such method: spam | |
126 | [1] |
|
126 | [1] | |
127 |
|
127 | |||
128 | $ get-with-headers.py --headeronly localhost:$HGPORT '?cmd=spam' |
|
128 | $ get-with-headers.py --headeronly localhost:$HGPORT '?cmd=spam' | |
129 | 400 no such method: spam |
|
129 | 400 no such method: spam | |
130 | [1] |
|
130 | [1] | |
131 |
|
131 | |||
132 | should give a 400 - bad command as a part of url path (issue4071) |
|
132 | should give a 400 - bad command as a part of url path (issue4071) | |
133 |
|
133 | |||
134 | $ get-with-headers.py --headeronly localhost:$HGPORT 'spam' |
|
134 | $ get-with-headers.py --headeronly localhost:$HGPORT 'spam' | |
135 | 400 no such method: spam |
|
135 | 400 no such method: spam | |
136 | [1] |
|
136 | [1] | |
137 |
|
137 | |||
138 | $ get-with-headers.py --headeronly localhost:$HGPORT 'raw-spam' |
|
138 | $ get-with-headers.py --headeronly localhost:$HGPORT 'raw-spam' | |
139 | 400 no such method: spam |
|
139 | 400 no such method: spam | |
140 | [1] |
|
140 | [1] | |
141 |
|
141 | |||
142 | $ get-with-headers.py --headeronly localhost:$HGPORT 'spam/tip/foo' |
|
142 | $ get-with-headers.py --headeronly localhost:$HGPORT 'spam/tip/foo' | |
143 | 400 no such method: spam |
|
143 | 400 no such method: spam | |
144 | [1] |
|
144 | [1] | |
145 |
|
145 | |||
146 | should give a 404 - file does not exist |
|
146 | should give a 404 - file does not exist | |
147 |
|
147 | |||
148 | $ get-with-headers.py localhost:$HGPORT 'file/tip/bork?style=raw' |
|
148 | $ get-with-headers.py localhost:$HGPORT 'file/tip/bork?style=raw' | |
149 | 404 Not Found |
|
149 | 404 Not Found | |
150 |
|
150 | |||
151 |
|
151 | |||
152 | error: bork@2ef0ac749a14e4f57a5a822464a0902c6f7f448f: not found in manifest |
|
152 | error: bork@2ef0ac749a14e4f57a5a822464a0902c6f7f448f: not found in manifest | |
153 | [1] |
|
153 | [1] | |
154 | $ get-with-headers.py localhost:$HGPORT 'file/tip/bork' |
|
154 | $ get-with-headers.py localhost:$HGPORT 'file/tip/bork' | |
155 | 404 Not Found |
|
155 | 404 Not Found | |
156 |
|
156 | |||
157 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
157 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
158 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
158 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
159 | <head> |
|
159 | <head> | |
160 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
160 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
161 | <meta name="robots" content="index, nofollow" /> |
|
161 | <meta name="robots" content="index, nofollow" /> | |
162 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
162 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
163 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
163 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
164 |
|
164 | |||
165 | <title>test: error</title> |
|
165 | <title>test: error</title> | |
166 | </head> |
|
166 | </head> | |
167 | <body> |
|
167 | <body> | |
168 |
|
168 | |||
169 | <div class="container"> |
|
169 | <div class="container"> | |
170 | <div class="menu"> |
|
170 | <div class="menu"> | |
171 | <div class="logo"> |
|
171 | <div class="logo"> | |
172 | <a href="https://mercurial-scm.org/"> |
|
172 | <a href="https://mercurial-scm.org/"> | |
173 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> |
|
173 | <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a> | |
174 | </div> |
|
174 | </div> | |
175 | <ul> |
|
175 | <ul> | |
176 | <li><a href="/shortlog">log</a></li> |
|
176 | <li><a href="/shortlog">log</a></li> | |
177 | <li><a href="/graph">graph</a></li> |
|
177 | <li><a href="/graph">graph</a></li> | |
178 | <li><a href="/tags">tags</a></li> |
|
178 | <li><a href="/tags">tags</a></li> | |
179 | <li><a href="/bookmarks">bookmarks</a></li> |
|
179 | <li><a href="/bookmarks">bookmarks</a></li> | |
180 | <li><a href="/branches">branches</a></li> |
|
180 | <li><a href="/branches">branches</a></li> | |
181 | </ul> |
|
181 | </ul> | |
182 | <ul> |
|
182 | <ul> | |
183 | <li><a href="/help">help</a></li> |
|
183 | <li><a href="/help">help</a></li> | |
184 | </ul> |
|
184 | </ul> | |
185 | </div> |
|
185 | </div> | |
186 |
|
186 | |||
187 | <div class="main"> |
|
187 | <div class="main"> | |
188 |
|
188 | |||
189 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
189 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
190 | <h3>error</h3> |
|
190 | <h3>error</h3> | |
191 |
|
191 | |||
192 |
|
192 | |||
193 | <form class="search" action="/log"> |
|
193 | <form class="search" action="/log"> | |
194 |
|
194 | |||
195 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
195 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
196 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
196 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
197 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
197 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
198 | </form> |
|
198 | </form> | |
199 |
|
199 | |||
200 | <div class="description"> |
|
200 | <div class="description"> | |
201 | <p> |
|
201 | <p> | |
202 | An error occurred while processing your request: |
|
202 | An error occurred while processing your request: | |
203 | </p> |
|
203 | </p> | |
204 | <p> |
|
204 | <p> | |
205 | bork@2ef0ac749a14e4f57a5a822464a0902c6f7f448f: not found in manifest |
|
205 | bork@2ef0ac749a14e4f57a5a822464a0902c6f7f448f: not found in manifest | |
206 | </p> |
|
206 | </p> | |
207 | </div> |
|
207 | </div> | |
208 | </div> |
|
208 | </div> | |
209 | </div> |
|
209 | </div> | |
210 |
|
210 | |||
211 |
|
211 | |||
212 |
|
212 | |||
213 | </body> |
|
213 | </body> | |
214 | </html> |
|
214 | </html> | |
215 |
|
215 | |||
216 | [1] |
|
216 | [1] | |
217 | $ get-with-headers.py localhost:$HGPORT 'diff/tip/bork?style=raw' |
|
217 | $ get-with-headers.py localhost:$HGPORT 'diff/tip/bork?style=raw' | |
218 | 404 Not Found |
|
218 | 404 Not Found | |
219 |
|
219 | |||
220 |
|
220 | |||
221 | error: bork@2ef0ac749a14e4f57a5a822464a0902c6f7f448f: not found in manifest |
|
221 | error: bork@2ef0ac749a14e4f57a5a822464a0902c6f7f448f: not found in manifest | |
222 | [1] |
|
222 | [1] | |
223 |
|
223 | |||
224 | try bad style |
|
224 | try bad style | |
225 |
|
225 | |||
226 | $ (get-with-headers.py localhost:$HGPORT 'file/tip/?style=foobar') |
|
226 | $ (get-with-headers.py localhost:$HGPORT 'file/tip/?style=foobar') | |
227 | 200 Script output follows |
|
227 | 200 Script output follows | |
228 |
|
228 | |||
229 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
229 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
230 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
|
230 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> | |
231 | <head> |
|
231 | <head> | |
232 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> |
|
232 | <link rel="icon" href="/static/hgicon.png" type="image/png" /> | |
233 | <meta name="robots" content="index, nofollow" /> |
|
233 | <meta name="robots" content="index, nofollow" /> | |
234 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> |
|
234 | <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> | |
235 | <script type="text/javascript" src="/static/mercurial.js"></script> |
|
235 | <script type="text/javascript" src="/static/mercurial.js"></script> | |
236 |
|
236 | |||
237 | <title>test: 2ef0ac749a14 /</title> |
|
237 | <title>test: 2ef0ac749a14 /</title> | |
238 | </head> |
|
238 | </head> | |
239 | <body> |
|
239 | <body> | |
240 |
|
240 | |||
241 | <div class="container"> |
|
241 | <div class="container"> | |
242 | <div class="menu"> |
|
242 | <div class="menu"> | |
243 | <div class="logo"> |
|
243 | <div class="logo"> | |
244 | <a href="https://mercurial-scm.org/"> |
|
244 | <a href="https://mercurial-scm.org/"> | |
245 | <img src="/static/hglogo.png" alt="mercurial" /></a> |
|
245 | <img src="/static/hglogo.png" alt="mercurial" /></a> | |
246 | </div> |
|
246 | </div> | |
247 | <ul> |
|
247 | <ul> | |
248 | <li><a href="/shortlog/tip">log</a></li> |
|
248 | <li><a href="/shortlog/tip">log</a></li> | |
249 | <li><a href="/graph/tip">graph</a></li> |
|
249 | <li><a href="/graph/tip">graph</a></li> | |
250 | <li><a href="/tags">tags</a></li> |
|
250 | <li><a href="/tags">tags</a></li> | |
251 | <li><a href="/bookmarks">bookmarks</a></li> |
|
251 | <li><a href="/bookmarks">bookmarks</a></li> | |
252 | <li><a href="/branches">branches</a></li> |
|
252 | <li><a href="/branches">branches</a></li> | |
253 | </ul> |
|
253 | </ul> | |
254 | <ul> |
|
254 | <ul> | |
255 | <li><a href="/rev/tip">changeset</a></li> |
|
255 | <li><a href="/rev/tip">changeset</a></li> | |
256 | <li class="active">browse</li> |
|
256 | <li class="active">browse</li> | |
257 | </ul> |
|
257 | </ul> | |
258 | <ul> |
|
258 | <ul> | |
259 |
|
259 | |||
260 | </ul> |
|
260 | </ul> | |
261 | <ul> |
|
261 | <ul> | |
262 | <li><a href="/help">help</a></li> |
|
262 | <li><a href="/help">help</a></li> | |
263 | </ul> |
|
263 | </ul> | |
264 | </div> |
|
264 | </div> | |
265 |
|
265 | |||
266 | <div class="main"> |
|
266 | <div class="main"> | |
267 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> |
|
267 | <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> | |
268 | <h3> |
|
268 | <h3> | |
269 | directory / @ 0:<a href="/rev/2ef0ac749a14">2ef0ac749a14</a> |
|
269 | directory / @ 0:<a href="/rev/2ef0ac749a14">2ef0ac749a14</a> | |
270 | <span class="phase">draft</span> <span class="branchhead">default</span> <span class="tag">tip</span> <span class="tag">@</span> <span class="tag">a b c</span> <span class="tag">d/e/f</span> |
|
270 | <span class="phase">draft</span> <span class="branchhead">default</span> <span class="tag">tip</span> <span class="tag">@</span> <span class="tag">a b c</span> <span class="tag">d/e/f</span> | |
271 | </h3> |
|
271 | </h3> | |
272 |
|
272 | |||
273 |
|
273 | |||
274 | <form class="search" action="/log"> |
|
274 | <form class="search" action="/log"> | |
275 |
|
275 | |||
276 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> |
|
276 | <p><input name="rev" id="search1" type="text" size="30" value="" /></p> | |
277 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision |
|
277 | <div id="hint">Find changesets by keywords (author, files, the commit message), revision | |
278 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> |
|
278 | number or hash, or <a href="/help/revsets">revset expression</a>.</div> | |
279 | </form> |
|
279 | </form> | |
280 |
|
280 | |||
281 | <table class="bigtable"> |
|
281 | <table class="bigtable"> | |
282 | <thead> |
|
282 | <thead> | |
283 | <tr> |
|
283 | <tr> | |
284 | <th class="name">name</th> |
|
284 | <th class="name">name</th> | |
285 | <th class="size">size</th> |
|
285 | <th class="size">size</th> | |
286 | <th class="permissions">permissions</th> |
|
286 | <th class="permissions">permissions</th> | |
287 | </tr> |
|
287 | </tr> | |
288 | </thead> |
|
288 | </thead> | |
289 | <tbody class="stripes2"> |
|
289 | <tbody class="stripes2"> | |
290 |
|
290 | |||
291 |
|
291 | |||
292 | <tr class="fileline"> |
|
292 | <tr class="fileline"> | |
293 | <td class="name"> |
|
293 | <td class="name"> | |
294 | <a href="/file/tip/da"> |
|
294 | <a href="/file/tip/da"> | |
295 | <img src="/static/coal-folder.png" alt="dir."/> da/ |
|
295 | <img src="/static/coal-folder.png" alt="dir."/> da/ | |
296 | </a> |
|
296 | </a> | |
297 | <a href="/file/tip/da/"> |
|
297 | <a href="/file/tip/da/"> | |
298 |
|
298 | |||
299 | </a> |
|
299 | </a> | |
300 | </td> |
|
300 | </td> | |
301 | <td class="size"></td> |
|
301 | <td class="size"></td> | |
302 | <td class="permissions">drwxr-xr-x</td> |
|
302 | <td class="permissions">drwxr-xr-x</td> | |
303 | </tr> |
|
303 | </tr> | |
304 |
|
304 | |||
305 | <tr class="fileline"> |
|
305 | <tr class="fileline"> | |
306 | <td class="filename"> |
|
306 | <td class="filename"> | |
307 | <a href="/file/tip/foo"> |
|
307 | <a href="/file/tip/foo"> | |
308 | <img src="/static/coal-file.png" alt="file"/> foo |
|
308 | <img src="/static/coal-file.png" alt="file"/> foo | |
309 | </a> |
|
309 | </a> | |
310 | </td> |
|
310 | </td> | |
311 | <td class="size">4</td> |
|
311 | <td class="size">4</td> | |
312 | <td class="permissions">-rw-r--r--</td> |
|
312 | <td class="permissions">-rw-r--r--</td> | |
313 | </tr> |
|
313 | </tr> | |
314 | </tbody> |
|
314 | </tbody> | |
315 | </table> |
|
315 | </table> | |
316 | </div> |
|
316 | </div> | |
317 | </div> |
|
317 | </div> | |
318 |
|
318 | |||
319 |
|
319 | |||
320 | </body> |
|
320 | </body> | |
321 | </html> |
|
321 | </html> | |
322 |
|
322 | |||
323 |
|
323 | |||
324 | stop and restart |
|
324 | stop and restart | |
325 |
|
325 | |||
326 | $ killdaemons.py |
|
326 | $ killdaemons.py | |
327 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log |
|
327 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log | |
328 | $ cat hg.pid >> $DAEMON_PIDS |
|
328 | $ cat hg.pid >> $DAEMON_PIDS | |
329 |
|
329 | |||
330 | Test the access/error files are opened in append mode |
|
330 | Test the access/error files are opened in append mode | |
331 |
|
331 | |||
332 | $ "$PYTHON" -c "print(len(open('access.log', 'rb').readlines()), 'log lines written')" |
|
332 | $ "$PYTHON" -c "print(len(open('access.log', 'rb').readlines()), 'log lines written')" | |
333 | 14 log lines written |
|
333 | 14 log lines written | |
334 |
|
334 | |||
335 | static file |
|
335 | static file | |
336 |
|
336 | |||
337 | $ get-with-headers.py --twice localhost:$HGPORT 'static/style-gitweb.css' - date etag server |
|
337 | $ get-with-headers.py --twice localhost:$HGPORT 'static/style-gitweb.css' - date etag server | |
338 | 200 Script output follows |
|
338 | 200 Script output follows | |
339 | content-length: 9074 |
|
339 | content-length: 9074 | |
340 | content-type: text/css |
|
340 | content-type: text/css | |
341 |
|
341 | |||
342 | body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; background: white; color: black; } |
|
342 | body { font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px; margin:10px; background: white; color: black; } | |
343 | a { color:#0000cc; } |
|
343 | a { color:#0000cc; } | |
344 | a:hover, a:visited, a:active { color:#880000; } |
|
344 | a:hover, a:visited, a:active { color:#880000; } | |
345 | div.page_header { height:25px; padding:8px; font-size:18px; font-weight:bold; background-color:#d9d8d1; } |
|
345 | div.page_header { height:25px; padding:8px; font-size:18px; font-weight:bold; background-color:#d9d8d1; } | |
346 | div.page_header a:visited { color:#0000cc; } |
|
346 | div.page_header a:visited { color:#0000cc; } | |
347 | div.page_header a:hover { color:#880000; } |
|
347 | div.page_header a:hover { color:#880000; } | |
348 | div.page_nav { |
|
348 | div.page_nav { | |
349 | padding:8px; |
|
349 | padding:8px; | |
350 | display: flex; |
|
350 | display: flex; | |
351 | justify-content: space-between; |
|
351 | justify-content: space-between; | |
352 | align-items: center; |
|
352 | align-items: center; | |
353 | } |
|
353 | } | |
354 | div.page_nav a:visited { color:#0000cc; } |
|
354 | div.page_nav a:visited { color:#0000cc; } | |
355 | div.extra_nav { |
|
355 | div.extra_nav { | |
356 | padding: 8px; |
|
356 | padding: 8px; | |
357 | } |
|
357 | } | |
358 | div.extra_nav a:visited { |
|
358 | div.extra_nav a:visited { | |
359 | color: #0000cc; |
|
359 | color: #0000cc; | |
360 | } |
|
360 | } | |
361 | div.page_path { padding:8px; border:solid #d9d8d1; border-width:0px 0px 1px} |
|
361 | div.page_path { padding:8px; border:solid #d9d8d1; border-width:0px 0px 1px} | |
362 | div.page_footer { padding:4px 8px; background-color: #d9d8d1; } |
|
362 | div.page_footer { padding:4px 8px; background-color: #d9d8d1; } | |
363 | div.page_footer_text { float:left; color:#555555; font-style:italic; } |
|
363 | div.page_footer_text { float:left; color:#555555; font-style:italic; } | |
364 | div.page_body { padding:8px; } |
|
364 | div.page_body { padding:8px; } | |
365 | div.title, a.title { |
|
365 | div.title, a.title { | |
366 | display:block; padding:6px 8px; |
|
366 | display:block; padding:6px 8px; | |
367 | font-weight:bold; background-color:#edece6; text-decoration:none; color:#000000; |
|
367 | font-weight:bold; background-color:#edece6; text-decoration:none; color:#000000; | |
368 | } |
|
368 | } | |
369 | a.title:hover { background-color: #d9d8d1; } |
|
369 | a.title:hover { background-color: #d9d8d1; } | |
370 | div.title_text { padding:6px 0px; border: solid #d9d8d1; border-width:0px 0px 1px; } |
|
370 | div.title_text { padding:6px 0px; border: solid #d9d8d1; border-width:0px 0px 1px; } | |
371 | div.log_body { padding:8px 8px 8px 150px; } |
|
371 | div.log_body { padding:8px 8px 8px 150px; } | |
372 | .age { white-space:nowrap; } |
|
372 | .age { white-space:nowrap; } | |
373 | a.title span.age { position:relative; float:left; width:142px; font-style:italic; } |
|
373 | a.title span.age { position:relative; float:left; width:142px; font-style:italic; } | |
374 | div.log_link { |
|
374 | div.log_link { | |
375 | padding:0px 8px; |
|
375 | padding:0px 8px; | |
376 | font-size:10px; font-family:sans-serif; font-style:normal; |
|
376 | font-size:10px; font-family:sans-serif; font-style:normal; | |
377 | position:relative; float:left; width:136px; |
|
377 | position:relative; float:left; width:136px; | |
378 | } |
|
378 | } | |
379 | div.list_head { padding:6px 8px 4px; border:solid #d9d8d1; border-width:1px 0px 0px; font-style:italic; } |
|
379 | div.list_head { padding:6px 8px 4px; border:solid #d9d8d1; border-width:1px 0px 0px; font-style:italic; } | |
380 | a.list { text-decoration:none; color:#000000; } |
|
380 | a.list { text-decoration:none; color:#000000; } | |
381 | a.list:hover { text-decoration:underline; color:#880000; } |
|
381 | a.list:hover { text-decoration:underline; color:#880000; } | |
382 | table { padding:8px 4px; } |
|
382 | table { padding:8px 4px; } | |
383 | th { padding:2px 5px; font-size:12px; text-align:left; } |
|
383 | th { padding:2px 5px; font-size:12px; text-align:left; } | |
384 | .parity0 { background-color:#ffffff; } |
|
384 | .parity0 { background-color:#ffffff; } | |
385 | tr.dark, .parity1, pre.sourcelines.stripes > :nth-child(4n+4) { background-color:#f6f6f0; } |
|
385 | tr.dark, .parity1, pre.sourcelines.stripes > :nth-child(4n+4) { background-color:#f6f6f0; } | |
386 | tr.light:hover, .parity0:hover, tr.dark:hover, .parity1:hover, |
|
386 | tr.light:hover, .parity0:hover, tr.dark:hover, .parity1:hover, | |
387 | pre.sourcelines.stripes > :nth-child(4n+2):hover, |
|
387 | pre.sourcelines.stripes > :nth-child(4n+2):hover, | |
388 | pre.sourcelines.stripes > :nth-child(4n+4):hover, |
|
388 | pre.sourcelines.stripes > :nth-child(4n+4):hover, | |
389 | pre.sourcelines.stripes > :nth-child(4n+1):hover + :nth-child(4n+2), |
|
389 | pre.sourcelines.stripes > :nth-child(4n+1):hover + :nth-child(4n+2), | |
390 | pre.sourcelines.stripes > :nth-child(4n+3):hover + :nth-child(4n+4) { background-color:#edece6; } |
|
390 | pre.sourcelines.stripes > :nth-child(4n+3):hover + :nth-child(4n+4) { background-color:#edece6; } | |
391 | td { padding:2px 5px; font-size:12px; vertical-align:top; } |
|
391 | td { padding:2px 5px; font-size:12px; vertical-align:top; } | |
392 | td.closed { background-color: #99f; } |
|
392 | td.closed { background-color: #99f; } | |
393 | td.link { padding:2px 5px; font-family:sans-serif; font-size:10px; } |
|
393 | td.link { padding:2px 5px; font-family:sans-serif; font-size:10px; } | |
394 | td.indexlinks { white-space: nowrap; } |
|
394 | td.indexlinks { white-space: nowrap; } | |
395 | td.indexlinks a { |
|
395 | td.indexlinks a { | |
396 | padding: 2px 5px; line-height: 10px; |
|
396 | padding: 2px 5px; line-height: 10px; | |
397 | border: 1px solid; |
|
397 | border: 1px solid; | |
398 | color: #ffffff; background-color: #7777bb; |
|
398 | color: #ffffff; background-color: #7777bb; | |
399 | border-color: #aaaadd #333366 #333366 #aaaadd; |
|
399 | border-color: #aaaadd #333366 #333366 #aaaadd; | |
400 | font-weight: bold; text-align: center; text-decoration: none; |
|
400 | font-weight: bold; text-align: center; text-decoration: none; | |
401 | font-size: 10px; |
|
401 | font-size: 10px; | |
402 | } |
|
402 | } | |
403 | td.indexlinks a:hover { background-color: #6666aa; } |
|
403 | td.indexlinks a:hover { background-color: #6666aa; } | |
404 | div.pre { font-family:monospace; font-size:12px; white-space:pre; } |
|
404 | div.pre { font-family:monospace; font-size:12px; white-space:pre; } | |
405 |
|
405 | |||
406 | .search { |
|
406 | .search { | |
407 | margin-right: 8px; |
|
407 | margin-right: 8px; | |
408 | } |
|
408 | } | |
409 |
|
409 | |||
410 | div#hint { |
|
410 | div#hint { | |
411 | position: absolute; |
|
411 | position: absolute; | |
412 | display: none; |
|
412 | display: none; | |
413 | width: 250px; |
|
413 | width: 250px; | |
414 | padding: 5px; |
|
414 | padding: 5px; | |
415 | background: #ffc; |
|
415 | background: #ffc; | |
416 | border: 1px solid yellow; |
|
416 | border: 1px solid yellow; | |
417 | border-radius: 5px; |
|
417 | border-radius: 5px; | |
418 | z-index: 15; |
|
418 | z-index: 15; | |
419 | } |
|
419 | } | |
420 |
|
420 | |||
421 | #searchform:hover div#hint { display: block; } |
|
421 | #searchform:hover div#hint { display: block; } | |
422 |
|
422 | |||
423 | tr.thisrev a { color:#999999; text-decoration: none; } |
|
423 | tr.thisrev a { color:#999999; text-decoration: none; } | |
424 | tr.thisrev pre { color:#009900; } |
|
424 | tr.thisrev pre { color:#009900; } | |
425 | td.annotate { |
|
425 | td.annotate { | |
426 | white-space: nowrap; |
|
426 | white-space: nowrap; | |
427 | } |
|
427 | } | |
428 | div.annotate-info { |
|
428 | div.annotate-info { | |
429 | z-index: 5; |
|
429 | z-index: 5; | |
430 | display: none; |
|
430 | display: none; | |
431 | position: absolute; |
|
431 | position: absolute; | |
432 | background-color: #FFFFFF; |
|
432 | background-color: #FFFFFF; | |
433 | border: 1px solid #d9d8d1; |
|
433 | border: 1px solid #d9d8d1; | |
434 | text-align: left; |
|
434 | text-align: left; | |
435 | color: #000000; |
|
435 | color: #000000; | |
436 | padding: 5px; |
|
436 | padding: 5px; | |
437 | } |
|
437 | } | |
438 | div.annotate-info a { color: #0000FF; text-decoration: underline; } |
|
438 | div.annotate-info a { color: #0000FF; text-decoration: underline; } | |
439 | td.annotate:hover div.annotate-info { display: inline; } |
|
439 | td.annotate:hover div.annotate-info { display: inline; } | |
440 |
|
440 | |||
441 | #diffopts-form { |
|
441 | #diffopts-form { | |
442 | padding-left: 8px; |
|
442 | padding-left: 8px; | |
443 | display: none; |
|
443 | display: none; | |
444 | } |
|
444 | } | |
445 |
|
445 | |||
446 | .linenr { color:#999999; text-decoration:none } |
|
446 | .linenr { color:#999999; text-decoration:none } | |
447 | div.rss_logo { float: right; white-space: nowrap; } |
|
447 | div.rss_logo { float: right; white-space: nowrap; } | |
448 | div.rss_logo a { |
|
448 | div.rss_logo a { | |
449 | padding:3px 6px; line-height:10px; |
|
449 | padding:3px 6px; line-height:10px; | |
450 | border:1px solid; border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e; |
|
450 | border:1px solid; border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e; | |
451 | color:#ffffff; background-color:#ff6600; |
|
451 | color:#ffffff; background-color:#ff6600; | |
452 | font-weight:bold; font-family:sans-serif; font-size:10px; |
|
452 | font-weight:bold; font-family:sans-serif; font-size:10px; | |
453 | text-align:center; text-decoration:none; |
|
453 | text-align:center; text-decoration:none; | |
454 | } |
|
454 | } | |
455 | div.rss_logo a:hover { background-color:#ee5500; } |
|
455 | div.rss_logo a:hover { background-color:#ee5500; } | |
456 | pre { margin: 0; } |
|
456 | pre { margin: 0; } | |
457 | span.logtags span { |
|
457 | span.logtags span { | |
458 | padding: 0px 4px; |
|
458 | padding: 0px 4px; | |
459 | font-size: 10px; |
|
459 | font-size: 10px; | |
460 | font-weight: normal; |
|
460 | font-weight: normal; | |
461 | border: 1px solid; |
|
461 | border: 1px solid; | |
462 | background-color: #ffaaff; |
|
462 | background-color: #ffaaff; | |
463 | border-color: #ffccff #ff00ee #ff00ee #ffccff; |
|
463 | border-color: #ffccff #ff00ee #ff00ee #ffccff; | |
464 | } |
|
464 | } | |
465 | span.logtags span.phasetag { |
|
465 | span.logtags span.phasetag { | |
466 | background-color: #dfafff; |
|
466 | background-color: #dfafff; | |
467 | border-color: #e2b8ff #ce48ff #ce48ff #e2b8ff; |
|
467 | border-color: #e2b8ff #ce48ff #ce48ff #e2b8ff; | |
468 | } |
|
468 | } | |
469 | span.logtags span.obsoletetag { |
|
469 | span.logtags span.obsoletetag { | |
470 | background-color: #dddddd; |
|
470 | background-color: #dddddd; | |
471 | border-color: #e4e4e4 #a3a3a3 #a3a3a3 #e4e4e4; |
|
471 | border-color: #e4e4e4 #a3a3a3 #a3a3a3 #e4e4e4; | |
472 | } |
|
472 | } | |
473 | span.logtags span.instabilitytag { |
|
473 | span.logtags span.instabilitytag { | |
474 | background-color: #ffb1c0; |
|
474 | background-color: #ffb1c0; | |
475 | border-color: #ffbbc8 #ff4476 #ff4476 #ffbbc8; |
|
475 | border-color: #ffbbc8 #ff4476 #ff4476 #ffbbc8; | |
476 | } |
|
476 | } | |
477 | span.logtags span.tagtag { |
|
477 | span.logtags span.tagtag { | |
478 | background-color: #ffffaa; |
|
478 | background-color: #ffffaa; | |
479 | border-color: #ffffcc #ffee00 #ffee00 #ffffcc; |
|
479 | border-color: #ffffcc #ffee00 #ffee00 #ffffcc; | |
480 | } |
|
480 | } | |
481 | span.logtags span.branchtag { |
|
481 | span.logtags span.branchtag { | |
482 | background-color: #aaffaa; |
|
482 | background-color: #aaffaa; | |
483 | border-color: #ccffcc #00cc33 #00cc33 #ccffcc; |
|
483 | border-color: #ccffcc #00cc33 #00cc33 #ccffcc; | |
484 | } |
|
484 | } | |
485 | span.logtags span.inbranchtag { |
|
485 | span.logtags span.inbranchtag { | |
486 | background-color: #d5dde6; |
|
486 | background-color: #d5dde6; | |
487 | border-color: #e3ecf4 #9398f4 #9398f4 #e3ecf4; |
|
487 | border-color: #e3ecf4 #9398f4 #9398f4 #e3ecf4; | |
488 | } |
|
488 | } | |
489 | span.logtags span.bookmarktag { |
|
489 | span.logtags span.bookmarktag { | |
490 | background-color: #afdffa; |
|
490 | background-color: #afdffa; | |
491 | border-color: #ccecff #46ace6 #46ace6 #ccecff; |
|
491 | border-color: #ccecff #46ace6 #46ace6 #ccecff; | |
492 | } |
|
492 | } | |
493 | span.difflineplus { color:#008800; } |
|
493 | span.difflineplus { color:#008800; } | |
494 | span.difflineminus { color:#cc0000; } |
|
494 | span.difflineminus { color:#cc0000; } | |
495 | span.difflineat { color:#990099; } |
|
495 | span.difflineat { color:#990099; } | |
496 | div.diffblocks { counter-reset: lineno; } |
|
496 | div.diffblocks { counter-reset: lineno; } | |
497 | div.diffblock { counter-increment: lineno; } |
|
497 | div.diffblock { counter-increment: lineno; } | |
498 | pre.sourcelines { position: relative; counter-reset: lineno; } |
|
498 | pre.sourcelines { position: relative; counter-reset: lineno; } | |
499 | pre.sourcelines > span { |
|
499 | pre.sourcelines > span { | |
500 | display: inline-block; |
|
500 | display: inline-block; | |
501 | box-sizing: border-box; |
|
501 | box-sizing: border-box; | |
502 | width: 100%; |
|
502 | width: 100%; | |
503 | padding: 0 0 0 5em; |
|
503 | padding: 0 0 0 5em; | |
504 | counter-increment: lineno; |
|
504 | counter-increment: lineno; | |
505 | vertical-align: top; |
|
505 | vertical-align: top; | |
506 | } |
|
506 | } | |
507 | pre.sourcelines > span:before { |
|
507 | pre.sourcelines > span:before { | |
508 | -moz-user-select: -moz-none; |
|
508 | -moz-user-select: -moz-none; | |
509 | -khtml-user-select: none; |
|
509 | -khtml-user-select: none; | |
510 | -webkit-user-select: none; |
|
510 | -webkit-user-select: none; | |
511 | -ms-user-select: none; |
|
511 | -ms-user-select: none; | |
512 | user-select: none; |
|
512 | user-select: none; | |
513 | display: inline-block; |
|
513 | display: inline-block; | |
514 | margin-left: -6em; |
|
514 | margin-left: -6em; | |
515 | width: 4em; |
|
515 | width: 4em; | |
516 | color: #999; |
|
516 | color: #999; | |
517 | text-align: right; |
|
517 | text-align: right; | |
518 | content: counters(lineno,"."); |
|
518 | content: counters(lineno,"."); | |
519 | float: left; |
|
519 | float: left; | |
520 | } |
|
520 | } | |
521 | pre.sourcelines > a { |
|
521 | pre.sourcelines > a { | |
522 | display: inline-block; |
|
522 | display: inline-block; | |
523 | position: absolute; |
|
523 | position: absolute; | |
524 | left: 0px; |
|
524 | left: 0px; | |
525 | width: 4em; |
|
525 | width: 4em; | |
526 | height: 1em; |
|
526 | height: 1em; | |
527 | } |
|
527 | } | |
528 | tr:target td, |
|
528 | tr:target td, | |
529 | pre.sourcelines > span:target, |
|
529 | pre.sourcelines > span:target, | |
530 | pre.sourcelines.stripes > span:target { |
|
530 | pre.sourcelines.stripes > span:target { | |
531 | background-color: #bfdfff; |
|
531 | background-color: #bfdfff; | |
532 | } |
|
532 | } | |
533 |
|
533 | |||
534 | .description { |
|
534 | .description { | |
535 | font-family: monospace; |
|
535 | font-family: monospace; | |
536 | white-space: pre; |
|
536 | white-space: pre; | |
537 | } |
|
537 | } | |
538 |
|
538 | |||
539 | /* Followlines */ |
|
539 | /* Followlines */ | |
540 | tbody.sourcelines > tr.followlines-selected, |
|
540 | tbody.sourcelines > tr.followlines-selected, | |
541 | pre.sourcelines > span.followlines-selected { |
|
541 | pre.sourcelines > span.followlines-selected { | |
542 | background-color: #99C7E9 !important; |
|
542 | background-color: #99C7E9 !important; | |
543 | } |
|
543 | } | |
544 |
|
544 | |||
545 | div#followlines { |
|
545 | div#followlines { | |
546 | background-color: #FFF; |
|
546 | background-color: #FFF; | |
547 | border: 1px solid #d9d8d1; |
|
547 | border: 1px solid #d9d8d1; | |
548 | padding: 5px; |
|
548 | padding: 5px; | |
549 | position: fixed; |
|
549 | position: fixed; | |
550 | } |
|
550 | } | |
551 |
|
551 | |||
552 | div.followlines-cancel { |
|
552 | div.followlines-cancel { | |
553 | text-align: right; |
|
553 | text-align: right; | |
554 | } |
|
554 | } | |
555 |
|
555 | |||
556 | div.followlines-cancel > button { |
|
556 | div.followlines-cancel > button { | |
557 | line-height: 80%; |
|
557 | line-height: 80%; | |
558 | padding: 0; |
|
558 | padding: 0; | |
559 | border: 0; |
|
559 | border: 0; | |
560 | border-radius: 2px; |
|
560 | border-radius: 2px; | |
561 | background-color: inherit; |
|
561 | background-color: inherit; | |
562 | font-weight: bold; |
|
562 | font-weight: bold; | |
563 | } |
|
563 | } | |
564 |
|
564 | |||
565 | div.followlines-cancel > button:hover { |
|
565 | div.followlines-cancel > button:hover { | |
566 | color: #FFFFFF; |
|
566 | color: #FFFFFF; | |
567 | background-color: #CF1F1F; |
|
567 | background-color: #CF1F1F; | |
568 | } |
|
568 | } | |
569 |
|
569 | |||
570 | div.followlines-link { |
|
570 | div.followlines-link { | |
571 | margin: 2px; |
|
571 | margin: 2px; | |
572 | margin-top: 4px; |
|
572 | margin-top: 4px; | |
573 | font-family: sans-serif; |
|
573 | font-family: sans-serif; | |
574 | } |
|
574 | } | |
575 |
|
575 | |||
576 | .btn-followlines { |
|
576 | .btn-followlines { | |
577 | position: absolute; |
|
577 | position: absolute; | |
578 | display: none; |
|
578 | display: none; | |
579 | cursor: pointer; |
|
579 | cursor: pointer; | |
580 | box-sizing: content-box; |
|
580 | box-sizing: content-box; | |
581 | font-size: 11px; |
|
581 | font-size: 11px; | |
582 | width: 13px; |
|
582 | width: 13px; | |
583 | height: 13px; |
|
583 | height: 13px; | |
584 | border-radius: 3px; |
|
584 | border-radius: 3px; | |
585 | margin: 0px; |
|
585 | margin: 0px; | |
586 | margin-top: -2px; |
|
586 | margin-top: -2px; | |
587 | padding: 0px; |
|
587 | padding: 0px; | |
588 | background-color: #E5FDE5; |
|
588 | background-color: #E5FDE5; | |
589 | border: 1px solid #9BC19B; |
|
589 | border: 1px solid #9BC19B; | |
590 | font-family: monospace; |
|
590 | font-family: monospace; | |
591 | text-align: center; |
|
591 | text-align: center; | |
592 | line-height: 5px; |
|
592 | line-height: 5px; | |
593 | } |
|
593 | } | |
594 |
|
594 | |||
595 | span.followlines-select .btn-followlines { |
|
595 | span.followlines-select .btn-followlines { | |
596 | margin-left: -1.6em; |
|
596 | margin-left: -1.6em; | |
597 | } |
|
597 | } | |
598 |
|
598 | |||
599 | .btn-followlines:hover { |
|
599 | .btn-followlines:hover { | |
600 | transform: scale(1.1, 1.1); |
|
600 | transform: scale(1.1, 1.1); | |
601 | } |
|
601 | } | |
602 |
|
602 | |||
603 | .btn-followlines .followlines-plus { |
|
603 | .btn-followlines .followlines-plus { | |
604 | color: green; |
|
604 | color: green; | |
605 | } |
|
605 | } | |
606 |
|
606 | |||
607 | .btn-followlines .followlines-minus { |
|
607 | .btn-followlines .followlines-minus { | |
608 | color: red; |
|
608 | color: red; | |
609 | } |
|
609 | } | |
610 |
|
610 | |||
611 | .btn-followlines-end { |
|
611 | .btn-followlines-end { | |
612 | background-color: #ffdcdc; |
|
612 | background-color: #ffdcdc; | |
613 | } |
|
613 | } | |
614 |
|
614 | |||
615 | .sourcelines tr:hover .btn-followlines, |
|
615 | .sourcelines tr:hover .btn-followlines, | |
616 | .sourcelines span.followlines-select:hover > .btn-followlines { |
|
616 | .sourcelines span.followlines-select:hover > .btn-followlines { | |
617 | display: inline; |
|
617 | display: inline; | |
618 | } |
|
618 | } | |
619 |
|
619 | |||
620 | .btn-followlines-hidden, |
|
620 | .btn-followlines-hidden, | |
621 | .sourcelines tr:hover .btn-followlines-hidden { |
|
621 | .sourcelines tr:hover .btn-followlines-hidden { | |
622 | display: none; |
|
622 | display: none; | |
623 | } |
|
623 | } | |
624 |
|
624 | |||
625 | /* Graph */ |
|
625 | /* Graph */ | |
626 | div#wrapper { |
|
626 | div#wrapper { | |
627 | position: relative; |
|
627 | position: relative; | |
628 | margin: 0; |
|
628 | margin: 0; | |
629 | padding: 0; |
|
629 | padding: 0; | |
630 | margin-top: 3px; |
|
630 | margin-top: 3px; | |
631 | } |
|
631 | } | |
632 |
|
632 | |||
633 | canvas { |
|
633 | canvas { | |
634 | position: absolute; |
|
634 | position: absolute; | |
635 | z-index: 5; |
|
635 | z-index: 5; | |
636 | top: -0.9em; |
|
636 | top: -0.9em; | |
637 | margin: 0; |
|
637 | margin: 0; | |
638 | } |
|
638 | } | |
639 |
|
639 | |||
640 | ul#graphnodes { |
|
640 | ul#graphnodes { | |
641 | list-style: none inside none; |
|
641 | list-style: none inside none; | |
642 | padding: 0; |
|
642 | padding: 0; | |
643 | margin: 0; |
|
643 | margin: 0; | |
644 | } |
|
644 | } | |
645 |
|
645 | |||
646 | ul#graphnodes li { |
|
646 | ul#graphnodes li { | |
647 | position: relative; |
|
647 | position: relative; | |
648 | height: 37px; |
|
648 | height: 37px; | |
649 | overflow: visible; |
|
649 | overflow: visible; | |
650 | padding-top: 2px; |
|
650 | padding-top: 2px; | |
651 | } |
|
651 | } | |
652 |
|
652 | |||
653 | ul#graphnodes li .fg { |
|
653 | ul#graphnodes li .fg { | |
654 | position: absolute; |
|
654 | position: absolute; | |
655 | z-index: 10; |
|
655 | z-index: 10; | |
656 | } |
|
656 | } | |
657 |
|
657 | |||
658 | ul#graphnodes li .info { |
|
658 | ul#graphnodes li .info { | |
659 | font-size: 100%; |
|
659 | font-size: 100%; | |
660 | font-style: italic; |
|
660 | font-style: italic; | |
661 | } |
|
661 | } | |
662 |
|
662 | |||
663 | /* Comparison */ |
|
663 | /* Comparison */ | |
664 | .legend { |
|
664 | .legend { | |
665 | padding: 1.5% 0 1.5% 0; |
|
665 | padding: 1.5% 0 1.5% 0; | |
666 | } |
|
666 | } | |
667 |
|
667 | |||
668 | .legendinfo { |
|
668 | .legendinfo { | |
669 | border: 1px solid #d9d8d1; |
|
669 | border: 1px solid #d9d8d1; | |
670 | font-size: 80%; |
|
670 | font-size: 80%; | |
671 | text-align: center; |
|
671 | text-align: center; | |
672 | padding: 0.5%; |
|
672 | padding: 0.5%; | |
673 | } |
|
673 | } | |
674 |
|
674 | |||
675 | .equal { |
|
675 | .equal { | |
676 | background-color: #ffffff; |
|
676 | background-color: #ffffff; | |
677 | } |
|
677 | } | |
678 |
|
678 | |||
679 | .delete { |
|
679 | .delete { | |
680 | background-color: #faa; |
|
680 | background-color: #faa; | |
681 | color: #333; |
|
681 | color: #333; | |
682 | } |
|
682 | } | |
683 |
|
683 | |||
684 | .insert { |
|
684 | .insert { | |
685 | background-color: #ffa; |
|
685 | background-color: #ffa; | |
686 | } |
|
686 | } | |
687 |
|
687 | |||
688 | .replace { |
|
688 | .replace { | |
689 | background-color: #e8e8e8; |
|
689 | background-color: #e8e8e8; | |
690 | } |
|
690 | } | |
691 |
|
691 | |||
692 | .comparison { |
|
692 | .comparison { | |
693 | overflow-x: auto; |
|
693 | overflow-x: auto; | |
694 | } |
|
694 | } | |
695 |
|
695 | |||
696 | .header th { |
|
696 | .header th { | |
697 | text-align: center; |
|
697 | text-align: center; | |
698 | } |
|
698 | } | |
699 |
|
699 | |||
700 | .block { |
|
700 | .block { | |
701 | border-top: 1px solid #d9d8d1; |
|
701 | border-top: 1px solid #d9d8d1; | |
702 | } |
|
702 | } | |
703 |
|
703 | |||
704 | .scroll-loading { |
|
704 | .scroll-loading { | |
705 | -webkit-animation: change_color 1s linear 0s infinite alternate; |
|
705 | -webkit-animation: change_color 1s linear 0s infinite alternate; | |
706 | -moz-animation: change_color 1s linear 0s infinite alternate; |
|
706 | -moz-animation: change_color 1s linear 0s infinite alternate; | |
707 | -o-animation: change_color 1s linear 0s infinite alternate; |
|
707 | -o-animation: change_color 1s linear 0s infinite alternate; | |
708 | animation: change_color 1s linear 0s infinite alternate; |
|
708 | animation: change_color 1s linear 0s infinite alternate; | |
709 | } |
|
709 | } | |
710 |
|
710 | |||
711 | @-webkit-keyframes change_color { |
|
711 | @-webkit-keyframes change_color { | |
712 | from { background-color: #A0CEFF; } to { } |
|
712 | from { background-color: #A0CEFF; } to { } | |
713 | } |
|
713 | } | |
714 | @-moz-keyframes change_color { |
|
714 | @-moz-keyframes change_color { | |
715 | from { background-color: #A0CEFF; } to { } |
|
715 | from { background-color: #A0CEFF; } to { } | |
716 | } |
|
716 | } | |
717 | @-o-keyframes change_color { |
|
717 | @-o-keyframes change_color { | |
718 | from { background-color: #A0CEFF; } to { } |
|
718 | from { background-color: #A0CEFF; } to { } | |
719 | } |
|
719 | } | |
720 | @keyframes change_color { |
|
720 | @keyframes change_color { | |
721 | from { background-color: #A0CEFF; } to { } |
|
721 | from { background-color: #A0CEFF; } to { } | |
722 | } |
|
722 | } | |
723 |
|
723 | |||
724 | .scroll-loading-error { |
|
724 | .scroll-loading-error { | |
725 | background-color: #FFCCCC !important; |
|
725 | background-color: #FFCCCC !important; | |
726 | } |
|
726 | } | |
727 |
|
727 | |||
728 | #doc { |
|
728 | #doc { | |
729 | margin: 0 8px; |
|
729 | margin: 0 8px; | |
730 | } |
|
730 | } | |
731 | 304 Not Modified |
|
731 | 304 Not Modified | |
732 |
|
732 | |||
733 |
|
733 | |||
734 | phase changes are refreshed (issue4061) |
|
734 | phase changes are refreshed (issue4061) | |
735 |
|
735 | |||
736 | $ echo bar >> foo |
|
736 | $ echo bar >> foo | |
737 | $ hg ci -msecret --secret |
|
737 | $ hg ci -msecret --secret | |
738 | $ get-with-headers.py localhost:$HGPORT 'log?style=raw' |
|
738 | $ get-with-headers.py localhost:$HGPORT 'log?style=raw' | |
739 | 200 Script output follows |
|
739 | 200 Script output follows | |
740 |
|
740 | |||
741 |
|
741 | |||
742 | # HG changelog |
|
742 | # HG changelog | |
743 | # Node ID 2ef0ac749a14e4f57a5a822464a0902c6f7f448f |
|
743 | # Node ID 2ef0ac749a14e4f57a5a822464a0902c6f7f448f | |
744 |
|
744 | |||
745 | changeset: 2ef0ac749a14e4f57a5a822464a0902c6f7f448f |
|
745 | changeset: 2ef0ac749a14e4f57a5a822464a0902c6f7f448f | |
746 | revision: 0 |
|
746 | revision: 0 | |
747 | user: test |
|
747 | user: test | |
748 | date: Thu, 01 Jan 1970 00:00:00 +0000 |
|
748 | date: Thu, 01 Jan 1970 00:00:00 +0000 | |
749 | summary: base |
|
749 | summary: base | |
750 | branch: default |
|
750 | branch: default | |
751 | tag: tip |
|
751 | tag: tip | |
752 | bookmark: @ |
|
752 | bookmark: @ | |
753 | bookmark: a b c |
|
753 | bookmark: a b c | |
754 | bookmark: d/e/f |
|
754 | bookmark: d/e/f | |
755 |
|
755 | |||
756 |
|
756 | |||
757 | $ hg phase --draft tip |
|
757 | $ hg phase --draft tip | |
758 | $ get-with-headers.py localhost:$HGPORT 'log?style=raw' |
|
758 | $ get-with-headers.py localhost:$HGPORT 'log?style=raw' | |
759 | 200 Script output follows |
|
759 | 200 Script output follows | |
760 |
|
760 | |||
761 |
|
761 | |||
762 | # HG changelog |
|
762 | # HG changelog | |
763 | # Node ID a084749e708a9c4c0a5b652a2a446322ce290e04 |
|
763 | # Node ID a084749e708a9c4c0a5b652a2a446322ce290e04 | |
764 |
|
764 | |||
765 | changeset: a084749e708a9c4c0a5b652a2a446322ce290e04 |
|
765 | changeset: a084749e708a9c4c0a5b652a2a446322ce290e04 | |
766 | revision: 1 |
|
766 | revision: 1 | |
767 | user: test |
|
767 | user: test | |
768 | date: Thu, 01 Jan 1970 00:00:00 +0000 |
|
768 | date: Thu, 01 Jan 1970 00:00:00 +0000 | |
769 | summary: secret |
|
769 | summary: secret | |
770 | branch: default |
|
770 | branch: default | |
771 | tag: tip |
|
771 | tag: tip | |
772 |
|
772 | |||
773 | changeset: 2ef0ac749a14e4f57a5a822464a0902c6f7f448f |
|
773 | changeset: 2ef0ac749a14e4f57a5a822464a0902c6f7f448f | |
774 | revision: 0 |
|
774 | revision: 0 | |
775 | user: test |
|
775 | user: test | |
776 | date: Thu, 01 Jan 1970 00:00:00 +0000 |
|
776 | date: Thu, 01 Jan 1970 00:00:00 +0000 | |
777 | summary: base |
|
777 | summary: base | |
778 | bookmark: @ |
|
778 | bookmark: @ | |
779 | bookmark: a b c |
|
779 | bookmark: a b c | |
780 | bookmark: d/e/f |
|
780 | bookmark: d/e/f | |
781 |
|
781 | |||
782 |
|
782 | |||
783 |
|
783 | |||
784 | access bookmarks |
|
784 | access bookmarks | |
785 |
|
785 | |||
786 | $ get-with-headers.py localhost:$HGPORT 'rev/@?style=paper' | grep -E '^200|changeset 0:' |
|
786 | $ get-with-headers.py localhost:$HGPORT 'rev/@?style=paper' | grep -E '^200|changeset 0:' | |
787 | 200 Script output follows |
|
787 | 200 Script output follows | |
788 | changeset 0:<a href="/rev/2ef0ac749a14?style=paper">2ef0ac749a14</a> |
|
788 | changeset 0:<a href="/rev/2ef0ac749a14?style=paper">2ef0ac749a14</a> | |
789 |
|
789 | |||
790 | $ get-with-headers.py localhost:$HGPORT 'rev/%40?style=paper' | grep -E '^200|changeset 0:' |
|
790 | $ get-with-headers.py localhost:$HGPORT 'rev/%40?style=paper' | grep -E '^200|changeset 0:' | |
791 | 200 Script output follows |
|
791 | 200 Script output follows | |
792 | changeset 0:<a href="/rev/2ef0ac749a14?style=paper">2ef0ac749a14</a> |
|
792 | changeset 0:<a href="/rev/2ef0ac749a14?style=paper">2ef0ac749a14</a> | |
793 |
|
793 | |||
794 | $ get-with-headers.py localhost:$HGPORT 'rev/a%20b%20c?style=paper' | grep -E '^200|changeset 0:' |
|
794 | $ get-with-headers.py localhost:$HGPORT 'rev/a%20b%20c?style=paper' | grep -E '^200|changeset 0:' | |
795 | 200 Script output follows |
|
795 | 200 Script output follows | |
796 | changeset 0:<a href="/rev/2ef0ac749a14?style=paper">2ef0ac749a14</a> |
|
796 | changeset 0:<a href="/rev/2ef0ac749a14?style=paper">2ef0ac749a14</a> | |
797 |
|
797 | |||
798 | $ get-with-headers.py localhost:$HGPORT 'rev/d%252Fe%252Ff?style=paper' | grep -E '^200|changeset 0:' |
|
798 | $ get-with-headers.py localhost:$HGPORT 'rev/d%252Fe%252Ff?style=paper' | grep -E '^200|changeset 0:' | |
799 | 200 Script output follows |
|
799 | 200 Script output follows | |
800 | changeset 0:<a href="/rev/2ef0ac749a14?style=paper">2ef0ac749a14</a> |
|
800 | changeset 0:<a href="/rev/2ef0ac749a14?style=paper">2ef0ac749a14</a> | |
801 |
|
801 | |||
802 | no '[up]' entry in file view when in root directory |
|
802 | no '[up]' entry in file view when in root directory | |
803 |
|
803 | |||
804 | $ get-with-headers.py localhost:$HGPORT 'file/tip?style=paper' | grep -F '[up]' |
|
804 | $ get-with-headers.py localhost:$HGPORT 'file/tip?style=paper' | grep -F '[up]' | |
805 | [1] |
|
805 | [1] | |
806 | $ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=paper' | grep -F '[up]' |
|
806 | $ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=paper' | grep -F '[up]' | |
807 | <a href="/file/tip/?style=paper">[up]</a> |
|
807 | <a href="/file/tip/?style=paper">[up]</a> | |
808 | $ get-with-headers.py localhost:$HGPORT 'file/tip?style=coal' | grep -F '[up]' |
|
808 | $ get-with-headers.py localhost:$HGPORT 'file/tip?style=coal' | grep -F '[up]' | |
809 | [1] |
|
809 | [1] | |
810 | $ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=coal' | grep -F '[up]' |
|
810 | $ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=coal' | grep -F '[up]' | |
811 | <a href="/file/tip/?style=coal">[up]</a> |
|
811 | <a href="/file/tip/?style=coal">[up]</a> | |
812 | $ get-with-headers.py localhost:$HGPORT 'file/tip?style=gitweb' | grep -F '[up]' |
|
812 | $ get-with-headers.py localhost:$HGPORT 'file/tip?style=gitweb' | grep -F '[up]' | |
813 | [1] |
|
813 | [1] | |
814 | $ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=gitweb' | grep -F '[up]' |
|
814 | $ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=gitweb' | grep -F '[up]' | |
815 | <a href="/file/tip/?style=gitweb">[up]</a> |
|
815 | <a href="/file/tip/?style=gitweb">[up]</a> | |
816 | $ get-with-headers.py localhost:$HGPORT 'file/tip?style=monoblue' | grep -F '[up]' |
|
816 | $ get-with-headers.py localhost:$HGPORT 'file/tip?style=monoblue' | grep -F '[up]' | |
817 | [1] |
|
817 | [1] | |
818 | $ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=monoblue' | grep -F '[up]' |
|
818 | $ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=monoblue' | grep -F '[up]' | |
819 | <a href="/file/tip/?style=monoblue">[up]</a> |
|
819 | <a href="/file/tip/?style=monoblue">[up]</a> | |
820 | $ get-with-headers.py localhost:$HGPORT 'file/tip?style=spartan' | grep -F '[up]' |
|
820 | $ get-with-headers.py localhost:$HGPORT 'file/tip?style=spartan' | grep -F '[up]' | |
821 | [1] |
|
821 | [1] | |
822 | $ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=spartan' | grep -F '[up]' |
|
822 | $ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=spartan' | grep -F '[up]' | |
823 | <a href="/file/tip/?style=spartan">[up]</a> |
|
823 | <a href="/file/tip/?style=spartan">[up]</a> | |
824 |
|
824 | |||
825 | no style can be loaded from directories other than the specified paths |
|
825 | no style can be loaded from directories other than the specified paths | |
826 |
|
826 | |||
827 | $ mkdir -p x/templates/fallback |
|
827 | $ mkdir -p x/templates/fallback | |
828 | $ cat <<EOF > x/templates/fallback/map |
|
828 | $ cat <<EOF > x/templates/fallback/map | |
829 | > default = 'shortlog' |
|
829 | > default = 'shortlog' | |
830 | > shortlog = 'fall back to default\n' |
|
830 | > shortlog = 'fall back to default\n' | |
831 | > mimetype = 'text/plain' |
|
831 | > mimetype = 'text/plain' | |
832 | > EOF |
|
832 | > EOF | |
833 | $ cat <<EOF > x/map |
|
833 | $ cat <<EOF > x/map | |
834 | > default = 'shortlog' |
|
834 | > default = 'shortlog' | |
835 | > shortlog = 'access to outside of templates directory\n' |
|
835 | > shortlog = 'access to outside of templates directory\n' | |
836 | > mimetype = 'text/plain' |
|
836 | > mimetype = 'text/plain' | |
837 | > EOF |
|
837 | > EOF | |
838 |
|
838 | |||
839 | $ killdaemons.py |
|
839 | $ killdaemons.py | |
840 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log \ |
|
840 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log \ | |
841 | > --config web.style=fallback --config web.templates=x/templates |
|
841 | > --config web.style=fallback --config web.templates=x/templates | |
842 | $ cat hg.pid >> $DAEMON_PIDS |
|
842 | $ cat hg.pid >> $DAEMON_PIDS | |
843 |
|
843 | |||
844 | $ get-with-headers.py localhost:$HGPORT "?style=`pwd`/x" |
|
844 | $ get-with-headers.py localhost:$HGPORT "?style=`pwd`/x" | |
845 | 200 Script output follows |
|
845 | 200 Script output follows | |
846 |
|
846 | |||
847 | fall back to default |
|
847 | fall back to default | |
848 |
|
848 | |||
849 | $ get-with-headers.py localhost:$HGPORT '?style=..' |
|
849 | $ get-with-headers.py localhost:$HGPORT '?style=..' | |
850 | 200 Script output follows |
|
850 | 200 Script output follows | |
851 |
|
851 | |||
852 | fall back to default |
|
852 | fall back to default | |
853 |
|
853 | |||
854 | $ get-with-headers.py localhost:$HGPORT '?style=./..' |
|
854 | $ get-with-headers.py localhost:$HGPORT '?style=./..' | |
855 | 200 Script output follows |
|
855 | 200 Script output follows | |
856 |
|
856 | |||
857 | fall back to default |
|
857 | fall back to default | |
858 |
|
858 | |||
859 | $ get-with-headers.py localhost:$HGPORT '?style=.../.../' |
|
859 | $ get-with-headers.py localhost:$HGPORT '?style=.../.../' | |
860 | 200 Script output follows |
|
860 | 200 Script output follows | |
861 |
|
861 | |||
862 | fall back to default |
|
862 | fall back to default | |
863 |
|
863 | |||
864 | $ killdaemons.py |
|
864 | $ killdaemons.py | |
865 |
|
865 | |||
866 | Test signal-safe-lock in web and non-web processes |
|
866 | Test signal-safe-lock in web and non-web processes | |
867 |
|
867 | |||
868 | $ cat <<'EOF' > disablesig.py |
|
868 | $ cat <<'EOF' > disablesig.py | |
869 | > import signal |
|
869 | > import signal | |
870 | > from mercurial import error, extensions |
|
870 | > from mercurial import error, extensions | |
871 | > def disabledsig(orig, signalnum, handler): |
|
871 | > def disabledsig(orig, signalnum, handler): | |
872 | > if signalnum == signal.SIGTERM: |
|
872 | > if signalnum == signal.SIGTERM: | |
873 | > raise error.Abort(b'SIGTERM cannot be replaced') |
|
873 | > raise error.Abort(b'SIGTERM cannot be replaced') | |
874 | > try: |
|
874 | > try: | |
875 | > return orig(signalnum, handler) |
|
875 | > return orig(signalnum, handler) | |
876 | > except ValueError: |
|
876 | > except ValueError: | |
877 | > raise error.Abort(b'signal.signal() called in thread?') |
|
877 | > raise error.Abort(b'signal.signal() called in thread?') | |
878 | > def uisetup(ui): |
|
878 | > def uisetup(ui): | |
879 |
> extensions.wrapfunction(signal, |
|
879 | > extensions.wrapfunction(signal, 'signal', disabledsig) | |
880 |
|
|
880 | > EOF | |
881 |
|
881 | |||
882 | by default, signal interrupt should be disabled while making a lock file |
|
882 | by default, signal interrupt should be disabled while making a lock file | |
883 |
|
883 | |||
884 | $ hg debuglock -s --config extensions.disablesig=disablesig.py |
|
884 | $ hg debuglock -s --config extensions.disablesig=disablesig.py | |
885 | abort: SIGTERM cannot be replaced |
|
885 | abort: SIGTERM cannot be replaced | |
886 | [255] |
|
886 | [255] | |
887 |
|
887 | |||
888 | but in hgweb, it isn't disabled since some WSGI servers complains about |
|
888 | but in hgweb, it isn't disabled since some WSGI servers complains about | |
889 | unsupported signal.signal() calls (see issue5889) |
|
889 | unsupported signal.signal() calls (see issue5889) | |
890 |
|
890 | |||
891 | $ hg serve --config extensions.disablesig=disablesig.py \ |
|
891 | $ hg serve --config extensions.disablesig=disablesig.py \ | |
892 | > --config web.allow-push='*' --config web.push_ssl=False \ |
|
892 | > --config web.allow-push='*' --config web.push_ssl=False \ | |
893 | > -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
893 | > -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
894 | $ cat hg.pid >> $DAEMON_PIDS |
|
894 | $ cat hg.pid >> $DAEMON_PIDS | |
895 |
|
895 | |||
896 | $ hg clone -q http://localhost:$HGPORT/ repo |
|
896 | $ hg clone -q http://localhost:$HGPORT/ repo | |
897 | $ hg bookmark -R repo foo |
|
897 | $ hg bookmark -R repo foo | |
898 |
|
898 | |||
899 | push would fail if signal.signal() were called |
|
899 | push would fail if signal.signal() were called | |
900 |
|
900 | |||
901 | $ hg push -R repo -B foo |
|
901 | $ hg push -R repo -B foo | |
902 | pushing to http://localhost:$HGPORT/ |
|
902 | pushing to http://localhost:$HGPORT/ | |
903 | searching for changes |
|
903 | searching for changes | |
904 | no changes found |
|
904 | no changes found | |
905 | exporting bookmark foo |
|
905 | exporting bookmark foo | |
906 | [1] |
|
906 | [1] | |
907 |
|
907 | |||
908 | $ rm -R repo |
|
908 | $ rm -R repo | |
909 | $ killdaemons.py |
|
909 | $ killdaemons.py | |
910 |
|
910 | |||
911 | errors |
|
911 | errors | |
912 |
|
912 | |||
913 | $ cat errors.log | "$PYTHON" $TESTDIR/filtertraceback.py |
|
913 | $ cat errors.log | "$PYTHON" $TESTDIR/filtertraceback.py | |
914 | $ rm -f errors.log |
|
914 | $ rm -f errors.log | |
915 |
|
915 | |||
916 | Uncaught exceptions result in a logged error and canned HTTP response |
|
916 | Uncaught exceptions result in a logged error and canned HTTP response | |
917 |
|
917 | |||
918 | $ hg serve --config extensions.hgweberror=$TESTDIR/hgweberror.py -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
918 | $ hg serve --config extensions.hgweberror=$TESTDIR/hgweberror.py -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
919 | $ cat hg.pid >> $DAEMON_PIDS |
|
919 | $ cat hg.pid >> $DAEMON_PIDS | |
920 |
|
920 | |||
921 | $ get-with-headers.py localhost:$HGPORT 'raiseerror' transfer-encoding content-type |
|
921 | $ get-with-headers.py localhost:$HGPORT 'raiseerror' transfer-encoding content-type | |
922 | 500 Internal Server Error |
|
922 | 500 Internal Server Error | |
923 | transfer-encoding: chunked |
|
923 | transfer-encoding: chunked | |
924 |
|
924 | |||
925 | Internal Server Error (no-eol) |
|
925 | Internal Server Error (no-eol) | |
926 | [1] |
|
926 | [1] | |
927 |
|
927 | |||
928 | $ killdaemons.py |
|
928 | $ killdaemons.py | |
929 | $ cat errors.log | "$PYTHON" $TESTDIR/filtertraceback.py |
|
929 | $ cat errors.log | "$PYTHON" $TESTDIR/filtertraceback.py | |
930 | .* Exception happened during processing request '/raiseerror': (re) |
|
930 | .* Exception happened during processing request '/raiseerror': (re) | |
931 | Traceback (most recent call last): |
|
931 | Traceback (most recent call last): | |
932 | AttributeError: I am an uncaught error! |
|
932 | AttributeError: I am an uncaught error! | |
933 |
|
933 | |||
934 |
|
934 | |||
935 | Uncaught exception after partial content sent |
|
935 | Uncaught exception after partial content sent | |
936 |
|
936 | |||
937 | $ hg serve --config extensions.hgweberror=$TESTDIR/hgweberror.py -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
937 | $ hg serve --config extensions.hgweberror=$TESTDIR/hgweberror.py -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
938 | $ cat hg.pid >> $DAEMON_PIDS |
|
938 | $ cat hg.pid >> $DAEMON_PIDS | |
939 | $ get-with-headers.py localhost:$HGPORT 'raiseerror?partialresponse=1' transfer-encoding content-type |
|
939 | $ get-with-headers.py localhost:$HGPORT 'raiseerror?partialresponse=1' transfer-encoding content-type | |
940 | 200 Script output follows |
|
940 | 200 Script output follows | |
941 | transfer-encoding: chunked |
|
941 | transfer-encoding: chunked | |
942 | content-type: text/plain |
|
942 | content-type: text/plain | |
943 |
|
943 | |||
944 | partial content |
|
944 | partial content | |
945 | Internal Server Error (no-eol) |
|
945 | Internal Server Error (no-eol) | |
946 |
|
946 | |||
947 | $ killdaemons.py |
|
947 | $ killdaemons.py | |
948 |
|
948 | |||
949 | HTTP 304 works with hgwebdir (issue5844) |
|
949 | HTTP 304 works with hgwebdir (issue5844) | |
950 |
|
950 | |||
951 | $ cat > hgweb.conf << EOF |
|
951 | $ cat > hgweb.conf << EOF | |
952 | > [paths] |
|
952 | > [paths] | |
953 | > /repo = $TESTTMP/test |
|
953 | > /repo = $TESTTMP/test | |
954 | > EOF |
|
954 | > EOF | |
955 |
|
955 | |||
956 | $ hg serve --web-conf hgweb.conf -p $HGPORT -d --pid-file hg.pid -E error.log |
|
956 | $ hg serve --web-conf hgweb.conf -p $HGPORT -d --pid-file hg.pid -E error.log | |
957 | $ cat hg.pid >> $DAEMON_PIDS |
|
957 | $ cat hg.pid >> $DAEMON_PIDS | |
958 |
|
958 | |||
959 | $ get-with-headers.py --twice --headeronly localhost:$HGPORT 'repo/static/style.css' - date etag server |
|
959 | $ get-with-headers.py --twice --headeronly localhost:$HGPORT 'repo/static/style.css' - date etag server | |
960 | 200 Script output follows |
|
960 | 200 Script output follows | |
961 | content-length: 2677 |
|
961 | content-length: 2677 | |
962 | content-type: text/css |
|
962 | content-type: text/css | |
963 | 304 Not Modified |
|
963 | 304 Not Modified | |
964 |
|
964 | |||
965 | $ killdaemons.py |
|
965 | $ killdaemons.py | |
966 |
|
966 | |||
967 | $ cd .. |
|
967 | $ cd .. |
@@ -1,1248 +1,1248 b'' | |||||
1 | #require no-reposimplestore no-chg |
|
1 | #require no-reposimplestore no-chg | |
2 |
|
2 | |||
3 | $ hg init requirements |
|
3 | $ hg init requirements | |
4 | $ cd requirements |
|
4 | $ cd requirements | |
5 |
|
5 | |||
6 | # LFS not loaded by default. |
|
6 | # LFS not loaded by default. | |
7 |
|
7 | |||
8 | $ hg config extensions |
|
8 | $ hg config extensions | |
9 | [1] |
|
9 | [1] | |
10 |
|
10 | |||
11 | # Adding lfs to requires file will auto-load lfs extension. |
|
11 | # Adding lfs to requires file will auto-load lfs extension. | |
12 |
|
12 | |||
13 | $ echo lfs >> .hg/requires |
|
13 | $ echo lfs >> .hg/requires | |
14 | $ hg config extensions |
|
14 | $ hg config extensions | |
15 | extensions.lfs= |
|
15 | extensions.lfs= | |
16 |
|
16 | |||
17 | # But only if there is no config entry for the extension already. |
|
17 | # But only if there is no config entry for the extension already. | |
18 |
|
18 | |||
19 | $ cat > .hg/hgrc << EOF |
|
19 | $ cat > .hg/hgrc << EOF | |
20 | > [extensions] |
|
20 | > [extensions] | |
21 | > lfs=! |
|
21 | > lfs=! | |
22 | > EOF |
|
22 | > EOF | |
23 |
|
23 | |||
24 | $ hg config extensions |
|
24 | $ hg config extensions | |
25 | abort: repository requires features unknown to this Mercurial: lfs |
|
25 | abort: repository requires features unknown to this Mercurial: lfs | |
26 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
|
26 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) | |
27 | [255] |
|
27 | [255] | |
28 |
|
28 | |||
29 | $ cat > .hg/hgrc << EOF |
|
29 | $ cat > .hg/hgrc << EOF | |
30 | > [extensions] |
|
30 | > [extensions] | |
31 | > lfs= |
|
31 | > lfs= | |
32 | > EOF |
|
32 | > EOF | |
33 |
|
33 | |||
34 | $ hg config extensions |
|
34 | $ hg config extensions | |
35 | extensions.lfs= |
|
35 | extensions.lfs= | |
36 |
|
36 | |||
37 | $ cat > .hg/hgrc << EOF |
|
37 | $ cat > .hg/hgrc << EOF | |
38 | > [extensions] |
|
38 | > [extensions] | |
39 | > lfs = missing.py |
|
39 | > lfs = missing.py | |
40 | > EOF |
|
40 | > EOF | |
41 |
|
41 | |||
42 | $ hg config extensions |
|
42 | $ hg config extensions | |
43 | \*\*\* failed to import extension "lfs" from missing.py: [Errno *] $ENOENT$: 'missing.py' (glob) |
|
43 | \*\*\* failed to import extension "lfs" from missing.py: [Errno *] $ENOENT$: 'missing.py' (glob) | |
44 | abort: repository requires features unknown to this Mercurial: lfs |
|
44 | abort: repository requires features unknown to this Mercurial: lfs | |
45 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
|
45 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) | |
46 | [255] |
|
46 | [255] | |
47 |
|
47 | |||
48 | $ cd .. |
|
48 | $ cd .. | |
49 |
|
49 | |||
50 | # Initial setup |
|
50 | # Initial setup | |
51 |
|
51 | |||
52 | $ cat >> $HGRCPATH << EOF |
|
52 | $ cat >> $HGRCPATH << EOF | |
53 | > [extensions] |
|
53 | > [extensions] | |
54 | > lfs= |
|
54 | > lfs= | |
55 | > [lfs] |
|
55 | > [lfs] | |
56 | > # Test deprecated config |
|
56 | > # Test deprecated config | |
57 | > threshold=1000B |
|
57 | > threshold=1000B | |
58 | > EOF |
|
58 | > EOF | |
59 |
|
59 | |||
60 | $ LONG=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
|
60 | $ LONG=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC | |
61 |
|
61 | |||
62 | # Prepare server and enable extension |
|
62 | # Prepare server and enable extension | |
63 | $ hg init server |
|
63 | $ hg init server | |
64 | $ hg clone -q server client |
|
64 | $ hg clone -q server client | |
65 | $ cd client |
|
65 | $ cd client | |
66 |
|
66 | |||
67 | # Commit small file |
|
67 | # Commit small file | |
68 | $ echo s > smallfile |
|
68 | $ echo s > smallfile | |
69 | $ echo '**.py = LF' > .hgeol |
|
69 | $ echo '**.py = LF' > .hgeol | |
70 | $ hg --config lfs.track='"size(\">1000B\")"' commit -Aqm "add small file" |
|
70 | $ hg --config lfs.track='"size(\">1000B\")"' commit -Aqm "add small file" | |
71 | hg: parse error: unsupported file pattern: size(">1000B") |
|
71 | hg: parse error: unsupported file pattern: size(">1000B") | |
72 | (paths must be prefixed with "path:") |
|
72 | (paths must be prefixed with "path:") | |
73 | [10] |
|
73 | [10] | |
74 | $ hg --config lfs.track='size(">1000B")' commit -Aqm "add small file" |
|
74 | $ hg --config lfs.track='size(">1000B")' commit -Aqm "add small file" | |
75 |
|
75 | |||
76 | # Commit large file |
|
76 | # Commit large file | |
77 | $ echo $LONG > largefile |
|
77 | $ echo $LONG > largefile | |
78 | $ hg debugrequires | grep lfs |
|
78 | $ hg debugrequires | grep lfs | |
79 | [1] |
|
79 | [1] | |
80 | $ hg commit --traceback -Aqm "add large file" |
|
80 | $ hg commit --traceback -Aqm "add large file" | |
81 | $ hg debugrequires | grep lfs |
|
81 | $ hg debugrequires | grep lfs | |
82 | lfs |
|
82 | lfs | |
83 |
|
83 | |||
84 | # Ensure metadata is stored |
|
84 | # Ensure metadata is stored | |
85 | $ hg debugdata largefile 0 |
|
85 | $ hg debugdata largefile 0 | |
86 | version https://git-lfs.github.com/spec/v1 |
|
86 | version https://git-lfs.github.com/spec/v1 | |
87 | oid sha256:f11e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b |
|
87 | oid sha256:f11e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b | |
88 | size 1501 |
|
88 | size 1501 | |
89 | x-is-binary 0 |
|
89 | x-is-binary 0 | |
90 |
|
90 | |||
91 | # Check the blobstore is populated |
|
91 | # Check the blobstore is populated | |
92 | $ find .hg/store/lfs/objects | sort |
|
92 | $ find .hg/store/lfs/objects | sort | |
93 | .hg/store/lfs/objects |
|
93 | .hg/store/lfs/objects | |
94 | .hg/store/lfs/objects/f1 |
|
94 | .hg/store/lfs/objects/f1 | |
95 | .hg/store/lfs/objects/f1/1e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b |
|
95 | .hg/store/lfs/objects/f1/1e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b | |
96 |
|
96 | |||
97 | # Check the blob stored contains the actual contents of the file |
|
97 | # Check the blob stored contains the actual contents of the file | |
98 | $ cat .hg/store/lfs/objects/f1/1e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b |
|
98 | $ cat .hg/store/lfs/objects/f1/1e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b | |
99 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
|
99 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC | |
100 |
|
100 | |||
101 | # Push changes to the server |
|
101 | # Push changes to the server | |
102 |
|
102 | |||
103 | $ hg push |
|
103 | $ hg push | |
104 | pushing to $TESTTMP/server |
|
104 | pushing to $TESTTMP/server | |
105 | searching for changes |
|
105 | searching for changes | |
106 | abort: lfs.url needs to be configured |
|
106 | abort: lfs.url needs to be configured | |
107 | [255] |
|
107 | [255] | |
108 |
|
108 | |||
109 | $ cat >> $HGRCPATH << EOF |
|
109 | $ cat >> $HGRCPATH << EOF | |
110 | > [lfs] |
|
110 | > [lfs] | |
111 | > url=file:$TESTTMP/dummy-remote/ |
|
111 | > url=file:$TESTTMP/dummy-remote/ | |
112 | > EOF |
|
112 | > EOF | |
113 |
|
113 | |||
114 | Push to a local non-lfs repo with the extension enabled will add the |
|
114 | Push to a local non-lfs repo with the extension enabled will add the | |
115 | lfs requirement |
|
115 | lfs requirement | |
116 |
|
116 | |||
117 | $ hg debugrequires -R $TESTTMP/server/ | grep lfs |
|
117 | $ hg debugrequires -R $TESTTMP/server/ | grep lfs | |
118 | [1] |
|
118 | [1] | |
119 | $ hg push -v | grep -E -v '^(uncompressed| )' |
|
119 | $ hg push -v | grep -E -v '^(uncompressed| )' | |
120 | pushing to $TESTTMP/server |
|
120 | pushing to $TESTTMP/server | |
121 | searching for changes |
|
121 | searching for changes | |
122 | lfs: found f11e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b in the local lfs store |
|
122 | lfs: found f11e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b in the local lfs store | |
123 | 2 changesets found |
|
123 | 2 changesets found | |
124 | adding changesets |
|
124 | adding changesets | |
125 | adding manifests |
|
125 | adding manifests | |
126 | adding file changes |
|
126 | adding file changes | |
127 | calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs |
|
127 | calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs | |
128 | added 2 changesets with 3 changes to 3 files |
|
128 | added 2 changesets with 3 changes to 3 files | |
129 | $ hg debugrequires -R $TESTTMP/server/ | grep lfs |
|
129 | $ hg debugrequires -R $TESTTMP/server/ | grep lfs | |
130 | lfs |
|
130 | lfs | |
131 |
|
131 | |||
132 | # Unknown URL scheme |
|
132 | # Unknown URL scheme | |
133 |
|
133 | |||
134 | $ hg push --config lfs.url=ftp://foobar |
|
134 | $ hg push --config lfs.url=ftp://foobar | |
135 | abort: lfs: unknown url scheme: ftp |
|
135 | abort: lfs: unknown url scheme: ftp | |
136 | [255] |
|
136 | [255] | |
137 |
|
137 | |||
138 | $ cd ../ |
|
138 | $ cd ../ | |
139 |
|
139 | |||
140 | # Initialize new client (not cloning) and setup extension |
|
140 | # Initialize new client (not cloning) and setup extension | |
141 | $ hg init client2 |
|
141 | $ hg init client2 | |
142 | $ cd client2 |
|
142 | $ cd client2 | |
143 | $ cat >> .hg/hgrc <<EOF |
|
143 | $ cat >> .hg/hgrc <<EOF | |
144 | > [paths] |
|
144 | > [paths] | |
145 | > default = $TESTTMP/server |
|
145 | > default = $TESTTMP/server | |
146 | > EOF |
|
146 | > EOF | |
147 |
|
147 | |||
148 | # Pull from server |
|
148 | # Pull from server | |
149 |
|
149 | |||
150 | Pulling a local lfs repo into a local non-lfs repo with the extension |
|
150 | Pulling a local lfs repo into a local non-lfs repo with the extension | |
151 | enabled adds the lfs requirement |
|
151 | enabled adds the lfs requirement | |
152 |
|
152 | |||
153 | $ hg debugrequires | grep lfs || true |
|
153 | $ hg debugrequires | grep lfs || true | |
154 | $ hg debugrequires -R $TESTTMP/server/ | grep lfs |
|
154 | $ hg debugrequires -R $TESTTMP/server/ | grep lfs | |
155 | lfs |
|
155 | lfs | |
156 | $ hg pull default |
|
156 | $ hg pull default | |
157 | pulling from $TESTTMP/server |
|
157 | pulling from $TESTTMP/server | |
158 | requesting all changes |
|
158 | requesting all changes | |
159 | adding changesets |
|
159 | adding changesets | |
160 | adding manifests |
|
160 | adding manifests | |
161 | adding file changes |
|
161 | adding file changes | |
162 | added 2 changesets with 3 changes to 3 files |
|
162 | added 2 changesets with 3 changes to 3 files | |
163 | new changesets 0ead593177f7:b88141481348 |
|
163 | new changesets 0ead593177f7:b88141481348 | |
164 | (run 'hg update' to get a working copy) |
|
164 | (run 'hg update' to get a working copy) | |
165 | $ hg debugrequires | grep lfs |
|
165 | $ hg debugrequires | grep lfs | |
166 | lfs |
|
166 | lfs | |
167 | $ hg debugrequires -R $TESTTMP/server/ | grep lfs |
|
167 | $ hg debugrequires -R $TESTTMP/server/ | grep lfs | |
168 | lfs |
|
168 | lfs | |
169 |
|
169 | |||
170 | # Check the blobstore is not yet populated |
|
170 | # Check the blobstore is not yet populated | |
171 | $ [ -d .hg/store/lfs/objects ] |
|
171 | $ [ -d .hg/store/lfs/objects ] | |
172 | [1] |
|
172 | [1] | |
173 |
|
173 | |||
174 | # Update to the last revision containing the large file |
|
174 | # Update to the last revision containing the large file | |
175 | $ hg update |
|
175 | $ hg update | |
176 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
176 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
177 |
|
177 | |||
178 | # Check the blobstore has been populated on update |
|
178 | # Check the blobstore has been populated on update | |
179 | $ find .hg/store/lfs/objects | sort |
|
179 | $ find .hg/store/lfs/objects | sort | |
180 | .hg/store/lfs/objects |
|
180 | .hg/store/lfs/objects | |
181 | .hg/store/lfs/objects/f1 |
|
181 | .hg/store/lfs/objects/f1 | |
182 | .hg/store/lfs/objects/f1/1e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b |
|
182 | .hg/store/lfs/objects/f1/1e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b | |
183 |
|
183 | |||
184 | # Check the contents of the file are fetched from blobstore when requested |
|
184 | # Check the contents of the file are fetched from blobstore when requested | |
185 | $ hg cat -r . largefile |
|
185 | $ hg cat -r . largefile | |
186 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
|
186 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC | |
187 |
|
187 | |||
188 | # Check the file has been copied in the working copy |
|
188 | # Check the file has been copied in the working copy | |
189 | $ cat largefile |
|
189 | $ cat largefile | |
190 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
|
190 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC | |
191 |
|
191 | |||
192 | $ cd .. |
|
192 | $ cd .. | |
193 |
|
193 | |||
194 | # Check rename, and switch between large and small files |
|
194 | # Check rename, and switch between large and small files | |
195 |
|
195 | |||
196 | $ hg init repo3 |
|
196 | $ hg init repo3 | |
197 | $ cd repo3 |
|
197 | $ cd repo3 | |
198 | $ cat >> .hg/hgrc << EOF |
|
198 | $ cat >> .hg/hgrc << EOF | |
199 | > [lfs] |
|
199 | > [lfs] | |
200 | > track=size(">10B") |
|
200 | > track=size(">10B") | |
201 | > EOF |
|
201 | > EOF | |
202 |
|
202 | |||
203 | $ echo LONGER-THAN-TEN-BYTES-WILL-TRIGGER-LFS > large |
|
203 | $ echo LONGER-THAN-TEN-BYTES-WILL-TRIGGER-LFS > large | |
204 | $ echo SHORTER > small |
|
204 | $ echo SHORTER > small | |
205 | $ hg add . -q |
|
205 | $ hg add . -q | |
206 | $ hg commit -m 'commit with lfs content' |
|
206 | $ hg commit -m 'commit with lfs content' | |
207 |
|
207 | |||
208 | $ hg files -r . 'set:added()' |
|
208 | $ hg files -r . 'set:added()' | |
209 | large |
|
209 | large | |
210 | small |
|
210 | small | |
211 | $ hg files -r . 'set:added() & lfs()' |
|
211 | $ hg files -r . 'set:added() & lfs()' | |
212 | large |
|
212 | large | |
213 |
|
213 | |||
214 | $ hg mv large l |
|
214 | $ hg mv large l | |
215 | $ hg mv small s |
|
215 | $ hg mv small s | |
216 | $ hg status 'set:removed()' |
|
216 | $ hg status 'set:removed()' | |
217 | R large |
|
217 | R large | |
218 | R small |
|
218 | R small | |
219 | $ hg status 'set:removed() & lfs()' |
|
219 | $ hg status 'set:removed() & lfs()' | |
220 | R large |
|
220 | R large | |
221 | $ hg commit -m 'renames' |
|
221 | $ hg commit -m 'renames' | |
222 |
|
222 | |||
223 | $ hg cat -r . l -T '{rawdata}\n' |
|
223 | $ hg cat -r . l -T '{rawdata}\n' | |
224 | version https://git-lfs.github.com/spec/v1 |
|
224 | version https://git-lfs.github.com/spec/v1 | |
225 | oid sha256:66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
225 | oid sha256:66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
226 | size 39 |
|
226 | size 39 | |
227 | x-hg-copy large |
|
227 | x-hg-copy large | |
228 | x-hg-copyrev 2c531e0992ff3107c511b53cb82a91b6436de8b2 |
|
228 | x-hg-copyrev 2c531e0992ff3107c511b53cb82a91b6436de8b2 | |
229 | x-is-binary 0 |
|
229 | x-is-binary 0 | |
230 |
|
230 | |||
231 |
|
231 | |||
232 | $ hg files -r . 'set:copied()' |
|
232 | $ hg files -r . 'set:copied()' | |
233 | l |
|
233 | l | |
234 | s |
|
234 | s | |
235 | $ hg files -r . 'set:copied() & lfs()' |
|
235 | $ hg files -r . 'set:copied() & lfs()' | |
236 | l |
|
236 | l | |
237 | $ hg status --change . 'set:removed()' |
|
237 | $ hg status --change . 'set:removed()' | |
238 | R large |
|
238 | R large | |
239 | R small |
|
239 | R small | |
240 | $ hg status --change . 'set:removed() & lfs()' |
|
240 | $ hg status --change . 'set:removed() & lfs()' | |
241 | R large |
|
241 | R large | |
242 |
|
242 | |||
243 | $ echo SHORT > l |
|
243 | $ echo SHORT > l | |
244 | $ echo BECOME-LARGER-FROM-SHORTER > s |
|
244 | $ echo BECOME-LARGER-FROM-SHORTER > s | |
245 | $ hg commit -m 'large to small, small to large' |
|
245 | $ hg commit -m 'large to small, small to large' | |
246 |
|
246 | |||
247 | $ echo 1 >> l |
|
247 | $ echo 1 >> l | |
248 | $ echo 2 >> s |
|
248 | $ echo 2 >> s | |
249 | $ hg commit -m 'random modifications' |
|
249 | $ hg commit -m 'random modifications' | |
250 |
|
250 | |||
251 | $ echo RESTORE-TO-BE-LARGE > l |
|
251 | $ echo RESTORE-TO-BE-LARGE > l | |
252 | $ echo SHORTER > s |
|
252 | $ echo SHORTER > s | |
253 | $ hg commit -m 'switch large and small again' |
|
253 | $ hg commit -m 'switch large and small again' | |
254 |
|
254 | |||
255 | # Test lfs_files template |
|
255 | # Test lfs_files template | |
256 |
|
256 | |||
257 | $ hg log -r 'all()' -T '{rev} {join(lfs_files, ", ")}\n' |
|
257 | $ hg log -r 'all()' -T '{rev} {join(lfs_files, ", ")}\n' | |
258 | 0 large |
|
258 | 0 large | |
259 | 1 l, large |
|
259 | 1 l, large | |
260 | 2 s |
|
260 | 2 s | |
261 | 3 s |
|
261 | 3 s | |
262 | 4 l |
|
262 | 4 l | |
263 |
|
263 | |||
264 | # Push and pull the above repo |
|
264 | # Push and pull the above repo | |
265 |
|
265 | |||
266 | $ hg --cwd .. init repo4 |
|
266 | $ hg --cwd .. init repo4 | |
267 | $ hg push ../repo4 |
|
267 | $ hg push ../repo4 | |
268 | pushing to ../repo4 |
|
268 | pushing to ../repo4 | |
269 | searching for changes |
|
269 | searching for changes | |
270 | adding changesets |
|
270 | adding changesets | |
271 | adding manifests |
|
271 | adding manifests | |
272 | adding file changes |
|
272 | adding file changes | |
273 | added 5 changesets with 10 changes to 4 files |
|
273 | added 5 changesets with 10 changes to 4 files | |
274 |
|
274 | |||
275 | $ hg --cwd .. init repo5 |
|
275 | $ hg --cwd .. init repo5 | |
276 | $ hg --cwd ../repo5 pull ../repo3 |
|
276 | $ hg --cwd ../repo5 pull ../repo3 | |
277 | pulling from ../repo3 |
|
277 | pulling from ../repo3 | |
278 | requesting all changes |
|
278 | requesting all changes | |
279 | adding changesets |
|
279 | adding changesets | |
280 | adding manifests |
|
280 | adding manifests | |
281 | adding file changes |
|
281 | adding file changes | |
282 | added 5 changesets with 10 changes to 4 files |
|
282 | added 5 changesets with 10 changes to 4 files | |
283 | new changesets fd47a419c4f7:5adf850972b9 |
|
283 | new changesets fd47a419c4f7:5adf850972b9 | |
284 | (run 'hg update' to get a working copy) |
|
284 | (run 'hg update' to get a working copy) | |
285 |
|
285 | |||
286 | $ cd .. |
|
286 | $ cd .. | |
287 |
|
287 | |||
288 | # Test clone |
|
288 | # Test clone | |
289 |
|
289 | |||
290 | $ hg init repo6 |
|
290 | $ hg init repo6 | |
291 | $ cd repo6 |
|
291 | $ cd repo6 | |
292 | $ cat >> .hg/hgrc << EOF |
|
292 | $ cat >> .hg/hgrc << EOF | |
293 | > [lfs] |
|
293 | > [lfs] | |
294 | > track=size(">30B") |
|
294 | > track=size(">30B") | |
295 | > EOF |
|
295 | > EOF | |
296 |
|
296 | |||
297 | $ echo LARGE-BECAUSE-IT-IS-MORE-THAN-30-BYTES > large |
|
297 | $ echo LARGE-BECAUSE-IT-IS-MORE-THAN-30-BYTES > large | |
298 | $ echo SMALL > small |
|
298 | $ echo SMALL > small | |
299 | $ hg commit -Aqm 'create a lfs file' large small |
|
299 | $ hg commit -Aqm 'create a lfs file' large small | |
300 | $ hg debuglfsupload -r 'all()' -v |
|
300 | $ hg debuglfsupload -r 'all()' -v | |
301 | lfs: found 8e92251415339ae9b148c8da89ed5ec665905166a1ab11b09dca8fad83344738 in the local lfs store |
|
301 | lfs: found 8e92251415339ae9b148c8da89ed5ec665905166a1ab11b09dca8fad83344738 in the local lfs store | |
302 |
|
302 | |||
303 | $ cd .. |
|
303 | $ cd .. | |
304 |
|
304 | |||
305 | $ hg clone repo6 repo7 |
|
305 | $ hg clone repo6 repo7 | |
306 | updating to branch default |
|
306 | updating to branch default | |
307 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
307 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
308 | $ cd repo7 |
|
308 | $ cd repo7 | |
309 | $ cat large |
|
309 | $ cat large | |
310 | LARGE-BECAUSE-IT-IS-MORE-THAN-30-BYTES |
|
310 | LARGE-BECAUSE-IT-IS-MORE-THAN-30-BYTES | |
311 | $ cat small |
|
311 | $ cat small | |
312 | SMALL |
|
312 | SMALL | |
313 |
|
313 | |||
314 | $ cd .. |
|
314 | $ cd .. | |
315 |
|
315 | |||
316 | $ hg --config extensions.share= share repo7 sharedrepo |
|
316 | $ hg --config extensions.share= share repo7 sharedrepo | |
317 | updating working directory |
|
317 | updating working directory | |
318 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
318 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
319 | $ hg debugrequires -R sharedrepo/ | grep lfs |
|
319 | $ hg debugrequires -R sharedrepo/ | grep lfs | |
320 | lfs |
|
320 | lfs | |
321 |
|
321 | |||
322 | # Test rename and status |
|
322 | # Test rename and status | |
323 |
|
323 | |||
324 | $ hg init repo8 |
|
324 | $ hg init repo8 | |
325 | $ cd repo8 |
|
325 | $ cd repo8 | |
326 | $ cat >> .hg/hgrc << EOF |
|
326 | $ cat >> .hg/hgrc << EOF | |
327 | > [lfs] |
|
327 | > [lfs] | |
328 | > track=size(">10B") |
|
328 | > track=size(">10B") | |
329 | > EOF |
|
329 | > EOF | |
330 |
|
330 | |||
331 | $ echo THIS-IS-LFS-BECAUSE-10-BYTES > a1 |
|
331 | $ echo THIS-IS-LFS-BECAUSE-10-BYTES > a1 | |
332 | $ echo SMALL > a2 |
|
332 | $ echo SMALL > a2 | |
333 | $ hg commit -m a -A a1 a2 |
|
333 | $ hg commit -m a -A a1 a2 | |
334 | $ hg status |
|
334 | $ hg status | |
335 | $ hg mv a1 b1 |
|
335 | $ hg mv a1 b1 | |
336 | $ hg mv a2 a1 |
|
336 | $ hg mv a2 a1 | |
337 | $ hg mv b1 a2 |
|
337 | $ hg mv b1 a2 | |
338 | $ hg commit -m b |
|
338 | $ hg commit -m b | |
339 | $ hg status |
|
339 | $ hg status | |
340 | >>> with open('a2', 'wb') as f: |
|
340 | >>> with open('a2', 'wb') as f: | |
341 | ... f.write(b'\1\nSTART-WITH-HG-FILELOG-METADATA') and None |
|
341 | ... f.write(b'\1\nSTART-WITH-HG-FILELOG-METADATA') and None | |
342 | >>> with open('a1', 'wb') as f: |
|
342 | >>> with open('a1', 'wb') as f: | |
343 | ... f.write(b'\1\nMETA\n') and None |
|
343 | ... f.write(b'\1\nMETA\n') and None | |
344 | $ hg commit -m meta |
|
344 | $ hg commit -m meta | |
345 | $ hg status |
|
345 | $ hg status | |
346 | $ hg log -T '{rev}: {file_copies} | {file_dels} | {file_adds}\n' |
|
346 | $ hg log -T '{rev}: {file_copies} | {file_dels} | {file_adds}\n' | |
347 | 2: | | |
|
347 | 2: | | | |
348 | 1: a1 (a2)a2 (a1) | | |
|
348 | 1: a1 (a2)a2 (a1) | | | |
349 | 0: | | a1 a2 |
|
349 | 0: | | a1 a2 | |
350 |
|
350 | |||
351 | $ for n in a1 a2; do |
|
351 | $ for n in a1 a2; do | |
352 | > for r in 0 1 2; do |
|
352 | > for r in 0 1 2; do | |
353 | > printf '\n%s @ %s\n' $n $r |
|
353 | > printf '\n%s @ %s\n' $n $r | |
354 | > hg debugdata $n $r |
|
354 | > hg debugdata $n $r | |
355 | > done |
|
355 | > done | |
356 | > done |
|
356 | > done | |
357 |
|
357 | |||
358 | a1 @ 0 |
|
358 | a1 @ 0 | |
359 | version https://git-lfs.github.com/spec/v1 |
|
359 | version https://git-lfs.github.com/spec/v1 | |
360 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
360 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
361 | size 29 |
|
361 | size 29 | |
362 | x-is-binary 0 |
|
362 | x-is-binary 0 | |
363 |
|
363 | |||
364 | a1 @ 1 |
|
364 | a1 @ 1 | |
365 | \x01 (esc) |
|
365 | \x01 (esc) | |
366 | copy: a2 |
|
366 | copy: a2 | |
367 | copyrev: 50470ad23cf937b1f4b9f80bfe54df38e65b50d9 |
|
367 | copyrev: 50470ad23cf937b1f4b9f80bfe54df38e65b50d9 | |
368 | \x01 (esc) |
|
368 | \x01 (esc) | |
369 | SMALL |
|
369 | SMALL | |
370 |
|
370 | |||
371 | a1 @ 2 |
|
371 | a1 @ 2 | |
372 | \x01 (esc) |
|
372 | \x01 (esc) | |
373 | \x01 (esc) |
|
373 | \x01 (esc) | |
374 | \x01 (esc) |
|
374 | \x01 (esc) | |
375 | META |
|
375 | META | |
376 |
|
376 | |||
377 | a2 @ 0 |
|
377 | a2 @ 0 | |
378 | SMALL |
|
378 | SMALL | |
379 |
|
379 | |||
380 | a2 @ 1 |
|
380 | a2 @ 1 | |
381 | version https://git-lfs.github.com/spec/v1 |
|
381 | version https://git-lfs.github.com/spec/v1 | |
382 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
382 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
383 | size 29 |
|
383 | size 29 | |
384 | x-hg-copy a1 |
|
384 | x-hg-copy a1 | |
385 | x-hg-copyrev be23af27908a582af43e5cda209a5a9b319de8d4 |
|
385 | x-hg-copyrev be23af27908a582af43e5cda209a5a9b319de8d4 | |
386 | x-is-binary 0 |
|
386 | x-is-binary 0 | |
387 |
|
387 | |||
388 | a2 @ 2 |
|
388 | a2 @ 2 | |
389 | version https://git-lfs.github.com/spec/v1 |
|
389 | version https://git-lfs.github.com/spec/v1 | |
390 | oid sha256:876dadc86a8542f9798048f2c47f51dbf8e4359aed883e8ec80c5db825f0d943 |
|
390 | oid sha256:876dadc86a8542f9798048f2c47f51dbf8e4359aed883e8ec80c5db825f0d943 | |
391 | size 32 |
|
391 | size 32 | |
392 | x-is-binary 0 |
|
392 | x-is-binary 0 | |
393 |
|
393 | |||
394 | # Verify commit hashes include rename metadata |
|
394 | # Verify commit hashes include rename metadata | |
395 |
|
395 | |||
396 | $ hg log -T '{rev}:{node|short} {desc}\n' |
|
396 | $ hg log -T '{rev}:{node|short} {desc}\n' | |
397 | 2:0fae949de7fa meta |
|
397 | 2:0fae949de7fa meta | |
398 | 1:9cd6bdffdac0 b |
|
398 | 1:9cd6bdffdac0 b | |
399 | 0:7f96794915f7 a |
|
399 | 0:7f96794915f7 a | |
400 |
|
400 | |||
401 | $ cd .. |
|
401 | $ cd .. | |
402 |
|
402 | |||
403 | # Test bundle |
|
403 | # Test bundle | |
404 |
|
404 | |||
405 | $ hg init repo9 |
|
405 | $ hg init repo9 | |
406 | $ cd repo9 |
|
406 | $ cd repo9 | |
407 | $ cat >> .hg/hgrc << EOF |
|
407 | $ cat >> .hg/hgrc << EOF | |
408 | > [lfs] |
|
408 | > [lfs] | |
409 | > track=size(">10B") |
|
409 | > track=size(">10B") | |
410 | > [diff] |
|
410 | > [diff] | |
411 | > git=1 |
|
411 | > git=1 | |
412 | > EOF |
|
412 | > EOF | |
413 |
|
413 | |||
414 | $ for i in 0 single two three 4; do |
|
414 | $ for i in 0 single two three 4; do | |
415 | > echo 'THIS-IS-LFS-'$i > a |
|
415 | > echo 'THIS-IS-LFS-'$i > a | |
416 | > hg commit -m a-$i -A a |
|
416 | > hg commit -m a-$i -A a | |
417 | > done |
|
417 | > done | |
418 |
|
418 | |||
419 | $ hg update 2 -q |
|
419 | $ hg update 2 -q | |
420 | $ echo 'THIS-IS-LFS-2-CHILD' > a |
|
420 | $ echo 'THIS-IS-LFS-2-CHILD' > a | |
421 | $ hg commit -m branching -q |
|
421 | $ hg commit -m branching -q | |
422 |
|
422 | |||
423 | $ hg bundle --base 1 bundle.hg -v |
|
423 | $ hg bundle --base 1 bundle.hg -v | |
424 | lfs: found 5ab7a3739a5feec94a562d070a14f36dba7cad17e5484a4a89eea8e5f3166888 in the local lfs store |
|
424 | lfs: found 5ab7a3739a5feec94a562d070a14f36dba7cad17e5484a4a89eea8e5f3166888 in the local lfs store | |
425 | lfs: found a9c7d1cd6ce2b9bbdf46ed9a862845228717b921c089d0d42e3bcaed29eb612e in the local lfs store |
|
425 | lfs: found a9c7d1cd6ce2b9bbdf46ed9a862845228717b921c089d0d42e3bcaed29eb612e in the local lfs store | |
426 | lfs: found f693890c49c409ec33673b71e53f297681f76c1166daf33b2ad7ebf8b1d3237e in the local lfs store |
|
426 | lfs: found f693890c49c409ec33673b71e53f297681f76c1166daf33b2ad7ebf8b1d3237e in the local lfs store | |
427 | lfs: found fda198fea753eb66a252e9856915e1f5cddbe41723bd4b695ece2604ad3c9f75 in the local lfs store |
|
427 | lfs: found fda198fea753eb66a252e9856915e1f5cddbe41723bd4b695ece2604ad3c9f75 in the local lfs store | |
428 | 4 changesets found |
|
428 | 4 changesets found | |
429 | uncompressed size of bundle content: |
|
429 | uncompressed size of bundle content: | |
430 | * (changelog) (glob) |
|
430 | * (changelog) (glob) | |
431 | * (manifests) (glob) |
|
431 | * (manifests) (glob) | |
432 | * a (glob) |
|
432 | * a (glob) | |
433 | $ hg --config extensions.strip= strip -r 2 --no-backup --force -q |
|
433 | $ hg --config extensions.strip= strip -r 2 --no-backup --force -q | |
434 | $ hg -R bundle.hg log -p -T '{rev} {desc}\n' a |
|
434 | $ hg -R bundle.hg log -p -T '{rev} {desc}\n' a | |
435 | 5 branching |
|
435 | 5 branching | |
436 | diff --git a/a b/a |
|
436 | diff --git a/a b/a | |
437 | --- a/a |
|
437 | --- a/a | |
438 | +++ b/a |
|
438 | +++ b/a | |
439 | @@ -1,1 +1,1 @@ |
|
439 | @@ -1,1 +1,1 @@ | |
440 | -THIS-IS-LFS-two |
|
440 | -THIS-IS-LFS-two | |
441 | +THIS-IS-LFS-2-CHILD |
|
441 | +THIS-IS-LFS-2-CHILD | |
442 |
|
442 | |||
443 | 4 a-4 |
|
443 | 4 a-4 | |
444 | diff --git a/a b/a |
|
444 | diff --git a/a b/a | |
445 | --- a/a |
|
445 | --- a/a | |
446 | +++ b/a |
|
446 | +++ b/a | |
447 | @@ -1,1 +1,1 @@ |
|
447 | @@ -1,1 +1,1 @@ | |
448 | -THIS-IS-LFS-three |
|
448 | -THIS-IS-LFS-three | |
449 | +THIS-IS-LFS-4 |
|
449 | +THIS-IS-LFS-4 | |
450 |
|
450 | |||
451 | 3 a-three |
|
451 | 3 a-three | |
452 | diff --git a/a b/a |
|
452 | diff --git a/a b/a | |
453 | --- a/a |
|
453 | --- a/a | |
454 | +++ b/a |
|
454 | +++ b/a | |
455 | @@ -1,1 +1,1 @@ |
|
455 | @@ -1,1 +1,1 @@ | |
456 | -THIS-IS-LFS-two |
|
456 | -THIS-IS-LFS-two | |
457 | +THIS-IS-LFS-three |
|
457 | +THIS-IS-LFS-three | |
458 |
|
458 | |||
459 | 2 a-two |
|
459 | 2 a-two | |
460 | diff --git a/a b/a |
|
460 | diff --git a/a b/a | |
461 | --- a/a |
|
461 | --- a/a | |
462 | +++ b/a |
|
462 | +++ b/a | |
463 | @@ -1,1 +1,1 @@ |
|
463 | @@ -1,1 +1,1 @@ | |
464 | -THIS-IS-LFS-single |
|
464 | -THIS-IS-LFS-single | |
465 | +THIS-IS-LFS-two |
|
465 | +THIS-IS-LFS-two | |
466 |
|
466 | |||
467 | 1 a-single |
|
467 | 1 a-single | |
468 | diff --git a/a b/a |
|
468 | diff --git a/a b/a | |
469 | --- a/a |
|
469 | --- a/a | |
470 | +++ b/a |
|
470 | +++ b/a | |
471 | @@ -1,1 +1,1 @@ |
|
471 | @@ -1,1 +1,1 @@ | |
472 | -THIS-IS-LFS-0 |
|
472 | -THIS-IS-LFS-0 | |
473 | +THIS-IS-LFS-single |
|
473 | +THIS-IS-LFS-single | |
474 |
|
474 | |||
475 | 0 a-0 |
|
475 | 0 a-0 | |
476 | diff --git a/a b/a |
|
476 | diff --git a/a b/a | |
477 | new file mode 100644 |
|
477 | new file mode 100644 | |
478 | --- /dev/null |
|
478 | --- /dev/null | |
479 | +++ b/a |
|
479 | +++ b/a | |
480 | @@ -0,0 +1,1 @@ |
|
480 | @@ -0,0 +1,1 @@ | |
481 | +THIS-IS-LFS-0 |
|
481 | +THIS-IS-LFS-0 | |
482 |
|
482 | |||
483 | $ hg bundle -R bundle.hg --base 1 bundle-again.hg -q |
|
483 | $ hg bundle -R bundle.hg --base 1 bundle-again.hg -q | |
484 | $ hg -R bundle-again.hg log -p -T '{rev} {desc}\n' a |
|
484 | $ hg -R bundle-again.hg log -p -T '{rev} {desc}\n' a | |
485 | 5 branching |
|
485 | 5 branching | |
486 | diff --git a/a b/a |
|
486 | diff --git a/a b/a | |
487 | --- a/a |
|
487 | --- a/a | |
488 | +++ b/a |
|
488 | +++ b/a | |
489 | @@ -1,1 +1,1 @@ |
|
489 | @@ -1,1 +1,1 @@ | |
490 | -THIS-IS-LFS-two |
|
490 | -THIS-IS-LFS-two | |
491 | +THIS-IS-LFS-2-CHILD |
|
491 | +THIS-IS-LFS-2-CHILD | |
492 |
|
492 | |||
493 | 4 a-4 |
|
493 | 4 a-4 | |
494 | diff --git a/a b/a |
|
494 | diff --git a/a b/a | |
495 | --- a/a |
|
495 | --- a/a | |
496 | +++ b/a |
|
496 | +++ b/a | |
497 | @@ -1,1 +1,1 @@ |
|
497 | @@ -1,1 +1,1 @@ | |
498 | -THIS-IS-LFS-three |
|
498 | -THIS-IS-LFS-three | |
499 | +THIS-IS-LFS-4 |
|
499 | +THIS-IS-LFS-4 | |
500 |
|
500 | |||
501 | 3 a-three |
|
501 | 3 a-three | |
502 | diff --git a/a b/a |
|
502 | diff --git a/a b/a | |
503 | --- a/a |
|
503 | --- a/a | |
504 | +++ b/a |
|
504 | +++ b/a | |
505 | @@ -1,1 +1,1 @@ |
|
505 | @@ -1,1 +1,1 @@ | |
506 | -THIS-IS-LFS-two |
|
506 | -THIS-IS-LFS-two | |
507 | +THIS-IS-LFS-three |
|
507 | +THIS-IS-LFS-three | |
508 |
|
508 | |||
509 | 2 a-two |
|
509 | 2 a-two | |
510 | diff --git a/a b/a |
|
510 | diff --git a/a b/a | |
511 | --- a/a |
|
511 | --- a/a | |
512 | +++ b/a |
|
512 | +++ b/a | |
513 | @@ -1,1 +1,1 @@ |
|
513 | @@ -1,1 +1,1 @@ | |
514 | -THIS-IS-LFS-single |
|
514 | -THIS-IS-LFS-single | |
515 | +THIS-IS-LFS-two |
|
515 | +THIS-IS-LFS-two | |
516 |
|
516 | |||
517 | 1 a-single |
|
517 | 1 a-single | |
518 | diff --git a/a b/a |
|
518 | diff --git a/a b/a | |
519 | --- a/a |
|
519 | --- a/a | |
520 | +++ b/a |
|
520 | +++ b/a | |
521 | @@ -1,1 +1,1 @@ |
|
521 | @@ -1,1 +1,1 @@ | |
522 | -THIS-IS-LFS-0 |
|
522 | -THIS-IS-LFS-0 | |
523 | +THIS-IS-LFS-single |
|
523 | +THIS-IS-LFS-single | |
524 |
|
524 | |||
525 | 0 a-0 |
|
525 | 0 a-0 | |
526 | diff --git a/a b/a |
|
526 | diff --git a/a b/a | |
527 | new file mode 100644 |
|
527 | new file mode 100644 | |
528 | --- /dev/null |
|
528 | --- /dev/null | |
529 | +++ b/a |
|
529 | +++ b/a | |
530 | @@ -0,0 +1,1 @@ |
|
530 | @@ -0,0 +1,1 @@ | |
531 | +THIS-IS-LFS-0 |
|
531 | +THIS-IS-LFS-0 | |
532 |
|
532 | |||
533 | $ cd .. |
|
533 | $ cd .. | |
534 |
|
534 | |||
535 | # Test isbinary |
|
535 | # Test isbinary | |
536 |
|
536 | |||
537 | $ hg init repo10 |
|
537 | $ hg init repo10 | |
538 | $ cd repo10 |
|
538 | $ cd repo10 | |
539 | $ cat >> .hg/hgrc << EOF |
|
539 | $ cat >> .hg/hgrc << EOF | |
540 | > [extensions] |
|
540 | > [extensions] | |
541 | > lfs= |
|
541 | > lfs= | |
542 | > [lfs] |
|
542 | > [lfs] | |
543 | > track=all() |
|
543 | > track=all() | |
544 | > EOF |
|
544 | > EOF | |
545 | $ "$PYTHON" <<'EOF' |
|
545 | $ "$PYTHON" <<'EOF' | |
546 | > def write(path, content): |
|
546 | > def write(path, content): | |
547 | > with open(path, 'wb') as f: |
|
547 | > with open(path, 'wb') as f: | |
548 | > f.write(content) |
|
548 | > f.write(content) | |
549 | > write('a', b'\0\0') |
|
549 | > write('a', b'\0\0') | |
550 | > write('b', b'\1\n') |
|
550 | > write('b', b'\1\n') | |
551 | > write('c', b'\1\n\0') |
|
551 | > write('c', b'\1\n\0') | |
552 | > write('d', b'xx') |
|
552 | > write('d', b'xx') | |
553 | > EOF |
|
553 | > EOF | |
554 | $ hg add a b c d |
|
554 | $ hg add a b c d | |
555 | $ hg diff --stat |
|
555 | $ hg diff --stat | |
556 | a | Bin |
|
556 | a | Bin | |
557 | b | 1 + |
|
557 | b | 1 + | |
558 | c | Bin |
|
558 | c | Bin | |
559 | d | 1 + |
|
559 | d | 1 + | |
560 | 4 files changed, 2 insertions(+), 0 deletions(-) |
|
560 | 4 files changed, 2 insertions(+), 0 deletions(-) | |
561 | $ hg commit -m binarytest |
|
561 | $ hg commit -m binarytest | |
562 | $ cat > $TESTTMP/dumpbinary.py << EOF |
|
562 | $ cat > $TESTTMP/dumpbinary.py << EOF | |
563 | > from mercurial.utils import ( |
|
563 | > from mercurial.utils import ( | |
564 | > stringutil, |
|
564 | > stringutil, | |
565 | > ) |
|
565 | > ) | |
566 | > def reposetup(ui, repo): |
|
566 | > def reposetup(ui, repo): | |
567 | > for n in (b'a', b'b', b'c', b'd'): |
|
567 | > for n in (b'a', b'b', b'c', b'd'): | |
568 | > ui.write((b'%s: binary=%s\n') |
|
568 | > ui.write((b'%s: binary=%s\n') | |
569 | > % (n, stringutil.pprint(repo[b'.'][n].isbinary()))) |
|
569 | > % (n, stringutil.pprint(repo[b'.'][n].isbinary()))) | |
570 | > EOF |
|
570 | > EOF | |
571 | $ hg --config extensions.dumpbinary=$TESTTMP/dumpbinary.py id --trace |
|
571 | $ hg --config extensions.dumpbinary=$TESTTMP/dumpbinary.py id --trace | |
572 | a: binary=True |
|
572 | a: binary=True | |
573 | b: binary=False |
|
573 | b: binary=False | |
574 | c: binary=True |
|
574 | c: binary=True | |
575 | d: binary=False |
|
575 | d: binary=False | |
576 | b55353847f02 tip |
|
576 | b55353847f02 tip | |
577 |
|
577 | |||
578 | Binary blobs don't need to be present to be skipped in filesets. (And their |
|
578 | Binary blobs don't need to be present to be skipped in filesets. (And their | |
579 | absence doesn't cause an abort.) |
|
579 | absence doesn't cause an abort.) | |
580 |
|
580 | |||
581 | $ rm .hg/store/lfs/objects/96/a296d224f285c67bee93c30f8a309157f0daa35dc5b87e410b78630a09cfc7 |
|
581 | $ rm .hg/store/lfs/objects/96/a296d224f285c67bee93c30f8a309157f0daa35dc5b87e410b78630a09cfc7 | |
582 | $ rm .hg/store/lfs/objects/92/f76135a4baf4faccb8586a60faf830c2bdfce147cefa188aaf4b790bd01b7e |
|
582 | $ rm .hg/store/lfs/objects/92/f76135a4baf4faccb8586a60faf830c2bdfce147cefa188aaf4b790bd01b7e | |
583 |
|
583 | |||
584 | $ hg files --debug -r . 'set:eol("unix")' --config 'experimental.lfs.disableusercache=True' |
|
584 | $ hg files --debug -r . 'set:eol("unix")' --config 'experimental.lfs.disableusercache=True' | |
585 | lfs: found c04b5bb1a5b2eb3e9cd4805420dba5a9d133da5b7adeeafb5474c4adae9faa80 in the local lfs store |
|
585 | lfs: found c04b5bb1a5b2eb3e9cd4805420dba5a9d133da5b7adeeafb5474c4adae9faa80 in the local lfs store | |
586 | 2 b |
|
586 | 2 b | |
587 | lfs: found 5dde896887f6754c9b15bfe3a441ae4806df2fde94001311e08bf110622e0bbe in the local lfs store |
|
587 | lfs: found 5dde896887f6754c9b15bfe3a441ae4806df2fde94001311e08bf110622e0bbe in the local lfs store | |
588 |
|
588 | |||
589 | $ hg files --debug -r . 'set:binary()' --config 'experimental.lfs.disableusercache=True' |
|
589 | $ hg files --debug -r . 'set:binary()' --config 'experimental.lfs.disableusercache=True' | |
590 | 2 a |
|
590 | 2 a | |
591 | 3 c |
|
591 | 3 c | |
592 |
|
592 | |||
593 | $ cd .. |
|
593 | $ cd .. | |
594 |
|
594 | |||
595 | # Test fctx.cmp fastpath - diff without LFS blobs |
|
595 | # Test fctx.cmp fastpath - diff without LFS blobs | |
596 |
|
596 | |||
597 | $ hg init repo12 |
|
597 | $ hg init repo12 | |
598 | $ cd repo12 |
|
598 | $ cd repo12 | |
599 | $ cat >> .hg/hgrc <<EOF |
|
599 | $ cat >> .hg/hgrc <<EOF | |
600 | > [lfs] |
|
600 | > [lfs] | |
601 | > threshold=1 |
|
601 | > threshold=1 | |
602 | > EOF |
|
602 | > EOF | |
603 | $ cat > ../patch.diff <<EOF |
|
603 | $ cat > ../patch.diff <<EOF | |
604 | > # HG changeset patch |
|
604 | > # HG changeset patch | |
605 | > 2 |
|
605 | > 2 | |
606 | > |
|
606 | > | |
607 | > diff --git a/a b/a |
|
607 | > diff --git a/a b/a | |
608 | > old mode 100644 |
|
608 | > old mode 100644 | |
609 | > new mode 100755 |
|
609 | > new mode 100755 | |
610 | > EOF |
|
610 | > EOF | |
611 |
|
611 | |||
612 | $ for i in 1 2 3; do |
|
612 | $ for i in 1 2 3; do | |
613 | > cp ../repo10/a a |
|
613 | > cp ../repo10/a a | |
614 | > if [ $i = 3 ]; then |
|
614 | > if [ $i = 3 ]; then | |
615 | > # make a content-only change |
|
615 | > # make a content-only change | |
616 | > hg import -q --bypass ../patch.diff |
|
616 | > hg import -q --bypass ../patch.diff | |
617 | > hg update -q |
|
617 | > hg update -q | |
618 | > rm ../patch.diff |
|
618 | > rm ../patch.diff | |
619 | > else |
|
619 | > else | |
620 | > echo $i >> a |
|
620 | > echo $i >> a | |
621 | > hg commit -m $i -A a |
|
621 | > hg commit -m $i -A a | |
622 | > fi |
|
622 | > fi | |
623 | > done |
|
623 | > done | |
624 | $ [ -d .hg/store/lfs/objects ] |
|
624 | $ [ -d .hg/store/lfs/objects ] | |
625 |
|
625 | |||
626 | $ cd .. |
|
626 | $ cd .. | |
627 |
|
627 | |||
628 | $ hg clone repo12 repo13 --noupdate |
|
628 | $ hg clone repo12 repo13 --noupdate | |
629 | $ cd repo13 |
|
629 | $ cd repo13 | |
630 | $ hg log --removed -p a -T '{desc}\n' --config diff.nobinary=1 --git |
|
630 | $ hg log --removed -p a -T '{desc}\n' --config diff.nobinary=1 --git | |
631 | 2 |
|
631 | 2 | |
632 | diff --git a/a b/a |
|
632 | diff --git a/a b/a | |
633 | old mode 100644 |
|
633 | old mode 100644 | |
634 | new mode 100755 |
|
634 | new mode 100755 | |
635 |
|
635 | |||
636 | 2 |
|
636 | 2 | |
637 | diff --git a/a b/a |
|
637 | diff --git a/a b/a | |
638 | Binary file a has changed |
|
638 | Binary file a has changed | |
639 |
|
639 | |||
640 | 1 |
|
640 | 1 | |
641 | diff --git a/a b/a |
|
641 | diff --git a/a b/a | |
642 | new file mode 100644 |
|
642 | new file mode 100644 | |
643 | Binary file a has changed |
|
643 | Binary file a has changed | |
644 |
|
644 | |||
645 | $ [ -d .hg/store/lfs/objects ] |
|
645 | $ [ -d .hg/store/lfs/objects ] | |
646 | [1] |
|
646 | [1] | |
647 |
|
647 | |||
648 | $ cd .. |
|
648 | $ cd .. | |
649 |
|
649 | |||
650 | # Test filter |
|
650 | # Test filter | |
651 |
|
651 | |||
652 | $ hg init repo11 |
|
652 | $ hg init repo11 | |
653 | $ cd repo11 |
|
653 | $ cd repo11 | |
654 | $ cat >> .hg/hgrc << EOF |
|
654 | $ cat >> .hg/hgrc << EOF | |
655 | > [lfs] |
|
655 | > [lfs] | |
656 | > track=(**.a & size(">5B")) | (**.b & !size(">5B")) |
|
656 | > track=(**.a & size(">5B")) | (**.b & !size(">5B")) | |
657 | > | (**.c & "path:d" & !"path:d/c.c") | size(">10B") |
|
657 | > | (**.c & "path:d" & !"path:d/c.c") | size(">10B") | |
658 | > EOF |
|
658 | > EOF | |
659 |
|
659 | |||
660 | $ mkdir a |
|
660 | $ mkdir a | |
661 | $ echo aaaaaa > a/1.a |
|
661 | $ echo aaaaaa > a/1.a | |
662 | $ echo a > a/2.a |
|
662 | $ echo a > a/2.a | |
663 | $ echo aaaaaa > 1.b |
|
663 | $ echo aaaaaa > 1.b | |
664 | $ echo a > 2.b |
|
664 | $ echo a > 2.b | |
665 | $ echo a > 1.c |
|
665 | $ echo a > 1.c | |
666 | $ mkdir d |
|
666 | $ mkdir d | |
667 | $ echo a > d/c.c |
|
667 | $ echo a > d/c.c | |
668 | $ echo a > d/d.c |
|
668 | $ echo a > d/d.c | |
669 | $ echo aaaaaaaaaaaa > x |
|
669 | $ echo aaaaaaaaaaaa > x | |
670 | $ hg add . -q |
|
670 | $ hg add . -q | |
671 | $ hg commit -m files |
|
671 | $ hg commit -m files | |
672 |
|
672 | |||
673 | $ for p in a/1.a a/2.a 1.b 2.b 1.c d/c.c d/d.c x; do |
|
673 | $ for p in a/1.a a/2.a 1.b 2.b 1.c d/c.c d/d.c x; do | |
674 | > if hg debugdata $p 0 2>&1 | grep git-lfs >/dev/null; then |
|
674 | > if hg debugdata $p 0 2>&1 | grep git-lfs >/dev/null; then | |
675 | > echo "${p}: is lfs" |
|
675 | > echo "${p}: is lfs" | |
676 | > else |
|
676 | > else | |
677 | > echo "${p}: not lfs" |
|
677 | > echo "${p}: not lfs" | |
678 | > fi |
|
678 | > fi | |
679 | > done |
|
679 | > done | |
680 | a/1.a: is lfs |
|
680 | a/1.a: is lfs | |
681 | a/2.a: not lfs |
|
681 | a/2.a: not lfs | |
682 | 1.b: not lfs |
|
682 | 1.b: not lfs | |
683 | 2.b: is lfs |
|
683 | 2.b: is lfs | |
684 | 1.c: not lfs |
|
684 | 1.c: not lfs | |
685 | d/c.c: not lfs |
|
685 | d/c.c: not lfs | |
686 | d/d.c: is lfs |
|
686 | d/d.c: is lfs | |
687 | x: is lfs |
|
687 | x: is lfs | |
688 |
|
688 | |||
689 | $ cd .. |
|
689 | $ cd .. | |
690 |
|
690 | |||
691 | # Verify the repos |
|
691 | # Verify the repos | |
692 |
|
692 | |||
693 | $ cat > $TESTTMP/dumpflog.py << EOF |
|
693 | $ cat > $TESTTMP/dumpflog.py << EOF | |
694 | > # print raw revision sizes, flags, and hashes for certain files |
|
694 | > # print raw revision sizes, flags, and hashes for certain files | |
695 | > import hashlib |
|
695 | > import hashlib | |
696 | > from mercurial.node import short |
|
696 | > from mercurial.node import short | |
697 | > from mercurial import ( |
|
697 | > from mercurial import ( | |
698 | > pycompat, |
|
698 | > pycompat, | |
699 | > revlog, |
|
699 | > revlog, | |
700 | > ) |
|
700 | > ) | |
701 | > from mercurial.utils import ( |
|
701 | > from mercurial.utils import ( | |
702 | > procutil, |
|
702 | > procutil, | |
703 | > stringutil, |
|
703 | > stringutil, | |
704 | > ) |
|
704 | > ) | |
705 | > def hash(rawtext): |
|
705 | > def hash(rawtext): | |
706 | > h = hashlib.sha512() |
|
706 | > h = hashlib.sha512() | |
707 | > h.update(rawtext) |
|
707 | > h.update(rawtext) | |
708 | > return pycompat.sysbytes(h.hexdigest()[:4]) |
|
708 | > return pycompat.sysbytes(h.hexdigest()[:4]) | |
709 | > def reposetup(ui, repo): |
|
709 | > def reposetup(ui, repo): | |
710 | > # these 2 files are interesting |
|
710 | > # these 2 files are interesting | |
711 | > for name in [b'l', b's']: |
|
711 | > for name in [b'l', b's']: | |
712 | > fl = repo.file(name) |
|
712 | > fl = repo.file(name) | |
713 | > if len(fl) == 0: |
|
713 | > if len(fl) == 0: | |
714 | > continue |
|
714 | > continue | |
715 | > sizes = [fl._revlog.rawsize(i) for i in fl] |
|
715 | > sizes = [fl._revlog.rawsize(i) for i in fl] | |
716 | > texts = [fl.rawdata(i) for i in fl] |
|
716 | > texts = [fl.rawdata(i) for i in fl] | |
717 | > flags = [int(fl._revlog.flags(i)) for i in fl] |
|
717 | > flags = [int(fl._revlog.flags(i)) for i in fl] | |
718 | > hashes = [hash(t) for t in texts] |
|
718 | > hashes = [hash(t) for t in texts] | |
719 | > procutil.stdout.write(b' %s: rawsizes=%r flags=%r hashes=%s\n' |
|
719 | > procutil.stdout.write(b' %s: rawsizes=%r flags=%r hashes=%s\n' | |
720 | > % (name, sizes, flags, stringutil.pprint(hashes))) |
|
720 | > % (name, sizes, flags, stringutil.pprint(hashes))) | |
721 | > EOF |
|
721 | > EOF | |
722 |
|
722 | |||
723 | $ for i in client client2 server repo3 repo4 repo5 repo6 repo7 repo8 repo9 \ |
|
723 | $ for i in client client2 server repo3 repo4 repo5 repo6 repo7 repo8 repo9 \ | |
724 | > repo10; do |
|
724 | > repo10; do | |
725 | > echo 'repo:' $i |
|
725 | > echo 'repo:' $i | |
726 | > hg --cwd $i verify --config extensions.dumpflog=$TESTTMP/dumpflog.py -q |
|
726 | > hg --cwd $i verify --config extensions.dumpflog=$TESTTMP/dumpflog.py -q | |
727 | > done |
|
727 | > done | |
728 | repo: client |
|
728 | repo: client | |
729 | repo: client2 |
|
729 | repo: client2 | |
730 | repo: server |
|
730 | repo: server | |
731 | repo: repo3 |
|
731 | repo: repo3 | |
732 | l: rawsizes=[211, 6, 8, 141] flags=[8192, 0, 0, 8192] hashes=['d2b8', '948c', 'cc88', '724d'] |
|
732 | l: rawsizes=[211, 6, 8, 141] flags=[8192, 0, 0, 8192] hashes=['d2b8', '948c', 'cc88', '724d'] | |
733 | s: rawsizes=[74, 141, 141, 8] flags=[0, 8192, 8192, 0] hashes=['3c80', 'fce0', '874a', '826b'] |
|
733 | s: rawsizes=[74, 141, 141, 8] flags=[0, 8192, 8192, 0] hashes=['3c80', 'fce0', '874a', '826b'] | |
734 | repo: repo4 |
|
734 | repo: repo4 | |
735 | l: rawsizes=[211, 6, 8, 141] flags=[8192, 0, 0, 8192] hashes=['d2b8', '948c', 'cc88', '724d'] |
|
735 | l: rawsizes=[211, 6, 8, 141] flags=[8192, 0, 0, 8192] hashes=['d2b8', '948c', 'cc88', '724d'] | |
736 | s: rawsizes=[74, 141, 141, 8] flags=[0, 8192, 8192, 0] hashes=['3c80', 'fce0', '874a', '826b'] |
|
736 | s: rawsizes=[74, 141, 141, 8] flags=[0, 8192, 8192, 0] hashes=['3c80', 'fce0', '874a', '826b'] | |
737 | repo: repo5 |
|
737 | repo: repo5 | |
738 | l: rawsizes=[211, 6, 8, 141] flags=[8192, 0, 0, 8192] hashes=['d2b8', '948c', 'cc88', '724d'] |
|
738 | l: rawsizes=[211, 6, 8, 141] flags=[8192, 0, 0, 8192] hashes=['d2b8', '948c', 'cc88', '724d'] | |
739 | s: rawsizes=[74, 141, 141, 8] flags=[0, 8192, 8192, 0] hashes=['3c80', 'fce0', '874a', '826b'] |
|
739 | s: rawsizes=[74, 141, 141, 8] flags=[0, 8192, 8192, 0] hashes=['3c80', 'fce0', '874a', '826b'] | |
740 | repo: repo6 |
|
740 | repo: repo6 | |
741 | repo: repo7 |
|
741 | repo: repo7 | |
742 | repo: repo8 |
|
742 | repo: repo8 | |
743 | repo: repo9 |
|
743 | repo: repo9 | |
744 | repo: repo10 |
|
744 | repo: repo10 | |
745 |
|
745 | |||
746 | repo13 doesn't have any cached lfs files and its source never pushed its |
|
746 | repo13 doesn't have any cached lfs files and its source never pushed its | |
747 | files. Therefore, the files don't exist in the remote store. Use the files in |
|
747 | files. Therefore, the files don't exist in the remote store. Use the files in | |
748 | the user cache. |
|
748 | the user cache. | |
749 |
|
749 | |||
750 | $ test -d $TESTTMP/repo13/.hg/store/lfs/objects |
|
750 | $ test -d $TESTTMP/repo13/.hg/store/lfs/objects | |
751 | [1] |
|
751 | [1] | |
752 |
|
752 | |||
753 | $ hg --config extensions.share= share repo13 repo14 |
|
753 | $ hg --config extensions.share= share repo13 repo14 | |
754 | updating working directory |
|
754 | updating working directory | |
755 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
755 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
756 | $ hg -R repo14 -q verify |
|
756 | $ hg -R repo14 -q verify | |
757 |
|
757 | |||
758 | $ hg clone repo13 repo15 |
|
758 | $ hg clone repo13 repo15 | |
759 | updating to branch default |
|
759 | updating to branch default | |
760 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
760 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
761 | $ hg -R repo15 -q verify |
|
761 | $ hg -R repo15 -q verify | |
762 |
|
762 | |||
763 | If the source repo doesn't have the blob (maybe it was pulled or cloned with |
|
763 | If the source repo doesn't have the blob (maybe it was pulled or cloned with | |
764 | --noupdate), the blob is still accessible via the global cache to send to the |
|
764 | --noupdate), the blob is still accessible via the global cache to send to the | |
765 | remote store. |
|
765 | remote store. | |
766 |
|
766 | |||
767 | $ rm -rf $TESTTMP/repo15/.hg/store/lfs |
|
767 | $ rm -rf $TESTTMP/repo15/.hg/store/lfs | |
768 | $ hg init repo16 |
|
768 | $ hg init repo16 | |
769 | $ hg -R repo15 push repo16 |
|
769 | $ hg -R repo15 push repo16 | |
770 | pushing to repo16 |
|
770 | pushing to repo16 | |
771 | searching for changes |
|
771 | searching for changes | |
772 | adding changesets |
|
772 | adding changesets | |
773 | adding manifests |
|
773 | adding manifests | |
774 | adding file changes |
|
774 | adding file changes | |
775 | added 3 changesets with 2 changes to 1 files |
|
775 | added 3 changesets with 2 changes to 1 files | |
776 | $ hg -R repo15 -q verify |
|
776 | $ hg -R repo15 -q verify | |
777 |
|
777 | |||
778 | Test damaged file scenarios. (This also damages the usercache because of the |
|
778 | Test damaged file scenarios. (This also damages the usercache because of the | |
779 | hardlinks.) |
|
779 | hardlinks.) | |
780 |
|
780 | |||
781 | $ echo 'damage' >> repo5/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
781 | $ echo 'damage' >> repo5/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
782 |
|
782 | |||
783 | Repo with damaged lfs objects in any revision will fail verification. |
|
783 | Repo with damaged lfs objects in any revision will fail verification. | |
784 |
|
784 | |||
785 | $ hg -R repo5 verify |
|
785 | $ hg -R repo5 verify | |
786 | checking changesets |
|
786 | checking changesets | |
787 | checking manifests |
|
787 | checking manifests | |
788 | crosschecking files in changesets and manifests |
|
788 | crosschecking files in changesets and manifests | |
789 | checking files |
|
789 | checking files | |
790 | l@1: unpacking 46a2f24864bc: integrity check failed on l:0 |
|
790 | l@1: unpacking 46a2f24864bc: integrity check failed on l:0 | |
791 | large@0: unpacking 2c531e0992ff: integrity check failed on large:0 |
|
791 | large@0: unpacking 2c531e0992ff: integrity check failed on large:0 | |
792 | not checking dirstate because of previous errors |
|
792 | not checking dirstate because of previous errors | |
793 | checked 5 changesets with 10 changes to 4 files |
|
793 | checked 5 changesets with 10 changes to 4 files | |
794 | 2 integrity errors encountered! |
|
794 | 2 integrity errors encountered! | |
795 | (first damaged changeset appears to be 0) |
|
795 | (first damaged changeset appears to be 0) | |
796 | [1] |
|
796 | [1] | |
797 |
|
797 | |||
798 | Updates work after cloning a damaged repo, if the damaged lfs objects aren't in |
|
798 | Updates work after cloning a damaged repo, if the damaged lfs objects aren't in | |
799 | the update destination. Those objects won't be added to the new repo's store |
|
799 | the update destination. Those objects won't be added to the new repo's store | |
800 | because they aren't accessed. |
|
800 | because they aren't accessed. | |
801 |
|
801 | |||
802 | $ hg clone -v repo5 fromcorrupt |
|
802 | $ hg clone -v repo5 fromcorrupt | |
803 | updating to branch default |
|
803 | updating to branch default | |
804 | resolving manifests |
|
804 | resolving manifests | |
805 | getting l |
|
805 | getting l | |
806 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the usercache |
|
806 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the usercache | |
807 | getting s |
|
807 | getting s | |
808 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
808 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
809 | $ test -f fromcorrupt/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
809 | $ test -f fromcorrupt/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
810 | [1] |
|
810 | [1] | |
811 |
|
811 | |||
812 | Verify will not try to download lfs blobs, if told not to process lfs content. |
|
812 | Verify will not try to download lfs blobs, if told not to process lfs content. | |
813 | The extension makes sure that the filelog.renamed() path is taken on a missing |
|
813 | The extension makes sure that the filelog.renamed() path is taken on a missing | |
814 | blob, and the output shows that it isn't fetched. |
|
814 | blob, and the output shows that it isn't fetched. | |
815 |
|
815 | |||
816 | $ cat > $TESTTMP/lfsrename.py <<EOF |
|
816 | $ cat > $TESTTMP/lfsrename.py <<EOF | |
817 | > import sys |
|
817 | > import sys | |
818 | > |
|
818 | > | |
819 | > from mercurial import ( |
|
819 | > from mercurial import ( | |
820 | > exthelper, |
|
820 | > exthelper, | |
821 | > pycompat, |
|
821 | > pycompat, | |
822 | > ) |
|
822 | > ) | |
823 | > |
|
823 | > | |
824 | > from hgext.lfs import ( |
|
824 | > from hgext.lfs import ( | |
825 | > pointer, |
|
825 | > pointer, | |
826 | > wrapper, |
|
826 | > wrapper, | |
827 | > ) |
|
827 | > ) | |
828 | > |
|
828 | > | |
829 | > eh = exthelper.exthelper() |
|
829 | > eh = exthelper.exthelper() | |
830 | > uisetup = eh.finaluisetup |
|
830 | > uisetup = eh.finaluisetup | |
831 | > |
|
831 | > | |
832 |
> @eh.wrapfunction(wrapper, |
|
832 | > @eh.wrapfunction(wrapper, 'filelogrenamed') | |
833 |
|
|
833 | > def filelogrenamed(orig, orig1, self, node): | |
834 | > ret = orig(orig1, self, node) |
|
834 | > ret = orig(orig1, self, node) | |
835 | > if wrapper._islfs(self._revlog, node) and ret: |
|
835 | > if wrapper._islfs(self._revlog, node) and ret: | |
836 | > rawtext = self._revlog.rawdata(node) |
|
836 | > rawtext = self._revlog.rawdata(node) | |
837 | > metadata = pointer.deserialize(rawtext) |
|
837 | > metadata = pointer.deserialize(rawtext) | |
838 | > print('lfs blob %s renamed %s -> %s' |
|
838 | > print('lfs blob %s renamed %s -> %s' | |
839 | > % (pycompat.sysstr(metadata[b'oid']), |
|
839 | > % (pycompat.sysstr(metadata[b'oid']), | |
840 | > pycompat.sysstr(ret[0]), |
|
840 | > pycompat.sysstr(ret[0]), | |
841 | > pycompat.fsdecode(self._revlog.filename))) |
|
841 | > pycompat.fsdecode(self._revlog.filename))) | |
842 | > sys.stdout.flush() |
|
842 | > sys.stdout.flush() | |
843 | > return ret |
|
843 | > return ret | |
844 | > EOF |
|
844 | > EOF | |
845 |
|
845 | |||
846 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v --no-lfs \ |
|
846 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v --no-lfs \ | |
847 | > --config extensions.x=$TESTTMP/lfsrename.py |
|
847 | > --config extensions.x=$TESTTMP/lfsrename.py | |
848 | repository uses revlog format 1 |
|
848 | repository uses revlog format 1 | |
849 | checking changesets |
|
849 | checking changesets | |
850 | checking manifests |
|
850 | checking manifests | |
851 | crosschecking files in changesets and manifests |
|
851 | crosschecking files in changesets and manifests | |
852 | checking files |
|
852 | checking files | |
853 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store |
|
853 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store | |
854 | lfs blob sha256:66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e renamed large -> l |
|
854 | lfs blob sha256:66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e renamed large -> l | |
855 | checking dirstate |
|
855 | checking dirstate | |
856 | checked 5 changesets with 10 changes to 4 files |
|
856 | checked 5 changesets with 10 changes to 4 files | |
857 |
|
857 | |||
858 | Verify will not try to download lfs blobs, if told not to by the config option |
|
858 | Verify will not try to download lfs blobs, if told not to by the config option | |
859 |
|
859 | |||
860 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v \ |
|
860 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v \ | |
861 | > --config verify.skipflags=8192 \ |
|
861 | > --config verify.skipflags=8192 \ | |
862 | > --config extensions.x=$TESTTMP/lfsrename.py |
|
862 | > --config extensions.x=$TESTTMP/lfsrename.py | |
863 | repository uses revlog format 1 |
|
863 | repository uses revlog format 1 | |
864 | checking changesets |
|
864 | checking changesets | |
865 | checking manifests |
|
865 | checking manifests | |
866 | crosschecking files in changesets and manifests |
|
866 | crosschecking files in changesets and manifests | |
867 | checking files |
|
867 | checking files | |
868 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store |
|
868 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store | |
869 | lfs blob sha256:66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e renamed large -> l |
|
869 | lfs blob sha256:66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e renamed large -> l | |
870 | checking dirstate |
|
870 | checking dirstate | |
871 | checked 5 changesets with 10 changes to 4 files |
|
871 | checked 5 changesets with 10 changes to 4 files | |
872 |
|
872 | |||
873 | Verify will copy/link all lfs objects into the local store that aren't already |
|
873 | Verify will copy/link all lfs objects into the local store that aren't already | |
874 | present. Bypass the corrupted usercache to show that verify works when fed by |
|
874 | present. Bypass the corrupted usercache to show that verify works when fed by | |
875 | the (uncorrupted) remote store. |
|
875 | the (uncorrupted) remote store. | |
876 |
|
876 | |||
877 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v |
|
877 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v | |
878 | repository uses revlog format 1 |
|
878 | repository uses revlog format 1 | |
879 | checking changesets |
|
879 | checking changesets | |
880 | checking manifests |
|
880 | checking manifests | |
881 | crosschecking files in changesets and manifests |
|
881 | crosschecking files in changesets and manifests | |
882 | checking files |
|
882 | checking files | |
883 | lfs: adding 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e to the usercache |
|
883 | lfs: adding 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e to the usercache | |
884 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the local lfs store |
|
884 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the local lfs store | |
885 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store |
|
885 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store | |
886 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the local lfs store |
|
886 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the local lfs store | |
887 | lfs: adding 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 to the usercache |
|
887 | lfs: adding 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 to the usercache | |
888 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store |
|
888 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store | |
889 | lfs: adding b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c to the usercache |
|
889 | lfs: adding b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c to the usercache | |
890 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store |
|
890 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store | |
891 | checking dirstate |
|
891 | checking dirstate | |
892 | checked 5 changesets with 10 changes to 4 files |
|
892 | checked 5 changesets with 10 changes to 4 files | |
893 |
|
893 | |||
894 | Verify will not copy/link a corrupted file from the usercache into the local |
|
894 | Verify will not copy/link a corrupted file from the usercache into the local | |
895 | store, and poison it. (The verify with a good remote now works.) |
|
895 | store, and poison it. (The verify with a good remote now works.) | |
896 |
|
896 | |||
897 | $ rm -r fromcorrupt/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
897 | $ rm -r fromcorrupt/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
898 | $ hg -R fromcorrupt verify -v |
|
898 | $ hg -R fromcorrupt verify -v | |
899 | repository uses revlog format 1 |
|
899 | repository uses revlog format 1 | |
900 | checking changesets |
|
900 | checking changesets | |
901 | checking manifests |
|
901 | checking manifests | |
902 | crosschecking files in changesets and manifests |
|
902 | crosschecking files in changesets and manifests | |
903 | checking files |
|
903 | checking files | |
904 | l@1: unpacking 46a2f24864bc: integrity check failed on l:0 |
|
904 | l@1: unpacking 46a2f24864bc: integrity check failed on l:0 | |
905 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store |
|
905 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store | |
906 | large@0: unpacking 2c531e0992ff: integrity check failed on large:0 |
|
906 | large@0: unpacking 2c531e0992ff: integrity check failed on large:0 | |
907 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store |
|
907 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store | |
908 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store |
|
908 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store | |
909 | not checking dirstate because of previous errors |
|
909 | not checking dirstate because of previous errors | |
910 | checked 5 changesets with 10 changes to 4 files |
|
910 | checked 5 changesets with 10 changes to 4 files | |
911 | 2 integrity errors encountered! |
|
911 | 2 integrity errors encountered! | |
912 | (first damaged changeset appears to be 0) |
|
912 | (first damaged changeset appears to be 0) | |
913 | [1] |
|
913 | [1] | |
914 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v |
|
914 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v | |
915 | repository uses revlog format 1 |
|
915 | repository uses revlog format 1 | |
916 | checking changesets |
|
916 | checking changesets | |
917 | checking manifests |
|
917 | checking manifests | |
918 | crosschecking files in changesets and manifests |
|
918 | crosschecking files in changesets and manifests | |
919 | checking files |
|
919 | checking files | |
920 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the usercache |
|
920 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the usercache | |
921 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store |
|
921 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store | |
922 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the local lfs store |
|
922 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the local lfs store | |
923 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store |
|
923 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store | |
924 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store |
|
924 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store | |
925 | checking dirstate |
|
925 | checking dirstate | |
926 | checked 5 changesets with 10 changes to 4 files |
|
926 | checked 5 changesets with 10 changes to 4 files | |
927 |
|
927 | |||
928 | Damaging a file required by the update destination fails the update. |
|
928 | Damaging a file required by the update destination fails the update. | |
929 |
|
929 | |||
930 | $ echo 'damage' >> $TESTTMP/dummy-remote/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b |
|
930 | $ echo 'damage' >> $TESTTMP/dummy-remote/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | |
931 | $ hg --config lfs.usercache=emptycache clone -v repo5 fromcorrupt2 |
|
931 | $ hg --config lfs.usercache=emptycache clone -v repo5 fromcorrupt2 | |
932 | updating to branch default |
|
932 | updating to branch default | |
933 | resolving manifests |
|
933 | resolving manifests | |
934 | abort: corrupt remote lfs object: 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b |
|
934 | abort: corrupt remote lfs object: 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | |
935 | [255] |
|
935 | [255] | |
936 |
|
936 | |||
937 | A corrupted lfs blob is not transferred from a file://remotestore to the |
|
937 | A corrupted lfs blob is not transferred from a file://remotestore to the | |
938 | usercache or local store. |
|
938 | usercache or local store. | |
939 |
|
939 | |||
940 | $ test -f emptycache/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b |
|
940 | $ test -f emptycache/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | |
941 | [1] |
|
941 | [1] | |
942 | $ test -f fromcorrupt2/.hg/store/lfs/objects/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b |
|
942 | $ test -f fromcorrupt2/.hg/store/lfs/objects/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | |
943 | [1] |
|
943 | [1] | |
944 |
|
944 | |||
945 | $ hg -R fromcorrupt2 verify |
|
945 | $ hg -R fromcorrupt2 verify | |
946 | checking changesets |
|
946 | checking changesets | |
947 | checking manifests |
|
947 | checking manifests | |
948 | crosschecking files in changesets and manifests |
|
948 | crosschecking files in changesets and manifests | |
949 | checking files |
|
949 | checking files | |
950 | l@1: unpacking 46a2f24864bc: integrity check failed on l:0 |
|
950 | l@1: unpacking 46a2f24864bc: integrity check failed on l:0 | |
951 | large@0: unpacking 2c531e0992ff: integrity check failed on large:0 |
|
951 | large@0: unpacking 2c531e0992ff: integrity check failed on large:0 | |
952 | not checking dirstate because of previous errors |
|
952 | not checking dirstate because of previous errors | |
953 | checked 5 changesets with 10 changes to 4 files |
|
953 | checked 5 changesets with 10 changes to 4 files | |
954 | 2 integrity errors encountered! |
|
954 | 2 integrity errors encountered! | |
955 | (first damaged changeset appears to be 0) |
|
955 | (first damaged changeset appears to be 0) | |
956 | [1] |
|
956 | [1] | |
957 |
|
957 | |||
958 | Corrupt local files are not sent upstream. (The alternate dummy remote |
|
958 | Corrupt local files are not sent upstream. (The alternate dummy remote | |
959 | avoids the corrupt lfs object in the original remote.) |
|
959 | avoids the corrupt lfs object in the original remote.) | |
960 |
|
960 | |||
961 | $ mkdir $TESTTMP/dummy-remote2 |
|
961 | $ mkdir $TESTTMP/dummy-remote2 | |
962 | $ hg init dest |
|
962 | $ hg init dest | |
963 | $ hg -R fromcorrupt2 --config lfs.url=file:///$TESTTMP/dummy-remote2 push -v dest |
|
963 | $ hg -R fromcorrupt2 --config lfs.url=file:///$TESTTMP/dummy-remote2 push -v dest | |
964 | pushing to dest |
|
964 | pushing to dest | |
965 | searching for changes |
|
965 | searching for changes | |
966 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store |
|
966 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store | |
967 | abort: detected corrupt lfs object: 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
967 | abort: detected corrupt lfs object: 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
968 | (run hg verify) |
|
968 | (run hg verify) | |
969 | [255] |
|
969 | [255] | |
970 |
|
970 | |||
971 | $ hg -R fromcorrupt2 --config lfs.url=file:///$TESTTMP/dummy-remote2 verify -v |
|
971 | $ hg -R fromcorrupt2 --config lfs.url=file:///$TESTTMP/dummy-remote2 verify -v | |
972 | repository uses revlog format 1 |
|
972 | repository uses revlog format 1 | |
973 | checking changesets |
|
973 | checking changesets | |
974 | checking manifests |
|
974 | checking manifests | |
975 | crosschecking files in changesets and manifests |
|
975 | crosschecking files in changesets and manifests | |
976 | checking files |
|
976 | checking files | |
977 | l@1: unpacking 46a2f24864bc: integrity check failed on l:0 |
|
977 | l@1: unpacking 46a2f24864bc: integrity check failed on l:0 | |
978 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store |
|
978 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store | |
979 | large@0: unpacking 2c531e0992ff: integrity check failed on large:0 |
|
979 | large@0: unpacking 2c531e0992ff: integrity check failed on large:0 | |
980 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store |
|
980 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store | |
981 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store |
|
981 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store | |
982 | not checking dirstate because of previous errors |
|
982 | not checking dirstate because of previous errors | |
983 | checked 5 changesets with 10 changes to 4 files |
|
983 | checked 5 changesets with 10 changes to 4 files | |
984 | 2 integrity errors encountered! |
|
984 | 2 integrity errors encountered! | |
985 | (first damaged changeset appears to be 0) |
|
985 | (first damaged changeset appears to be 0) | |
986 | [1] |
|
986 | [1] | |
987 |
|
987 | |||
988 | $ cat $TESTTMP/dummy-remote2/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | $TESTDIR/f --sha256 |
|
988 | $ cat $TESTTMP/dummy-remote2/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | $TESTDIR/f --sha256 | |
989 | sha256=22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b |
|
989 | sha256=22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | |
990 | $ cat fromcorrupt2/.hg/store/lfs/objects/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | $TESTDIR/f --sha256 |
|
990 | $ cat fromcorrupt2/.hg/store/lfs/objects/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | $TESTDIR/f --sha256 | |
991 | sha256=22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b |
|
991 | sha256=22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | |
992 | $ test -f $TESTTMP/dummy-remote2/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
992 | $ test -f $TESTTMP/dummy-remote2/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
993 | [1] |
|
993 | [1] | |
994 |
|
994 | |||
995 | Accessing a corrupt file will complain |
|
995 | Accessing a corrupt file will complain | |
996 |
|
996 | |||
997 | $ hg --cwd fromcorrupt2 cat -r 0 large |
|
997 | $ hg --cwd fromcorrupt2 cat -r 0 large | |
998 | abort: integrity check failed on large:0 |
|
998 | abort: integrity check failed on large:0 | |
999 | [50] |
|
999 | [50] | |
1000 |
|
1000 | |||
1001 | lfs -> normal -> lfs round trip conversions are possible. The 'none()' |
|
1001 | lfs -> normal -> lfs round trip conversions are possible. The 'none()' | |
1002 | predicate on the command line will override whatever is configured globally and |
|
1002 | predicate on the command line will override whatever is configured globally and | |
1003 | locally, and ensures everything converts to a regular file. For lfs -> normal, |
|
1003 | locally, and ensures everything converts to a regular file. For lfs -> normal, | |
1004 | there's no 'lfs' destination repo requirement. For normal -> lfs, there is. |
|
1004 | there's no 'lfs' destination repo requirement. For normal -> lfs, there is. | |
1005 |
|
1005 | |||
1006 | $ hg --config extensions.convert= --config 'lfs.track=none()' \ |
|
1006 | $ hg --config extensions.convert= --config 'lfs.track=none()' \ | |
1007 | > convert repo8 convert_normal |
|
1007 | > convert repo8 convert_normal | |
1008 | initializing destination convert_normal repository |
|
1008 | initializing destination convert_normal repository | |
1009 | scanning source... |
|
1009 | scanning source... | |
1010 | sorting... |
|
1010 | sorting... | |
1011 | converting... |
|
1011 | converting... | |
1012 | 2 a |
|
1012 | 2 a | |
1013 | 1 b |
|
1013 | 1 b | |
1014 | 0 meta |
|
1014 | 0 meta | |
1015 | $ hg debugrequires -R convert_normal | grep 'lfs' |
|
1015 | $ hg debugrequires -R convert_normal | grep 'lfs' | |
1016 | [1] |
|
1016 | [1] | |
1017 | $ hg --cwd convert_normal cat a1 -r 0 -T '{rawdata}' |
|
1017 | $ hg --cwd convert_normal cat a1 -r 0 -T '{rawdata}' | |
1018 | THIS-IS-LFS-BECAUSE-10-BYTES |
|
1018 | THIS-IS-LFS-BECAUSE-10-BYTES | |
1019 |
|
1019 | |||
1020 | $ hg --config extensions.convert= --config lfs.threshold=10B \ |
|
1020 | $ hg --config extensions.convert= --config lfs.threshold=10B \ | |
1021 | > convert convert_normal convert_lfs |
|
1021 | > convert convert_normal convert_lfs | |
1022 | initializing destination convert_lfs repository |
|
1022 | initializing destination convert_lfs repository | |
1023 | scanning source... |
|
1023 | scanning source... | |
1024 | sorting... |
|
1024 | sorting... | |
1025 | converting... |
|
1025 | converting... | |
1026 | 2 a |
|
1026 | 2 a | |
1027 | 1 b |
|
1027 | 1 b | |
1028 | 0 meta |
|
1028 | 0 meta | |
1029 |
|
1029 | |||
1030 | $ hg --cwd convert_lfs cat -r 0 a1 -T '{rawdata}' |
|
1030 | $ hg --cwd convert_lfs cat -r 0 a1 -T '{rawdata}' | |
1031 | version https://git-lfs.github.com/spec/v1 |
|
1031 | version https://git-lfs.github.com/spec/v1 | |
1032 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
1032 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
1033 | size 29 |
|
1033 | size 29 | |
1034 | x-is-binary 0 |
|
1034 | x-is-binary 0 | |
1035 | $ hg --cwd convert_lfs debugdata a1 0 |
|
1035 | $ hg --cwd convert_lfs debugdata a1 0 | |
1036 | version https://git-lfs.github.com/spec/v1 |
|
1036 | version https://git-lfs.github.com/spec/v1 | |
1037 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
1037 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
1038 | size 29 |
|
1038 | size 29 | |
1039 | x-is-binary 0 |
|
1039 | x-is-binary 0 | |
1040 | $ hg --cwd convert_lfs log -r 0 -T "{lfs_files % '{lfspointer % '{key}={value}\n'}'}" |
|
1040 | $ hg --cwd convert_lfs log -r 0 -T "{lfs_files % '{lfspointer % '{key}={value}\n'}'}" | |
1041 | version=https://git-lfs.github.com/spec/v1 |
|
1041 | version=https://git-lfs.github.com/spec/v1 | |
1042 | oid=sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
1042 | oid=sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
1043 | size=29 |
|
1043 | size=29 | |
1044 | x-is-binary=0 |
|
1044 | x-is-binary=0 | |
1045 | $ hg --cwd convert_lfs log -r 0 \ |
|
1045 | $ hg --cwd convert_lfs log -r 0 \ | |
1046 | > -T '{lfs_files % "{get(lfspointer, "oid")}\n"}{lfs_files % "{lfspointer.oid}\n"}' |
|
1046 | > -T '{lfs_files % "{get(lfspointer, "oid")}\n"}{lfs_files % "{lfspointer.oid}\n"}' | |
1047 | sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
1047 | sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
1048 | sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
1048 | sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
1049 | $ hg --cwd convert_lfs log -r 0 -T '{lfs_files % "{lfspointer}\n"}' |
|
1049 | $ hg --cwd convert_lfs log -r 0 -T '{lfs_files % "{lfspointer}\n"}' | |
1050 | version=https://git-lfs.github.com/spec/v1 oid=sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 size=29 x-is-binary=0 |
|
1050 | version=https://git-lfs.github.com/spec/v1 oid=sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 size=29 x-is-binary=0 | |
1051 | $ hg --cwd convert_lfs \ |
|
1051 | $ hg --cwd convert_lfs \ | |
1052 | > log -r 'all()' -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}' |
|
1052 | > log -r 'all()' -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}' | |
1053 | 0: a1: 5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
1053 | 0: a1: 5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
1054 | 1: a2: 5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
1054 | 1: a2: 5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
1055 | 2: a2: 876dadc86a8542f9798048f2c47f51dbf8e4359aed883e8ec80c5db825f0d943 |
|
1055 | 2: a2: 876dadc86a8542f9798048f2c47f51dbf8e4359aed883e8ec80c5db825f0d943 | |
1056 |
|
1056 | |||
1057 | $ hg debugrequires -R convert_lfs | grep 'lfs' |
|
1057 | $ hg debugrequires -R convert_lfs | grep 'lfs' | |
1058 | lfs |
|
1058 | lfs | |
1059 |
|
1059 | |||
1060 | The hashes in all stages of the conversion are unchanged. |
|
1060 | The hashes in all stages of the conversion are unchanged. | |
1061 |
|
1061 | |||
1062 | $ hg -R repo8 log -T '{node|short}\n' |
|
1062 | $ hg -R repo8 log -T '{node|short}\n' | |
1063 | 0fae949de7fa |
|
1063 | 0fae949de7fa | |
1064 | 9cd6bdffdac0 |
|
1064 | 9cd6bdffdac0 | |
1065 | 7f96794915f7 |
|
1065 | 7f96794915f7 | |
1066 | $ hg -R convert_normal log -T '{node|short}\n' |
|
1066 | $ hg -R convert_normal log -T '{node|short}\n' | |
1067 | 0fae949de7fa |
|
1067 | 0fae949de7fa | |
1068 | 9cd6bdffdac0 |
|
1068 | 9cd6bdffdac0 | |
1069 | 7f96794915f7 |
|
1069 | 7f96794915f7 | |
1070 | $ hg -R convert_lfs log -T '{node|short}\n' |
|
1070 | $ hg -R convert_lfs log -T '{node|short}\n' | |
1071 | 0fae949de7fa |
|
1071 | 0fae949de7fa | |
1072 | 9cd6bdffdac0 |
|
1072 | 9cd6bdffdac0 | |
1073 | 7f96794915f7 |
|
1073 | 7f96794915f7 | |
1074 |
|
1074 | |||
1075 | This convert is trickier, because it contains deleted files (via `hg mv`) |
|
1075 | This convert is trickier, because it contains deleted files (via `hg mv`) | |
1076 |
|
1076 | |||
1077 | $ hg --config extensions.convert= --config lfs.threshold=1000M \ |
|
1077 | $ hg --config extensions.convert= --config lfs.threshold=1000M \ | |
1078 | > convert repo3 convert_normal2 |
|
1078 | > convert repo3 convert_normal2 | |
1079 | initializing destination convert_normal2 repository |
|
1079 | initializing destination convert_normal2 repository | |
1080 | scanning source... |
|
1080 | scanning source... | |
1081 | sorting... |
|
1081 | sorting... | |
1082 | converting... |
|
1082 | converting... | |
1083 | 4 commit with lfs content |
|
1083 | 4 commit with lfs content | |
1084 | 3 renames |
|
1084 | 3 renames | |
1085 | 2 large to small, small to large |
|
1085 | 2 large to small, small to large | |
1086 | 1 random modifications |
|
1086 | 1 random modifications | |
1087 | 0 switch large and small again |
|
1087 | 0 switch large and small again | |
1088 | $ hg debugrequires -R convert_normal2 | grep 'lfs' |
|
1088 | $ hg debugrequires -R convert_normal2 | grep 'lfs' | |
1089 | [1] |
|
1089 | [1] | |
1090 | $ hg --cwd convert_normal2 debugdata large 0 |
|
1090 | $ hg --cwd convert_normal2 debugdata large 0 | |
1091 | LONGER-THAN-TEN-BYTES-WILL-TRIGGER-LFS |
|
1091 | LONGER-THAN-TEN-BYTES-WILL-TRIGGER-LFS | |
1092 |
|
1092 | |||
1093 | $ hg --config extensions.convert= --config lfs.threshold=10B \ |
|
1093 | $ hg --config extensions.convert= --config lfs.threshold=10B \ | |
1094 | > convert convert_normal2 convert_lfs2 |
|
1094 | > convert convert_normal2 convert_lfs2 | |
1095 | initializing destination convert_lfs2 repository |
|
1095 | initializing destination convert_lfs2 repository | |
1096 | scanning source... |
|
1096 | scanning source... | |
1097 | sorting... |
|
1097 | sorting... | |
1098 | converting... |
|
1098 | converting... | |
1099 | 4 commit with lfs content |
|
1099 | 4 commit with lfs content | |
1100 | 3 renames |
|
1100 | 3 renames | |
1101 | 2 large to small, small to large |
|
1101 | 2 large to small, small to large | |
1102 | 1 random modifications |
|
1102 | 1 random modifications | |
1103 | 0 switch large and small again |
|
1103 | 0 switch large and small again | |
1104 | $ hg debugrequires -R convert_lfs2 | grep 'lfs' |
|
1104 | $ hg debugrequires -R convert_lfs2 | grep 'lfs' | |
1105 | lfs |
|
1105 | lfs | |
1106 | $ hg --cwd convert_lfs2 debugdata large 0 |
|
1106 | $ hg --cwd convert_lfs2 debugdata large 0 | |
1107 | version https://git-lfs.github.com/spec/v1 |
|
1107 | version https://git-lfs.github.com/spec/v1 | |
1108 | oid sha256:66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
1108 | oid sha256:66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
1109 | size 39 |
|
1109 | size 39 | |
1110 | x-is-binary 0 |
|
1110 | x-is-binary 0 | |
1111 |
|
1111 | |||
1112 | Committing deleted files works: |
|
1112 | Committing deleted files works: | |
1113 |
|
1113 | |||
1114 | $ hg init $TESTTMP/repo-del |
|
1114 | $ hg init $TESTTMP/repo-del | |
1115 | $ cd $TESTTMP/repo-del |
|
1115 | $ cd $TESTTMP/repo-del | |
1116 | $ echo 1 > A |
|
1116 | $ echo 1 > A | |
1117 | $ hg commit -m 'add A' -A A |
|
1117 | $ hg commit -m 'add A' -A A | |
1118 | $ hg rm A |
|
1118 | $ hg rm A | |
1119 | $ hg commit -m 'rm A' |
|
1119 | $ hg commit -m 'rm A' | |
1120 |
|
1120 | |||
1121 | Bad .hglfs files will block the commit with a useful message |
|
1121 | Bad .hglfs files will block the commit with a useful message | |
1122 |
|
1122 | |||
1123 | $ cat > .hglfs << EOF |
|
1123 | $ cat > .hglfs << EOF | |
1124 | > [track] |
|
1124 | > [track] | |
1125 | > **.test = size(">5B") |
|
1125 | > **.test = size(">5B") | |
1126 | > bad file ... no commit |
|
1126 | > bad file ... no commit | |
1127 | > EOF |
|
1127 | > EOF | |
1128 |
|
1128 | |||
1129 | $ echo x > file.txt |
|
1129 | $ echo x > file.txt | |
1130 | $ hg ci -Aqm 'should fail' |
|
1130 | $ hg ci -Aqm 'should fail' | |
1131 | config error at .hglfs:3: bad file ... no commit |
|
1131 | config error at .hglfs:3: bad file ... no commit | |
1132 | [30] |
|
1132 | [30] | |
1133 |
|
1133 | |||
1134 | $ cat > .hglfs << EOF |
|
1134 | $ cat > .hglfs << EOF | |
1135 | > [track] |
|
1135 | > [track] | |
1136 | > **.test = size(">5B") |
|
1136 | > **.test = size(">5B") | |
1137 | > ** = nonexistent() |
|
1137 | > ** = nonexistent() | |
1138 | > EOF |
|
1138 | > EOF | |
1139 |
|
1139 | |||
1140 | $ hg ci -Aqm 'should fail' |
|
1140 | $ hg ci -Aqm 'should fail' | |
1141 | abort: parse error in .hglfs: unknown identifier: nonexistent |
|
1141 | abort: parse error in .hglfs: unknown identifier: nonexistent | |
1142 | [255] |
|
1142 | [255] | |
1143 |
|
1143 | |||
1144 | '**' works out to mean all files. |
|
1144 | '**' works out to mean all files. | |
1145 |
|
1145 | |||
1146 | $ cat > .hglfs << EOF |
|
1146 | $ cat > .hglfs << EOF | |
1147 | > [track] |
|
1147 | > [track] | |
1148 | > path:.hglfs = none() |
|
1148 | > path:.hglfs = none() | |
1149 | > **.test = size(">5B") |
|
1149 | > **.test = size(">5B") | |
1150 | > **.exclude = none() |
|
1150 | > **.exclude = none() | |
1151 | > ** = size(">10B") |
|
1151 | > ** = size(">10B") | |
1152 | > EOF |
|
1152 | > EOF | |
1153 |
|
1153 | |||
1154 | The LFS policy takes effect without tracking the .hglfs file |
|
1154 | The LFS policy takes effect without tracking the .hglfs file | |
1155 |
|
1155 | |||
1156 | $ echo 'largefile' > lfs.test |
|
1156 | $ echo 'largefile' > lfs.test | |
1157 | $ echo '012345678901234567890' > nolfs.exclude |
|
1157 | $ echo '012345678901234567890' > nolfs.exclude | |
1158 | $ echo '01234567890123456' > lfs.catchall |
|
1158 | $ echo '01234567890123456' > lfs.catchall | |
1159 | $ hg add * |
|
1159 | $ hg add * | |
1160 | $ hg ci -qm 'before add .hglfs' |
|
1160 | $ hg ci -qm 'before add .hglfs' | |
1161 | $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n' |
|
1161 | $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n' | |
1162 | 2: lfs.catchall: d4ec46c2869ba22eceb42a729377432052d9dd75d82fc40390ebaadecee87ee9 |
|
1162 | 2: lfs.catchall: d4ec46c2869ba22eceb42a729377432052d9dd75d82fc40390ebaadecee87ee9 | |
1163 | lfs.test: 5489e6ced8c36a7b267292bde9fd5242a5f80a7482e8f23fa0477393dfaa4d6c |
|
1163 | lfs.test: 5489e6ced8c36a7b267292bde9fd5242a5f80a7482e8f23fa0477393dfaa4d6c | |
1164 |
|
1164 | |||
1165 | The .hglfs file works when tracked |
|
1165 | The .hglfs file works when tracked | |
1166 |
|
1166 | |||
1167 | $ echo 'largefile2' > lfs.test |
|
1167 | $ echo 'largefile2' > lfs.test | |
1168 | $ echo '012345678901234567890a' > nolfs.exclude |
|
1168 | $ echo '012345678901234567890a' > nolfs.exclude | |
1169 | $ echo '01234567890123456a' > lfs.catchall |
|
1169 | $ echo '01234567890123456a' > lfs.catchall | |
1170 | $ hg ci -Aqm 'after adding .hglfs' |
|
1170 | $ hg ci -Aqm 'after adding .hglfs' | |
1171 | $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n' |
|
1171 | $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n' | |
1172 | 3: lfs.catchall: 31f43b9c62b540126b0ad5884dc013d21a61c9329b77de1fceeae2fc58511573 |
|
1172 | 3: lfs.catchall: 31f43b9c62b540126b0ad5884dc013d21a61c9329b77de1fceeae2fc58511573 | |
1173 | lfs.test: 8acd23467967bc7b8cc5a280056589b0ba0b17ff21dbd88a7b6474d6290378a6 |
|
1173 | lfs.test: 8acd23467967bc7b8cc5a280056589b0ba0b17ff21dbd88a7b6474d6290378a6 | |
1174 |
|
1174 | |||
1175 | The LFS policy stops when the .hglfs is gone |
|
1175 | The LFS policy stops when the .hglfs is gone | |
1176 |
|
1176 | |||
1177 | $ mv .hglfs .hglfs_ |
|
1177 | $ mv .hglfs .hglfs_ | |
1178 | $ echo 'largefile3' > lfs.test |
|
1178 | $ echo 'largefile3' > lfs.test | |
1179 | $ echo '012345678901234567890abc' > nolfs.exclude |
|
1179 | $ echo '012345678901234567890abc' > nolfs.exclude | |
1180 | $ echo '01234567890123456abc' > lfs.catchall |
|
1180 | $ echo '01234567890123456abc' > lfs.catchall | |
1181 | $ hg ci -qm 'file test' -X .hglfs |
|
1181 | $ hg ci -qm 'file test' -X .hglfs | |
1182 | $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n' |
|
1182 | $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n' | |
1183 | 4: |
|
1183 | 4: | |
1184 |
|
1184 | |||
1185 | $ mv .hglfs_ .hglfs |
|
1185 | $ mv .hglfs_ .hglfs | |
1186 | $ echo '012345678901234567890abc' > lfs.test |
|
1186 | $ echo '012345678901234567890abc' > lfs.test | |
1187 | $ hg ci -m 'back to lfs' |
|
1187 | $ hg ci -m 'back to lfs' | |
1188 | $ hg rm lfs.test |
|
1188 | $ hg rm lfs.test | |
1189 | $ hg ci -qm 'remove lfs' |
|
1189 | $ hg ci -qm 'remove lfs' | |
1190 |
|
1190 | |||
1191 | {lfs_files} will list deleted files too |
|
1191 | {lfs_files} will list deleted files too | |
1192 |
|
1192 | |||
1193 | $ hg log -T "{lfs_files % '{rev} {file}: {lfspointer.oid}\n'}" |
|
1193 | $ hg log -T "{lfs_files % '{rev} {file}: {lfspointer.oid}\n'}" | |
1194 | 6 lfs.test: |
|
1194 | 6 lfs.test: | |
1195 | 5 lfs.test: sha256:43f8f41171b6f62a6b61ba4ce98a8a6c1649240a47ebafd43120aa215ac9e7f6 |
|
1195 | 5 lfs.test: sha256:43f8f41171b6f62a6b61ba4ce98a8a6c1649240a47ebafd43120aa215ac9e7f6 | |
1196 | 3 lfs.catchall: sha256:31f43b9c62b540126b0ad5884dc013d21a61c9329b77de1fceeae2fc58511573 |
|
1196 | 3 lfs.catchall: sha256:31f43b9c62b540126b0ad5884dc013d21a61c9329b77de1fceeae2fc58511573 | |
1197 | 3 lfs.test: sha256:8acd23467967bc7b8cc5a280056589b0ba0b17ff21dbd88a7b6474d6290378a6 |
|
1197 | 3 lfs.test: sha256:8acd23467967bc7b8cc5a280056589b0ba0b17ff21dbd88a7b6474d6290378a6 | |
1198 | 2 lfs.catchall: sha256:d4ec46c2869ba22eceb42a729377432052d9dd75d82fc40390ebaadecee87ee9 |
|
1198 | 2 lfs.catchall: sha256:d4ec46c2869ba22eceb42a729377432052d9dd75d82fc40390ebaadecee87ee9 | |
1199 | 2 lfs.test: sha256:5489e6ced8c36a7b267292bde9fd5242a5f80a7482e8f23fa0477393dfaa4d6c |
|
1199 | 2 lfs.test: sha256:5489e6ced8c36a7b267292bde9fd5242a5f80a7482e8f23fa0477393dfaa4d6c | |
1200 |
|
1200 | |||
1201 | $ hg log -r 'file("set:lfs()")' -T '{rev} {join(lfs_files, ", ")}\n' |
|
1201 | $ hg log -r 'file("set:lfs()")' -T '{rev} {join(lfs_files, ", ")}\n' | |
1202 | 2 lfs.catchall, lfs.test |
|
1202 | 2 lfs.catchall, lfs.test | |
1203 | 3 lfs.catchall, lfs.test |
|
1203 | 3 lfs.catchall, lfs.test | |
1204 | 5 lfs.test |
|
1204 | 5 lfs.test | |
1205 | 6 lfs.test |
|
1205 | 6 lfs.test | |
1206 |
|
1206 | |||
1207 | $ cd .. |
|
1207 | $ cd .. | |
1208 |
|
1208 | |||
1209 | Unbundling adds a requirement to a non-lfs repo, if necessary. |
|
1209 | Unbundling adds a requirement to a non-lfs repo, if necessary. | |
1210 |
|
1210 | |||
1211 | $ hg bundle -R $TESTTMP/repo-del -qr 0 --base null nolfs.hg |
|
1211 | $ hg bundle -R $TESTTMP/repo-del -qr 0 --base null nolfs.hg | |
1212 | $ hg bundle -R convert_lfs2 -qr tip --base null lfs.hg |
|
1212 | $ hg bundle -R convert_lfs2 -qr tip --base null lfs.hg | |
1213 | $ hg init unbundle |
|
1213 | $ hg init unbundle | |
1214 | $ hg pull -R unbundle -q nolfs.hg |
|
1214 | $ hg pull -R unbundle -q nolfs.hg | |
1215 | $ hg debugrequires -R unbundle | grep lfs |
|
1215 | $ hg debugrequires -R unbundle | grep lfs | |
1216 | [1] |
|
1216 | [1] | |
1217 | $ hg pull -R unbundle -q lfs.hg |
|
1217 | $ hg pull -R unbundle -q lfs.hg | |
1218 | $ hg debugrequires -R unbundle | grep lfs |
|
1218 | $ hg debugrequires -R unbundle | grep lfs | |
1219 | lfs |
|
1219 | lfs | |
1220 |
|
1220 | |||
1221 | $ hg init no_lfs |
|
1221 | $ hg init no_lfs | |
1222 | $ cat >> no_lfs/.hg/hgrc <<EOF |
|
1222 | $ cat >> no_lfs/.hg/hgrc <<EOF | |
1223 | > [experimental] |
|
1223 | > [experimental] | |
1224 | > changegroup3 = True |
|
1224 | > changegroup3 = True | |
1225 | > [extensions] |
|
1225 | > [extensions] | |
1226 | > lfs=! |
|
1226 | > lfs=! | |
1227 | > EOF |
|
1227 | > EOF | |
1228 | $ cp -R no_lfs no_lfs2 |
|
1228 | $ cp -R no_lfs no_lfs2 | |
1229 |
|
1229 | |||
1230 | Pushing from a local lfs repo to a local repo without an lfs requirement and |
|
1230 | Pushing from a local lfs repo to a local repo without an lfs requirement and | |
1231 | with lfs disabled, fails. |
|
1231 | with lfs disabled, fails. | |
1232 |
|
1232 | |||
1233 | $ hg push -R convert_lfs2 no_lfs |
|
1233 | $ hg push -R convert_lfs2 no_lfs | |
1234 | pushing to no_lfs |
|
1234 | pushing to no_lfs | |
1235 | abort: required features are not supported in the destination: lfs |
|
1235 | abort: required features are not supported in the destination: lfs | |
1236 | [255] |
|
1236 | [255] | |
1237 | $ hg debugrequires -R no_lfs/ | grep lfs |
|
1237 | $ hg debugrequires -R no_lfs/ | grep lfs | |
1238 | [1] |
|
1238 | [1] | |
1239 |
|
1239 | |||
1240 | Pulling from a local lfs repo to a local repo without an lfs requirement and |
|
1240 | Pulling from a local lfs repo to a local repo without an lfs requirement and | |
1241 | with lfs disabled, fails. |
|
1241 | with lfs disabled, fails. | |
1242 |
|
1242 | |||
1243 | $ hg pull -R no_lfs2 convert_lfs2 |
|
1243 | $ hg pull -R no_lfs2 convert_lfs2 | |
1244 | pulling from convert_lfs2 |
|
1244 | pulling from convert_lfs2 | |
1245 | abort: required features are not supported in the destination: lfs |
|
1245 | abort: required features are not supported in the destination: lfs | |
1246 | [255] |
|
1246 | [255] | |
1247 | $ hg debugrequires -R no_lfs2/ | grep lfs |
|
1247 | $ hg debugrequires -R no_lfs2/ | grep lfs | |
1248 | [1] |
|
1248 | [1] |
@@ -1,165 +1,165 b'' | |||||
1 | $ . "$TESTDIR/narrow-library.sh" |
|
1 | $ . "$TESTDIR/narrow-library.sh" | |
2 |
|
2 | |||
3 | $ hg init master |
|
3 | $ hg init master | |
4 | $ cd master |
|
4 | $ cd master | |
5 |
|
5 | |||
6 | $ mkdir inside |
|
6 | $ mkdir inside | |
7 | $ echo inside > inside/f1 |
|
7 | $ echo inside > inside/f1 | |
8 | $ mkdir outside |
|
8 | $ mkdir outside | |
9 | $ echo outside > outside/f2 |
|
9 | $ echo outside > outside/f2 | |
10 | $ mkdir patchdir |
|
10 | $ mkdir patchdir | |
11 | $ echo patch_this > patchdir/f3 |
|
11 | $ echo patch_this > patchdir/f3 | |
12 | $ hg ci -Aqm 'initial' |
|
12 | $ hg ci -Aqm 'initial' | |
13 |
|
13 | |||
14 | $ cd .. |
|
14 | $ cd .. | |
15 |
|
15 | |||
16 | $ hg clone --narrow ssh://user@dummy/master narrow --include inside |
|
16 | $ hg clone --narrow ssh://user@dummy/master narrow --include inside | |
17 | requesting all changes |
|
17 | requesting all changes | |
18 | adding changesets |
|
18 | adding changesets | |
19 | adding manifests |
|
19 | adding manifests | |
20 | adding file changes |
|
20 | adding file changes | |
21 | added 1 changesets with 1 changes to 1 files |
|
21 | added 1 changesets with 1 changes to 1 files | |
22 | new changesets dff6a2a6d433 |
|
22 | new changesets dff6a2a6d433 | |
23 | updating to branch default |
|
23 | updating to branch default | |
24 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
24 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
25 |
|
25 | |||
26 | $ cd narrow |
|
26 | $ cd narrow | |
27 |
|
27 | |||
28 | $ mkdir outside |
|
28 | $ mkdir outside | |
29 | $ echo other_contents > outside/f2 |
|
29 | $ echo other_contents > outside/f2 | |
30 | $ hg tracked | grep outside |
|
30 | $ hg tracked | grep outside | |
31 | [1] |
|
31 | [1] | |
32 | $ hg files | grep outside |
|
32 | $ hg files | grep outside | |
33 | [1] |
|
33 | [1] | |
34 | $ hg status |
|
34 | $ hg status | |
35 |
|
35 | |||
36 | `hg status` did not add outside. |
|
36 | `hg status` did not add outside. | |
37 | $ hg tracked | grep outside |
|
37 | $ hg tracked | grep outside | |
38 | [1] |
|
38 | [1] | |
39 | $ hg files | grep outside |
|
39 | $ hg files | grep outside | |
40 | [1] |
|
40 | [1] | |
41 |
|
41 | |||
42 | Unfortunately this is not really a candidate for adding to narrowhg proper, |
|
42 | Unfortunately this is not really a candidate for adding to narrowhg proper, | |
43 | since it depends on some other source for providing the manifests (when using |
|
43 | since it depends on some other source for providing the manifests (when using | |
44 | treemanifests) and file contents. Something like a virtual filesystem and/or |
|
44 | treemanifests) and file contents. Something like a virtual filesystem and/or | |
45 | remotefilelog. We want to be useful when not using those systems, so we do not |
|
45 | remotefilelog. We want to be useful when not using those systems, so we do not | |
46 | have this method available in narrowhg proper at the moment. |
|
46 | have this method available in narrowhg proper at the moment. | |
47 | $ cat > "$TESTTMP/expand_extension.py" <<EOF |
|
47 | $ cat > "$TESTTMP/expand_extension.py" <<EOF | |
48 | > import os |
|
48 | > import os | |
49 | > import sys |
|
49 | > import sys | |
50 | > |
|
50 | > | |
51 | > from mercurial import encoding |
|
51 | > from mercurial import encoding | |
52 | > from mercurial import extensions |
|
52 | > from mercurial import extensions | |
53 | > from mercurial import localrepo |
|
53 | > from mercurial import localrepo | |
54 | > from mercurial import match as matchmod |
|
54 | > from mercurial import match as matchmod | |
55 | > from mercurial import narrowspec |
|
55 | > from mercurial import narrowspec | |
56 | > from mercurial import patch |
|
56 | > from mercurial import patch | |
57 | > from mercurial import util as hgutil |
|
57 | > from mercurial import util as hgutil | |
58 | > |
|
58 | > | |
59 | > narrowspecexpanded = False |
|
59 | > narrowspecexpanded = False | |
60 | > def expandnarrowspec(ui, repo, newincludes=None): |
|
60 | > def expandnarrowspec(ui, repo, newincludes=None): | |
61 | > if not newincludes: |
|
61 | > if not newincludes: | |
62 | > return |
|
62 | > return | |
63 | > if getattr(repo, '_narrowspecexpanded', False): |
|
63 | > if getattr(repo, '_narrowspecexpanded', False): | |
64 | > return |
|
64 | > return | |
65 | > repo._narrowspecexpanded = True |
|
65 | > repo._narrowspecexpanded = True | |
66 | > import sys |
|
66 | > import sys | |
67 | > newincludes = set([newincludes]) |
|
67 | > newincludes = set([newincludes]) | |
68 | > includes, excludes = repo.narrowpats |
|
68 | > includes, excludes = repo.narrowpats | |
69 | > currentmatcher = narrowspec.match(repo.root, includes, excludes) |
|
69 | > currentmatcher = narrowspec.match(repo.root, includes, excludes) | |
70 | > includes = includes | newincludes |
|
70 | > includes = includes | newincludes | |
71 | > if not repo.currenttransaction(): |
|
71 | > if not repo.currenttransaction(): | |
72 | > ui.develwarn(b'expandnarrowspec called outside of transaction!') |
|
72 | > ui.develwarn(b'expandnarrowspec called outside of transaction!') | |
73 | > repo.setnarrowpats(includes, excludes) |
|
73 | > repo.setnarrowpats(includes, excludes) | |
74 | > narrowspec.copytoworkingcopy(repo) |
|
74 | > narrowspec.copytoworkingcopy(repo) | |
75 | > newmatcher = narrowspec.match(repo.root, includes, excludes) |
|
75 | > newmatcher = narrowspec.match(repo.root, includes, excludes) | |
76 | > added = matchmod.differencematcher(newmatcher, currentmatcher) |
|
76 | > added = matchmod.differencematcher(newmatcher, currentmatcher) | |
77 | > with repo.dirstate.changing_parents(repo): |
|
77 | > with repo.dirstate.changing_parents(repo): | |
78 | > for f in repo[b'.'].manifest().walk(added): |
|
78 | > for f in repo[b'.'].manifest().walk(added): | |
79 | > repo.dirstate.update_file( |
|
79 | > repo.dirstate.update_file( | |
80 | > f, |
|
80 | > f, | |
81 | > p1_tracked=True, |
|
81 | > p1_tracked=True, | |
82 | > wc_tracked=True, |
|
82 | > wc_tracked=True, | |
83 | > possibly_dirty=True, |
|
83 | > possibly_dirty=True, | |
84 | > ) |
|
84 | > ) | |
85 | > |
|
85 | > | |
86 | > def reposetup(ui, repo): |
|
86 | > def reposetup(ui, repo): | |
87 | > class expandingrepo(repo.__class__): |
|
87 | > class expandingrepo(repo.__class__): | |
88 | > def narrowmatch(self, *args, **kwargs): |
|
88 | > def narrowmatch(self, *args, **kwargs): | |
89 | > with repo.wlock(), repo.lock(), repo.transaction( |
|
89 | > with repo.wlock(), repo.lock(), repo.transaction( | |
90 | > b'expandnarrowspec'): |
|
90 | > b'expandnarrowspec'): | |
91 | > expandnarrowspec(ui, repo, |
|
91 | > expandnarrowspec(ui, repo, | |
92 | > encoding.environ.get(b'DIRSTATEINCLUDES')) |
|
92 | > encoding.environ.get(b'DIRSTATEINCLUDES')) | |
93 | > return super(expandingrepo, self).narrowmatch(*args, **kwargs) |
|
93 | > return super(expandingrepo, self).narrowmatch(*args, **kwargs) | |
94 | > repo.__class__ = expandingrepo |
|
94 | > repo.__class__ = expandingrepo | |
95 | > |
|
95 | > | |
96 | > def extsetup(unused_ui): |
|
96 | > def extsetup(unused_ui): | |
97 | > def overridepatch(orig, ui, repo, *args, **kwargs): |
|
97 | > def overridepatch(orig, ui, repo, *args, **kwargs): | |
98 | > with repo.wlock(): |
|
98 | > with repo.wlock(): | |
99 | > expandnarrowspec(ui, repo, encoding.environ.get(b'PATCHINCLUDES')) |
|
99 | > expandnarrowspec(ui, repo, encoding.environ.get(b'PATCHINCLUDES')) | |
100 | > return orig(ui, repo, *args, **kwargs) |
|
100 | > return orig(ui, repo, *args, **kwargs) | |
101 | > |
|
101 | > | |
102 |
> extensions.wrapfunction(patch, |
|
102 | > extensions.wrapfunction(patch, 'patch', overridepatch) | |
103 |
|
|
103 | > EOF | |
104 | $ cat >> ".hg/hgrc" <<EOF |
|
104 | $ cat >> ".hg/hgrc" <<EOF | |
105 | > [extensions] |
|
105 | > [extensions] | |
106 | > expand_extension = $TESTTMP/expand_extension.py |
|
106 | > expand_extension = $TESTTMP/expand_extension.py | |
107 | > EOF |
|
107 | > EOF | |
108 |
|
108 | |||
109 | Since we do not have the ability to rely on a virtual filesystem or |
|
109 | Since we do not have the ability to rely on a virtual filesystem or | |
110 | remotefilelog in the test, we just fake it by copying the data from the 'master' |
|
110 | remotefilelog in the test, we just fake it by copying the data from the 'master' | |
111 | repo. |
|
111 | repo. | |
112 | $ cp -a ../master/.hg/store/data/* .hg/store/data |
|
112 | $ cp -a ../master/.hg/store/data/* .hg/store/data | |
113 | Do that for patchdir as well. |
|
113 | Do that for patchdir as well. | |
114 | $ cp -a ../master/patchdir . |
|
114 | $ cp -a ../master/patchdir . | |
115 |
|
115 | |||
116 | `hg status` will now add outside, but not patchdir. |
|
116 | `hg status` will now add outside, but not patchdir. | |
117 | $ DIRSTATEINCLUDES=path:outside hg status |
|
117 | $ DIRSTATEINCLUDES=path:outside hg status | |
118 | M outside/f2 |
|
118 | M outside/f2 | |
119 | $ hg tracked | grep outside |
|
119 | $ hg tracked | grep outside | |
120 | I path:outside |
|
120 | I path:outside | |
121 | $ hg files | grep outside > /dev/null |
|
121 | $ hg files | grep outside > /dev/null | |
122 | $ hg tracked | grep patchdir |
|
122 | $ hg tracked | grep patchdir | |
123 | [1] |
|
123 | [1] | |
124 | $ hg files | grep patchdir |
|
124 | $ hg files | grep patchdir | |
125 | [1] |
|
125 | [1] | |
126 |
|
126 | |||
127 | Get rid of the modification to outside/f2. |
|
127 | Get rid of the modification to outside/f2. | |
128 | $ hg update -C . |
|
128 | $ hg update -C . | |
129 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
129 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
130 |
|
130 | |||
131 | This patch will not apply cleanly at the moment, so `hg import` will break |
|
131 | This patch will not apply cleanly at the moment, so `hg import` will break | |
132 | $ cat > "$TESTTMP/foo.patch" <<EOF |
|
132 | $ cat > "$TESTTMP/foo.patch" <<EOF | |
133 | > --- patchdir/f3 |
|
133 | > --- patchdir/f3 | |
134 | > +++ patchdir/f3 |
|
134 | > +++ patchdir/f3 | |
135 | > @@ -1,1 +1,1 @@ |
|
135 | > @@ -1,1 +1,1 @@ | |
136 | > -this should be "patch_this", but its not, so patch fails |
|
136 | > -this should be "patch_this", but its not, so patch fails | |
137 | > +this text is irrelevant |
|
137 | > +this text is irrelevant | |
138 | > EOF |
|
138 | > EOF | |
139 | $ PATCHINCLUDES=path:patchdir hg import -p0 -e "$TESTTMP/foo.patch" -m ignored |
|
139 | $ PATCHINCLUDES=path:patchdir hg import -p0 -e "$TESTTMP/foo.patch" -m ignored | |
140 | applying $TESTTMP/foo.patch |
|
140 | applying $TESTTMP/foo.patch | |
141 | patching file patchdir/f3 |
|
141 | patching file patchdir/f3 | |
142 | Hunk #1 FAILED at 0 |
|
142 | Hunk #1 FAILED at 0 | |
143 | 1 out of 1 hunks FAILED -- saving rejects to file patchdir/f3.rej |
|
143 | 1 out of 1 hunks FAILED -- saving rejects to file patchdir/f3.rej | |
144 | abort: patch failed to apply |
|
144 | abort: patch failed to apply | |
145 | [20] |
|
145 | [20] | |
146 | $ hg tracked | grep patchdir |
|
146 | $ hg tracked | grep patchdir | |
147 | [1] |
|
147 | [1] | |
148 | $ hg files | grep patchdir > /dev/null |
|
148 | $ hg files | grep patchdir > /dev/null | |
149 | [1] |
|
149 | [1] | |
150 |
|
150 | |||
151 | Let's make it apply cleanly and see that it *did* expand properly |
|
151 | Let's make it apply cleanly and see that it *did* expand properly | |
152 | $ cat > "$TESTTMP/foo.patch" <<EOF |
|
152 | $ cat > "$TESTTMP/foo.patch" <<EOF | |
153 | > --- patchdir/f3 |
|
153 | > --- patchdir/f3 | |
154 | > +++ patchdir/f3 |
|
154 | > +++ patchdir/f3 | |
155 | > @@ -1,1 +1,1 @@ |
|
155 | > @@ -1,1 +1,1 @@ | |
156 | > -patch_this |
|
156 | > -patch_this | |
157 | > +patched_this |
|
157 | > +patched_this | |
158 | > EOF |
|
158 | > EOF | |
159 | $ PATCHINCLUDES=path:patchdir hg import -p0 -e "$TESTTMP/foo.patch" -m message |
|
159 | $ PATCHINCLUDES=path:patchdir hg import -p0 -e "$TESTTMP/foo.patch" -m message | |
160 | applying $TESTTMP/foo.patch |
|
160 | applying $TESTTMP/foo.patch | |
161 | $ cat patchdir/f3 |
|
161 | $ cat patchdir/f3 | |
162 | patched_this |
|
162 | patched_this | |
163 | $ hg tracked | grep patchdir |
|
163 | $ hg tracked | grep patchdir | |
164 | I path:patchdir |
|
164 | I path:patchdir | |
165 | $ hg files | grep patchdir > /dev/null |
|
165 | $ hg files | grep patchdir > /dev/null |
@@ -1,1904 +1,1904 b'' | |||||
1 | ============================================================================================ |
|
1 | ============================================================================================ | |
2 | Test cases where there are race condition between two clients pushing to the same repository |
|
2 | Test cases where there are race condition between two clients pushing to the same repository | |
3 | ============================================================================================ |
|
3 | ============================================================================================ | |
4 |
|
4 | |||
5 | This file tests cases where two clients push to a server at the same time. The |
|
5 | This file tests cases where two clients push to a server at the same time. The | |
6 | "raced" client is done preparing it push bundle when the "racing" client |
|
6 | "raced" client is done preparing it push bundle when the "racing" client | |
7 | perform its push. The "raced" client starts its actual push after the "racing" |
|
7 | perform its push. The "raced" client starts its actual push after the "racing" | |
8 | client push is fully complete. |
|
8 | client push is fully complete. | |
9 |
|
9 | |||
10 | A set of extension and shell functions ensures this scheduling. |
|
10 | A set of extension and shell functions ensures this scheduling. | |
11 |
|
11 | |||
12 | $ cat >> delaypush.py << EOF |
|
12 | $ cat >> delaypush.py << EOF | |
13 | > """small extension orchestrate push race |
|
13 | > """small extension orchestrate push race | |
14 | > |
|
14 | > | |
15 | > Client with the extensions will create a file when ready and get stuck until |
|
15 | > Client with the extensions will create a file when ready and get stuck until | |
16 | > a file is created.""" |
|
16 | > a file is created.""" | |
17 | > |
|
17 | > | |
18 | > import errno |
|
18 | > import errno | |
19 | > import os |
|
19 | > import os | |
20 | > import time |
|
20 | > import time | |
21 | > |
|
21 | > | |
22 | > from mercurial import ( |
|
22 | > from mercurial import ( | |
23 | > exchange, |
|
23 | > exchange, | |
24 | > extensions, |
|
24 | > extensions, | |
25 | > registrar, |
|
25 | > registrar, | |
26 | > ) |
|
26 | > ) | |
27 | > |
|
27 | > | |
28 | > configtable = {} |
|
28 | > configtable = {} | |
29 | > configitem = registrar.configitem(configtable) |
|
29 | > configitem = registrar.configitem(configtable) | |
30 | > |
|
30 | > | |
31 | > configitem(b'delaypush', b'ready-path', |
|
31 | > configitem(b'delaypush', b'ready-path', | |
32 | > default=None, |
|
32 | > default=None, | |
33 | > ) |
|
33 | > ) | |
34 | > configitem(b'delaypush', b'release-path', |
|
34 | > configitem(b'delaypush', b'release-path', | |
35 | > default=None, |
|
35 | > default=None, | |
36 | > ) |
|
36 | > ) | |
37 | > |
|
37 | > | |
38 | > def delaypush(orig, pushop): |
|
38 | > def delaypush(orig, pushop): | |
39 | > # notify we are done preparing |
|
39 | > # notify we are done preparing | |
40 | > ui = pushop.repo.ui |
|
40 | > ui = pushop.repo.ui | |
41 | > readypath = ui.config(b'delaypush', b'ready-path') |
|
41 | > readypath = ui.config(b'delaypush', b'ready-path') | |
42 | > if readypath is not None: |
|
42 | > if readypath is not None: | |
43 | > with open(readypath, 'w') as r: |
|
43 | > with open(readypath, 'w') as r: | |
44 | > r.write('foo') |
|
44 | > r.write('foo') | |
45 | > ui.status(b'wrote ready: %s\n' % readypath) |
|
45 | > ui.status(b'wrote ready: %s\n' % readypath) | |
46 | > # now wait for the other process to be done |
|
46 | > # now wait for the other process to be done | |
47 | > watchpath = ui.config(b'delaypush', b'release-path') |
|
47 | > watchpath = ui.config(b'delaypush', b'release-path') | |
48 | > if watchpath is not None: |
|
48 | > if watchpath is not None: | |
49 | > ui.status(b'waiting on: %s\n' % watchpath) |
|
49 | > ui.status(b'waiting on: %s\n' % watchpath) | |
50 | > limit = 100 |
|
50 | > limit = 100 | |
51 | > test_default_timeout = os.environ.get('HGTEST_TIMEOUT_DEFAULT') |
|
51 | > test_default_timeout = os.environ.get('HGTEST_TIMEOUT_DEFAULT') | |
52 | > test_timeout = os.environ.get('HGTEST_TIMEOUT') |
|
52 | > test_timeout = os.environ.get('HGTEST_TIMEOUT') | |
53 | > if test_default_timeout is not None: |
|
53 | > if test_default_timeout is not None: | |
54 | > test_default_timeout = int(test_default_timeout) |
|
54 | > test_default_timeout = int(test_default_timeout) | |
55 | > if test_timeout is not None: |
|
55 | > if test_timeout is not None: | |
56 | > test_timeout = int(test_timeout) |
|
56 | > test_timeout = int(test_timeout) | |
57 | > if ( |
|
57 | > if ( | |
58 | > test_default_timeout is not None |
|
58 | > test_default_timeout is not None | |
59 | > and test_timeout is not None |
|
59 | > and test_timeout is not None | |
60 | > and test_default_timeout < test_timeout |
|
60 | > and test_default_timeout < test_timeout | |
61 | > ): |
|
61 | > ): | |
62 | > limit = int(limit * (test_timeout / test_default_timeout)) |
|
62 | > limit = int(limit * (test_timeout / test_default_timeout)) | |
63 | > while 0 < limit and not os.path.exists(watchpath): |
|
63 | > while 0 < limit and not os.path.exists(watchpath): | |
64 | > limit -= 1 |
|
64 | > limit -= 1 | |
65 | > time.sleep(0.1) |
|
65 | > time.sleep(0.1) | |
66 | > if limit <= 0: |
|
66 | > if limit <= 0: | |
67 | > ui.warn(b'exiting without watchfile: %s' % watchpath) |
|
67 | > ui.warn(b'exiting without watchfile: %s' % watchpath) | |
68 | > else: |
|
68 | > else: | |
69 | > # delete the file at the end of the push |
|
69 | > # delete the file at the end of the push | |
70 | > def delete(): |
|
70 | > def delete(): | |
71 | > try: |
|
71 | > try: | |
72 | > os.unlink(watchpath) |
|
72 | > os.unlink(watchpath) | |
73 | > except FileNotFoundError: |
|
73 | > except FileNotFoundError: | |
74 | > pass |
|
74 | > pass | |
75 | > ui.atexit(delete) |
|
75 | > ui.atexit(delete) | |
76 | > return orig(pushop) |
|
76 | > return orig(pushop) | |
77 | > |
|
77 | > | |
78 | > def uisetup(ui): |
|
78 | > def uisetup(ui): | |
79 |
> extensions.wrapfunction(exchange, |
|
79 | > extensions.wrapfunction(exchange, '_pushbundle2', delaypush) | |
80 |
|
|
80 | > EOF | |
81 |
|
81 | |||
82 | $ waiton () { |
|
82 | $ waiton () { | |
83 | > # wait for a file to be created (then delete it) |
|
83 | > # wait for a file to be created (then delete it) | |
84 | > count=100 |
|
84 | > count=100 | |
85 | > while [ ! -f $1 ] ; |
|
85 | > while [ ! -f $1 ] ; | |
86 | > do |
|
86 | > do | |
87 | > sleep 0.1; |
|
87 | > sleep 0.1; | |
88 | > count=`expr $count - 1`; |
|
88 | > count=`expr $count - 1`; | |
89 | > if [ $count -lt 0 ]; |
|
89 | > if [ $count -lt 0 ]; | |
90 | > then |
|
90 | > then | |
91 | > break |
|
91 | > break | |
92 | > fi; |
|
92 | > fi; | |
93 | > done |
|
93 | > done | |
94 | > [ -f $1 ] || echo "ready file still missing: $1" |
|
94 | > [ -f $1 ] || echo "ready file still missing: $1" | |
95 | > rm -f $1 |
|
95 | > rm -f $1 | |
96 | > } |
|
96 | > } | |
97 |
|
97 | |||
98 | $ release () { |
|
98 | $ release () { | |
99 | > # create a file and wait for it be deleted |
|
99 | > # create a file and wait for it be deleted | |
100 | > count=100 |
|
100 | > count=100 | |
101 | > touch $1 |
|
101 | > touch $1 | |
102 | > while [ -f $1 ] ; |
|
102 | > while [ -f $1 ] ; | |
103 | > do |
|
103 | > do | |
104 | > sleep 0.1; |
|
104 | > sleep 0.1; | |
105 | > count=`expr $count - 1`; |
|
105 | > count=`expr $count - 1`; | |
106 | > if [ $count -lt 0 ]; |
|
106 | > if [ $count -lt 0 ]; | |
107 | > then |
|
107 | > then | |
108 | > break |
|
108 | > break | |
109 | > fi; |
|
109 | > fi; | |
110 | > done |
|
110 | > done | |
111 | > [ ! -f $1 ] || echo "delay file still exist: $1" |
|
111 | > [ ! -f $1 ] || echo "delay file still exist: $1" | |
112 | > } |
|
112 | > } | |
113 |
|
113 | |||
114 | $ cat >> $HGRCPATH << EOF |
|
114 | $ cat >> $HGRCPATH << EOF | |
115 | > [ui] |
|
115 | > [ui] | |
116 | > # simplify output |
|
116 | > # simplify output | |
117 | > logtemplate = {node|short} {desc} ({branch}) |
|
117 | > logtemplate = {node|short} {desc} ({branch}) | |
118 | > [phases] |
|
118 | > [phases] | |
119 | > publish = no |
|
119 | > publish = no | |
120 | > [experimental] |
|
120 | > [experimental] | |
121 | > evolution=true |
|
121 | > evolution=true | |
122 | > [alias] |
|
122 | > [alias] | |
123 | > graph = log -G --rev 'sort(all(), "topo")' |
|
123 | > graph = log -G --rev 'sort(all(), "topo")' | |
124 | > EOF |
|
124 | > EOF | |
125 |
|
125 | |||
126 | We tests multiple cases: |
|
126 | We tests multiple cases: | |
127 | * strict: no race detected, |
|
127 | * strict: no race detected, | |
128 | * unrelated: race on unrelated heads are allowed. |
|
128 | * unrelated: race on unrelated heads are allowed. | |
129 |
|
129 | |||
130 | #testcases strict unrelated |
|
130 | #testcases strict unrelated | |
131 |
|
131 | |||
132 | #if strict |
|
132 | #if strict | |
133 |
|
133 | |||
134 | $ cat >> $HGRCPATH << EOF |
|
134 | $ cat >> $HGRCPATH << EOF | |
135 | > [server] |
|
135 | > [server] | |
136 | > concurrent-push-mode = strict |
|
136 | > concurrent-push-mode = strict | |
137 | > EOF |
|
137 | > EOF | |
138 |
|
138 | |||
139 | #endif |
|
139 | #endif | |
140 |
|
140 | |||
141 | Setup |
|
141 | Setup | |
142 | ----- |
|
142 | ----- | |
143 |
|
143 | |||
144 | create a repo with one root |
|
144 | create a repo with one root | |
145 |
|
145 | |||
146 | $ hg init server |
|
146 | $ hg init server | |
147 | $ cd server |
|
147 | $ cd server | |
148 | $ echo root > root |
|
148 | $ echo root > root | |
149 | $ hg ci -Am "C-ROOT" |
|
149 | $ hg ci -Am "C-ROOT" | |
150 | adding root |
|
150 | adding root | |
151 | $ cd .. |
|
151 | $ cd .. | |
152 |
|
152 | |||
153 | clone it in two clients |
|
153 | clone it in two clients | |
154 |
|
154 | |||
155 | $ hg clone ssh://user@dummy/server client-racy |
|
155 | $ hg clone ssh://user@dummy/server client-racy | |
156 | requesting all changes |
|
156 | requesting all changes | |
157 | adding changesets |
|
157 | adding changesets | |
158 | adding manifests |
|
158 | adding manifests | |
159 | adding file changes |
|
159 | adding file changes | |
160 | added 1 changesets with 1 changes to 1 files |
|
160 | added 1 changesets with 1 changes to 1 files | |
161 | new changesets 842e2fac6304 (1 drafts) |
|
161 | new changesets 842e2fac6304 (1 drafts) | |
162 | updating to branch default |
|
162 | updating to branch default | |
163 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
163 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
164 | $ hg clone ssh://user@dummy/server client-other |
|
164 | $ hg clone ssh://user@dummy/server client-other | |
165 | requesting all changes |
|
165 | requesting all changes | |
166 | adding changesets |
|
166 | adding changesets | |
167 | adding manifests |
|
167 | adding manifests | |
168 | adding file changes |
|
168 | adding file changes | |
169 | added 1 changesets with 1 changes to 1 files |
|
169 | added 1 changesets with 1 changes to 1 files | |
170 | new changesets 842e2fac6304 (1 drafts) |
|
170 | new changesets 842e2fac6304 (1 drafts) | |
171 | updating to branch default |
|
171 | updating to branch default | |
172 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
172 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
173 |
|
173 | |||
174 | setup one to allow race on push |
|
174 | setup one to allow race on push | |
175 |
|
175 | |||
176 | $ cat >> client-racy/.hg/hgrc << EOF |
|
176 | $ cat >> client-racy/.hg/hgrc << EOF | |
177 | > [extensions] |
|
177 | > [extensions] | |
178 | > delaypush = $TESTTMP/delaypush.py |
|
178 | > delaypush = $TESTTMP/delaypush.py | |
179 | > [delaypush] |
|
179 | > [delaypush] | |
180 | > ready-path = $TESTTMP/readyfile |
|
180 | > ready-path = $TESTTMP/readyfile | |
181 | > release-path = $TESTTMP/watchfile |
|
181 | > release-path = $TESTTMP/watchfile | |
182 | > EOF |
|
182 | > EOF | |
183 |
|
183 | |||
184 | Simple race, both try to push to the server at the same time |
|
184 | Simple race, both try to push to the server at the same time | |
185 | ------------------------------------------------------------ |
|
185 | ------------------------------------------------------------ | |
186 |
|
186 | |||
187 | Both try to replace the same head |
|
187 | Both try to replace the same head | |
188 |
|
188 | |||
189 | # a |
|
189 | # a | |
190 | # | b |
|
190 | # | b | |
191 | # |/ |
|
191 | # |/ | |
192 | # * |
|
192 | # * | |
193 |
|
193 | |||
194 | Creating changesets |
|
194 | Creating changesets | |
195 |
|
195 | |||
196 | $ echo b > client-other/a |
|
196 | $ echo b > client-other/a | |
197 | $ hg -R client-other/ add client-other/a |
|
197 | $ hg -R client-other/ add client-other/a | |
198 | $ hg -R client-other/ commit -m "C-A" |
|
198 | $ hg -R client-other/ commit -m "C-A" | |
199 | $ echo b > client-racy/b |
|
199 | $ echo b > client-racy/b | |
200 | $ hg -R client-racy/ add client-racy/b |
|
200 | $ hg -R client-racy/ add client-racy/b | |
201 | $ hg -R client-racy/ commit -m "C-B" |
|
201 | $ hg -R client-racy/ commit -m "C-B" | |
202 |
|
202 | |||
203 | Pushing |
|
203 | Pushing | |
204 |
|
204 | |||
205 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & |
|
205 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & | |
206 |
|
206 | |||
207 | $ waiton $TESTTMP/readyfile |
|
207 | $ waiton $TESTTMP/readyfile | |
208 |
|
208 | |||
209 | $ hg -R client-other push -r 'tip' |
|
209 | $ hg -R client-other push -r 'tip' | |
210 | pushing to ssh://user@dummy/server |
|
210 | pushing to ssh://user@dummy/server | |
211 | searching for changes |
|
211 | searching for changes | |
212 | remote: adding changesets |
|
212 | remote: adding changesets | |
213 | remote: adding manifests |
|
213 | remote: adding manifests | |
214 | remote: adding file changes |
|
214 | remote: adding file changes | |
215 | remote: added 1 changesets with 1 changes to 1 files |
|
215 | remote: added 1 changesets with 1 changes to 1 files | |
216 |
|
216 | |||
217 | $ release $TESTTMP/watchfile |
|
217 | $ release $TESTTMP/watchfile | |
218 |
|
218 | |||
219 | Check the result of the push |
|
219 | Check the result of the push | |
220 |
|
220 | |||
221 | $ cat ./push-log |
|
221 | $ cat ./push-log | |
222 | pushing to ssh://user@dummy/server |
|
222 | pushing to ssh://user@dummy/server | |
223 | searching for changes |
|
223 | searching for changes | |
224 | wrote ready: $TESTTMP/readyfile |
|
224 | wrote ready: $TESTTMP/readyfile | |
225 | waiting on: $TESTTMP/watchfile |
|
225 | waiting on: $TESTTMP/watchfile | |
226 | abort: push failed: |
|
226 | abort: push failed: | |
227 | 'remote repository changed while pushing - please try again' |
|
227 | 'remote repository changed while pushing - please try again' | |
228 |
|
228 | |||
229 | $ hg -R server graph |
|
229 | $ hg -R server graph | |
230 | o 98217d5a1659 C-A (default) |
|
230 | o 98217d5a1659 C-A (default) | |
231 | | |
|
231 | | | |
232 | @ 842e2fac6304 C-ROOT (default) |
|
232 | @ 842e2fac6304 C-ROOT (default) | |
233 |
|
233 | |||
234 |
|
234 | |||
235 | Pushing on two different heads |
|
235 | Pushing on two different heads | |
236 | ------------------------------ |
|
236 | ------------------------------ | |
237 |
|
237 | |||
238 | Both try to replace a different head |
|
238 | Both try to replace a different head | |
239 |
|
239 | |||
240 | # a b |
|
240 | # a b | |
241 | # | | |
|
241 | # | | | |
242 | # * * |
|
242 | # * * | |
243 | # |/ |
|
243 | # |/ | |
244 | # * |
|
244 | # * | |
245 |
|
245 | |||
246 | (resync-all) |
|
246 | (resync-all) | |
247 |
|
247 | |||
248 | $ hg -R ./server pull ./client-racy |
|
248 | $ hg -R ./server pull ./client-racy | |
249 | pulling from ./client-racy |
|
249 | pulling from ./client-racy | |
250 | searching for changes |
|
250 | searching for changes | |
251 | adding changesets |
|
251 | adding changesets | |
252 | adding manifests |
|
252 | adding manifests | |
253 | adding file changes |
|
253 | adding file changes | |
254 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
254 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
255 | new changesets a9149a1428e2 (1 drafts) |
|
255 | new changesets a9149a1428e2 (1 drafts) | |
256 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
256 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
257 | $ hg -R ./client-other pull |
|
257 | $ hg -R ./client-other pull | |
258 | pulling from ssh://user@dummy/server |
|
258 | pulling from ssh://user@dummy/server | |
259 | searching for changes |
|
259 | searching for changes | |
260 | adding changesets |
|
260 | adding changesets | |
261 | adding manifests |
|
261 | adding manifests | |
262 | adding file changes |
|
262 | adding file changes | |
263 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
263 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
264 | new changesets a9149a1428e2 (1 drafts) |
|
264 | new changesets a9149a1428e2 (1 drafts) | |
265 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
265 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
266 | $ hg -R ./client-racy pull |
|
266 | $ hg -R ./client-racy pull | |
267 | pulling from ssh://user@dummy/server |
|
267 | pulling from ssh://user@dummy/server | |
268 | searching for changes |
|
268 | searching for changes | |
269 | adding changesets |
|
269 | adding changesets | |
270 | adding manifests |
|
270 | adding manifests | |
271 | adding file changes |
|
271 | adding file changes | |
272 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
272 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
273 | new changesets 98217d5a1659 (1 drafts) |
|
273 | new changesets 98217d5a1659 (1 drafts) | |
274 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
274 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
275 |
|
275 | |||
276 | $ hg -R server graph |
|
276 | $ hg -R server graph | |
277 | o a9149a1428e2 C-B (default) |
|
277 | o a9149a1428e2 C-B (default) | |
278 | | |
|
278 | | | |
279 | | o 98217d5a1659 C-A (default) |
|
279 | | o 98217d5a1659 C-A (default) | |
280 | |/ |
|
280 | |/ | |
281 | @ 842e2fac6304 C-ROOT (default) |
|
281 | @ 842e2fac6304 C-ROOT (default) | |
282 |
|
282 | |||
283 |
|
283 | |||
284 | Creating changesets |
|
284 | Creating changesets | |
285 |
|
285 | |||
286 | $ echo aa >> client-other/a |
|
286 | $ echo aa >> client-other/a | |
287 | $ hg -R client-other/ commit -m "C-C" |
|
287 | $ hg -R client-other/ commit -m "C-C" | |
288 | $ echo bb >> client-racy/b |
|
288 | $ echo bb >> client-racy/b | |
289 | $ hg -R client-racy/ commit -m "C-D" |
|
289 | $ hg -R client-racy/ commit -m "C-D" | |
290 |
|
290 | |||
291 | Pushing |
|
291 | Pushing | |
292 |
|
292 | |||
293 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & |
|
293 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & | |
294 |
|
294 | |||
295 | $ waiton $TESTTMP/readyfile |
|
295 | $ waiton $TESTTMP/readyfile | |
296 |
|
296 | |||
297 | $ hg -R client-other push -r 'tip' |
|
297 | $ hg -R client-other push -r 'tip' | |
298 | pushing to ssh://user@dummy/server |
|
298 | pushing to ssh://user@dummy/server | |
299 | searching for changes |
|
299 | searching for changes | |
300 | remote: adding changesets |
|
300 | remote: adding changesets | |
301 | remote: adding manifests |
|
301 | remote: adding manifests | |
302 | remote: adding file changes |
|
302 | remote: adding file changes | |
303 | remote: added 1 changesets with 1 changes to 1 files |
|
303 | remote: added 1 changesets with 1 changes to 1 files | |
304 |
|
304 | |||
305 | $ release $TESTTMP/watchfile |
|
305 | $ release $TESTTMP/watchfile | |
306 |
|
306 | |||
307 | Check the result of the push |
|
307 | Check the result of the push | |
308 |
|
308 | |||
309 | #if strict |
|
309 | #if strict | |
310 | $ cat ./push-log |
|
310 | $ cat ./push-log | |
311 | pushing to ssh://user@dummy/server |
|
311 | pushing to ssh://user@dummy/server | |
312 | searching for changes |
|
312 | searching for changes | |
313 | wrote ready: $TESTTMP/readyfile |
|
313 | wrote ready: $TESTTMP/readyfile | |
314 | waiting on: $TESTTMP/watchfile |
|
314 | waiting on: $TESTTMP/watchfile | |
315 | abort: push failed: |
|
315 | abort: push failed: | |
316 | 'remote repository changed while pushing - please try again' |
|
316 | 'remote repository changed while pushing - please try again' | |
317 |
|
317 | |||
318 | $ hg -R server graph |
|
318 | $ hg -R server graph | |
319 | o 51c544a58128 C-C (default) |
|
319 | o 51c544a58128 C-C (default) | |
320 | | |
|
320 | | | |
321 | o 98217d5a1659 C-A (default) |
|
321 | o 98217d5a1659 C-A (default) | |
322 | | |
|
322 | | | |
323 | | o a9149a1428e2 C-B (default) |
|
323 | | o a9149a1428e2 C-B (default) | |
324 | |/ |
|
324 | |/ | |
325 | @ 842e2fac6304 C-ROOT (default) |
|
325 | @ 842e2fac6304 C-ROOT (default) | |
326 |
|
326 | |||
327 | #endif |
|
327 | #endif | |
328 | #if unrelated |
|
328 | #if unrelated | |
329 |
|
329 | |||
330 | (The two heads are unrelated, push should be allowed) |
|
330 | (The two heads are unrelated, push should be allowed) | |
331 |
|
331 | |||
332 | $ cat ./push-log |
|
332 | $ cat ./push-log | |
333 | pushing to ssh://user@dummy/server |
|
333 | pushing to ssh://user@dummy/server | |
334 | searching for changes |
|
334 | searching for changes | |
335 | wrote ready: $TESTTMP/readyfile |
|
335 | wrote ready: $TESTTMP/readyfile | |
336 | waiting on: $TESTTMP/watchfile |
|
336 | waiting on: $TESTTMP/watchfile | |
337 | remote: adding changesets |
|
337 | remote: adding changesets | |
338 | remote: adding manifests |
|
338 | remote: adding manifests | |
339 | remote: adding file changes |
|
339 | remote: adding file changes | |
340 | remote: added 1 changesets with 1 changes to 1 files |
|
340 | remote: added 1 changesets with 1 changes to 1 files | |
341 |
|
341 | |||
342 | $ hg -R server graph |
|
342 | $ hg -R server graph | |
343 | o 59e76faf78bd C-D (default) |
|
343 | o 59e76faf78bd C-D (default) | |
344 | | |
|
344 | | | |
345 | o a9149a1428e2 C-B (default) |
|
345 | o a9149a1428e2 C-B (default) | |
346 | | |
|
346 | | | |
347 | | o 51c544a58128 C-C (default) |
|
347 | | o 51c544a58128 C-C (default) | |
348 | | | |
|
348 | | | | |
349 | | o 98217d5a1659 C-A (default) |
|
349 | | o 98217d5a1659 C-A (default) | |
350 | |/ |
|
350 | |/ | |
351 | @ 842e2fac6304 C-ROOT (default) |
|
351 | @ 842e2fac6304 C-ROOT (default) | |
352 |
|
352 | |||
353 | #endif |
|
353 | #endif | |
354 |
|
354 | |||
355 | Pushing while someone creates a new head |
|
355 | Pushing while someone creates a new head | |
356 | ----------------------------------------- |
|
356 | ----------------------------------------- | |
357 |
|
357 | |||
358 | Pushing a new changeset while someone creates a new branch. |
|
358 | Pushing a new changeset while someone creates a new branch. | |
359 |
|
359 | |||
360 | # a (raced) |
|
360 | # a (raced) | |
361 | # | |
|
361 | # | | |
362 | # * b |
|
362 | # * b | |
363 | # |/ |
|
363 | # |/ | |
364 | # * |
|
364 | # * | |
365 |
|
365 | |||
366 | (resync-all) |
|
366 | (resync-all) | |
367 |
|
367 | |||
368 | #if strict |
|
368 | #if strict | |
369 |
|
369 | |||
370 | $ hg -R ./server pull ./client-racy |
|
370 | $ hg -R ./server pull ./client-racy | |
371 | pulling from ./client-racy |
|
371 | pulling from ./client-racy | |
372 | searching for changes |
|
372 | searching for changes | |
373 | adding changesets |
|
373 | adding changesets | |
374 | adding manifests |
|
374 | adding manifests | |
375 | adding file changes |
|
375 | adding file changes | |
376 | added 1 changesets with 1 changes to 1 files |
|
376 | added 1 changesets with 1 changes to 1 files | |
377 | new changesets 59e76faf78bd (1 drafts) |
|
377 | new changesets 59e76faf78bd (1 drafts) | |
378 | (run 'hg update' to get a working copy) |
|
378 | (run 'hg update' to get a working copy) | |
379 |
|
379 | |||
380 | #endif |
|
380 | #endif | |
381 | #if unrelated |
|
381 | #if unrelated | |
382 |
|
382 | |||
383 | $ hg -R ./server pull ./client-racy |
|
383 | $ hg -R ./server pull ./client-racy | |
384 | pulling from ./client-racy |
|
384 | pulling from ./client-racy | |
385 | searching for changes |
|
385 | searching for changes | |
386 | no changes found |
|
386 | no changes found | |
387 |
|
387 | |||
388 | #endif |
|
388 | #endif | |
389 |
|
389 | |||
390 | $ hg -R ./client-other pull |
|
390 | $ hg -R ./client-other pull | |
391 | pulling from ssh://user@dummy/server |
|
391 | pulling from ssh://user@dummy/server | |
392 | searching for changes |
|
392 | searching for changes | |
393 | adding changesets |
|
393 | adding changesets | |
394 | adding manifests |
|
394 | adding manifests | |
395 | adding file changes |
|
395 | adding file changes | |
396 | added 1 changesets with 1 changes to 1 files |
|
396 | added 1 changesets with 1 changes to 1 files | |
397 | new changesets 59e76faf78bd (1 drafts) |
|
397 | new changesets 59e76faf78bd (1 drafts) | |
398 | (run 'hg update' to get a working copy) |
|
398 | (run 'hg update' to get a working copy) | |
399 | $ hg -R ./client-racy pull |
|
399 | $ hg -R ./client-racy pull | |
400 | pulling from ssh://user@dummy/server |
|
400 | pulling from ssh://user@dummy/server | |
401 | searching for changes |
|
401 | searching for changes | |
402 | adding changesets |
|
402 | adding changesets | |
403 | adding manifests |
|
403 | adding manifests | |
404 | adding file changes |
|
404 | adding file changes | |
405 | added 1 changesets with 1 changes to 1 files |
|
405 | added 1 changesets with 1 changes to 1 files | |
406 | new changesets 51c544a58128 (1 drafts) |
|
406 | new changesets 51c544a58128 (1 drafts) | |
407 | (run 'hg update' to get a working copy) |
|
407 | (run 'hg update' to get a working copy) | |
408 |
|
408 | |||
409 | $ hg -R server graph |
|
409 | $ hg -R server graph | |
410 | o 59e76faf78bd C-D (default) |
|
410 | o 59e76faf78bd C-D (default) | |
411 | | |
|
411 | | | |
412 | o a9149a1428e2 C-B (default) |
|
412 | o a9149a1428e2 C-B (default) | |
413 | | |
|
413 | | | |
414 | | o 51c544a58128 C-C (default) |
|
414 | | o 51c544a58128 C-C (default) | |
415 | | | |
|
415 | | | | |
416 | | o 98217d5a1659 C-A (default) |
|
416 | | o 98217d5a1659 C-A (default) | |
417 | |/ |
|
417 | |/ | |
418 | @ 842e2fac6304 C-ROOT (default) |
|
418 | @ 842e2fac6304 C-ROOT (default) | |
419 |
|
419 | |||
420 |
|
420 | |||
421 | Creating changesets |
|
421 | Creating changesets | |
422 |
|
422 | |||
423 | (new head) |
|
423 | (new head) | |
424 |
|
424 | |||
425 | $ hg -R client-other/ up 'desc("C-A")' |
|
425 | $ hg -R client-other/ up 'desc("C-A")' | |
426 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
426 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
427 | $ echo aaa >> client-other/a |
|
427 | $ echo aaa >> client-other/a | |
428 | $ hg -R client-other/ commit -m "C-E" |
|
428 | $ hg -R client-other/ commit -m "C-E" | |
429 | created new head |
|
429 | created new head | |
430 |
|
430 | |||
431 | (children of existing head) |
|
431 | (children of existing head) | |
432 |
|
432 | |||
433 | $ hg -R client-racy/ up 'desc("C-C")' |
|
433 | $ hg -R client-racy/ up 'desc("C-C")' | |
434 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
434 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
435 | $ echo bbb >> client-racy/a |
|
435 | $ echo bbb >> client-racy/a | |
436 | $ hg -R client-racy/ commit -m "C-F" |
|
436 | $ hg -R client-racy/ commit -m "C-F" | |
437 |
|
437 | |||
438 | Pushing |
|
438 | Pushing | |
439 |
|
439 | |||
440 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & |
|
440 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & | |
441 |
|
441 | |||
442 | $ waiton $TESTTMP/readyfile |
|
442 | $ waiton $TESTTMP/readyfile | |
443 |
|
443 | |||
444 | $ hg -R client-other push -fr 'tip' |
|
444 | $ hg -R client-other push -fr 'tip' | |
445 | pushing to ssh://user@dummy/server |
|
445 | pushing to ssh://user@dummy/server | |
446 | searching for changes |
|
446 | searching for changes | |
447 | remote: adding changesets |
|
447 | remote: adding changesets | |
448 | remote: adding manifests |
|
448 | remote: adding manifests | |
449 | remote: adding file changes |
|
449 | remote: adding file changes | |
450 | remote: added 1 changesets with 1 changes to 1 files (+1 heads) |
|
450 | remote: added 1 changesets with 1 changes to 1 files (+1 heads) | |
451 |
|
451 | |||
452 | $ release $TESTTMP/watchfile |
|
452 | $ release $TESTTMP/watchfile | |
453 |
|
453 | |||
454 | Check the result of the push |
|
454 | Check the result of the push | |
455 |
|
455 | |||
456 | #if strict |
|
456 | #if strict | |
457 |
|
457 | |||
458 | $ cat ./push-log |
|
458 | $ cat ./push-log | |
459 | pushing to ssh://user@dummy/server |
|
459 | pushing to ssh://user@dummy/server | |
460 | searching for changes |
|
460 | searching for changes | |
461 | wrote ready: $TESTTMP/readyfile |
|
461 | wrote ready: $TESTTMP/readyfile | |
462 | waiting on: $TESTTMP/watchfile |
|
462 | waiting on: $TESTTMP/watchfile | |
463 | abort: push failed: |
|
463 | abort: push failed: | |
464 | 'remote repository changed while pushing - please try again' |
|
464 | 'remote repository changed while pushing - please try again' | |
465 |
|
465 | |||
466 | $ hg -R server graph |
|
466 | $ hg -R server graph | |
467 | o d603e2c0cdd7 C-E (default) |
|
467 | o d603e2c0cdd7 C-E (default) | |
468 | | |
|
468 | | | |
469 | | o 51c544a58128 C-C (default) |
|
469 | | o 51c544a58128 C-C (default) | |
470 | |/ |
|
470 | |/ | |
471 | o 98217d5a1659 C-A (default) |
|
471 | o 98217d5a1659 C-A (default) | |
472 | | |
|
472 | | | |
473 | | o 59e76faf78bd C-D (default) |
|
473 | | o 59e76faf78bd C-D (default) | |
474 | | | |
|
474 | | | | |
475 | | o a9149a1428e2 C-B (default) |
|
475 | | o a9149a1428e2 C-B (default) | |
476 | |/ |
|
476 | |/ | |
477 | @ 842e2fac6304 C-ROOT (default) |
|
477 | @ 842e2fac6304 C-ROOT (default) | |
478 |
|
478 | |||
479 |
|
479 | |||
480 | #endif |
|
480 | #endif | |
481 |
|
481 | |||
482 | #if unrelated |
|
482 | #if unrelated | |
483 |
|
483 | |||
484 | (The racing new head do not affect existing heads, push should go through) |
|
484 | (The racing new head do not affect existing heads, push should go through) | |
485 |
|
485 | |||
486 | $ cat ./push-log |
|
486 | $ cat ./push-log | |
487 | pushing to ssh://user@dummy/server |
|
487 | pushing to ssh://user@dummy/server | |
488 | searching for changes |
|
488 | searching for changes | |
489 | wrote ready: $TESTTMP/readyfile |
|
489 | wrote ready: $TESTTMP/readyfile | |
490 | waiting on: $TESTTMP/watchfile |
|
490 | waiting on: $TESTTMP/watchfile | |
491 | remote: adding changesets |
|
491 | remote: adding changesets | |
492 | remote: adding manifests |
|
492 | remote: adding manifests | |
493 | remote: adding file changes |
|
493 | remote: adding file changes | |
494 | remote: added 1 changesets with 1 changes to 1 files |
|
494 | remote: added 1 changesets with 1 changes to 1 files | |
495 |
|
495 | |||
496 | $ hg -R server graph |
|
496 | $ hg -R server graph | |
497 | o d9e379a8c432 C-F (default) |
|
497 | o d9e379a8c432 C-F (default) | |
498 | | |
|
498 | | | |
499 | o 51c544a58128 C-C (default) |
|
499 | o 51c544a58128 C-C (default) | |
500 | | |
|
500 | | | |
501 | | o d603e2c0cdd7 C-E (default) |
|
501 | | o d603e2c0cdd7 C-E (default) | |
502 | |/ |
|
502 | |/ | |
503 | o 98217d5a1659 C-A (default) |
|
503 | o 98217d5a1659 C-A (default) | |
504 | | |
|
504 | | | |
505 | | o 59e76faf78bd C-D (default) |
|
505 | | o 59e76faf78bd C-D (default) | |
506 | | | |
|
506 | | | | |
507 | | o a9149a1428e2 C-B (default) |
|
507 | | o a9149a1428e2 C-B (default) | |
508 | |/ |
|
508 | |/ | |
509 | @ 842e2fac6304 C-ROOT (default) |
|
509 | @ 842e2fac6304 C-ROOT (default) | |
510 |
|
510 | |||
511 | #endif |
|
511 | #endif | |
512 |
|
512 | |||
513 | Pushing touching different named branch (same topo): new branch raced |
|
513 | Pushing touching different named branch (same topo): new branch raced | |
514 | --------------------------------------------------------------------- |
|
514 | --------------------------------------------------------------------- | |
515 |
|
515 | |||
516 | Pushing two children on the same head, one is a different named branch |
|
516 | Pushing two children on the same head, one is a different named branch | |
517 |
|
517 | |||
518 | # a (raced, branch-a) |
|
518 | # a (raced, branch-a) | |
519 | # | |
|
519 | # | | |
520 | # | b (default branch) |
|
520 | # | b (default branch) | |
521 | # |/ |
|
521 | # |/ | |
522 | # * |
|
522 | # * | |
523 |
|
523 | |||
524 | (resync-all) |
|
524 | (resync-all) | |
525 |
|
525 | |||
526 | #if strict |
|
526 | #if strict | |
527 |
|
527 | |||
528 | $ hg -R ./server pull ./client-racy |
|
528 | $ hg -R ./server pull ./client-racy | |
529 | pulling from ./client-racy |
|
529 | pulling from ./client-racy | |
530 | searching for changes |
|
530 | searching for changes | |
531 | adding changesets |
|
531 | adding changesets | |
532 | adding manifests |
|
532 | adding manifests | |
533 | adding file changes |
|
533 | adding file changes | |
534 | added 1 changesets with 1 changes to 1 files |
|
534 | added 1 changesets with 1 changes to 1 files | |
535 | new changesets d9e379a8c432 (1 drafts) |
|
535 | new changesets d9e379a8c432 (1 drafts) | |
536 | (run 'hg update' to get a working copy) |
|
536 | (run 'hg update' to get a working copy) | |
537 |
|
537 | |||
538 | #endif |
|
538 | #endif | |
539 | #if unrelated |
|
539 | #if unrelated | |
540 |
|
540 | |||
541 | $ hg -R ./server pull ./client-racy |
|
541 | $ hg -R ./server pull ./client-racy | |
542 | pulling from ./client-racy |
|
542 | pulling from ./client-racy | |
543 | searching for changes |
|
543 | searching for changes | |
544 | no changes found |
|
544 | no changes found | |
545 |
|
545 | |||
546 | #endif |
|
546 | #endif | |
547 |
|
547 | |||
548 | $ hg -R ./client-other pull |
|
548 | $ hg -R ./client-other pull | |
549 | pulling from ssh://user@dummy/server |
|
549 | pulling from ssh://user@dummy/server | |
550 | searching for changes |
|
550 | searching for changes | |
551 | adding changesets |
|
551 | adding changesets | |
552 | adding manifests |
|
552 | adding manifests | |
553 | adding file changes |
|
553 | adding file changes | |
554 | added 1 changesets with 1 changes to 1 files |
|
554 | added 1 changesets with 1 changes to 1 files | |
555 | new changesets d9e379a8c432 (1 drafts) |
|
555 | new changesets d9e379a8c432 (1 drafts) | |
556 | (run 'hg update' to get a working copy) |
|
556 | (run 'hg update' to get a working copy) | |
557 | $ hg -R ./client-racy pull |
|
557 | $ hg -R ./client-racy pull | |
558 | pulling from ssh://user@dummy/server |
|
558 | pulling from ssh://user@dummy/server | |
559 | searching for changes |
|
559 | searching for changes | |
560 | adding changesets |
|
560 | adding changesets | |
561 | adding manifests |
|
561 | adding manifests | |
562 | adding file changes |
|
562 | adding file changes | |
563 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
563 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
564 | new changesets d603e2c0cdd7 (1 drafts) |
|
564 | new changesets d603e2c0cdd7 (1 drafts) | |
565 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
565 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
566 |
|
566 | |||
567 | $ hg -R server graph |
|
567 | $ hg -R server graph | |
568 | o d9e379a8c432 C-F (default) |
|
568 | o d9e379a8c432 C-F (default) | |
569 | | |
|
569 | | | |
570 | o 51c544a58128 C-C (default) |
|
570 | o 51c544a58128 C-C (default) | |
571 | | |
|
571 | | | |
572 | | o d603e2c0cdd7 C-E (default) |
|
572 | | o d603e2c0cdd7 C-E (default) | |
573 | |/ |
|
573 | |/ | |
574 | o 98217d5a1659 C-A (default) |
|
574 | o 98217d5a1659 C-A (default) | |
575 | | |
|
575 | | | |
576 | | o 59e76faf78bd C-D (default) |
|
576 | | o 59e76faf78bd C-D (default) | |
577 | | | |
|
577 | | | | |
578 | | o a9149a1428e2 C-B (default) |
|
578 | | o a9149a1428e2 C-B (default) | |
579 | |/ |
|
579 | |/ | |
580 | @ 842e2fac6304 C-ROOT (default) |
|
580 | @ 842e2fac6304 C-ROOT (default) | |
581 |
|
581 | |||
582 |
|
582 | |||
583 | Creating changesets |
|
583 | Creating changesets | |
584 |
|
584 | |||
585 | (update existing head) |
|
585 | (update existing head) | |
586 |
|
586 | |||
587 | $ hg -R client-other/ up 'desc("C-F")' |
|
587 | $ hg -R client-other/ up 'desc("C-F")' | |
588 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
588 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
589 | $ echo aaa >> client-other/a |
|
589 | $ echo aaa >> client-other/a | |
590 | $ hg -R client-other/ commit -m "C-G" |
|
590 | $ hg -R client-other/ commit -m "C-G" | |
591 |
|
591 | |||
592 | (new named branch from that existing head) |
|
592 | (new named branch from that existing head) | |
593 |
|
593 | |||
594 | $ hg -R client-racy/ up 'desc("C-F")' |
|
594 | $ hg -R client-racy/ up 'desc("C-F")' | |
595 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
595 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
596 | $ echo bbb >> client-racy/a |
|
596 | $ echo bbb >> client-racy/a | |
597 | $ hg -R client-racy/ branch my-first-test-branch |
|
597 | $ hg -R client-racy/ branch my-first-test-branch | |
598 | marked working directory as branch my-first-test-branch |
|
598 | marked working directory as branch my-first-test-branch | |
599 | (branches are permanent and global, did you want a bookmark?) |
|
599 | (branches are permanent and global, did you want a bookmark?) | |
600 | $ hg -R client-racy/ commit -m "C-H" |
|
600 | $ hg -R client-racy/ commit -m "C-H" | |
601 |
|
601 | |||
602 | Pushing |
|
602 | Pushing | |
603 |
|
603 | |||
604 | $ hg -R client-racy push -r 'tip' --new-branch > ./push-log 2>&1 & |
|
604 | $ hg -R client-racy push -r 'tip' --new-branch > ./push-log 2>&1 & | |
605 |
|
605 | |||
606 | $ waiton $TESTTMP/readyfile |
|
606 | $ waiton $TESTTMP/readyfile | |
607 |
|
607 | |||
608 | $ hg -R client-other push -fr 'tip' |
|
608 | $ hg -R client-other push -fr 'tip' | |
609 | pushing to ssh://user@dummy/server |
|
609 | pushing to ssh://user@dummy/server | |
610 | searching for changes |
|
610 | searching for changes | |
611 | remote: adding changesets |
|
611 | remote: adding changesets | |
612 | remote: adding manifests |
|
612 | remote: adding manifests | |
613 | remote: adding file changes |
|
613 | remote: adding file changes | |
614 | remote: added 1 changesets with 1 changes to 1 files |
|
614 | remote: added 1 changesets with 1 changes to 1 files | |
615 |
|
615 | |||
616 | $ release $TESTTMP/watchfile |
|
616 | $ release $TESTTMP/watchfile | |
617 |
|
617 | |||
618 | Check the result of the push |
|
618 | Check the result of the push | |
619 |
|
619 | |||
620 | #if strict |
|
620 | #if strict | |
621 | $ cat ./push-log |
|
621 | $ cat ./push-log | |
622 | pushing to ssh://user@dummy/server |
|
622 | pushing to ssh://user@dummy/server | |
623 | searching for changes |
|
623 | searching for changes | |
624 | wrote ready: $TESTTMP/readyfile |
|
624 | wrote ready: $TESTTMP/readyfile | |
625 | waiting on: $TESTTMP/watchfile |
|
625 | waiting on: $TESTTMP/watchfile | |
626 | abort: push failed: |
|
626 | abort: push failed: | |
627 | 'remote repository changed while pushing - please try again' |
|
627 | 'remote repository changed while pushing - please try again' | |
628 |
|
628 | |||
629 | $ hg -R server graph |
|
629 | $ hg -R server graph | |
630 | o 75d69cba5402 C-G (default) |
|
630 | o 75d69cba5402 C-G (default) | |
631 | | |
|
631 | | | |
632 | o d9e379a8c432 C-F (default) |
|
632 | o d9e379a8c432 C-F (default) | |
633 | | |
|
633 | | | |
634 | o 51c544a58128 C-C (default) |
|
634 | o 51c544a58128 C-C (default) | |
635 | | |
|
635 | | | |
636 | | o d603e2c0cdd7 C-E (default) |
|
636 | | o d603e2c0cdd7 C-E (default) | |
637 | |/ |
|
637 | |/ | |
638 | o 98217d5a1659 C-A (default) |
|
638 | o 98217d5a1659 C-A (default) | |
639 | | |
|
639 | | | |
640 | | o 59e76faf78bd C-D (default) |
|
640 | | o 59e76faf78bd C-D (default) | |
641 | | | |
|
641 | | | | |
642 | | o a9149a1428e2 C-B (default) |
|
642 | | o a9149a1428e2 C-B (default) | |
643 | |/ |
|
643 | |/ | |
644 | @ 842e2fac6304 C-ROOT (default) |
|
644 | @ 842e2fac6304 C-ROOT (default) | |
645 |
|
645 | |||
646 | #endif |
|
646 | #endif | |
647 | #if unrelated |
|
647 | #if unrelated | |
648 |
|
648 | |||
649 | (unrelated named branches are unrelated) |
|
649 | (unrelated named branches are unrelated) | |
650 |
|
650 | |||
651 | $ cat ./push-log |
|
651 | $ cat ./push-log | |
652 | pushing to ssh://user@dummy/server |
|
652 | pushing to ssh://user@dummy/server | |
653 | searching for changes |
|
653 | searching for changes | |
654 | wrote ready: $TESTTMP/readyfile |
|
654 | wrote ready: $TESTTMP/readyfile | |
655 | waiting on: $TESTTMP/watchfile |
|
655 | waiting on: $TESTTMP/watchfile | |
656 | remote: adding changesets |
|
656 | remote: adding changesets | |
657 | remote: adding manifests |
|
657 | remote: adding manifests | |
658 | remote: adding file changes |
|
658 | remote: adding file changes | |
659 | remote: added 1 changesets with 1 changes to 1 files (+1 heads) |
|
659 | remote: added 1 changesets with 1 changes to 1 files (+1 heads) | |
660 |
|
660 | |||
661 | $ hg -R server graph |
|
661 | $ hg -R server graph | |
662 | o 833be552cfe6 C-H (my-first-test-branch) |
|
662 | o 833be552cfe6 C-H (my-first-test-branch) | |
663 | | |
|
663 | | | |
664 | | o 75d69cba5402 C-G (default) |
|
664 | | o 75d69cba5402 C-G (default) | |
665 | |/ |
|
665 | |/ | |
666 | o d9e379a8c432 C-F (default) |
|
666 | o d9e379a8c432 C-F (default) | |
667 | | |
|
667 | | | |
668 | o 51c544a58128 C-C (default) |
|
668 | o 51c544a58128 C-C (default) | |
669 | | |
|
669 | | | |
670 | | o d603e2c0cdd7 C-E (default) |
|
670 | | o d603e2c0cdd7 C-E (default) | |
671 | |/ |
|
671 | |/ | |
672 | o 98217d5a1659 C-A (default) |
|
672 | o 98217d5a1659 C-A (default) | |
673 | | |
|
673 | | | |
674 | | o 59e76faf78bd C-D (default) |
|
674 | | o 59e76faf78bd C-D (default) | |
675 | | | |
|
675 | | | | |
676 | | o a9149a1428e2 C-B (default) |
|
676 | | o a9149a1428e2 C-B (default) | |
677 | |/ |
|
677 | |/ | |
678 | @ 842e2fac6304 C-ROOT (default) |
|
678 | @ 842e2fac6304 C-ROOT (default) | |
679 |
|
679 | |||
680 | #endif |
|
680 | #endif | |
681 |
|
681 | |||
682 | The racing new head do not affect existing heads, push should go through |
|
682 | The racing new head do not affect existing heads, push should go through | |
683 |
|
683 | |||
684 | pushing touching different named branch (same topo): old branch raced |
|
684 | pushing touching different named branch (same topo): old branch raced | |
685 | --------------------------------------------------------------------- |
|
685 | --------------------------------------------------------------------- | |
686 |
|
686 | |||
687 | Pushing two children on the same head, one is a different named branch |
|
687 | Pushing two children on the same head, one is a different named branch | |
688 |
|
688 | |||
689 | # a (raced, default-branch) |
|
689 | # a (raced, default-branch) | |
690 | # | |
|
690 | # | | |
691 | # | b (new branch) |
|
691 | # | b (new branch) | |
692 | # |/ |
|
692 | # |/ | |
693 | # * (default-branch) |
|
693 | # * (default-branch) | |
694 |
|
694 | |||
695 | (resync-all) |
|
695 | (resync-all) | |
696 |
|
696 | |||
697 | #if strict |
|
697 | #if strict | |
698 |
|
698 | |||
699 | $ hg -R ./server pull ./client-racy |
|
699 | $ hg -R ./server pull ./client-racy | |
700 | pulling from ./client-racy |
|
700 | pulling from ./client-racy | |
701 | searching for changes |
|
701 | searching for changes | |
702 | adding changesets |
|
702 | adding changesets | |
703 | adding manifests |
|
703 | adding manifests | |
704 | adding file changes |
|
704 | adding file changes | |
705 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
705 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
706 | new changesets 833be552cfe6 (1 drafts) |
|
706 | new changesets 833be552cfe6 (1 drafts) | |
707 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
707 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
708 |
|
708 | |||
709 | #endif |
|
709 | #endif | |
710 | #if unrelated |
|
710 | #if unrelated | |
711 |
|
711 | |||
712 | $ hg -R ./server pull ./client-racy |
|
712 | $ hg -R ./server pull ./client-racy | |
713 | pulling from ./client-racy |
|
713 | pulling from ./client-racy | |
714 | searching for changes |
|
714 | searching for changes | |
715 | no changes found |
|
715 | no changes found | |
716 |
|
716 | |||
717 | #endif |
|
717 | #endif | |
718 |
|
718 | |||
719 | $ hg -R ./client-other pull |
|
719 | $ hg -R ./client-other pull | |
720 | pulling from ssh://user@dummy/server |
|
720 | pulling from ssh://user@dummy/server | |
721 | searching for changes |
|
721 | searching for changes | |
722 | adding changesets |
|
722 | adding changesets | |
723 | adding manifests |
|
723 | adding manifests | |
724 | adding file changes |
|
724 | adding file changes | |
725 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
725 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
726 | new changesets 833be552cfe6 (1 drafts) |
|
726 | new changesets 833be552cfe6 (1 drafts) | |
727 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
727 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
728 | $ hg -R ./client-racy pull |
|
728 | $ hg -R ./client-racy pull | |
729 | pulling from ssh://user@dummy/server |
|
729 | pulling from ssh://user@dummy/server | |
730 | searching for changes |
|
730 | searching for changes | |
731 | adding changesets |
|
731 | adding changesets | |
732 | adding manifests |
|
732 | adding manifests | |
733 | adding file changes |
|
733 | adding file changes | |
734 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
734 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
735 | new changesets 75d69cba5402 (1 drafts) |
|
735 | new changesets 75d69cba5402 (1 drafts) | |
736 | (run 'hg heads' to see heads) |
|
736 | (run 'hg heads' to see heads) | |
737 |
|
737 | |||
738 | $ hg -R server graph |
|
738 | $ hg -R server graph | |
739 | o 833be552cfe6 C-H (my-first-test-branch) |
|
739 | o 833be552cfe6 C-H (my-first-test-branch) | |
740 | | |
|
740 | | | |
741 | | o 75d69cba5402 C-G (default) |
|
741 | | o 75d69cba5402 C-G (default) | |
742 | |/ |
|
742 | |/ | |
743 | o d9e379a8c432 C-F (default) |
|
743 | o d9e379a8c432 C-F (default) | |
744 | | |
|
744 | | | |
745 | o 51c544a58128 C-C (default) |
|
745 | o 51c544a58128 C-C (default) | |
746 | | |
|
746 | | | |
747 | | o d603e2c0cdd7 C-E (default) |
|
747 | | o d603e2c0cdd7 C-E (default) | |
748 | |/ |
|
748 | |/ | |
749 | o 98217d5a1659 C-A (default) |
|
749 | o 98217d5a1659 C-A (default) | |
750 | | |
|
750 | | | |
751 | | o 59e76faf78bd C-D (default) |
|
751 | | o 59e76faf78bd C-D (default) | |
752 | | | |
|
752 | | | | |
753 | | o a9149a1428e2 C-B (default) |
|
753 | | o a9149a1428e2 C-B (default) | |
754 | |/ |
|
754 | |/ | |
755 | @ 842e2fac6304 C-ROOT (default) |
|
755 | @ 842e2fac6304 C-ROOT (default) | |
756 |
|
756 | |||
757 |
|
757 | |||
758 | Creating changesets |
|
758 | Creating changesets | |
759 |
|
759 | |||
760 | (new named branch from one head) |
|
760 | (new named branch from one head) | |
761 |
|
761 | |||
762 | $ hg -R client-other/ up 'desc("C-G")' |
|
762 | $ hg -R client-other/ up 'desc("C-G")' | |
763 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
763 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
764 | $ echo aaa >> client-other/a |
|
764 | $ echo aaa >> client-other/a | |
765 | $ hg -R client-other/ branch my-second-test-branch |
|
765 | $ hg -R client-other/ branch my-second-test-branch | |
766 | marked working directory as branch my-second-test-branch |
|
766 | marked working directory as branch my-second-test-branch | |
767 | $ hg -R client-other/ commit -m "C-I" |
|
767 | $ hg -R client-other/ commit -m "C-I" | |
768 |
|
768 | |||
769 | (children "updating" that same head) |
|
769 | (children "updating" that same head) | |
770 |
|
770 | |||
771 | $ hg -R client-racy/ up 'desc("C-G")' |
|
771 | $ hg -R client-racy/ up 'desc("C-G")' | |
772 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
772 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
773 | $ echo bbb >> client-racy/a |
|
773 | $ echo bbb >> client-racy/a | |
774 | $ hg -R client-racy/ commit -m "C-J" |
|
774 | $ hg -R client-racy/ commit -m "C-J" | |
775 |
|
775 | |||
776 | Pushing |
|
776 | Pushing | |
777 |
|
777 | |||
778 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & |
|
778 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & | |
779 |
|
779 | |||
780 | $ waiton $TESTTMP/readyfile |
|
780 | $ waiton $TESTTMP/readyfile | |
781 |
|
781 | |||
782 | $ hg -R client-other push -fr 'tip' --new-branch |
|
782 | $ hg -R client-other push -fr 'tip' --new-branch | |
783 | pushing to ssh://user@dummy/server |
|
783 | pushing to ssh://user@dummy/server | |
784 | searching for changes |
|
784 | searching for changes | |
785 | remote: adding changesets |
|
785 | remote: adding changesets | |
786 | remote: adding manifests |
|
786 | remote: adding manifests | |
787 | remote: adding file changes |
|
787 | remote: adding file changes | |
788 | remote: added 1 changesets with 1 changes to 1 files |
|
788 | remote: added 1 changesets with 1 changes to 1 files | |
789 |
|
789 | |||
790 | $ release $TESTTMP/watchfile |
|
790 | $ release $TESTTMP/watchfile | |
791 |
|
791 | |||
792 | Check the result of the push |
|
792 | Check the result of the push | |
793 |
|
793 | |||
794 | #if strict |
|
794 | #if strict | |
795 |
|
795 | |||
796 | $ cat ./push-log |
|
796 | $ cat ./push-log | |
797 | pushing to ssh://user@dummy/server |
|
797 | pushing to ssh://user@dummy/server | |
798 | searching for changes |
|
798 | searching for changes | |
799 | wrote ready: $TESTTMP/readyfile |
|
799 | wrote ready: $TESTTMP/readyfile | |
800 | waiting on: $TESTTMP/watchfile |
|
800 | waiting on: $TESTTMP/watchfile | |
801 | abort: push failed: |
|
801 | abort: push failed: | |
802 | 'remote repository changed while pushing - please try again' |
|
802 | 'remote repository changed while pushing - please try again' | |
803 |
|
803 | |||
804 | $ hg -R server graph |
|
804 | $ hg -R server graph | |
805 | o b35ed749f288 C-I (my-second-test-branch) |
|
805 | o b35ed749f288 C-I (my-second-test-branch) | |
806 | | |
|
806 | | | |
807 | o 75d69cba5402 C-G (default) |
|
807 | o 75d69cba5402 C-G (default) | |
808 | | |
|
808 | | | |
809 | | o 833be552cfe6 C-H (my-first-test-branch) |
|
809 | | o 833be552cfe6 C-H (my-first-test-branch) | |
810 | |/ |
|
810 | |/ | |
811 | o d9e379a8c432 C-F (default) |
|
811 | o d9e379a8c432 C-F (default) | |
812 | | |
|
812 | | | |
813 | o 51c544a58128 C-C (default) |
|
813 | o 51c544a58128 C-C (default) | |
814 | | |
|
814 | | | |
815 | | o d603e2c0cdd7 C-E (default) |
|
815 | | o d603e2c0cdd7 C-E (default) | |
816 | |/ |
|
816 | |/ | |
817 | o 98217d5a1659 C-A (default) |
|
817 | o 98217d5a1659 C-A (default) | |
818 | | |
|
818 | | | |
819 | | o 59e76faf78bd C-D (default) |
|
819 | | o 59e76faf78bd C-D (default) | |
820 | | | |
|
820 | | | | |
821 | | o a9149a1428e2 C-B (default) |
|
821 | | o a9149a1428e2 C-B (default) | |
822 | |/ |
|
822 | |/ | |
823 | @ 842e2fac6304 C-ROOT (default) |
|
823 | @ 842e2fac6304 C-ROOT (default) | |
824 |
|
824 | |||
825 |
|
825 | |||
826 | #endif |
|
826 | #endif | |
827 |
|
827 | |||
828 | #if unrelated |
|
828 | #if unrelated | |
829 |
|
829 | |||
830 | (unrelated named branches are unrelated) |
|
830 | (unrelated named branches are unrelated) | |
831 |
|
831 | |||
832 | $ cat ./push-log |
|
832 | $ cat ./push-log | |
833 | pushing to ssh://user@dummy/server |
|
833 | pushing to ssh://user@dummy/server | |
834 | searching for changes |
|
834 | searching for changes | |
835 | wrote ready: $TESTTMP/readyfile |
|
835 | wrote ready: $TESTTMP/readyfile | |
836 | waiting on: $TESTTMP/watchfile |
|
836 | waiting on: $TESTTMP/watchfile | |
837 | remote: adding changesets |
|
837 | remote: adding changesets | |
838 | remote: adding manifests |
|
838 | remote: adding manifests | |
839 | remote: adding file changes |
|
839 | remote: adding file changes | |
840 | remote: added 1 changesets with 1 changes to 1 files (+1 heads) |
|
840 | remote: added 1 changesets with 1 changes to 1 files (+1 heads) | |
841 |
|
841 | |||
842 | $ hg -R server graph |
|
842 | $ hg -R server graph | |
843 | o 89420bf00fae C-J (default) |
|
843 | o 89420bf00fae C-J (default) | |
844 | | |
|
844 | | | |
845 | | o b35ed749f288 C-I (my-second-test-branch) |
|
845 | | o b35ed749f288 C-I (my-second-test-branch) | |
846 | |/ |
|
846 | |/ | |
847 | o 75d69cba5402 C-G (default) |
|
847 | o 75d69cba5402 C-G (default) | |
848 | | |
|
848 | | | |
849 | | o 833be552cfe6 C-H (my-first-test-branch) |
|
849 | | o 833be552cfe6 C-H (my-first-test-branch) | |
850 | |/ |
|
850 | |/ | |
851 | o d9e379a8c432 C-F (default) |
|
851 | o d9e379a8c432 C-F (default) | |
852 | | |
|
852 | | | |
853 | o 51c544a58128 C-C (default) |
|
853 | o 51c544a58128 C-C (default) | |
854 | | |
|
854 | | | |
855 | | o d603e2c0cdd7 C-E (default) |
|
855 | | o d603e2c0cdd7 C-E (default) | |
856 | |/ |
|
856 | |/ | |
857 | o 98217d5a1659 C-A (default) |
|
857 | o 98217d5a1659 C-A (default) | |
858 | | |
|
858 | | | |
859 | | o 59e76faf78bd C-D (default) |
|
859 | | o 59e76faf78bd C-D (default) | |
860 | | | |
|
860 | | | | |
861 | | o a9149a1428e2 C-B (default) |
|
861 | | o a9149a1428e2 C-B (default) | |
862 | |/ |
|
862 | |/ | |
863 | @ 842e2fac6304 C-ROOT (default) |
|
863 | @ 842e2fac6304 C-ROOT (default) | |
864 |
|
864 | |||
865 |
|
865 | |||
866 | #endif |
|
866 | #endif | |
867 |
|
867 | |||
868 | pushing racing push touch multiple heads |
|
868 | pushing racing push touch multiple heads | |
869 | ---------------------------------------- |
|
869 | ---------------------------------------- | |
870 |
|
870 | |||
871 | There are multiple heads, but the racing push touch all of them |
|
871 | There are multiple heads, but the racing push touch all of them | |
872 |
|
872 | |||
873 | # a (raced) |
|
873 | # a (raced) | |
874 | # | b |
|
874 | # | b | |
875 | # |/| |
|
875 | # |/| | |
876 | # * * |
|
876 | # * * | |
877 | # |/ |
|
877 | # |/ | |
878 | # * |
|
878 | # * | |
879 |
|
879 | |||
880 | (resync-all) |
|
880 | (resync-all) | |
881 |
|
881 | |||
882 | #if strict |
|
882 | #if strict | |
883 |
|
883 | |||
884 | $ hg -R ./server pull ./client-racy |
|
884 | $ hg -R ./server pull ./client-racy | |
885 | pulling from ./client-racy |
|
885 | pulling from ./client-racy | |
886 | searching for changes |
|
886 | searching for changes | |
887 | adding changesets |
|
887 | adding changesets | |
888 | adding manifests |
|
888 | adding manifests | |
889 | adding file changes |
|
889 | adding file changes | |
890 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
890 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
891 | new changesets 89420bf00fae (1 drafts) |
|
891 | new changesets 89420bf00fae (1 drafts) | |
892 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
892 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
893 |
|
893 | |||
894 | #endif |
|
894 | #endif | |
895 |
|
895 | |||
896 | #if unrelated |
|
896 | #if unrelated | |
897 |
|
897 | |||
898 | $ hg -R ./server pull ./client-racy |
|
898 | $ hg -R ./server pull ./client-racy | |
899 | pulling from ./client-racy |
|
899 | pulling from ./client-racy | |
900 | searching for changes |
|
900 | searching for changes | |
901 | no changes found |
|
901 | no changes found | |
902 |
|
902 | |||
903 | #endif |
|
903 | #endif | |
904 |
|
904 | |||
905 | $ hg -R ./client-other pull |
|
905 | $ hg -R ./client-other pull | |
906 | pulling from ssh://user@dummy/server |
|
906 | pulling from ssh://user@dummy/server | |
907 | searching for changes |
|
907 | searching for changes | |
908 | adding changesets |
|
908 | adding changesets | |
909 | adding manifests |
|
909 | adding manifests | |
910 | adding file changes |
|
910 | adding file changes | |
911 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
911 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
912 | new changesets 89420bf00fae (1 drafts) |
|
912 | new changesets 89420bf00fae (1 drafts) | |
913 | (run 'hg heads' to see heads) |
|
913 | (run 'hg heads' to see heads) | |
914 | $ hg -R ./client-racy pull |
|
914 | $ hg -R ./client-racy pull | |
915 | pulling from ssh://user@dummy/server |
|
915 | pulling from ssh://user@dummy/server | |
916 | searching for changes |
|
916 | searching for changes | |
917 | adding changesets |
|
917 | adding changesets | |
918 | adding manifests |
|
918 | adding manifests | |
919 | adding file changes |
|
919 | adding file changes | |
920 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
920 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
921 | new changesets b35ed749f288 (1 drafts) |
|
921 | new changesets b35ed749f288 (1 drafts) | |
922 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
922 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
923 |
|
923 | |||
924 | $ hg -R server graph |
|
924 | $ hg -R server graph | |
925 | o 89420bf00fae C-J (default) |
|
925 | o 89420bf00fae C-J (default) | |
926 | | |
|
926 | | | |
927 | | o b35ed749f288 C-I (my-second-test-branch) |
|
927 | | o b35ed749f288 C-I (my-second-test-branch) | |
928 | |/ |
|
928 | |/ | |
929 | o 75d69cba5402 C-G (default) |
|
929 | o 75d69cba5402 C-G (default) | |
930 | | |
|
930 | | | |
931 | | o 833be552cfe6 C-H (my-first-test-branch) |
|
931 | | o 833be552cfe6 C-H (my-first-test-branch) | |
932 | |/ |
|
932 | |/ | |
933 | o d9e379a8c432 C-F (default) |
|
933 | o d9e379a8c432 C-F (default) | |
934 | | |
|
934 | | | |
935 | o 51c544a58128 C-C (default) |
|
935 | o 51c544a58128 C-C (default) | |
936 | | |
|
936 | | | |
937 | | o d603e2c0cdd7 C-E (default) |
|
937 | | o d603e2c0cdd7 C-E (default) | |
938 | |/ |
|
938 | |/ | |
939 | o 98217d5a1659 C-A (default) |
|
939 | o 98217d5a1659 C-A (default) | |
940 | | |
|
940 | | | |
941 | | o 59e76faf78bd C-D (default) |
|
941 | | o 59e76faf78bd C-D (default) | |
942 | | | |
|
942 | | | | |
943 | | o a9149a1428e2 C-B (default) |
|
943 | | o a9149a1428e2 C-B (default) | |
944 | |/ |
|
944 | |/ | |
945 | @ 842e2fac6304 C-ROOT (default) |
|
945 | @ 842e2fac6304 C-ROOT (default) | |
946 |
|
946 | |||
947 |
|
947 | |||
948 | Creating changesets |
|
948 | Creating changesets | |
949 |
|
949 | |||
950 | (merges heads) |
|
950 | (merges heads) | |
951 |
|
951 | |||
952 | $ hg -R client-other/ up 'desc("C-E")' |
|
952 | $ hg -R client-other/ up 'desc("C-E")' | |
953 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
953 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
954 | $ hg -R client-other/ merge 'desc("C-D")' |
|
954 | $ hg -R client-other/ merge 'desc("C-D")' | |
955 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
955 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
956 | (branch merge, don't forget to commit) |
|
956 | (branch merge, don't forget to commit) | |
957 | $ hg -R client-other/ commit -m "C-K" |
|
957 | $ hg -R client-other/ commit -m "C-K" | |
958 |
|
958 | |||
959 | (update one head) |
|
959 | (update one head) | |
960 |
|
960 | |||
961 | $ hg -R client-racy/ up 'desc("C-D")' |
|
961 | $ hg -R client-racy/ up 'desc("C-D")' | |
962 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
962 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
963 | $ echo bbb >> client-racy/b |
|
963 | $ echo bbb >> client-racy/b | |
964 | $ hg -R client-racy/ commit -m "C-L" |
|
964 | $ hg -R client-racy/ commit -m "C-L" | |
965 |
|
965 | |||
966 | Pushing |
|
966 | Pushing | |
967 |
|
967 | |||
968 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & |
|
968 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & | |
969 |
|
969 | |||
970 | $ waiton $TESTTMP/readyfile |
|
970 | $ waiton $TESTTMP/readyfile | |
971 |
|
971 | |||
972 | $ hg -R client-other push -fr 'tip' --new-branch |
|
972 | $ hg -R client-other push -fr 'tip' --new-branch | |
973 | pushing to ssh://user@dummy/server |
|
973 | pushing to ssh://user@dummy/server | |
974 | searching for changes |
|
974 | searching for changes | |
975 | remote: adding changesets |
|
975 | remote: adding changesets | |
976 | remote: adding manifests |
|
976 | remote: adding manifests | |
977 | remote: adding file changes |
|
977 | remote: adding file changes | |
978 | remote: added 1 changesets with 0 changes to 0 files (-1 heads) |
|
978 | remote: added 1 changesets with 0 changes to 0 files (-1 heads) | |
979 |
|
979 | |||
980 | $ release $TESTTMP/watchfile |
|
980 | $ release $TESTTMP/watchfile | |
981 |
|
981 | |||
982 | Check the result of the push |
|
982 | Check the result of the push | |
983 |
|
983 | |||
984 | $ cat ./push-log |
|
984 | $ cat ./push-log | |
985 | pushing to ssh://user@dummy/server |
|
985 | pushing to ssh://user@dummy/server | |
986 | searching for changes |
|
986 | searching for changes | |
987 | wrote ready: $TESTTMP/readyfile |
|
987 | wrote ready: $TESTTMP/readyfile | |
988 | waiting on: $TESTTMP/watchfile |
|
988 | waiting on: $TESTTMP/watchfile | |
989 | abort: push failed: |
|
989 | abort: push failed: | |
990 | 'remote repository changed while pushing - please try again' |
|
990 | 'remote repository changed while pushing - please try again' | |
991 |
|
991 | |||
992 | $ hg -R server graph |
|
992 | $ hg -R server graph | |
993 | o be705100c623 C-K (default) |
|
993 | o be705100c623 C-K (default) | |
994 | |\ |
|
994 | |\ | |
995 | | o d603e2c0cdd7 C-E (default) |
|
995 | | o d603e2c0cdd7 C-E (default) | |
996 | | | |
|
996 | | | | |
997 | o | 59e76faf78bd C-D (default) |
|
997 | o | 59e76faf78bd C-D (default) | |
998 | | | |
|
998 | | | | |
999 | | | o 89420bf00fae C-J (default) |
|
999 | | | o 89420bf00fae C-J (default) | |
1000 | | | | |
|
1000 | | | | | |
1001 | | | | o b35ed749f288 C-I (my-second-test-branch) |
|
1001 | | | | o b35ed749f288 C-I (my-second-test-branch) | |
1002 | | | |/ |
|
1002 | | | |/ | |
1003 | | | o 75d69cba5402 C-G (default) |
|
1003 | | | o 75d69cba5402 C-G (default) | |
1004 | | | | |
|
1004 | | | | | |
1005 | | | | o 833be552cfe6 C-H (my-first-test-branch) |
|
1005 | | | | o 833be552cfe6 C-H (my-first-test-branch) | |
1006 | | | |/ |
|
1006 | | | |/ | |
1007 | | | o d9e379a8c432 C-F (default) |
|
1007 | | | o d9e379a8c432 C-F (default) | |
1008 | | | | |
|
1008 | | | | | |
1009 | | | o 51c544a58128 C-C (default) |
|
1009 | | | o 51c544a58128 C-C (default) | |
1010 | | |/ |
|
1010 | | |/ | |
1011 | o | a9149a1428e2 C-B (default) |
|
1011 | o | a9149a1428e2 C-B (default) | |
1012 | | | |
|
1012 | | | | |
1013 | | o 98217d5a1659 C-A (default) |
|
1013 | | o 98217d5a1659 C-A (default) | |
1014 | |/ |
|
1014 | |/ | |
1015 | @ 842e2fac6304 C-ROOT (default) |
|
1015 | @ 842e2fac6304 C-ROOT (default) | |
1016 |
|
1016 | |||
1017 |
|
1017 | |||
1018 | pushing raced push touch multiple heads |
|
1018 | pushing raced push touch multiple heads | |
1019 | --------------------------------------- |
|
1019 | --------------------------------------- | |
1020 |
|
1020 | |||
1021 | There are multiple heads, the raced push touch all of them |
|
1021 | There are multiple heads, the raced push touch all of them | |
1022 |
|
1022 | |||
1023 | # b |
|
1023 | # b | |
1024 | # | a (raced) |
|
1024 | # | a (raced) | |
1025 | # |/| |
|
1025 | # |/| | |
1026 | # * * |
|
1026 | # * * | |
1027 | # |/ |
|
1027 | # |/ | |
1028 | # * |
|
1028 | # * | |
1029 |
|
1029 | |||
1030 | (resync-all) |
|
1030 | (resync-all) | |
1031 |
|
1031 | |||
1032 | $ hg -R ./server pull ./client-racy |
|
1032 | $ hg -R ./server pull ./client-racy | |
1033 | pulling from ./client-racy |
|
1033 | pulling from ./client-racy | |
1034 | searching for changes |
|
1034 | searching for changes | |
1035 | adding changesets |
|
1035 | adding changesets | |
1036 | adding manifests |
|
1036 | adding manifests | |
1037 | adding file changes |
|
1037 | adding file changes | |
1038 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
1038 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
1039 | new changesets cac2cead0ff0 (1 drafts) |
|
1039 | new changesets cac2cead0ff0 (1 drafts) | |
1040 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
1040 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
1041 | $ hg -R ./client-other pull |
|
1041 | $ hg -R ./client-other pull | |
1042 | pulling from ssh://user@dummy/server |
|
1042 | pulling from ssh://user@dummy/server | |
1043 | searching for changes |
|
1043 | searching for changes | |
1044 | adding changesets |
|
1044 | adding changesets | |
1045 | adding manifests |
|
1045 | adding manifests | |
1046 | adding file changes |
|
1046 | adding file changes | |
1047 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
1047 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
1048 | new changesets cac2cead0ff0 (1 drafts) |
|
1048 | new changesets cac2cead0ff0 (1 drafts) | |
1049 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
1049 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
1050 | $ hg -R ./client-racy pull |
|
1050 | $ hg -R ./client-racy pull | |
1051 | pulling from ssh://user@dummy/server |
|
1051 | pulling from ssh://user@dummy/server | |
1052 | searching for changes |
|
1052 | searching for changes | |
1053 | adding changesets |
|
1053 | adding changesets | |
1054 | adding manifests |
|
1054 | adding manifests | |
1055 | adding file changes |
|
1055 | adding file changes | |
1056 | added 1 changesets with 0 changes to 0 files |
|
1056 | added 1 changesets with 0 changes to 0 files | |
1057 | new changesets be705100c623 (1 drafts) |
|
1057 | new changesets be705100c623 (1 drafts) | |
1058 | (run 'hg update' to get a working copy) |
|
1058 | (run 'hg update' to get a working copy) | |
1059 |
|
1059 | |||
1060 | $ hg -R server graph |
|
1060 | $ hg -R server graph | |
1061 | o cac2cead0ff0 C-L (default) |
|
1061 | o cac2cead0ff0 C-L (default) | |
1062 | | |
|
1062 | | | |
1063 | | o be705100c623 C-K (default) |
|
1063 | | o be705100c623 C-K (default) | |
1064 | |/| |
|
1064 | |/| | |
1065 | | o d603e2c0cdd7 C-E (default) |
|
1065 | | o d603e2c0cdd7 C-E (default) | |
1066 | | | |
|
1066 | | | | |
1067 | o | 59e76faf78bd C-D (default) |
|
1067 | o | 59e76faf78bd C-D (default) | |
1068 | | | |
|
1068 | | | | |
1069 | | | o 89420bf00fae C-J (default) |
|
1069 | | | o 89420bf00fae C-J (default) | |
1070 | | | | |
|
1070 | | | | | |
1071 | | | | o b35ed749f288 C-I (my-second-test-branch) |
|
1071 | | | | o b35ed749f288 C-I (my-second-test-branch) | |
1072 | | | |/ |
|
1072 | | | |/ | |
1073 | | | o 75d69cba5402 C-G (default) |
|
1073 | | | o 75d69cba5402 C-G (default) | |
1074 | | | | |
|
1074 | | | | | |
1075 | | | | o 833be552cfe6 C-H (my-first-test-branch) |
|
1075 | | | | o 833be552cfe6 C-H (my-first-test-branch) | |
1076 | | | |/ |
|
1076 | | | |/ | |
1077 | | | o d9e379a8c432 C-F (default) |
|
1077 | | | o d9e379a8c432 C-F (default) | |
1078 | | | | |
|
1078 | | | | | |
1079 | | | o 51c544a58128 C-C (default) |
|
1079 | | | o 51c544a58128 C-C (default) | |
1080 | | |/ |
|
1080 | | |/ | |
1081 | o | a9149a1428e2 C-B (default) |
|
1081 | o | a9149a1428e2 C-B (default) | |
1082 | | | |
|
1082 | | | | |
1083 | | o 98217d5a1659 C-A (default) |
|
1083 | | o 98217d5a1659 C-A (default) | |
1084 | |/ |
|
1084 | |/ | |
1085 | @ 842e2fac6304 C-ROOT (default) |
|
1085 | @ 842e2fac6304 C-ROOT (default) | |
1086 |
|
1086 | |||
1087 |
|
1087 | |||
1088 | Creating changesets |
|
1088 | Creating changesets | |
1089 |
|
1089 | |||
1090 | (update existing head) |
|
1090 | (update existing head) | |
1091 |
|
1091 | |||
1092 | $ echo aaa >> client-other/a |
|
1092 | $ echo aaa >> client-other/a | |
1093 | $ hg -R client-other/ commit -m "C-M" |
|
1093 | $ hg -R client-other/ commit -m "C-M" | |
1094 |
|
1094 | |||
1095 | (merge heads) |
|
1095 | (merge heads) | |
1096 |
|
1096 | |||
1097 | $ hg -R client-racy/ merge 'desc("C-K")' |
|
1097 | $ hg -R client-racy/ merge 'desc("C-K")' | |
1098 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1098 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1099 | (branch merge, don't forget to commit) |
|
1099 | (branch merge, don't forget to commit) | |
1100 | $ hg -R client-racy/ commit -m "C-N" |
|
1100 | $ hg -R client-racy/ commit -m "C-N" | |
1101 |
|
1101 | |||
1102 | Pushing |
|
1102 | Pushing | |
1103 |
|
1103 | |||
1104 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & |
|
1104 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & | |
1105 |
|
1105 | |||
1106 | $ waiton $TESTTMP/readyfile |
|
1106 | $ waiton $TESTTMP/readyfile | |
1107 |
|
1107 | |||
1108 | $ hg -R client-other push -fr 'tip' --new-branch |
|
1108 | $ hg -R client-other push -fr 'tip' --new-branch | |
1109 | pushing to ssh://user@dummy/server |
|
1109 | pushing to ssh://user@dummy/server | |
1110 | searching for changes |
|
1110 | searching for changes | |
1111 | remote: adding changesets |
|
1111 | remote: adding changesets | |
1112 | remote: adding manifests |
|
1112 | remote: adding manifests | |
1113 | remote: adding file changes |
|
1113 | remote: adding file changes | |
1114 | remote: added 1 changesets with 1 changes to 1 files |
|
1114 | remote: added 1 changesets with 1 changes to 1 files | |
1115 |
|
1115 | |||
1116 | $ release $TESTTMP/watchfile |
|
1116 | $ release $TESTTMP/watchfile | |
1117 |
|
1117 | |||
1118 | Check the result of the push |
|
1118 | Check the result of the push | |
1119 |
|
1119 | |||
1120 | $ cat ./push-log |
|
1120 | $ cat ./push-log | |
1121 | pushing to ssh://user@dummy/server |
|
1121 | pushing to ssh://user@dummy/server | |
1122 | searching for changes |
|
1122 | searching for changes | |
1123 | wrote ready: $TESTTMP/readyfile |
|
1123 | wrote ready: $TESTTMP/readyfile | |
1124 | waiting on: $TESTTMP/watchfile |
|
1124 | waiting on: $TESTTMP/watchfile | |
1125 | abort: push failed: |
|
1125 | abort: push failed: | |
1126 | 'remote repository changed while pushing - please try again' |
|
1126 | 'remote repository changed while pushing - please try again' | |
1127 |
|
1127 | |||
1128 | $ hg -R server graph |
|
1128 | $ hg -R server graph | |
1129 | o 6fd3090135df C-M (default) |
|
1129 | o 6fd3090135df C-M (default) | |
1130 | | |
|
1130 | | | |
1131 | o be705100c623 C-K (default) |
|
1131 | o be705100c623 C-K (default) | |
1132 | |\ |
|
1132 | |\ | |
1133 | | o d603e2c0cdd7 C-E (default) |
|
1133 | | o d603e2c0cdd7 C-E (default) | |
1134 | | | |
|
1134 | | | | |
1135 | +---o cac2cead0ff0 C-L (default) |
|
1135 | +---o cac2cead0ff0 C-L (default) | |
1136 | | | |
|
1136 | | | | |
1137 | o | 59e76faf78bd C-D (default) |
|
1137 | o | 59e76faf78bd C-D (default) | |
1138 | | | |
|
1138 | | | | |
1139 | | | o 89420bf00fae C-J (default) |
|
1139 | | | o 89420bf00fae C-J (default) | |
1140 | | | | |
|
1140 | | | | | |
1141 | | | | o b35ed749f288 C-I (my-second-test-branch) |
|
1141 | | | | o b35ed749f288 C-I (my-second-test-branch) | |
1142 | | | |/ |
|
1142 | | | |/ | |
1143 | | | o 75d69cba5402 C-G (default) |
|
1143 | | | o 75d69cba5402 C-G (default) | |
1144 | | | | |
|
1144 | | | | | |
1145 | | | | o 833be552cfe6 C-H (my-first-test-branch) |
|
1145 | | | | o 833be552cfe6 C-H (my-first-test-branch) | |
1146 | | | |/ |
|
1146 | | | |/ | |
1147 | | | o d9e379a8c432 C-F (default) |
|
1147 | | | o d9e379a8c432 C-F (default) | |
1148 | | | | |
|
1148 | | | | | |
1149 | | | o 51c544a58128 C-C (default) |
|
1149 | | | o 51c544a58128 C-C (default) | |
1150 | | |/ |
|
1150 | | |/ | |
1151 | o | a9149a1428e2 C-B (default) |
|
1151 | o | a9149a1428e2 C-B (default) | |
1152 | | | |
|
1152 | | | | |
1153 | | o 98217d5a1659 C-A (default) |
|
1153 | | o 98217d5a1659 C-A (default) | |
1154 | |/ |
|
1154 | |/ | |
1155 | @ 842e2fac6304 C-ROOT (default) |
|
1155 | @ 842e2fac6304 C-ROOT (default) | |
1156 |
|
1156 | |||
1157 |
|
1157 | |||
1158 | racing commit push a new head behind another named branch |
|
1158 | racing commit push a new head behind another named branch | |
1159 | --------------------------------------------------------- |
|
1159 | --------------------------------------------------------- | |
1160 |
|
1160 | |||
1161 | non-continuous branch are valid case, we tests for them. |
|
1161 | non-continuous branch are valid case, we tests for them. | |
1162 |
|
1162 | |||
1163 | # b (branch default) |
|
1163 | # b (branch default) | |
1164 | # | |
|
1164 | # | | |
1165 | # o (branch foo) |
|
1165 | # o (branch foo) | |
1166 | # | |
|
1166 | # | | |
1167 | # | a (raced, branch default) |
|
1167 | # | a (raced, branch default) | |
1168 | # |/ |
|
1168 | # |/ | |
1169 | # * (branch foo) |
|
1169 | # * (branch foo) | |
1170 | # | |
|
1170 | # | | |
1171 | # * (branch default) |
|
1171 | # * (branch default) | |
1172 |
|
1172 | |||
1173 | (resync-all + other branch) |
|
1173 | (resync-all + other branch) | |
1174 |
|
1174 | |||
1175 | $ hg -R ./server pull ./client-racy |
|
1175 | $ hg -R ./server pull ./client-racy | |
1176 | pulling from ./client-racy |
|
1176 | pulling from ./client-racy | |
1177 | searching for changes |
|
1177 | searching for changes | |
1178 | adding changesets |
|
1178 | adding changesets | |
1179 | adding manifests |
|
1179 | adding manifests | |
1180 | adding file changes |
|
1180 | adding file changes | |
1181 | added 1 changesets with 0 changes to 0 files |
|
1181 | added 1 changesets with 0 changes to 0 files | |
1182 | new changesets 866a66e18630 (1 drafts) |
|
1182 | new changesets 866a66e18630 (1 drafts) | |
1183 | (run 'hg update' to get a working copy) |
|
1183 | (run 'hg update' to get a working copy) | |
1184 |
|
1184 | |||
1185 | (creates named branch on head) |
|
1185 | (creates named branch on head) | |
1186 |
|
1186 | |||
1187 | $ hg -R ./server/ up 'desc("C-N")' |
|
1187 | $ hg -R ./server/ up 'desc("C-N")' | |
1188 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1188 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1189 | $ hg -R ./server/ branch other |
|
1189 | $ hg -R ./server/ branch other | |
1190 | marked working directory as branch other |
|
1190 | marked working directory as branch other | |
1191 | $ hg -R ./server/ ci -m "C-Z" |
|
1191 | $ hg -R ./server/ ci -m "C-Z" | |
1192 | $ hg -R ./server/ up null |
|
1192 | $ hg -R ./server/ up null | |
1193 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
1193 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
1194 |
|
1194 | |||
1195 | (sync client) |
|
1195 | (sync client) | |
1196 |
|
1196 | |||
1197 | $ hg -R ./client-other pull |
|
1197 | $ hg -R ./client-other pull | |
1198 | pulling from ssh://user@dummy/server |
|
1198 | pulling from ssh://user@dummy/server | |
1199 | searching for changes |
|
1199 | searching for changes | |
1200 | adding changesets |
|
1200 | adding changesets | |
1201 | adding manifests |
|
1201 | adding manifests | |
1202 | adding file changes |
|
1202 | adding file changes | |
1203 | added 2 changesets with 0 changes to 0 files |
|
1203 | added 2 changesets with 0 changes to 0 files | |
1204 | new changesets 866a66e18630:55a6f1c01b48 (2 drafts) |
|
1204 | new changesets 866a66e18630:55a6f1c01b48 (2 drafts) | |
1205 | (run 'hg update' to get a working copy) |
|
1205 | (run 'hg update' to get a working copy) | |
1206 | $ hg -R ./client-racy pull |
|
1206 | $ hg -R ./client-racy pull | |
1207 | pulling from ssh://user@dummy/server |
|
1207 | pulling from ssh://user@dummy/server | |
1208 | searching for changes |
|
1208 | searching for changes | |
1209 | adding changesets |
|
1209 | adding changesets | |
1210 | adding manifests |
|
1210 | adding manifests | |
1211 | adding file changes |
|
1211 | adding file changes | |
1212 | added 2 changesets with 1 changes to 1 files (+1 heads) |
|
1212 | added 2 changesets with 1 changes to 1 files (+1 heads) | |
1213 | new changesets 6fd3090135df:55a6f1c01b48 (2 drafts) |
|
1213 | new changesets 6fd3090135df:55a6f1c01b48 (2 drafts) | |
1214 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
1214 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
1215 |
|
1215 | |||
1216 | $ hg -R server graph |
|
1216 | $ hg -R server graph | |
1217 | o 55a6f1c01b48 C-Z (other) |
|
1217 | o 55a6f1c01b48 C-Z (other) | |
1218 | | |
|
1218 | | | |
1219 | o 866a66e18630 C-N (default) |
|
1219 | o 866a66e18630 C-N (default) | |
1220 | |\ |
|
1220 | |\ | |
1221 | +---o 6fd3090135df C-M (default) |
|
1221 | +---o 6fd3090135df C-M (default) | |
1222 | | | |
|
1222 | | | | |
1223 | | o cac2cead0ff0 C-L (default) |
|
1223 | | o cac2cead0ff0 C-L (default) | |
1224 | | | |
|
1224 | | | | |
1225 | o | be705100c623 C-K (default) |
|
1225 | o | be705100c623 C-K (default) | |
1226 | |\| |
|
1226 | |\| | |
1227 | o | d603e2c0cdd7 C-E (default) |
|
1227 | o | d603e2c0cdd7 C-E (default) | |
1228 | | | |
|
1228 | | | | |
1229 | | o 59e76faf78bd C-D (default) |
|
1229 | | o 59e76faf78bd C-D (default) | |
1230 | | | |
|
1230 | | | | |
1231 | | | o 89420bf00fae C-J (default) |
|
1231 | | | o 89420bf00fae C-J (default) | |
1232 | | | | |
|
1232 | | | | | |
1233 | | | | o b35ed749f288 C-I (my-second-test-branch) |
|
1233 | | | | o b35ed749f288 C-I (my-second-test-branch) | |
1234 | | | |/ |
|
1234 | | | |/ | |
1235 | | | o 75d69cba5402 C-G (default) |
|
1235 | | | o 75d69cba5402 C-G (default) | |
1236 | | | | |
|
1236 | | | | | |
1237 | | | | o 833be552cfe6 C-H (my-first-test-branch) |
|
1237 | | | | o 833be552cfe6 C-H (my-first-test-branch) | |
1238 | | | |/ |
|
1238 | | | |/ | |
1239 | | | o d9e379a8c432 C-F (default) |
|
1239 | | | o d9e379a8c432 C-F (default) | |
1240 | | | | |
|
1240 | | | | | |
1241 | +---o 51c544a58128 C-C (default) |
|
1241 | +---o 51c544a58128 C-C (default) | |
1242 | | | |
|
1242 | | | | |
1243 | | o a9149a1428e2 C-B (default) |
|
1243 | | o a9149a1428e2 C-B (default) | |
1244 | | | |
|
1244 | | | | |
1245 | o | 98217d5a1659 C-A (default) |
|
1245 | o | 98217d5a1659 C-A (default) | |
1246 | |/ |
|
1246 | |/ | |
1247 | o 842e2fac6304 C-ROOT (default) |
|
1247 | o 842e2fac6304 C-ROOT (default) | |
1248 |
|
1248 | |||
1249 |
|
1249 | |||
1250 | Creating changesets |
|
1250 | Creating changesets | |
1251 |
|
1251 | |||
1252 | (update default head through another named branch one) |
|
1252 | (update default head through another named branch one) | |
1253 |
|
1253 | |||
1254 | $ hg -R client-other/ up 'desc("C-Z")' |
|
1254 | $ hg -R client-other/ up 'desc("C-Z")' | |
1255 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1255 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1256 | $ echo aaa >> client-other/a |
|
1256 | $ echo aaa >> client-other/a | |
1257 | $ hg -R client-other/ commit -m "C-O" |
|
1257 | $ hg -R client-other/ commit -m "C-O" | |
1258 | $ echo aaa >> client-other/a |
|
1258 | $ echo aaa >> client-other/a | |
1259 | $ hg -R client-other/ branch --force default |
|
1259 | $ hg -R client-other/ branch --force default | |
1260 | marked working directory as branch default |
|
1260 | marked working directory as branch default | |
1261 | $ hg -R client-other/ commit -m "C-P" |
|
1261 | $ hg -R client-other/ commit -m "C-P" | |
1262 | created new head |
|
1262 | created new head | |
1263 |
|
1263 | |||
1264 | (update default head) |
|
1264 | (update default head) | |
1265 |
|
1265 | |||
1266 | $ hg -R client-racy/ up 'desc("C-Z")' |
|
1266 | $ hg -R client-racy/ up 'desc("C-Z")' | |
1267 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1267 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1268 | $ echo bbb >> client-other/a |
|
1268 | $ echo bbb >> client-other/a | |
1269 | $ hg -R client-racy/ branch --force default |
|
1269 | $ hg -R client-racy/ branch --force default | |
1270 | marked working directory as branch default |
|
1270 | marked working directory as branch default | |
1271 | $ hg -R client-racy/ commit -m "C-Q" |
|
1271 | $ hg -R client-racy/ commit -m "C-Q" | |
1272 | created new head |
|
1272 | created new head | |
1273 |
|
1273 | |||
1274 | Pushing |
|
1274 | Pushing | |
1275 |
|
1275 | |||
1276 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & |
|
1276 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & | |
1277 |
|
1277 | |||
1278 | $ waiton $TESTTMP/readyfile |
|
1278 | $ waiton $TESTTMP/readyfile | |
1279 |
|
1279 | |||
1280 | $ hg -R client-other push -fr 'tip' --new-branch |
|
1280 | $ hg -R client-other push -fr 'tip' --new-branch | |
1281 | pushing to ssh://user@dummy/server |
|
1281 | pushing to ssh://user@dummy/server | |
1282 | searching for changes |
|
1282 | searching for changes | |
1283 | remote: adding changesets |
|
1283 | remote: adding changesets | |
1284 | remote: adding manifests |
|
1284 | remote: adding manifests | |
1285 | remote: adding file changes |
|
1285 | remote: adding file changes | |
1286 | remote: added 2 changesets with 1 changes to 1 files |
|
1286 | remote: added 2 changesets with 1 changes to 1 files | |
1287 |
|
1287 | |||
1288 | $ release $TESTTMP/watchfile |
|
1288 | $ release $TESTTMP/watchfile | |
1289 |
|
1289 | |||
1290 | Check the result of the push |
|
1290 | Check the result of the push | |
1291 |
|
1291 | |||
1292 | $ cat ./push-log |
|
1292 | $ cat ./push-log | |
1293 | pushing to ssh://user@dummy/server |
|
1293 | pushing to ssh://user@dummy/server | |
1294 | searching for changes |
|
1294 | searching for changes | |
1295 | wrote ready: $TESTTMP/readyfile |
|
1295 | wrote ready: $TESTTMP/readyfile | |
1296 | waiting on: $TESTTMP/watchfile |
|
1296 | waiting on: $TESTTMP/watchfile | |
1297 | abort: push failed: |
|
1297 | abort: push failed: | |
1298 | 'remote repository changed while pushing - please try again' |
|
1298 | 'remote repository changed while pushing - please try again' | |
1299 |
|
1299 | |||
1300 | $ hg -R server graph |
|
1300 | $ hg -R server graph | |
1301 | o 1b58ee3f79e5 C-P (default) |
|
1301 | o 1b58ee3f79e5 C-P (default) | |
1302 | | |
|
1302 | | | |
1303 | o d0a85b2252a9 C-O (other) |
|
1303 | o d0a85b2252a9 C-O (other) | |
1304 | | |
|
1304 | | | |
1305 | o 55a6f1c01b48 C-Z (other) |
|
1305 | o 55a6f1c01b48 C-Z (other) | |
1306 | | |
|
1306 | | | |
1307 | o 866a66e18630 C-N (default) |
|
1307 | o 866a66e18630 C-N (default) | |
1308 | |\ |
|
1308 | |\ | |
1309 | +---o 6fd3090135df C-M (default) |
|
1309 | +---o 6fd3090135df C-M (default) | |
1310 | | | |
|
1310 | | | | |
1311 | | o cac2cead0ff0 C-L (default) |
|
1311 | | o cac2cead0ff0 C-L (default) | |
1312 | | | |
|
1312 | | | | |
1313 | o | be705100c623 C-K (default) |
|
1313 | o | be705100c623 C-K (default) | |
1314 | |\| |
|
1314 | |\| | |
1315 | o | d603e2c0cdd7 C-E (default) |
|
1315 | o | d603e2c0cdd7 C-E (default) | |
1316 | | | |
|
1316 | | | | |
1317 | | o 59e76faf78bd C-D (default) |
|
1317 | | o 59e76faf78bd C-D (default) | |
1318 | | | |
|
1318 | | | | |
1319 | | | o 89420bf00fae C-J (default) |
|
1319 | | | o 89420bf00fae C-J (default) | |
1320 | | | | |
|
1320 | | | | | |
1321 | | | | o b35ed749f288 C-I (my-second-test-branch) |
|
1321 | | | | o b35ed749f288 C-I (my-second-test-branch) | |
1322 | | | |/ |
|
1322 | | | |/ | |
1323 | | | o 75d69cba5402 C-G (default) |
|
1323 | | | o 75d69cba5402 C-G (default) | |
1324 | | | | |
|
1324 | | | | | |
1325 | | | | o 833be552cfe6 C-H (my-first-test-branch) |
|
1325 | | | | o 833be552cfe6 C-H (my-first-test-branch) | |
1326 | | | |/ |
|
1326 | | | |/ | |
1327 | | | o d9e379a8c432 C-F (default) |
|
1327 | | | o d9e379a8c432 C-F (default) | |
1328 | | | | |
|
1328 | | | | | |
1329 | +---o 51c544a58128 C-C (default) |
|
1329 | +---o 51c544a58128 C-C (default) | |
1330 | | | |
|
1330 | | | | |
1331 | | o a9149a1428e2 C-B (default) |
|
1331 | | o a9149a1428e2 C-B (default) | |
1332 | | | |
|
1332 | | | | |
1333 | o | 98217d5a1659 C-A (default) |
|
1333 | o | 98217d5a1659 C-A (default) | |
1334 | |/ |
|
1334 | |/ | |
1335 | o 842e2fac6304 C-ROOT (default) |
|
1335 | o 842e2fac6304 C-ROOT (default) | |
1336 |
|
1336 | |||
1337 |
|
1337 | |||
1338 | raced commit push a new head behind another named branch |
|
1338 | raced commit push a new head behind another named branch | |
1339 | --------------------------------------------------------- |
|
1339 | --------------------------------------------------------- | |
1340 |
|
1340 | |||
1341 | non-continuous branch are valid case, we tests for them. |
|
1341 | non-continuous branch are valid case, we tests for them. | |
1342 |
|
1342 | |||
1343 | # b (raced branch default) |
|
1343 | # b (raced branch default) | |
1344 | # | |
|
1344 | # | | |
1345 | # o (branch foo) |
|
1345 | # o (branch foo) | |
1346 | # | |
|
1346 | # | | |
1347 | # | a (branch default) |
|
1347 | # | a (branch default) | |
1348 | # |/ |
|
1348 | # |/ | |
1349 | # * (branch foo) |
|
1349 | # * (branch foo) | |
1350 | # | |
|
1350 | # | | |
1351 | # * (branch default) |
|
1351 | # * (branch default) | |
1352 |
|
1352 | |||
1353 | (resync-all) |
|
1353 | (resync-all) | |
1354 |
|
1354 | |||
1355 | $ hg -R ./server pull ./client-racy |
|
1355 | $ hg -R ./server pull ./client-racy | |
1356 | pulling from ./client-racy |
|
1356 | pulling from ./client-racy | |
1357 | searching for changes |
|
1357 | searching for changes | |
1358 | adding changesets |
|
1358 | adding changesets | |
1359 | adding manifests |
|
1359 | adding manifests | |
1360 | adding file changes |
|
1360 | adding file changes | |
1361 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
1361 | added 1 changesets with 0 changes to 0 files (+1 heads) | |
1362 | new changesets b0ee3d6f51bc (1 drafts) |
|
1362 | new changesets b0ee3d6f51bc (1 drafts) | |
1363 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
1363 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
1364 | $ hg -R ./client-other pull |
|
1364 | $ hg -R ./client-other pull | |
1365 | pulling from ssh://user@dummy/server |
|
1365 | pulling from ssh://user@dummy/server | |
1366 | searching for changes |
|
1366 | searching for changes | |
1367 | adding changesets |
|
1367 | adding changesets | |
1368 | adding manifests |
|
1368 | adding manifests | |
1369 | adding file changes |
|
1369 | adding file changes | |
1370 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
1370 | added 1 changesets with 0 changes to 0 files (+1 heads) | |
1371 | new changesets b0ee3d6f51bc (1 drafts) |
|
1371 | new changesets b0ee3d6f51bc (1 drafts) | |
1372 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
1372 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
1373 | $ hg -R ./client-racy pull |
|
1373 | $ hg -R ./client-racy pull | |
1374 | pulling from ssh://user@dummy/server |
|
1374 | pulling from ssh://user@dummy/server | |
1375 | searching for changes |
|
1375 | searching for changes | |
1376 | adding changesets |
|
1376 | adding changesets | |
1377 | adding manifests |
|
1377 | adding manifests | |
1378 | adding file changes |
|
1378 | adding file changes | |
1379 | added 2 changesets with 1 changes to 1 files (+1 heads) |
|
1379 | added 2 changesets with 1 changes to 1 files (+1 heads) | |
1380 | new changesets d0a85b2252a9:1b58ee3f79e5 (2 drafts) |
|
1380 | new changesets d0a85b2252a9:1b58ee3f79e5 (2 drafts) | |
1381 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
1381 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
1382 |
|
1382 | |||
1383 | $ hg -R server graph |
|
1383 | $ hg -R server graph | |
1384 | o b0ee3d6f51bc C-Q (default) |
|
1384 | o b0ee3d6f51bc C-Q (default) | |
1385 | | |
|
1385 | | | |
1386 | | o 1b58ee3f79e5 C-P (default) |
|
1386 | | o 1b58ee3f79e5 C-P (default) | |
1387 | | | |
|
1387 | | | | |
1388 | | o d0a85b2252a9 C-O (other) |
|
1388 | | o d0a85b2252a9 C-O (other) | |
1389 | |/ |
|
1389 | |/ | |
1390 | o 55a6f1c01b48 C-Z (other) |
|
1390 | o 55a6f1c01b48 C-Z (other) | |
1391 | | |
|
1391 | | | |
1392 | o 866a66e18630 C-N (default) |
|
1392 | o 866a66e18630 C-N (default) | |
1393 | |\ |
|
1393 | |\ | |
1394 | +---o 6fd3090135df C-M (default) |
|
1394 | +---o 6fd3090135df C-M (default) | |
1395 | | | |
|
1395 | | | | |
1396 | | o cac2cead0ff0 C-L (default) |
|
1396 | | o cac2cead0ff0 C-L (default) | |
1397 | | | |
|
1397 | | | | |
1398 | o | be705100c623 C-K (default) |
|
1398 | o | be705100c623 C-K (default) | |
1399 | |\| |
|
1399 | |\| | |
1400 | o | d603e2c0cdd7 C-E (default) |
|
1400 | o | d603e2c0cdd7 C-E (default) | |
1401 | | | |
|
1401 | | | | |
1402 | | o 59e76faf78bd C-D (default) |
|
1402 | | o 59e76faf78bd C-D (default) | |
1403 | | | |
|
1403 | | | | |
1404 | | | o 89420bf00fae C-J (default) |
|
1404 | | | o 89420bf00fae C-J (default) | |
1405 | | | | |
|
1405 | | | | | |
1406 | | | | o b35ed749f288 C-I (my-second-test-branch) |
|
1406 | | | | o b35ed749f288 C-I (my-second-test-branch) | |
1407 | | | |/ |
|
1407 | | | |/ | |
1408 | | | o 75d69cba5402 C-G (default) |
|
1408 | | | o 75d69cba5402 C-G (default) | |
1409 | | | | |
|
1409 | | | | | |
1410 | | | | o 833be552cfe6 C-H (my-first-test-branch) |
|
1410 | | | | o 833be552cfe6 C-H (my-first-test-branch) | |
1411 | | | |/ |
|
1411 | | | |/ | |
1412 | | | o d9e379a8c432 C-F (default) |
|
1412 | | | o d9e379a8c432 C-F (default) | |
1413 | | | | |
|
1413 | | | | | |
1414 | +---o 51c544a58128 C-C (default) |
|
1414 | +---o 51c544a58128 C-C (default) | |
1415 | | | |
|
1415 | | | | |
1416 | | o a9149a1428e2 C-B (default) |
|
1416 | | o a9149a1428e2 C-B (default) | |
1417 | | | |
|
1417 | | | | |
1418 | o | 98217d5a1659 C-A (default) |
|
1418 | o | 98217d5a1659 C-A (default) | |
1419 | |/ |
|
1419 | |/ | |
1420 | o 842e2fac6304 C-ROOT (default) |
|
1420 | o 842e2fac6304 C-ROOT (default) | |
1421 |
|
1421 | |||
1422 |
|
1422 | |||
1423 | Creating changesets |
|
1423 | Creating changesets | |
1424 |
|
1424 | |||
1425 | (update 'other' named branch head) |
|
1425 | (update 'other' named branch head) | |
1426 |
|
1426 | |||
1427 | $ hg -R client-other/ up 'desc("C-P")' |
|
1427 | $ hg -R client-other/ up 'desc("C-P")' | |
1428 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1428 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1429 | $ echo aaa >> client-other/a |
|
1429 | $ echo aaa >> client-other/a | |
1430 | $ hg -R client-other/ branch --force other |
|
1430 | $ hg -R client-other/ branch --force other | |
1431 | marked working directory as branch other |
|
1431 | marked working directory as branch other | |
1432 | $ hg -R client-other/ commit -m "C-R" |
|
1432 | $ hg -R client-other/ commit -m "C-R" | |
1433 | created new head |
|
1433 | created new head | |
1434 |
|
1434 | |||
1435 | (update 'other named brnach through a 'default' changeset') |
|
1435 | (update 'other named brnach through a 'default' changeset') | |
1436 |
|
1436 | |||
1437 | $ hg -R client-racy/ up 'desc("C-P")' |
|
1437 | $ hg -R client-racy/ up 'desc("C-P")' | |
1438 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1438 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1439 | $ echo bbb >> client-racy/a |
|
1439 | $ echo bbb >> client-racy/a | |
1440 | $ hg -R client-racy/ commit -m "C-S" |
|
1440 | $ hg -R client-racy/ commit -m "C-S" | |
1441 | $ echo bbb >> client-racy/a |
|
1441 | $ echo bbb >> client-racy/a | |
1442 | $ hg -R client-racy/ branch --force other |
|
1442 | $ hg -R client-racy/ branch --force other | |
1443 | marked working directory as branch other |
|
1443 | marked working directory as branch other | |
1444 | $ hg -R client-racy/ commit -m "C-T" |
|
1444 | $ hg -R client-racy/ commit -m "C-T" | |
1445 | created new head |
|
1445 | created new head | |
1446 |
|
1446 | |||
1447 | Pushing |
|
1447 | Pushing | |
1448 |
|
1448 | |||
1449 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & |
|
1449 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & | |
1450 |
|
1450 | |||
1451 | $ waiton $TESTTMP/readyfile |
|
1451 | $ waiton $TESTTMP/readyfile | |
1452 |
|
1452 | |||
1453 | $ hg -R client-other push -fr 'tip' --new-branch |
|
1453 | $ hg -R client-other push -fr 'tip' --new-branch | |
1454 | pushing to ssh://user@dummy/server |
|
1454 | pushing to ssh://user@dummy/server | |
1455 | searching for changes |
|
1455 | searching for changes | |
1456 | remote: adding changesets |
|
1456 | remote: adding changesets | |
1457 | remote: adding manifests |
|
1457 | remote: adding manifests | |
1458 | remote: adding file changes |
|
1458 | remote: adding file changes | |
1459 | remote: added 1 changesets with 1 changes to 1 files |
|
1459 | remote: added 1 changesets with 1 changes to 1 files | |
1460 |
|
1460 | |||
1461 | $ release $TESTTMP/watchfile |
|
1461 | $ release $TESTTMP/watchfile | |
1462 |
|
1462 | |||
1463 | Check the result of the push |
|
1463 | Check the result of the push | |
1464 |
|
1464 | |||
1465 | $ cat ./push-log |
|
1465 | $ cat ./push-log | |
1466 | pushing to ssh://user@dummy/server |
|
1466 | pushing to ssh://user@dummy/server | |
1467 | searching for changes |
|
1467 | searching for changes | |
1468 | wrote ready: $TESTTMP/readyfile |
|
1468 | wrote ready: $TESTTMP/readyfile | |
1469 | waiting on: $TESTTMP/watchfile |
|
1469 | waiting on: $TESTTMP/watchfile | |
1470 | abort: push failed: |
|
1470 | abort: push failed: | |
1471 | 'remote repository changed while pushing - please try again' |
|
1471 | 'remote repository changed while pushing - please try again' | |
1472 |
|
1472 | |||
1473 | $ hg -R server graph |
|
1473 | $ hg -R server graph | |
1474 | o de7b9e2ba3f6 C-R (other) |
|
1474 | o de7b9e2ba3f6 C-R (other) | |
1475 | | |
|
1475 | | | |
1476 | o 1b58ee3f79e5 C-P (default) |
|
1476 | o 1b58ee3f79e5 C-P (default) | |
1477 | | |
|
1477 | | | |
1478 | o d0a85b2252a9 C-O (other) |
|
1478 | o d0a85b2252a9 C-O (other) | |
1479 | | |
|
1479 | | | |
1480 | | o b0ee3d6f51bc C-Q (default) |
|
1480 | | o b0ee3d6f51bc C-Q (default) | |
1481 | |/ |
|
1481 | |/ | |
1482 | o 55a6f1c01b48 C-Z (other) |
|
1482 | o 55a6f1c01b48 C-Z (other) | |
1483 | | |
|
1483 | | | |
1484 | o 866a66e18630 C-N (default) |
|
1484 | o 866a66e18630 C-N (default) | |
1485 | |\ |
|
1485 | |\ | |
1486 | +---o 6fd3090135df C-M (default) |
|
1486 | +---o 6fd3090135df C-M (default) | |
1487 | | | |
|
1487 | | | | |
1488 | | o cac2cead0ff0 C-L (default) |
|
1488 | | o cac2cead0ff0 C-L (default) | |
1489 | | | |
|
1489 | | | | |
1490 | o | be705100c623 C-K (default) |
|
1490 | o | be705100c623 C-K (default) | |
1491 | |\| |
|
1491 | |\| | |
1492 | o | d603e2c0cdd7 C-E (default) |
|
1492 | o | d603e2c0cdd7 C-E (default) | |
1493 | | | |
|
1493 | | | | |
1494 | | o 59e76faf78bd C-D (default) |
|
1494 | | o 59e76faf78bd C-D (default) | |
1495 | | | |
|
1495 | | | | |
1496 | | | o 89420bf00fae C-J (default) |
|
1496 | | | o 89420bf00fae C-J (default) | |
1497 | | | | |
|
1497 | | | | | |
1498 | | | | o b35ed749f288 C-I (my-second-test-branch) |
|
1498 | | | | o b35ed749f288 C-I (my-second-test-branch) | |
1499 | | | |/ |
|
1499 | | | |/ | |
1500 | | | o 75d69cba5402 C-G (default) |
|
1500 | | | o 75d69cba5402 C-G (default) | |
1501 | | | | |
|
1501 | | | | | |
1502 | | | | o 833be552cfe6 C-H (my-first-test-branch) |
|
1502 | | | | o 833be552cfe6 C-H (my-first-test-branch) | |
1503 | | | |/ |
|
1503 | | | |/ | |
1504 | | | o d9e379a8c432 C-F (default) |
|
1504 | | | o d9e379a8c432 C-F (default) | |
1505 | | | | |
|
1505 | | | | | |
1506 | +---o 51c544a58128 C-C (default) |
|
1506 | +---o 51c544a58128 C-C (default) | |
1507 | | | |
|
1507 | | | | |
1508 | | o a9149a1428e2 C-B (default) |
|
1508 | | o a9149a1428e2 C-B (default) | |
1509 | | | |
|
1509 | | | | |
1510 | o | 98217d5a1659 C-A (default) |
|
1510 | o | 98217d5a1659 C-A (default) | |
1511 | |/ |
|
1511 | |/ | |
1512 | o 842e2fac6304 C-ROOT (default) |
|
1512 | o 842e2fac6304 C-ROOT (default) | |
1513 |
|
1513 | |||
1514 |
|
1514 | |||
1515 | raced commit push a new head obsoleting the one touched by the racing push |
|
1515 | raced commit push a new head obsoleting the one touched by the racing push | |
1516 | -------------------------------------------------------------------------- |
|
1516 | -------------------------------------------------------------------------- | |
1517 |
|
1517 | |||
1518 | # b (racing) |
|
1518 | # b (racing) | |
1519 | # | |
|
1519 | # | | |
1520 | # ΓΈβ β a (raced) |
|
1520 | # ΓΈβ β a (raced) | |
1521 | # |/ |
|
1521 | # |/ | |
1522 | # * |
|
1522 | # * | |
1523 |
|
1523 | |||
1524 | (resync-all) |
|
1524 | (resync-all) | |
1525 |
|
1525 | |||
1526 | $ hg -R ./server pull ./client-racy |
|
1526 | $ hg -R ./server pull ./client-racy | |
1527 | pulling from ./client-racy |
|
1527 | pulling from ./client-racy | |
1528 | searching for changes |
|
1528 | searching for changes | |
1529 | adding changesets |
|
1529 | adding changesets | |
1530 | adding manifests |
|
1530 | adding manifests | |
1531 | adding file changes |
|
1531 | adding file changes | |
1532 | added 2 changesets with 2 changes to 1 files (+1 heads) |
|
1532 | added 2 changesets with 2 changes to 1 files (+1 heads) | |
1533 | new changesets 2efd43f7b5ba:3d57ed3c1091 (2 drafts) |
|
1533 | new changesets 2efd43f7b5ba:3d57ed3c1091 (2 drafts) | |
1534 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
1534 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
1535 | $ hg -R ./client-other pull |
|
1535 | $ hg -R ./client-other pull | |
1536 | pulling from ssh://user@dummy/server |
|
1536 | pulling from ssh://user@dummy/server | |
1537 | searching for changes |
|
1537 | searching for changes | |
1538 | adding changesets |
|
1538 | adding changesets | |
1539 | adding manifests |
|
1539 | adding manifests | |
1540 | adding file changes |
|
1540 | adding file changes | |
1541 | added 2 changesets with 2 changes to 1 files (+1 heads) |
|
1541 | added 2 changesets with 2 changes to 1 files (+1 heads) | |
1542 | new changesets 2efd43f7b5ba:3d57ed3c1091 (2 drafts) |
|
1542 | new changesets 2efd43f7b5ba:3d57ed3c1091 (2 drafts) | |
1543 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
1543 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
1544 | $ hg -R ./client-racy pull |
|
1544 | $ hg -R ./client-racy pull | |
1545 | pulling from ssh://user@dummy/server |
|
1545 | pulling from ssh://user@dummy/server | |
1546 | searching for changes |
|
1546 | searching for changes | |
1547 | adding changesets |
|
1547 | adding changesets | |
1548 | adding manifests |
|
1548 | adding manifests | |
1549 | adding file changes |
|
1549 | adding file changes | |
1550 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
1550 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
1551 | new changesets de7b9e2ba3f6 (1 drafts) |
|
1551 | new changesets de7b9e2ba3f6 (1 drafts) | |
1552 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
1552 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
1553 |
|
1553 | |||
1554 | $ hg -R server graph |
|
1554 | $ hg -R server graph | |
1555 | o 3d57ed3c1091 C-T (other) |
|
1555 | o 3d57ed3c1091 C-T (other) | |
1556 | | |
|
1556 | | | |
1557 | o 2efd43f7b5ba C-S (default) |
|
1557 | o 2efd43f7b5ba C-S (default) | |
1558 | | |
|
1558 | | | |
1559 | | o de7b9e2ba3f6 C-R (other) |
|
1559 | | o de7b9e2ba3f6 C-R (other) | |
1560 | |/ |
|
1560 | |/ | |
1561 | o 1b58ee3f79e5 C-P (default) |
|
1561 | o 1b58ee3f79e5 C-P (default) | |
1562 | | |
|
1562 | | | |
1563 | o d0a85b2252a9 C-O (other) |
|
1563 | o d0a85b2252a9 C-O (other) | |
1564 | | |
|
1564 | | | |
1565 | | o b0ee3d6f51bc C-Q (default) |
|
1565 | | o b0ee3d6f51bc C-Q (default) | |
1566 | |/ |
|
1566 | |/ | |
1567 | o 55a6f1c01b48 C-Z (other) |
|
1567 | o 55a6f1c01b48 C-Z (other) | |
1568 | | |
|
1568 | | | |
1569 | o 866a66e18630 C-N (default) |
|
1569 | o 866a66e18630 C-N (default) | |
1570 | |\ |
|
1570 | |\ | |
1571 | +---o 6fd3090135df C-M (default) |
|
1571 | +---o 6fd3090135df C-M (default) | |
1572 | | | |
|
1572 | | | | |
1573 | | o cac2cead0ff0 C-L (default) |
|
1573 | | o cac2cead0ff0 C-L (default) | |
1574 | | | |
|
1574 | | | | |
1575 | o | be705100c623 C-K (default) |
|
1575 | o | be705100c623 C-K (default) | |
1576 | |\| |
|
1576 | |\| | |
1577 | o | d603e2c0cdd7 C-E (default) |
|
1577 | o | d603e2c0cdd7 C-E (default) | |
1578 | | | |
|
1578 | | | | |
1579 | | o 59e76faf78bd C-D (default) |
|
1579 | | o 59e76faf78bd C-D (default) | |
1580 | | | |
|
1580 | | | | |
1581 | | | o 89420bf00fae C-J (default) |
|
1581 | | | o 89420bf00fae C-J (default) | |
1582 | | | | |
|
1582 | | | | | |
1583 | | | | o b35ed749f288 C-I (my-second-test-branch) |
|
1583 | | | | o b35ed749f288 C-I (my-second-test-branch) | |
1584 | | | |/ |
|
1584 | | | |/ | |
1585 | | | o 75d69cba5402 C-G (default) |
|
1585 | | | o 75d69cba5402 C-G (default) | |
1586 | | | | |
|
1586 | | | | | |
1587 | | | | o 833be552cfe6 C-H (my-first-test-branch) |
|
1587 | | | | o 833be552cfe6 C-H (my-first-test-branch) | |
1588 | | | |/ |
|
1588 | | | |/ | |
1589 | | | o d9e379a8c432 C-F (default) |
|
1589 | | | o d9e379a8c432 C-F (default) | |
1590 | | | | |
|
1590 | | | | | |
1591 | +---o 51c544a58128 C-C (default) |
|
1591 | +---o 51c544a58128 C-C (default) | |
1592 | | | |
|
1592 | | | | |
1593 | | o a9149a1428e2 C-B (default) |
|
1593 | | o a9149a1428e2 C-B (default) | |
1594 | | | |
|
1594 | | | | |
1595 | o | 98217d5a1659 C-A (default) |
|
1595 | o | 98217d5a1659 C-A (default) | |
1596 | |/ |
|
1596 | |/ | |
1597 | o 842e2fac6304 C-ROOT (default) |
|
1597 | o 842e2fac6304 C-ROOT (default) | |
1598 |
|
1598 | |||
1599 |
|
1599 | |||
1600 | Creating changesets and markers |
|
1600 | Creating changesets and markers | |
1601 |
|
1601 | |||
1602 | (continue existing head) |
|
1602 | (continue existing head) | |
1603 |
|
1603 | |||
1604 | $ hg -R client-other/ up 'desc("C-Q")' |
|
1604 | $ hg -R client-other/ up 'desc("C-Q")' | |
1605 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1605 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1606 | $ echo aaa >> client-other/a |
|
1606 | $ echo aaa >> client-other/a | |
1607 | $ hg -R client-other/ commit -m "C-U" |
|
1607 | $ hg -R client-other/ commit -m "C-U" | |
1608 |
|
1608 | |||
1609 | (new topo branch obsoleting that same head) |
|
1609 | (new topo branch obsoleting that same head) | |
1610 |
|
1610 | |||
1611 | $ hg -R client-racy/ up 'desc("C-Z")' |
|
1611 | $ hg -R client-racy/ up 'desc("C-Z")' | |
1612 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1612 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1613 | $ echo bbb >> client-racy/a |
|
1613 | $ echo bbb >> client-racy/a | |
1614 | $ hg -R client-racy/ branch --force default |
|
1614 | $ hg -R client-racy/ branch --force default | |
1615 | marked working directory as branch default |
|
1615 | marked working directory as branch default | |
1616 | $ hg -R client-racy/ commit -m "C-V" |
|
1616 | $ hg -R client-racy/ commit -m "C-V" | |
1617 | created new head |
|
1617 | created new head | |
1618 | $ ID_Q=`hg -R client-racy log -T '{node}\n' -r 'desc("C-Q")'` |
|
1618 | $ ID_Q=`hg -R client-racy log -T '{node}\n' -r 'desc("C-Q")'` | |
1619 | $ ID_V=`hg -R client-racy log -T '{node}\n' -r 'desc("C-V")'` |
|
1619 | $ ID_V=`hg -R client-racy log -T '{node}\n' -r 'desc("C-V")'` | |
1620 | $ hg -R client-racy debugobsolete $ID_Q $ID_V |
|
1620 | $ hg -R client-racy debugobsolete $ID_Q $ID_V | |
1621 | 1 new obsolescence markers |
|
1621 | 1 new obsolescence markers | |
1622 | obsoleted 1 changesets |
|
1622 | obsoleted 1 changesets | |
1623 |
|
1623 | |||
1624 | Pushing |
|
1624 | Pushing | |
1625 |
|
1625 | |||
1626 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & |
|
1626 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & | |
1627 |
|
1627 | |||
1628 | $ waiton $TESTTMP/readyfile |
|
1628 | $ waiton $TESTTMP/readyfile | |
1629 |
|
1629 | |||
1630 | $ hg -R client-other push -fr 'tip' --new-branch |
|
1630 | $ hg -R client-other push -fr 'tip' --new-branch | |
1631 | pushing to ssh://user@dummy/server |
|
1631 | pushing to ssh://user@dummy/server | |
1632 | searching for changes |
|
1632 | searching for changes | |
1633 | remote: adding changesets |
|
1633 | remote: adding changesets | |
1634 | remote: adding manifests |
|
1634 | remote: adding manifests | |
1635 | remote: adding file changes |
|
1635 | remote: adding file changes | |
1636 | remote: added 1 changesets with 0 changes to 0 files |
|
1636 | remote: added 1 changesets with 0 changes to 0 files | |
1637 |
|
1637 | |||
1638 | $ release $TESTTMP/watchfile |
|
1638 | $ release $TESTTMP/watchfile | |
1639 |
|
1639 | |||
1640 | Check the result of the push |
|
1640 | Check the result of the push | |
1641 |
|
1641 | |||
1642 | $ cat ./push-log |
|
1642 | $ cat ./push-log | |
1643 | pushing to ssh://user@dummy/server |
|
1643 | pushing to ssh://user@dummy/server | |
1644 | searching for changes |
|
1644 | searching for changes | |
1645 | wrote ready: $TESTTMP/readyfile |
|
1645 | wrote ready: $TESTTMP/readyfile | |
1646 | waiting on: $TESTTMP/watchfile |
|
1646 | waiting on: $TESTTMP/watchfile | |
1647 | abort: push failed: |
|
1647 | abort: push failed: | |
1648 | 'remote repository changed while pushing - please try again' |
|
1648 | 'remote repository changed while pushing - please try again' | |
1649 |
|
1649 | |||
1650 | $ hg -R server debugobsolete |
|
1650 | $ hg -R server debugobsolete | |
1651 | $ hg -R server graph |
|
1651 | $ hg -R server graph | |
1652 | o a98a47d8b85b C-U (default) |
|
1652 | o a98a47d8b85b C-U (default) | |
1653 | | |
|
1653 | | | |
1654 | o b0ee3d6f51bc C-Q (default) |
|
1654 | o b0ee3d6f51bc C-Q (default) | |
1655 | | |
|
1655 | | | |
1656 | | o 3d57ed3c1091 C-T (other) |
|
1656 | | o 3d57ed3c1091 C-T (other) | |
1657 | | | |
|
1657 | | | | |
1658 | | o 2efd43f7b5ba C-S (default) |
|
1658 | | o 2efd43f7b5ba C-S (default) | |
1659 | | | |
|
1659 | | | | |
1660 | | | o de7b9e2ba3f6 C-R (other) |
|
1660 | | | o de7b9e2ba3f6 C-R (other) | |
1661 | | |/ |
|
1661 | | |/ | |
1662 | | o 1b58ee3f79e5 C-P (default) |
|
1662 | | o 1b58ee3f79e5 C-P (default) | |
1663 | | | |
|
1663 | | | | |
1664 | | o d0a85b2252a9 C-O (other) |
|
1664 | | o d0a85b2252a9 C-O (other) | |
1665 | |/ |
|
1665 | |/ | |
1666 | o 55a6f1c01b48 C-Z (other) |
|
1666 | o 55a6f1c01b48 C-Z (other) | |
1667 | | |
|
1667 | | | |
1668 | o 866a66e18630 C-N (default) |
|
1668 | o 866a66e18630 C-N (default) | |
1669 | |\ |
|
1669 | |\ | |
1670 | +---o 6fd3090135df C-M (default) |
|
1670 | +---o 6fd3090135df C-M (default) | |
1671 | | | |
|
1671 | | | | |
1672 | | o cac2cead0ff0 C-L (default) |
|
1672 | | o cac2cead0ff0 C-L (default) | |
1673 | | | |
|
1673 | | | | |
1674 | o | be705100c623 C-K (default) |
|
1674 | o | be705100c623 C-K (default) | |
1675 | |\| |
|
1675 | |\| | |
1676 | o | d603e2c0cdd7 C-E (default) |
|
1676 | o | d603e2c0cdd7 C-E (default) | |
1677 | | | |
|
1677 | | | | |
1678 | | o 59e76faf78bd C-D (default) |
|
1678 | | o 59e76faf78bd C-D (default) | |
1679 | | | |
|
1679 | | | | |
1680 | | | o 89420bf00fae C-J (default) |
|
1680 | | | o 89420bf00fae C-J (default) | |
1681 | | | | |
|
1681 | | | | | |
1682 | | | | o b35ed749f288 C-I (my-second-test-branch) |
|
1682 | | | | o b35ed749f288 C-I (my-second-test-branch) | |
1683 | | | |/ |
|
1683 | | | |/ | |
1684 | | | o 75d69cba5402 C-G (default) |
|
1684 | | | o 75d69cba5402 C-G (default) | |
1685 | | | | |
|
1685 | | | | | |
1686 | | | | o 833be552cfe6 C-H (my-first-test-branch) |
|
1686 | | | | o 833be552cfe6 C-H (my-first-test-branch) | |
1687 | | | |/ |
|
1687 | | | |/ | |
1688 | | | o d9e379a8c432 C-F (default) |
|
1688 | | | o d9e379a8c432 C-F (default) | |
1689 | | | | |
|
1689 | | | | | |
1690 | +---o 51c544a58128 C-C (default) |
|
1690 | +---o 51c544a58128 C-C (default) | |
1691 | | | |
|
1691 | | | | |
1692 | | o a9149a1428e2 C-B (default) |
|
1692 | | o a9149a1428e2 C-B (default) | |
1693 | | | |
|
1693 | | | | |
1694 | o | 98217d5a1659 C-A (default) |
|
1694 | o | 98217d5a1659 C-A (default) | |
1695 | |/ |
|
1695 | |/ | |
1696 | o 842e2fac6304 C-ROOT (default) |
|
1696 | o 842e2fac6304 C-ROOT (default) | |
1697 |
|
1697 | |||
1698 |
|
1698 | |||
1699 | racing commit push a new head obsoleting the one touched by the raced push |
|
1699 | racing commit push a new head obsoleting the one touched by the raced push | |
1700 | -------------------------------------------------------------------------- |
|
1700 | -------------------------------------------------------------------------- | |
1701 |
|
1701 | |||
1702 | (mirror test case of the previous one |
|
1702 | (mirror test case of the previous one | |
1703 |
|
1703 | |||
1704 | # a (raced branch default) |
|
1704 | # a (raced branch default) | |
1705 | # | |
|
1705 | # | | |
1706 | # ΓΈβ β b (racing) |
|
1706 | # ΓΈβ β b (racing) | |
1707 | # |/ |
|
1707 | # |/ | |
1708 | # * |
|
1708 | # * | |
1709 |
|
1709 | |||
1710 | (resync-all) |
|
1710 | (resync-all) | |
1711 |
|
1711 | |||
1712 | $ hg -R ./server pull ./client-racy |
|
1712 | $ hg -R ./server pull ./client-racy | |
1713 | pulling from ./client-racy |
|
1713 | pulling from ./client-racy | |
1714 | searching for changes |
|
1714 | searching for changes | |
1715 | adding changesets |
|
1715 | adding changesets | |
1716 | adding manifests |
|
1716 | adding manifests | |
1717 | adding file changes |
|
1717 | adding file changes | |
1718 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
1718 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
1719 | 1 new obsolescence markers |
|
1719 | 1 new obsolescence markers | |
1720 | obsoleted 1 changesets |
|
1720 | obsoleted 1 changesets | |
1721 | 1 new orphan changesets |
|
1721 | 1 new orphan changesets | |
1722 | new changesets 720c5163ecf6 (1 drafts) |
|
1722 | new changesets 720c5163ecf6 (1 drafts) | |
1723 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
1723 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
1724 | $ hg -R ./client-other pull |
|
1724 | $ hg -R ./client-other pull | |
1725 | pulling from ssh://user@dummy/server |
|
1725 | pulling from ssh://user@dummy/server | |
1726 | searching for changes |
|
1726 | searching for changes | |
1727 | adding changesets |
|
1727 | adding changesets | |
1728 | adding manifests |
|
1728 | adding manifests | |
1729 | adding file changes |
|
1729 | adding file changes | |
1730 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
1730 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
1731 | 1 new obsolescence markers |
|
1731 | 1 new obsolescence markers | |
1732 | obsoleted 1 changesets |
|
1732 | obsoleted 1 changesets | |
1733 | 1 new orphan changesets |
|
1733 | 1 new orphan changesets | |
1734 | new changesets 720c5163ecf6 (1 drafts) |
|
1734 | new changesets 720c5163ecf6 (1 drafts) | |
1735 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
1735 | (run 'hg heads .' to see heads, 'hg merge' to merge) | |
1736 | $ hg -R ./client-racy pull |
|
1736 | $ hg -R ./client-racy pull | |
1737 | pulling from ssh://user@dummy/server |
|
1737 | pulling from ssh://user@dummy/server | |
1738 | searching for changes |
|
1738 | searching for changes | |
1739 | adding changesets |
|
1739 | adding changesets | |
1740 | adding manifests |
|
1740 | adding manifests | |
1741 | adding file changes |
|
1741 | adding file changes | |
1742 | added 1 changesets with 0 changes to 0 files |
|
1742 | added 1 changesets with 0 changes to 0 files | |
1743 | 1 new orphan changesets |
|
1743 | 1 new orphan changesets | |
1744 | new changesets a98a47d8b85b (1 drafts) |
|
1744 | new changesets a98a47d8b85b (1 drafts) | |
1745 | (run 'hg update' to get a working copy) |
|
1745 | (run 'hg update' to get a working copy) | |
1746 |
|
1746 | |||
1747 | $ hg -R server debugobsolete |
|
1747 | $ hg -R server debugobsolete | |
1748 | b0ee3d6f51bc4c0ca6d4f2907708027a6c376233 720c5163ecf64dcc6216bee2d62bf3edb1882499 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1748 | b0ee3d6f51bc4c0ca6d4f2907708027a6c376233 720c5163ecf64dcc6216bee2d62bf3edb1882499 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
1749 | $ hg -R server graph |
|
1749 | $ hg -R server graph | |
1750 | o 720c5163ecf6 C-V (default) |
|
1750 | o 720c5163ecf6 C-V (default) | |
1751 | | |
|
1751 | | | |
1752 | | * a98a47d8b85b C-U (default) |
|
1752 | | * a98a47d8b85b C-U (default) | |
1753 | | | |
|
1753 | | | | |
1754 | | x b0ee3d6f51bc C-Q (default) |
|
1754 | | x b0ee3d6f51bc C-Q (default) | |
1755 | |/ |
|
1755 | |/ | |
1756 | | o 3d57ed3c1091 C-T (other) |
|
1756 | | o 3d57ed3c1091 C-T (other) | |
1757 | | | |
|
1757 | | | | |
1758 | | o 2efd43f7b5ba C-S (default) |
|
1758 | | o 2efd43f7b5ba C-S (default) | |
1759 | | | |
|
1759 | | | | |
1760 | | | o de7b9e2ba3f6 C-R (other) |
|
1760 | | | o de7b9e2ba3f6 C-R (other) | |
1761 | | |/ |
|
1761 | | |/ | |
1762 | | o 1b58ee3f79e5 C-P (default) |
|
1762 | | o 1b58ee3f79e5 C-P (default) | |
1763 | | | |
|
1763 | | | | |
1764 | | o d0a85b2252a9 C-O (other) |
|
1764 | | o d0a85b2252a9 C-O (other) | |
1765 | |/ |
|
1765 | |/ | |
1766 | o 55a6f1c01b48 C-Z (other) |
|
1766 | o 55a6f1c01b48 C-Z (other) | |
1767 | | |
|
1767 | | | |
1768 | o 866a66e18630 C-N (default) |
|
1768 | o 866a66e18630 C-N (default) | |
1769 | |\ |
|
1769 | |\ | |
1770 | +---o 6fd3090135df C-M (default) |
|
1770 | +---o 6fd3090135df C-M (default) | |
1771 | | | |
|
1771 | | | | |
1772 | | o cac2cead0ff0 C-L (default) |
|
1772 | | o cac2cead0ff0 C-L (default) | |
1773 | | | |
|
1773 | | | | |
1774 | o | be705100c623 C-K (default) |
|
1774 | o | be705100c623 C-K (default) | |
1775 | |\| |
|
1775 | |\| | |
1776 | o | d603e2c0cdd7 C-E (default) |
|
1776 | o | d603e2c0cdd7 C-E (default) | |
1777 | | | |
|
1777 | | | | |
1778 | | o 59e76faf78bd C-D (default) |
|
1778 | | o 59e76faf78bd C-D (default) | |
1779 | | | |
|
1779 | | | | |
1780 | | | o 89420bf00fae C-J (default) |
|
1780 | | | o 89420bf00fae C-J (default) | |
1781 | | | | |
|
1781 | | | | | |
1782 | | | | o b35ed749f288 C-I (my-second-test-branch) |
|
1782 | | | | o b35ed749f288 C-I (my-second-test-branch) | |
1783 | | | |/ |
|
1783 | | | |/ | |
1784 | | | o 75d69cba5402 C-G (default) |
|
1784 | | | o 75d69cba5402 C-G (default) | |
1785 | | | | |
|
1785 | | | | | |
1786 | | | | o 833be552cfe6 C-H (my-first-test-branch) |
|
1786 | | | | o 833be552cfe6 C-H (my-first-test-branch) | |
1787 | | | |/ |
|
1787 | | | |/ | |
1788 | | | o d9e379a8c432 C-F (default) |
|
1788 | | | o d9e379a8c432 C-F (default) | |
1789 | | | | |
|
1789 | | | | | |
1790 | +---o 51c544a58128 C-C (default) |
|
1790 | +---o 51c544a58128 C-C (default) | |
1791 | | | |
|
1791 | | | | |
1792 | | o a9149a1428e2 C-B (default) |
|
1792 | | o a9149a1428e2 C-B (default) | |
1793 | | | |
|
1793 | | | | |
1794 | o | 98217d5a1659 C-A (default) |
|
1794 | o | 98217d5a1659 C-A (default) | |
1795 | |/ |
|
1795 | |/ | |
1796 | o 842e2fac6304 C-ROOT (default) |
|
1796 | o 842e2fac6304 C-ROOT (default) | |
1797 |
|
1797 | |||
1798 |
|
1798 | |||
1799 | Creating changesets and markers |
|
1799 | Creating changesets and markers | |
1800 |
|
1800 | |||
1801 | (new topo branch obsoleting that same head) |
|
1801 | (new topo branch obsoleting that same head) | |
1802 |
|
1802 | |||
1803 | $ hg -R client-other/ up 'desc("C-Q")' |
|
1803 | $ hg -R client-other/ up 'desc("C-Q")' | |
1804 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1804 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1805 | $ echo bbb >> client-other/a |
|
1805 | $ echo bbb >> client-other/a | |
1806 | $ hg -R client-other/ branch --force default |
|
1806 | $ hg -R client-other/ branch --force default | |
1807 | marked working directory as branch default |
|
1807 | marked working directory as branch default | |
1808 | $ hg -R client-other/ commit -m "C-W" |
|
1808 | $ hg -R client-other/ commit -m "C-W" | |
1809 | 1 new orphan changesets |
|
1809 | 1 new orphan changesets | |
1810 | created new head |
|
1810 | created new head | |
1811 | $ ID_V=`hg -R client-other log -T '{node}\n' -r 'desc("C-V")'` |
|
1811 | $ ID_V=`hg -R client-other log -T '{node}\n' -r 'desc("C-V")'` | |
1812 | $ ID_W=`hg -R client-other log -T '{node}\n' -r 'desc("C-W")'` |
|
1812 | $ ID_W=`hg -R client-other log -T '{node}\n' -r 'desc("C-W")'` | |
1813 | $ hg -R client-other debugobsolete $ID_V $ID_W |
|
1813 | $ hg -R client-other debugobsolete $ID_V $ID_W | |
1814 | 1 new obsolescence markers |
|
1814 | 1 new obsolescence markers | |
1815 | obsoleted 1 changesets |
|
1815 | obsoleted 1 changesets | |
1816 |
|
1816 | |||
1817 | (continue the same head) |
|
1817 | (continue the same head) | |
1818 |
|
1818 | |||
1819 | $ echo aaa >> client-racy/a |
|
1819 | $ echo aaa >> client-racy/a | |
1820 | $ hg -R client-racy/ commit -m "C-X" |
|
1820 | $ hg -R client-racy/ commit -m "C-X" | |
1821 |
|
1821 | |||
1822 | Pushing |
|
1822 | Pushing | |
1823 |
|
1823 | |||
1824 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & |
|
1824 | $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 & | |
1825 |
|
1825 | |||
1826 | $ waiton $TESTTMP/readyfile |
|
1826 | $ waiton $TESTTMP/readyfile | |
1827 |
|
1827 | |||
1828 | $ hg -R client-other push -fr 'tip' --new-branch |
|
1828 | $ hg -R client-other push -fr 'tip' --new-branch | |
1829 | pushing to ssh://user@dummy/server |
|
1829 | pushing to ssh://user@dummy/server | |
1830 | searching for changes |
|
1830 | searching for changes | |
1831 | remote: adding changesets |
|
1831 | remote: adding changesets | |
1832 | remote: adding manifests |
|
1832 | remote: adding manifests | |
1833 | remote: adding file changes |
|
1833 | remote: adding file changes | |
1834 | remote: added 1 changesets with 0 changes to 1 files (+1 heads) |
|
1834 | remote: added 1 changesets with 0 changes to 1 files (+1 heads) | |
1835 | remote: 1 new obsolescence markers |
|
1835 | remote: 1 new obsolescence markers | |
1836 | remote: obsoleted 1 changesets |
|
1836 | remote: obsoleted 1 changesets | |
1837 | remote: 1 new orphan changesets |
|
1837 | remote: 1 new orphan changesets | |
1838 |
|
1838 | |||
1839 | $ release $TESTTMP/watchfile |
|
1839 | $ release $TESTTMP/watchfile | |
1840 |
|
1840 | |||
1841 | Check the result of the push |
|
1841 | Check the result of the push | |
1842 |
|
1842 | |||
1843 | $ cat ./push-log |
|
1843 | $ cat ./push-log | |
1844 | pushing to ssh://user@dummy/server |
|
1844 | pushing to ssh://user@dummy/server | |
1845 | searching for changes |
|
1845 | searching for changes | |
1846 | wrote ready: $TESTTMP/readyfile |
|
1846 | wrote ready: $TESTTMP/readyfile | |
1847 | waiting on: $TESTTMP/watchfile |
|
1847 | waiting on: $TESTTMP/watchfile | |
1848 | abort: push failed: |
|
1848 | abort: push failed: | |
1849 | 'remote repository changed while pushing - please try again' |
|
1849 | 'remote repository changed while pushing - please try again' | |
1850 |
|
1850 | |||
1851 | $ hg -R server debugobsolete |
|
1851 | $ hg -R server debugobsolete | |
1852 | b0ee3d6f51bc4c0ca6d4f2907708027a6c376233 720c5163ecf64dcc6216bee2d62bf3edb1882499 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1852 | b0ee3d6f51bc4c0ca6d4f2907708027a6c376233 720c5163ecf64dcc6216bee2d62bf3edb1882499 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
1853 | 720c5163ecf64dcc6216bee2d62bf3edb1882499 39bc0598afe90ab18da460bafecc0fa953b77596 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
1853 | 720c5163ecf64dcc6216bee2d62bf3edb1882499 39bc0598afe90ab18da460bafecc0fa953b77596 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
1854 | $ hg -R server graph --hidden |
|
1854 | $ hg -R server graph --hidden | |
1855 | * 39bc0598afe9 C-W (default) |
|
1855 | * 39bc0598afe9 C-W (default) | |
1856 | | |
|
1856 | | | |
1857 | | * a98a47d8b85b C-U (default) |
|
1857 | | * a98a47d8b85b C-U (default) | |
1858 | |/ |
|
1858 | |/ | |
1859 | x b0ee3d6f51bc C-Q (default) |
|
1859 | x b0ee3d6f51bc C-Q (default) | |
1860 | | |
|
1860 | | | |
1861 | | o 3d57ed3c1091 C-T (other) |
|
1861 | | o 3d57ed3c1091 C-T (other) | |
1862 | | | |
|
1862 | | | | |
1863 | | o 2efd43f7b5ba C-S (default) |
|
1863 | | o 2efd43f7b5ba C-S (default) | |
1864 | | | |
|
1864 | | | | |
1865 | | | o de7b9e2ba3f6 C-R (other) |
|
1865 | | | o de7b9e2ba3f6 C-R (other) | |
1866 | | |/ |
|
1866 | | |/ | |
1867 | | o 1b58ee3f79e5 C-P (default) |
|
1867 | | o 1b58ee3f79e5 C-P (default) | |
1868 | | | |
|
1868 | | | | |
1869 | | o d0a85b2252a9 C-O (other) |
|
1869 | | o d0a85b2252a9 C-O (other) | |
1870 | |/ |
|
1870 | |/ | |
1871 | | x 720c5163ecf6 C-V (default) |
|
1871 | | x 720c5163ecf6 C-V (default) | |
1872 | |/ |
|
1872 | |/ | |
1873 | o 55a6f1c01b48 C-Z (other) |
|
1873 | o 55a6f1c01b48 C-Z (other) | |
1874 | | |
|
1874 | | | |
1875 | o 866a66e18630 C-N (default) |
|
1875 | o 866a66e18630 C-N (default) | |
1876 | |\ |
|
1876 | |\ | |
1877 | +---o 6fd3090135df C-M (default) |
|
1877 | +---o 6fd3090135df C-M (default) | |
1878 | | | |
|
1878 | | | | |
1879 | | o cac2cead0ff0 C-L (default) |
|
1879 | | o cac2cead0ff0 C-L (default) | |
1880 | | | |
|
1880 | | | | |
1881 | o | be705100c623 C-K (default) |
|
1881 | o | be705100c623 C-K (default) | |
1882 | |\| |
|
1882 | |\| | |
1883 | o | d603e2c0cdd7 C-E (default) |
|
1883 | o | d603e2c0cdd7 C-E (default) | |
1884 | | | |
|
1884 | | | | |
1885 | | o 59e76faf78bd C-D (default) |
|
1885 | | o 59e76faf78bd C-D (default) | |
1886 | | | |
|
1886 | | | | |
1887 | | | o 89420bf00fae C-J (default) |
|
1887 | | | o 89420bf00fae C-J (default) | |
1888 | | | | |
|
1888 | | | | | |
1889 | | | | o b35ed749f288 C-I (my-second-test-branch) |
|
1889 | | | | o b35ed749f288 C-I (my-second-test-branch) | |
1890 | | | |/ |
|
1890 | | | |/ | |
1891 | | | o 75d69cba5402 C-G (default) |
|
1891 | | | o 75d69cba5402 C-G (default) | |
1892 | | | | |
|
1892 | | | | | |
1893 | | | | o 833be552cfe6 C-H (my-first-test-branch) |
|
1893 | | | | o 833be552cfe6 C-H (my-first-test-branch) | |
1894 | | | |/ |
|
1894 | | | |/ | |
1895 | | | o d9e379a8c432 C-F (default) |
|
1895 | | | o d9e379a8c432 C-F (default) | |
1896 | | | | |
|
1896 | | | | | |
1897 | +---o 51c544a58128 C-C (default) |
|
1897 | +---o 51c544a58128 C-C (default) | |
1898 | | | |
|
1898 | | | | |
1899 | | o a9149a1428e2 C-B (default) |
|
1899 | | o a9149a1428e2 C-B (default) | |
1900 | | | |
|
1900 | | | | |
1901 | o | 98217d5a1659 C-A (default) |
|
1901 | o | 98217d5a1659 C-A (default) | |
1902 | |/ |
|
1902 | |/ | |
1903 | o 842e2fac6304 C-ROOT (default) |
|
1903 | o 842e2fac6304 C-ROOT (default) | |
1904 |
|
1904 |
@@ -1,581 +1,581 b'' | |||||
1 | This test is a duplicate of 'test-http.t' feel free to factor out |
|
1 | This test is a duplicate of 'test-http.t' feel free to factor out | |
2 | parts that are not bundle1/bundle2 specific. |
|
2 | parts that are not bundle1/bundle2 specific. | |
3 |
|
3 | |||
4 | $ cat << EOF >> $HGRCPATH |
|
4 | $ cat << EOF >> $HGRCPATH | |
5 | > [devel] |
|
5 | > [devel] | |
6 | > # This test is dedicated to interaction through old bundle |
|
6 | > # This test is dedicated to interaction through old bundle | |
7 | > legacy.exchange = bundle1 |
|
7 | > legacy.exchange = bundle1 | |
8 | > EOF |
|
8 | > EOF | |
9 |
|
9 | |||
10 |
|
10 | |||
11 | This test tries to exercise the ssh functionality with a dummy script |
|
11 | This test tries to exercise the ssh functionality with a dummy script | |
12 |
|
12 | |||
13 | creating 'remote' repo |
|
13 | creating 'remote' repo | |
14 |
|
14 | |||
15 | $ hg init remote |
|
15 | $ hg init remote | |
16 | $ cd remote |
|
16 | $ cd remote | |
17 | $ echo this > foo |
|
17 | $ echo this > foo | |
18 | $ echo this > fooO |
|
18 | $ echo this > fooO | |
19 | $ hg ci -A -m "init" foo fooO |
|
19 | $ hg ci -A -m "init" foo fooO | |
20 |
|
20 | |||
21 | insert a closed branch (issue4428) |
|
21 | insert a closed branch (issue4428) | |
22 |
|
22 | |||
23 | $ hg up null |
|
23 | $ hg up null | |
24 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
24 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
25 | $ hg branch closed |
|
25 | $ hg branch closed | |
26 | marked working directory as branch closed |
|
26 | marked working directory as branch closed | |
27 | (branches are permanent and global, did you want a bookmark?) |
|
27 | (branches are permanent and global, did you want a bookmark?) | |
28 | $ hg ci -mc0 |
|
28 | $ hg ci -mc0 | |
29 | $ hg ci --close-branch -mc1 |
|
29 | $ hg ci --close-branch -mc1 | |
30 | $ hg up -q default |
|
30 | $ hg up -q default | |
31 |
|
31 | |||
32 | configure for serving |
|
32 | configure for serving | |
33 |
|
33 | |||
34 | $ cat <<EOF > .hg/hgrc |
|
34 | $ cat <<EOF > .hg/hgrc | |
35 | > [server] |
|
35 | > [server] | |
36 | > uncompressed = True |
|
36 | > uncompressed = True | |
37 | > |
|
37 | > | |
38 | > [hooks] |
|
38 | > [hooks] | |
39 | > changegroup = sh -c "printenv.py --line changegroup-in-remote 0 ../dummylog" |
|
39 | > changegroup = sh -c "printenv.py --line changegroup-in-remote 0 ../dummylog" | |
40 | > EOF |
|
40 | > EOF | |
41 | $ cd $TESTTMP |
|
41 | $ cd $TESTTMP | |
42 |
|
42 | |||
43 | repo not found error |
|
43 | repo not found error | |
44 |
|
44 | |||
45 | $ hg clone ssh://user@dummy/nonexistent local |
|
45 | $ hg clone ssh://user@dummy/nonexistent local | |
46 | remote: abort: repository nonexistent not found |
|
46 | remote: abort: repository nonexistent not found | |
47 | abort: no suitable response from remote hg |
|
47 | abort: no suitable response from remote hg | |
48 | [255] |
|
48 | [255] | |
49 |
|
49 | |||
50 | non-existent absolute path |
|
50 | non-existent absolute path | |
51 |
|
51 | |||
52 | #if no-msys |
|
52 | #if no-msys | |
53 | $ hg clone ssh://user@dummy//`pwd`/nonexistent local |
|
53 | $ hg clone ssh://user@dummy//`pwd`/nonexistent local | |
54 | remote: abort: repository /$TESTTMP/nonexistent not found |
|
54 | remote: abort: repository /$TESTTMP/nonexistent not found | |
55 | abort: no suitable response from remote hg |
|
55 | abort: no suitable response from remote hg | |
56 | [255] |
|
56 | [255] | |
57 | #endif |
|
57 | #endif | |
58 |
|
58 | |||
59 | clone remote via stream |
|
59 | clone remote via stream | |
60 |
|
60 | |||
61 | #if no-reposimplestore |
|
61 | #if no-reposimplestore | |
62 |
|
62 | |||
63 | $ hg clone --stream ssh://user@dummy/remote local-stream |
|
63 | $ hg clone --stream ssh://user@dummy/remote local-stream | |
64 | streaming all changes |
|
64 | streaming all changes | |
65 | 4 files to transfer, 602 bytes of data (no-zstd !) |
|
65 | 4 files to transfer, 602 bytes of data (no-zstd !) | |
66 | transferred 602 bytes in * seconds (*) (glob) (no-zstd !) |
|
66 | transferred 602 bytes in * seconds (*) (glob) (no-zstd !) | |
67 | 4 files to transfer, 621 bytes of data (zstd !) |
|
67 | 4 files to transfer, 621 bytes of data (zstd !) | |
68 | transferred 621 bytes in * seconds (* */sec) (glob) (zstd !) |
|
68 | transferred 621 bytes in * seconds (* */sec) (glob) (zstd !) | |
69 | searching for changes |
|
69 | searching for changes | |
70 | no changes found |
|
70 | no changes found | |
71 | updating to branch default |
|
71 | updating to branch default | |
72 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
72 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
73 | $ cd local-stream |
|
73 | $ cd local-stream | |
74 | $ hg verify -q |
|
74 | $ hg verify -q | |
75 | $ hg branches |
|
75 | $ hg branches | |
76 | default 0:1160648e36ce |
|
76 | default 0:1160648e36ce | |
77 | $ cd $TESTTMP |
|
77 | $ cd $TESTTMP | |
78 |
|
78 | |||
79 | clone bookmarks via stream |
|
79 | clone bookmarks via stream | |
80 |
|
80 | |||
81 | $ hg -R local-stream book mybook |
|
81 | $ hg -R local-stream book mybook | |
82 | $ hg clone --stream ssh://user@dummy/local-stream stream2 |
|
82 | $ hg clone --stream ssh://user@dummy/local-stream stream2 | |
83 | streaming all changes |
|
83 | streaming all changes | |
84 | 4 files to transfer, 602 bytes of data (no-zstd !) |
|
84 | 4 files to transfer, 602 bytes of data (no-zstd !) | |
85 | transferred 602 bytes in * seconds (*) (glob) (no-zstd !) |
|
85 | transferred 602 bytes in * seconds (*) (glob) (no-zstd !) | |
86 | 4 files to transfer, 621 bytes of data (zstd !) |
|
86 | 4 files to transfer, 621 bytes of data (zstd !) | |
87 | transferred 621 bytes in * seconds (* */sec) (glob) (zstd !) |
|
87 | transferred 621 bytes in * seconds (* */sec) (glob) (zstd !) | |
88 | searching for changes |
|
88 | searching for changes | |
89 | no changes found |
|
89 | no changes found | |
90 | updating to branch default |
|
90 | updating to branch default | |
91 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
91 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
92 | $ cd stream2 |
|
92 | $ cd stream2 | |
93 | $ hg book |
|
93 | $ hg book | |
94 | mybook 0:1160648e36ce |
|
94 | mybook 0:1160648e36ce | |
95 | $ cd $TESTTMP |
|
95 | $ cd $TESTTMP | |
96 | $ rm -rf local-stream stream2 |
|
96 | $ rm -rf local-stream stream2 | |
97 |
|
97 | |||
98 | #endif |
|
98 | #endif | |
99 |
|
99 | |||
100 | clone remote via pull |
|
100 | clone remote via pull | |
101 |
|
101 | |||
102 | $ hg clone ssh://user@dummy/remote local |
|
102 | $ hg clone ssh://user@dummy/remote local | |
103 | requesting all changes |
|
103 | requesting all changes | |
104 | adding changesets |
|
104 | adding changesets | |
105 | adding manifests |
|
105 | adding manifests | |
106 | adding file changes |
|
106 | adding file changes | |
107 | added 3 changesets with 2 changes to 2 files |
|
107 | added 3 changesets with 2 changes to 2 files | |
108 | new changesets 1160648e36ce:ad076bfb429d |
|
108 | new changesets 1160648e36ce:ad076bfb429d | |
109 | updating to branch default |
|
109 | updating to branch default | |
110 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
110 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
111 |
|
111 | |||
112 | verify |
|
112 | verify | |
113 |
|
113 | |||
114 | $ cd local |
|
114 | $ cd local | |
115 | $ hg verify -q |
|
115 | $ hg verify -q | |
116 | $ cat >> .hg/hgrc <<EOF |
|
116 | $ cat >> .hg/hgrc <<EOF | |
117 | > [hooks] |
|
117 | > [hooks] | |
118 | > changegroup = sh -c "printenv.py --line changegroup-in-local 0 ../dummylog" |
|
118 | > changegroup = sh -c "printenv.py --line changegroup-in-local 0 ../dummylog" | |
119 | > EOF |
|
119 | > EOF | |
120 |
|
120 | |||
121 | empty default pull |
|
121 | empty default pull | |
122 |
|
122 | |||
123 | $ hg paths |
|
123 | $ hg paths | |
124 | default = ssh://user@dummy/remote |
|
124 | default = ssh://user@dummy/remote | |
125 | $ hg pull |
|
125 | $ hg pull | |
126 | pulling from ssh://user@dummy/remote |
|
126 | pulling from ssh://user@dummy/remote | |
127 | searching for changes |
|
127 | searching for changes | |
128 | no changes found |
|
128 | no changes found | |
129 |
|
129 | |||
130 | pull from wrong ssh URL |
|
130 | pull from wrong ssh URL | |
131 |
|
131 | |||
132 | $ hg pull ssh://user@dummy/doesnotexist |
|
132 | $ hg pull ssh://user@dummy/doesnotexist | |
133 | pulling from ssh://user@dummy/doesnotexist |
|
133 | pulling from ssh://user@dummy/doesnotexist | |
134 | remote: abort: repository doesnotexist not found |
|
134 | remote: abort: repository doesnotexist not found | |
135 | abort: no suitable response from remote hg |
|
135 | abort: no suitable response from remote hg | |
136 | [255] |
|
136 | [255] | |
137 |
|
137 | |||
138 | local change |
|
138 | local change | |
139 |
|
139 | |||
140 | $ echo bleah > foo |
|
140 | $ echo bleah > foo | |
141 | $ hg ci -m "add" |
|
141 | $ hg ci -m "add" | |
142 |
|
142 | |||
143 | updating rc |
|
143 | updating rc | |
144 |
|
144 | |||
145 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
145 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc | |
146 |
|
146 | |||
147 | find outgoing |
|
147 | find outgoing | |
148 |
|
148 | |||
149 | $ hg out ssh://user@dummy/remote |
|
149 | $ hg out ssh://user@dummy/remote | |
150 | comparing with ssh://user@dummy/remote |
|
150 | comparing with ssh://user@dummy/remote | |
151 | searching for changes |
|
151 | searching for changes | |
152 | changeset: 3:a28a9d1a809c |
|
152 | changeset: 3:a28a9d1a809c | |
153 | tag: tip |
|
153 | tag: tip | |
154 | parent: 0:1160648e36ce |
|
154 | parent: 0:1160648e36ce | |
155 | user: test |
|
155 | user: test | |
156 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
156 | date: Thu Jan 01 00:00:00 1970 +0000 | |
157 | summary: add |
|
157 | summary: add | |
158 |
|
158 | |||
159 |
|
159 | |||
160 | find incoming on the remote side |
|
160 | find incoming on the remote side | |
161 |
|
161 | |||
162 | $ hg incoming -R ../remote ssh://user@dummy/local |
|
162 | $ hg incoming -R ../remote ssh://user@dummy/local | |
163 | comparing with ssh://user@dummy/local |
|
163 | comparing with ssh://user@dummy/local | |
164 | searching for changes |
|
164 | searching for changes | |
165 | changeset: 3:a28a9d1a809c |
|
165 | changeset: 3:a28a9d1a809c | |
166 | tag: tip |
|
166 | tag: tip | |
167 | parent: 0:1160648e36ce |
|
167 | parent: 0:1160648e36ce | |
168 | user: test |
|
168 | user: test | |
169 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
169 | date: Thu Jan 01 00:00:00 1970 +0000 | |
170 | summary: add |
|
170 | summary: add | |
171 |
|
171 | |||
172 |
|
172 | |||
173 | find incoming on the remote side (using absolute path) |
|
173 | find incoming on the remote side (using absolute path) | |
174 |
|
174 | |||
175 | $ hg incoming -R ../remote "ssh://user@dummy/`pwd`" |
|
175 | $ hg incoming -R ../remote "ssh://user@dummy/`pwd`" | |
176 | comparing with ssh://user@dummy/$TESTTMP/local |
|
176 | comparing with ssh://user@dummy/$TESTTMP/local | |
177 | searching for changes |
|
177 | searching for changes | |
178 | changeset: 3:a28a9d1a809c |
|
178 | changeset: 3:a28a9d1a809c | |
179 | tag: tip |
|
179 | tag: tip | |
180 | parent: 0:1160648e36ce |
|
180 | parent: 0:1160648e36ce | |
181 | user: test |
|
181 | user: test | |
182 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
182 | date: Thu Jan 01 00:00:00 1970 +0000 | |
183 | summary: add |
|
183 | summary: add | |
184 |
|
184 | |||
185 |
|
185 | |||
186 | push |
|
186 | push | |
187 |
|
187 | |||
188 | $ hg push |
|
188 | $ hg push | |
189 | pushing to ssh://user@dummy/remote |
|
189 | pushing to ssh://user@dummy/remote | |
190 | searching for changes |
|
190 | searching for changes | |
191 | remote: adding changesets |
|
191 | remote: adding changesets | |
192 | remote: adding manifests |
|
192 | remote: adding manifests | |
193 | remote: adding file changes |
|
193 | remote: adding file changes | |
194 | remote: added 1 changesets with 1 changes to 1 files |
|
194 | remote: added 1 changesets with 1 changes to 1 files | |
195 | $ cd $TESTTMP/remote |
|
195 | $ cd $TESTTMP/remote | |
196 |
|
196 | |||
197 | check remote tip |
|
197 | check remote tip | |
198 |
|
198 | |||
199 | $ hg tip |
|
199 | $ hg tip | |
200 | changeset: 3:a28a9d1a809c |
|
200 | changeset: 3:a28a9d1a809c | |
201 | tag: tip |
|
201 | tag: tip | |
202 | parent: 0:1160648e36ce |
|
202 | parent: 0:1160648e36ce | |
203 | user: test |
|
203 | user: test | |
204 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
204 | date: Thu Jan 01 00:00:00 1970 +0000 | |
205 | summary: add |
|
205 | summary: add | |
206 |
|
206 | |||
207 | $ hg verify -q |
|
207 | $ hg verify -q | |
208 | $ hg cat -r tip foo |
|
208 | $ hg cat -r tip foo | |
209 | bleah |
|
209 | bleah | |
210 | $ echo z > z |
|
210 | $ echo z > z | |
211 | $ hg ci -A -m z z |
|
211 | $ hg ci -A -m z z | |
212 | created new head |
|
212 | created new head | |
213 |
|
213 | |||
214 | test pushkeys and bookmarks |
|
214 | test pushkeys and bookmarks | |
215 |
|
215 | |||
216 | $ cd $TESTTMP/local |
|
216 | $ cd $TESTTMP/local | |
217 | $ hg debugpushkey ssh://user@dummy/remote namespaces |
|
217 | $ hg debugpushkey ssh://user@dummy/remote namespaces | |
218 | bookmarks |
|
218 | bookmarks | |
219 | namespaces |
|
219 | namespaces | |
220 | phases |
|
220 | phases | |
221 | $ hg book foo -r 0 |
|
221 | $ hg book foo -r 0 | |
222 | $ hg out -B |
|
222 | $ hg out -B | |
223 | comparing with ssh://user@dummy/remote |
|
223 | comparing with ssh://user@dummy/remote | |
224 | searching for changed bookmarks |
|
224 | searching for changed bookmarks | |
225 | foo 1160648e36ce |
|
225 | foo 1160648e36ce | |
226 | $ hg push -B foo |
|
226 | $ hg push -B foo | |
227 | pushing to ssh://user@dummy/remote |
|
227 | pushing to ssh://user@dummy/remote | |
228 | searching for changes |
|
228 | searching for changes | |
229 | no changes found |
|
229 | no changes found | |
230 | exporting bookmark foo |
|
230 | exporting bookmark foo | |
231 | [1] |
|
231 | [1] | |
232 | $ hg debugpushkey ssh://user@dummy/remote bookmarks |
|
232 | $ hg debugpushkey ssh://user@dummy/remote bookmarks | |
233 | foo 1160648e36cec0054048a7edc4110c6f84fde594 |
|
233 | foo 1160648e36cec0054048a7edc4110c6f84fde594 | |
234 | $ hg book -f foo |
|
234 | $ hg book -f foo | |
235 | $ hg push --traceback |
|
235 | $ hg push --traceback | |
236 | pushing to ssh://user@dummy/remote |
|
236 | pushing to ssh://user@dummy/remote | |
237 | searching for changes |
|
237 | searching for changes | |
238 | no changes found |
|
238 | no changes found | |
239 | updating bookmark foo |
|
239 | updating bookmark foo | |
240 | [1] |
|
240 | [1] | |
241 | $ hg book -d foo |
|
241 | $ hg book -d foo | |
242 | $ hg in -B |
|
242 | $ hg in -B | |
243 | comparing with ssh://user@dummy/remote |
|
243 | comparing with ssh://user@dummy/remote | |
244 | searching for changed bookmarks |
|
244 | searching for changed bookmarks | |
245 | foo a28a9d1a809c |
|
245 | foo a28a9d1a809c | |
246 | $ hg book -f -r 0 foo |
|
246 | $ hg book -f -r 0 foo | |
247 | $ hg pull -B foo |
|
247 | $ hg pull -B foo | |
248 | pulling from ssh://user@dummy/remote |
|
248 | pulling from ssh://user@dummy/remote | |
249 | no changes found |
|
249 | no changes found | |
250 | updating bookmark foo |
|
250 | updating bookmark foo | |
251 | $ hg book -d foo |
|
251 | $ hg book -d foo | |
252 | $ hg push -B foo |
|
252 | $ hg push -B foo | |
253 | pushing to ssh://user@dummy/remote |
|
253 | pushing to ssh://user@dummy/remote | |
254 | searching for changes |
|
254 | searching for changes | |
255 | no changes found |
|
255 | no changes found | |
256 | deleting remote bookmark foo |
|
256 | deleting remote bookmark foo | |
257 | [1] |
|
257 | [1] | |
258 |
|
258 | |||
259 | a bad, evil hook that prints to stdout |
|
259 | a bad, evil hook that prints to stdout | |
260 |
|
260 | |||
261 | $ cat <<EOF > $TESTTMP/badhook |
|
261 | $ cat <<EOF > $TESTTMP/badhook | |
262 | > import sys |
|
262 | > import sys | |
263 | > sys.stdout.write("KABOOM\n") |
|
263 | > sys.stdout.write("KABOOM\n") | |
264 | > EOF |
|
264 | > EOF | |
265 |
|
265 | |||
266 | $ echo '[hooks]' >> ../remote/.hg/hgrc |
|
266 | $ echo '[hooks]' >> ../remote/.hg/hgrc | |
267 | $ echo "changegroup.stdout = \"$PYTHON\" $TESTTMP/badhook" >> ../remote/.hg/hgrc |
|
267 | $ echo "changegroup.stdout = \"$PYTHON\" $TESTTMP/badhook" >> ../remote/.hg/hgrc | |
268 | $ echo r > r |
|
268 | $ echo r > r | |
269 | $ hg ci -A -m z r |
|
269 | $ hg ci -A -m z r | |
270 |
|
270 | |||
271 | push should succeed even though it has an unexpected response |
|
271 | push should succeed even though it has an unexpected response | |
272 |
|
272 | |||
273 | $ hg push |
|
273 | $ hg push | |
274 | pushing to ssh://user@dummy/remote |
|
274 | pushing to ssh://user@dummy/remote | |
275 | searching for changes |
|
275 | searching for changes | |
276 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 |
|
276 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 | |
277 | remote: adding changesets |
|
277 | remote: adding changesets | |
278 | remote: adding manifests |
|
278 | remote: adding manifests | |
279 | remote: adding file changes |
|
279 | remote: adding file changes | |
280 | remote: added 1 changesets with 1 changes to 1 files |
|
280 | remote: added 1 changesets with 1 changes to 1 files | |
281 | remote: KABOOM |
|
281 | remote: KABOOM | |
282 | $ hg -R ../remote heads |
|
282 | $ hg -R ../remote heads | |
283 | changeset: 5:1383141674ec |
|
283 | changeset: 5:1383141674ec | |
284 | tag: tip |
|
284 | tag: tip | |
285 | parent: 3:a28a9d1a809c |
|
285 | parent: 3:a28a9d1a809c | |
286 | user: test |
|
286 | user: test | |
287 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
287 | date: Thu Jan 01 00:00:00 1970 +0000 | |
288 | summary: z |
|
288 | summary: z | |
289 |
|
289 | |||
290 | changeset: 4:6c0482d977a3 |
|
290 | changeset: 4:6c0482d977a3 | |
291 | parent: 0:1160648e36ce |
|
291 | parent: 0:1160648e36ce | |
292 | user: test |
|
292 | user: test | |
293 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
293 | date: Thu Jan 01 00:00:00 1970 +0000 | |
294 | summary: z |
|
294 | summary: z | |
295 |
|
295 | |||
296 |
|
296 | |||
297 | clone bookmarks |
|
297 | clone bookmarks | |
298 |
|
298 | |||
299 | $ hg -R ../remote bookmark test |
|
299 | $ hg -R ../remote bookmark test | |
300 | $ hg -R ../remote bookmarks |
|
300 | $ hg -R ../remote bookmarks | |
301 | * test 4:6c0482d977a3 |
|
301 | * test 4:6c0482d977a3 | |
302 | $ hg clone ssh://user@dummy/remote local-bookmarks |
|
302 | $ hg clone ssh://user@dummy/remote local-bookmarks | |
303 | requesting all changes |
|
303 | requesting all changes | |
304 | adding changesets |
|
304 | adding changesets | |
305 | adding manifests |
|
305 | adding manifests | |
306 | adding file changes |
|
306 | adding file changes | |
307 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
307 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
308 | new changesets 1160648e36ce:1383141674ec |
|
308 | new changesets 1160648e36ce:1383141674ec | |
309 | updating to branch default |
|
309 | updating to branch default | |
310 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
310 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
311 | $ hg -R local-bookmarks bookmarks |
|
311 | $ hg -R local-bookmarks bookmarks | |
312 | test 4:6c0482d977a3 |
|
312 | test 4:6c0482d977a3 | |
313 |
|
313 | |||
314 | passwords in ssh urls are not supported |
|
314 | passwords in ssh urls are not supported | |
315 | (we use a glob here because different Python versions give different |
|
315 | (we use a glob here because different Python versions give different | |
316 | results here) |
|
316 | results here) | |
317 |
|
317 | |||
318 | $ hg push ssh://user:erroneouspwd@dummy/remote |
|
318 | $ hg push ssh://user:erroneouspwd@dummy/remote | |
319 | pushing to ssh://user:*@dummy/remote (glob) |
|
319 | pushing to ssh://user:*@dummy/remote (glob) | |
320 | abort: password in URL not supported |
|
320 | abort: password in URL not supported | |
321 | [255] |
|
321 | [255] | |
322 |
|
322 | |||
323 | $ cd $TESTTMP |
|
323 | $ cd $TESTTMP | |
324 |
|
324 | |||
325 | hide outer repo |
|
325 | hide outer repo | |
326 | $ hg init |
|
326 | $ hg init | |
327 |
|
327 | |||
328 | Test remote paths with spaces (issue2983): |
|
328 | Test remote paths with spaces (issue2983): | |
329 |
|
329 | |||
330 | $ hg init "ssh://user@dummy/a repo" |
|
330 | $ hg init "ssh://user@dummy/a repo" | |
331 | $ touch "$TESTTMP/a repo/test" |
|
331 | $ touch "$TESTTMP/a repo/test" | |
332 | $ hg -R 'a repo' commit -A -m "test" |
|
332 | $ hg -R 'a repo' commit -A -m "test" | |
333 | adding test |
|
333 | adding test | |
334 | $ hg -R 'a repo' tag tag |
|
334 | $ hg -R 'a repo' tag tag | |
335 | $ hg id "ssh://user@dummy/a repo" |
|
335 | $ hg id "ssh://user@dummy/a repo" | |
336 | 73649e48688a |
|
336 | 73649e48688a | |
337 |
|
337 | |||
338 | $ hg id "ssh://user@dummy/a repo#noNoNO" |
|
338 | $ hg id "ssh://user@dummy/a repo#noNoNO" | |
339 | abort: unknown revision 'noNoNO' |
|
339 | abort: unknown revision 'noNoNO' | |
340 | [255] |
|
340 | [255] | |
341 |
|
341 | |||
342 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): |
|
342 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): | |
343 |
|
343 | |||
344 | $ hg clone "ssh://user@dummy/a repo" |
|
344 | $ hg clone "ssh://user@dummy/a repo" | |
345 | destination directory: a repo |
|
345 | destination directory: a repo | |
346 | abort: destination 'a repo' is not empty |
|
346 | abort: destination 'a repo' is not empty | |
347 | [10] |
|
347 | [10] | |
348 |
|
348 | |||
349 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might |
|
349 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might | |
350 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right |
|
350 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right | |
351 | parameters: |
|
351 | parameters: | |
352 |
|
352 | |||
353 | $ cat > ssh.sh << EOF |
|
353 | $ cat > ssh.sh << EOF | |
354 | > userhost="\$1" |
|
354 | > userhost="\$1" | |
355 | > SSH_ORIGINAL_COMMAND="\$2" |
|
355 | > SSH_ORIGINAL_COMMAND="\$2" | |
356 | > export SSH_ORIGINAL_COMMAND |
|
356 | > export SSH_ORIGINAL_COMMAND | |
357 | > PYTHONPATH="$PYTHONPATH" |
|
357 | > PYTHONPATH="$PYTHONPATH" | |
358 | > export PYTHONPATH |
|
358 | > export PYTHONPATH | |
359 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" |
|
359 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" | |
360 | > EOF |
|
360 | > EOF | |
361 |
|
361 | |||
362 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" |
|
362 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" | |
363 | 73649e48688a |
|
363 | 73649e48688a | |
364 |
|
364 | |||
365 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" |
|
365 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" | |
366 | remote: Illegal repository "$TESTTMP/a'repo" |
|
366 | remote: Illegal repository "$TESTTMP/a'repo" | |
367 | abort: no suitable response from remote hg |
|
367 | abort: no suitable response from remote hg | |
368 | [255] |
|
368 | [255] | |
369 |
|
369 | |||
370 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" |
|
370 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" | |
371 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" |
|
371 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" | |
372 | abort: no suitable response from remote hg |
|
372 | abort: no suitable response from remote hg | |
373 | [255] |
|
373 | [255] | |
374 |
|
374 | |||
375 | $ SSH_ORIGINAL_COMMAND="'hg' serve -R 'a'repo' --stdio" "$PYTHON" "$TESTDIR/../contrib/hg-ssh" |
|
375 | $ SSH_ORIGINAL_COMMAND="'hg' serve -R 'a'repo' --stdio" "$PYTHON" "$TESTDIR/../contrib/hg-ssh" | |
376 | Illegal command "'hg' serve -R 'a'repo' --stdio": No closing quotation |
|
376 | Illegal command "'hg' serve -R 'a'repo' --stdio": No closing quotation | |
377 | [255] |
|
377 | [255] | |
378 |
|
378 | |||
379 | Test hg-ssh in read-only mode: |
|
379 | Test hg-ssh in read-only mode: | |
380 |
|
380 | |||
381 | $ cat > ssh.sh << EOF |
|
381 | $ cat > ssh.sh << EOF | |
382 | > userhost="\$1" |
|
382 | > userhost="\$1" | |
383 | > SSH_ORIGINAL_COMMAND="\$2" |
|
383 | > SSH_ORIGINAL_COMMAND="\$2" | |
384 | > export SSH_ORIGINAL_COMMAND |
|
384 | > export SSH_ORIGINAL_COMMAND | |
385 | > PYTHONPATH="$PYTHONPATH" |
|
385 | > PYTHONPATH="$PYTHONPATH" | |
386 | > export PYTHONPATH |
|
386 | > export PYTHONPATH | |
387 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" |
|
387 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" | |
388 | > EOF |
|
388 | > EOF | |
389 |
|
389 | |||
390 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local |
|
390 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local | |
391 | requesting all changes |
|
391 | requesting all changes | |
392 | adding changesets |
|
392 | adding changesets | |
393 | adding manifests |
|
393 | adding manifests | |
394 | adding file changes |
|
394 | adding file changes | |
395 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
395 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
396 | new changesets 1160648e36ce:1383141674ec |
|
396 | new changesets 1160648e36ce:1383141674ec | |
397 | updating to branch default |
|
397 | updating to branch default | |
398 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
398 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
399 |
|
399 | |||
400 | $ cd read-only-local |
|
400 | $ cd read-only-local | |
401 | $ echo "baz" > bar |
|
401 | $ echo "baz" > bar | |
402 | $ hg ci -A -m "unpushable commit" bar |
|
402 | $ hg ci -A -m "unpushable commit" bar | |
403 | $ hg push --ssh "sh ../ssh.sh" |
|
403 | $ hg push --ssh "sh ../ssh.sh" | |
404 | pushing to ssh://user@dummy/*/remote (glob) |
|
404 | pushing to ssh://user@dummy/*/remote (glob) | |
405 | searching for changes |
|
405 | searching for changes | |
406 | remote: $EACCES$ |
|
406 | remote: $EACCES$ | |
407 | remote: abort: pretxnopen.hg-ssh hook failed |
|
407 | remote: abort: pretxnopen.hg-ssh hook failed | |
408 | remote: $EACCES$ |
|
408 | remote: $EACCES$ | |
409 | remote: pushkey-abort: prepushkey.hg-ssh hook failed |
|
409 | remote: pushkey-abort: prepushkey.hg-ssh hook failed | |
410 | updating 6c0482d977a3 to public failed! |
|
410 | updating 6c0482d977a3 to public failed! | |
411 | [1] |
|
411 | [1] | |
412 |
|
412 | |||
413 | $ cd $TESTTMP |
|
413 | $ cd $TESTTMP | |
414 |
|
414 | |||
415 | stderr from remote commands should be printed before stdout from local code (issue4336) |
|
415 | stderr from remote commands should be printed before stdout from local code (issue4336) | |
416 |
|
416 | |||
417 | $ hg clone remote stderr-ordering |
|
417 | $ hg clone remote stderr-ordering | |
418 | updating to branch default |
|
418 | updating to branch default | |
419 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
419 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
420 | $ cd stderr-ordering |
|
420 | $ cd stderr-ordering | |
421 | $ cat >> localwrite.py << EOF |
|
421 | $ cat >> localwrite.py << EOF | |
422 | > from mercurial import exchange, extensions |
|
422 | > from mercurial import exchange, extensions | |
423 | > |
|
423 | > | |
424 | > def wrappedpush(orig, repo, *args, **kwargs): |
|
424 | > def wrappedpush(orig, repo, *args, **kwargs): | |
425 | > res = orig(repo, *args, **kwargs) |
|
425 | > res = orig(repo, *args, **kwargs) | |
426 | > repo.ui.write(b'local stdout\n') |
|
426 | > repo.ui.write(b'local stdout\n') | |
427 | > return res |
|
427 | > return res | |
428 | > |
|
428 | > | |
429 | > def extsetup(ui): |
|
429 | > def extsetup(ui): | |
430 |
> extensions.wrapfunction(exchange, |
|
430 | > extensions.wrapfunction(exchange, 'push', wrappedpush) | |
431 |
|
|
431 | > EOF | |
432 |
|
432 | |||
433 | $ cat >> .hg/hgrc << EOF |
|
433 | $ cat >> .hg/hgrc << EOF | |
434 | > [paths] |
|
434 | > [paths] | |
435 | > default-push = ssh://user@dummy/remote |
|
435 | > default-push = ssh://user@dummy/remote | |
436 | > [extensions] |
|
436 | > [extensions] | |
437 | > localwrite = localwrite.py |
|
437 | > localwrite = localwrite.py | |
438 | > EOF |
|
438 | > EOF | |
439 |
|
439 | |||
440 | $ echo localwrite > foo |
|
440 | $ echo localwrite > foo | |
441 | $ hg commit -m 'testing localwrite' |
|
441 | $ hg commit -m 'testing localwrite' | |
442 | $ hg push |
|
442 | $ hg push | |
443 | pushing to ssh://user@dummy/remote |
|
443 | pushing to ssh://user@dummy/remote | |
444 | searching for changes |
|
444 | searching for changes | |
445 | remote: adding changesets |
|
445 | remote: adding changesets | |
446 | remote: adding manifests |
|
446 | remote: adding manifests | |
447 | remote: adding file changes |
|
447 | remote: adding file changes | |
448 | remote: added 1 changesets with 1 changes to 1 files |
|
448 | remote: added 1 changesets with 1 changes to 1 files | |
449 | remote: KABOOM |
|
449 | remote: KABOOM | |
450 | local stdout |
|
450 | local stdout | |
451 |
|
451 | |||
452 | debug output |
|
452 | debug output | |
453 |
|
453 | |||
454 | $ hg pull --debug ssh://user@dummy/remote |
|
454 | $ hg pull --debug ssh://user@dummy/remote | |
455 | pulling from ssh://user@dummy/remote |
|
455 | pulling from ssh://user@dummy/remote | |
456 | running .* ".*[/\\]dummyssh" ['"]user@dummy['"] ['"]hg -R remote serve --stdio['"] (re) |
|
456 | running .* ".*[/\\]dummyssh" ['"]user@dummy['"] ['"]hg -R remote serve --stdio['"] (re) | |
457 | sending hello command |
|
457 | sending hello command | |
458 | sending between command |
|
458 | sending between command | |
459 | remote: \d+ (re) |
|
459 | remote: \d+ (re) | |
460 | remote: capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (re) |
|
460 | remote: capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (re) | |
461 | remote: 1 |
|
461 | remote: 1 | |
462 | sending protocaps command |
|
462 | sending protocaps command | |
463 | preparing listkeys for "bookmarks" |
|
463 | preparing listkeys for "bookmarks" | |
464 | sending listkeys command |
|
464 | sending listkeys command | |
465 | received listkey for "bookmarks": 45 bytes |
|
465 | received listkey for "bookmarks": 45 bytes | |
466 | query 1; heads |
|
466 | query 1; heads | |
467 | sending batch command |
|
467 | sending batch command | |
468 | searching for changes |
|
468 | searching for changes | |
469 | all remote heads known locally |
|
469 | all remote heads known locally | |
470 | no changes found |
|
470 | no changes found | |
471 | preparing listkeys for "phases" |
|
471 | preparing listkeys for "phases" | |
472 | sending listkeys command |
|
472 | sending listkeys command | |
473 | received listkey for "phases": 15 bytes |
|
473 | received listkey for "phases": 15 bytes | |
474 | checking for updated bookmarks |
|
474 | checking for updated bookmarks | |
475 |
|
475 | |||
476 | $ cd $TESTTMP |
|
476 | $ cd $TESTTMP | |
477 |
|
477 | |||
478 | $ cat dummylog |
|
478 | $ cat dummylog | |
479 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
479 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
480 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio (no-msys !) |
|
480 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio (no-msys !) | |
481 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
481 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
482 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio (no-reposimplestore !) |
|
482 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio (no-reposimplestore !) | |
483 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) |
|
483 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) | |
484 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) |
|
484 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) | |
485 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio |
|
485 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio | |
486 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
486 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
487 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
487 | Got arguments 1:user@dummy 2:hg -R local serve --stdio | |
488 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio |
|
488 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio | |
489 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
489 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
490 | changegroup-in-remote hook: HG_HOOKNAME=changegroup |
|
490 | changegroup-in-remote hook: HG_HOOKNAME=changegroup | |
491 | HG_HOOKTYPE=changegroup |
|
491 | HG_HOOKTYPE=changegroup | |
492 | HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 |
|
492 | HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 | |
493 | HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 |
|
493 | HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 | |
494 | HG_SOURCE=serve |
|
494 | HG_SOURCE=serve | |
495 | HG_TXNID=TXN:$ID$ |
|
495 | HG_TXNID=TXN:$ID$ | |
496 | HG_TXNNAME=serve |
|
496 | HG_TXNNAME=serve | |
497 | remote:ssh:$LOCALIP |
|
497 | remote:ssh:$LOCALIP | |
498 | HG_URL=remote:ssh:$LOCALIP |
|
498 | HG_URL=remote:ssh:$LOCALIP | |
499 |
|
499 | |||
500 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
500 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
501 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
501 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
502 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
502 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
503 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
503 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
504 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
504 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
505 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
505 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
506 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
506 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
507 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
507 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
508 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
508 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
509 | changegroup-in-remote hook: HG_HOOKNAME=changegroup |
|
509 | changegroup-in-remote hook: HG_HOOKNAME=changegroup | |
510 | HG_HOOKTYPE=changegroup |
|
510 | HG_HOOKTYPE=changegroup | |
511 | HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 |
|
511 | HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 | |
512 | HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 |
|
512 | HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 | |
513 | HG_SOURCE=serve |
|
513 | HG_SOURCE=serve | |
514 | HG_TXNID=TXN:$ID$ |
|
514 | HG_TXNID=TXN:$ID$ | |
515 | HG_TXNNAME=serve |
|
515 | HG_TXNNAME=serve | |
516 | remote:ssh:$LOCALIP |
|
516 | remote:ssh:$LOCALIP | |
517 | HG_URL=remote:ssh:$LOCALIP |
|
517 | HG_URL=remote:ssh:$LOCALIP | |
518 |
|
518 | |||
519 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
519 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
520 | Got arguments 1:user@dummy 2:hg init 'a repo' |
|
520 | Got arguments 1:user@dummy 2:hg init 'a repo' | |
521 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
521 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
522 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
522 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
523 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
523 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
524 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
524 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
525 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
525 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
526 | changegroup-in-remote hook: HG_HOOKNAME=changegroup |
|
526 | changegroup-in-remote hook: HG_HOOKNAME=changegroup | |
527 | HG_HOOKTYPE=changegroup |
|
527 | HG_HOOKTYPE=changegroup | |
528 | HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 |
|
528 | HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 | |
529 | HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 |
|
529 | HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 | |
530 | HG_SOURCE=serve |
|
530 | HG_SOURCE=serve | |
531 | HG_TXNID=TXN:$ID$ |
|
531 | HG_TXNID=TXN:$ID$ | |
532 | HG_TXNNAME=serve |
|
532 | HG_TXNNAME=serve | |
533 | remote:ssh:$LOCALIP |
|
533 | remote:ssh:$LOCALIP | |
534 | HG_URL=remote:ssh:$LOCALIP |
|
534 | HG_URL=remote:ssh:$LOCALIP | |
535 |
|
535 | |||
536 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
536 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
537 |
|
537 | |||
538 | remote hook failure is attributed to remote |
|
538 | remote hook failure is attributed to remote | |
539 |
|
539 | |||
540 | $ cat > $TESTTMP/failhook << EOF |
|
540 | $ cat > $TESTTMP/failhook << EOF | |
541 | > def hook(ui, repo, **kwargs): |
|
541 | > def hook(ui, repo, **kwargs): | |
542 | > ui.write(b'hook failure!\n') |
|
542 | > ui.write(b'hook failure!\n') | |
543 | > ui.flush() |
|
543 | > ui.flush() | |
544 | > return 1 |
|
544 | > return 1 | |
545 | > EOF |
|
545 | > EOF | |
546 |
|
546 | |||
547 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc |
|
547 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc | |
548 |
|
548 | |||
549 | $ hg -q clone ssh://user@dummy/remote hookout |
|
549 | $ hg -q clone ssh://user@dummy/remote hookout | |
550 | $ cd hookout |
|
550 | $ cd hookout | |
551 | $ touch hookfailure |
|
551 | $ touch hookfailure | |
552 | $ hg -q commit -A -m 'remote hook failure' |
|
552 | $ hg -q commit -A -m 'remote hook failure' | |
553 | $ hg push |
|
553 | $ hg push | |
554 | pushing to ssh://user@dummy/remote |
|
554 | pushing to ssh://user@dummy/remote | |
555 | searching for changes |
|
555 | searching for changes | |
556 | remote: adding changesets |
|
556 | remote: adding changesets | |
557 | remote: adding manifests |
|
557 | remote: adding manifests | |
558 | remote: adding file changes |
|
558 | remote: adding file changes | |
559 | remote: hook failure! |
|
559 | remote: hook failure! | |
560 | remote: transaction abort! |
|
560 | remote: transaction abort! | |
561 | remote: rollback completed |
|
561 | remote: rollback completed | |
562 | remote: abort: pretxnchangegroup.fail hook failed |
|
562 | remote: abort: pretxnchangegroup.fail hook failed | |
563 | [1] |
|
563 | [1] | |
564 |
|
564 | |||
565 | abort during pull is properly reported as such |
|
565 | abort during pull is properly reported as such | |
566 |
|
566 | |||
567 | $ echo morefoo >> ../remote/foo |
|
567 | $ echo morefoo >> ../remote/foo | |
568 | $ hg -R ../remote commit --message "more foo to be pulled" |
|
568 | $ hg -R ../remote commit --message "more foo to be pulled" | |
569 | $ cat >> ../remote/.hg/hgrc << EOF |
|
569 | $ cat >> ../remote/.hg/hgrc << EOF | |
570 | > [extensions] |
|
570 | > [extensions] | |
571 | > crash = ${TESTDIR}/crashgetbundler.py |
|
571 | > crash = ${TESTDIR}/crashgetbundler.py | |
572 | > EOF |
|
572 | > EOF | |
573 | $ hg pull |
|
573 | $ hg pull | |
574 | pulling from ssh://user@dummy/remote |
|
574 | pulling from ssh://user@dummy/remote | |
575 | searching for changes |
|
575 | searching for changes | |
576 | adding changesets |
|
576 | adding changesets | |
577 | remote: abort: this is an exercise |
|
577 | remote: abort: this is an exercise | |
578 | transaction abort! |
|
578 | transaction abort! | |
579 | rollback completed |
|
579 | rollback completed | |
580 | abort: stream ended unexpectedly (got 0 bytes, expected 4) |
|
580 | abort: stream ended unexpectedly (got 0 bytes, expected 4) | |
581 | [255] |
|
581 | [255] |
@@ -1,699 +1,699 b'' | |||||
1 | This test tries to exercise the ssh functionality with a dummy script |
|
1 | This test tries to exercise the ssh functionality with a dummy script | |
2 |
|
2 | |||
3 | creating 'remote' repo |
|
3 | creating 'remote' repo | |
4 |
|
4 | |||
5 | $ hg init remote |
|
5 | $ hg init remote | |
6 | $ cd remote |
|
6 | $ cd remote | |
7 | $ echo this > foo |
|
7 | $ echo this > foo | |
8 | $ echo this > fooO |
|
8 | $ echo this > fooO | |
9 | $ hg ci -A -m "init" foo fooO |
|
9 | $ hg ci -A -m "init" foo fooO | |
10 |
|
10 | |||
11 | insert a closed branch (issue4428) |
|
11 | insert a closed branch (issue4428) | |
12 |
|
12 | |||
13 | $ hg up null |
|
13 | $ hg up null | |
14 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
14 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
15 | $ hg branch closed |
|
15 | $ hg branch closed | |
16 | marked working directory as branch closed |
|
16 | marked working directory as branch closed | |
17 | (branches are permanent and global, did you want a bookmark?) |
|
17 | (branches are permanent and global, did you want a bookmark?) | |
18 | $ hg ci -mc0 |
|
18 | $ hg ci -mc0 | |
19 | $ hg ci --close-branch -mc1 |
|
19 | $ hg ci --close-branch -mc1 | |
20 | $ hg up -q default |
|
20 | $ hg up -q default | |
21 |
|
21 | |||
22 | configure for serving |
|
22 | configure for serving | |
23 |
|
23 | |||
24 | $ cat <<EOF > .hg/hgrc |
|
24 | $ cat <<EOF > .hg/hgrc | |
25 | > [server] |
|
25 | > [server] | |
26 | > uncompressed = True |
|
26 | > uncompressed = True | |
27 | > |
|
27 | > | |
28 | > [hooks] |
|
28 | > [hooks] | |
29 | > changegroup = sh -c "printenv.py --line changegroup-in-remote 0 ../dummylog" |
|
29 | > changegroup = sh -c "printenv.py --line changegroup-in-remote 0 ../dummylog" | |
30 | > EOF |
|
30 | > EOF | |
31 | $ cd $TESTTMP |
|
31 | $ cd $TESTTMP | |
32 |
|
32 | |||
33 | repo not found error |
|
33 | repo not found error | |
34 |
|
34 | |||
35 | $ hg clone ssh://user@dummy/nonexistent local |
|
35 | $ hg clone ssh://user@dummy/nonexistent local | |
36 | remote: abort: repository nonexistent not found |
|
36 | remote: abort: repository nonexistent not found | |
37 | abort: no suitable response from remote hg |
|
37 | abort: no suitable response from remote hg | |
38 | [255] |
|
38 | [255] | |
39 | $ hg clone -q ssh://user@dummy/nonexistent local |
|
39 | $ hg clone -q ssh://user@dummy/nonexistent local | |
40 | remote: abort: repository nonexistent not found |
|
40 | remote: abort: repository nonexistent not found | |
41 | abort: no suitable response from remote hg |
|
41 | abort: no suitable response from remote hg | |
42 | [255] |
|
42 | [255] | |
43 |
|
43 | |||
44 | non-existent absolute path |
|
44 | non-existent absolute path | |
45 |
|
45 | |||
46 | $ hg clone ssh://user@dummy/`pwd`/nonexistent local |
|
46 | $ hg clone ssh://user@dummy/`pwd`/nonexistent local | |
47 | remote: abort: repository $TESTTMP/nonexistent not found |
|
47 | remote: abort: repository $TESTTMP/nonexistent not found | |
48 | abort: no suitable response from remote hg |
|
48 | abort: no suitable response from remote hg | |
49 | [255] |
|
49 | [255] | |
50 |
|
50 | |||
51 | clone remote via stream |
|
51 | clone remote via stream | |
52 |
|
52 | |||
53 | #if no-reposimplestore |
|
53 | #if no-reposimplestore | |
54 |
|
54 | |||
55 | $ hg clone --stream ssh://user@dummy/remote local-stream |
|
55 | $ hg clone --stream ssh://user@dummy/remote local-stream | |
56 | streaming all changes |
|
56 | streaming all changes | |
57 | 8 files to transfer, 827 bytes of data (no-zstd !) |
|
57 | 8 files to transfer, 827 bytes of data (no-zstd !) | |
58 | transferred 827 bytes in * seconds (*) (glob) (no-zstd !) |
|
58 | transferred 827 bytes in * seconds (*) (glob) (no-zstd !) | |
59 | 8 files to transfer, 846 bytes of data (zstd !) |
|
59 | 8 files to transfer, 846 bytes of data (zstd !) | |
60 | transferred * bytes in * seconds (* */sec) (glob) (zstd !) |
|
60 | transferred * bytes in * seconds (* */sec) (glob) (zstd !) | |
61 | updating to branch default |
|
61 | updating to branch default | |
62 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
62 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
63 | $ cd local-stream |
|
63 | $ cd local-stream | |
64 | $ hg verify -q |
|
64 | $ hg verify -q | |
65 | $ hg branches |
|
65 | $ hg branches | |
66 | default 0:1160648e36ce |
|
66 | default 0:1160648e36ce | |
67 | $ cd $TESTTMP |
|
67 | $ cd $TESTTMP | |
68 |
|
68 | |||
69 | clone bookmarks via stream |
|
69 | clone bookmarks via stream | |
70 |
|
70 | |||
71 | $ hg -R local-stream book mybook |
|
71 | $ hg -R local-stream book mybook | |
72 | $ hg clone --stream ssh://user@dummy/local-stream stream2 |
|
72 | $ hg clone --stream ssh://user@dummy/local-stream stream2 | |
73 | streaming all changes |
|
73 | streaming all changes | |
74 | 15 files to transfer, * of data (glob) |
|
74 | 15 files to transfer, * of data (glob) | |
75 | transferred * in * seconds (*) (glob) |
|
75 | transferred * in * seconds (*) (glob) | |
76 | updating to branch default |
|
76 | updating to branch default | |
77 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
77 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
78 | $ cd stream2 |
|
78 | $ cd stream2 | |
79 | $ hg book |
|
79 | $ hg book | |
80 | mybook 0:1160648e36ce |
|
80 | mybook 0:1160648e36ce | |
81 | $ cd $TESTTMP |
|
81 | $ cd $TESTTMP | |
82 | $ rm -rf local-stream stream2 |
|
82 | $ rm -rf local-stream stream2 | |
83 |
|
83 | |||
84 | #endif |
|
84 | #endif | |
85 |
|
85 | |||
86 | clone remote via pull |
|
86 | clone remote via pull | |
87 |
|
87 | |||
88 | $ hg clone ssh://user@dummy/remote local |
|
88 | $ hg clone ssh://user@dummy/remote local | |
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 3 changesets with 2 changes to 2 files |
|
93 | added 3 changesets with 2 changes to 2 files | |
94 | new changesets 1160648e36ce:ad076bfb429d |
|
94 | new changesets 1160648e36ce:ad076bfb429d | |
95 | updating to branch default |
|
95 | updating to branch default | |
96 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
96 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
97 |
|
97 | |||
98 | verify |
|
98 | verify | |
99 |
|
99 | |||
100 | $ cd local |
|
100 | $ cd local | |
101 | $ hg verify -q |
|
101 | $ hg verify -q | |
102 | $ cat >> .hg/hgrc <<EOF |
|
102 | $ cat >> .hg/hgrc <<EOF | |
103 | > [hooks] |
|
103 | > [hooks] | |
104 | > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog" |
|
104 | > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog" | |
105 | > EOF |
|
105 | > EOF | |
106 |
|
106 | |||
107 | empty default pull |
|
107 | empty default pull | |
108 |
|
108 | |||
109 | $ hg paths |
|
109 | $ hg paths | |
110 | default = ssh://user@dummy/remote |
|
110 | default = ssh://user@dummy/remote | |
111 | $ hg pull |
|
111 | $ hg pull | |
112 | pulling from ssh://user@dummy/remote |
|
112 | pulling from ssh://user@dummy/remote | |
113 | searching for changes |
|
113 | searching for changes | |
114 | no changes found |
|
114 | no changes found | |
115 |
|
115 | |||
116 | pull from wrong ssh URL |
|
116 | pull from wrong ssh URL | |
117 |
|
117 | |||
118 | $ hg pull ssh://user@dummy/doesnotexist |
|
118 | $ hg pull ssh://user@dummy/doesnotexist | |
119 | pulling from ssh://user@dummy/doesnotexist |
|
119 | pulling from ssh://user@dummy/doesnotexist | |
120 | remote: abort: repository doesnotexist not found |
|
120 | remote: abort: repository doesnotexist not found | |
121 | abort: no suitable response from remote hg |
|
121 | abort: no suitable response from remote hg | |
122 | [255] |
|
122 | [255] | |
123 |
|
123 | |||
124 | local change |
|
124 | local change | |
125 |
|
125 | |||
126 | $ echo bleah > foo |
|
126 | $ echo bleah > foo | |
127 | $ hg ci -m "add" |
|
127 | $ hg ci -m "add" | |
128 |
|
128 | |||
129 | updating rc |
|
129 | updating rc | |
130 |
|
130 | |||
131 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
131 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc | |
132 |
|
132 | |||
133 | find outgoing |
|
133 | find outgoing | |
134 |
|
134 | |||
135 | $ hg out ssh://user@dummy/remote |
|
135 | $ hg out ssh://user@dummy/remote | |
136 | comparing with ssh://user@dummy/remote |
|
136 | comparing with ssh://user@dummy/remote | |
137 | searching for changes |
|
137 | searching for changes | |
138 | changeset: 3:a28a9d1a809c |
|
138 | changeset: 3:a28a9d1a809c | |
139 | tag: tip |
|
139 | tag: tip | |
140 | parent: 0:1160648e36ce |
|
140 | parent: 0:1160648e36ce | |
141 | user: test |
|
141 | user: test | |
142 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
142 | date: Thu Jan 01 00:00:00 1970 +0000 | |
143 | summary: add |
|
143 | summary: add | |
144 |
|
144 | |||
145 |
|
145 | |||
146 | find incoming on the remote side |
|
146 | find incoming on the remote side | |
147 |
|
147 | |||
148 | $ hg incoming -R ../remote ssh://user@dummy/local |
|
148 | $ hg incoming -R ../remote ssh://user@dummy/local | |
149 | comparing with ssh://user@dummy/local |
|
149 | comparing with ssh://user@dummy/local | |
150 | searching for changes |
|
150 | searching for changes | |
151 | changeset: 3:a28a9d1a809c |
|
151 | changeset: 3:a28a9d1a809c | |
152 | tag: tip |
|
152 | tag: tip | |
153 | parent: 0:1160648e36ce |
|
153 | parent: 0:1160648e36ce | |
154 | user: test |
|
154 | user: test | |
155 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
155 | date: Thu Jan 01 00:00:00 1970 +0000 | |
156 | summary: add |
|
156 | summary: add | |
157 |
|
157 | |||
158 |
|
158 | |||
159 | find incoming on the remote side (using absolute path) |
|
159 | find incoming on the remote side (using absolute path) | |
160 |
|
160 | |||
161 | $ hg incoming -R ../remote "ssh://user@dummy/`pwd`" |
|
161 | $ hg incoming -R ../remote "ssh://user@dummy/`pwd`" | |
162 | comparing with ssh://user@dummy/$TESTTMP/local |
|
162 | comparing with ssh://user@dummy/$TESTTMP/local | |
163 | searching for changes |
|
163 | searching for changes | |
164 | changeset: 3:a28a9d1a809c |
|
164 | changeset: 3:a28a9d1a809c | |
165 | tag: tip |
|
165 | tag: tip | |
166 | parent: 0:1160648e36ce |
|
166 | parent: 0:1160648e36ce | |
167 | user: test |
|
167 | user: test | |
168 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
168 | date: Thu Jan 01 00:00:00 1970 +0000 | |
169 | summary: add |
|
169 | summary: add | |
170 |
|
170 | |||
171 |
|
171 | |||
172 | push |
|
172 | push | |
173 |
|
173 | |||
174 | $ hg push |
|
174 | $ hg push | |
175 | pushing to ssh://user@dummy/remote |
|
175 | pushing to ssh://user@dummy/remote | |
176 | searching for changes |
|
176 | searching for changes | |
177 | remote: adding changesets |
|
177 | remote: adding changesets | |
178 | remote: adding manifests |
|
178 | remote: adding manifests | |
179 | remote: adding file changes |
|
179 | remote: adding file changes | |
180 | remote: added 1 changesets with 1 changes to 1 files |
|
180 | remote: added 1 changesets with 1 changes to 1 files | |
181 | $ cd $TESTTMP/remote |
|
181 | $ cd $TESTTMP/remote | |
182 |
|
182 | |||
183 | check remote tip |
|
183 | check remote tip | |
184 |
|
184 | |||
185 | $ hg tip |
|
185 | $ hg tip | |
186 | changeset: 3:a28a9d1a809c |
|
186 | changeset: 3:a28a9d1a809c | |
187 | tag: tip |
|
187 | tag: tip | |
188 | parent: 0:1160648e36ce |
|
188 | parent: 0:1160648e36ce | |
189 | user: test |
|
189 | user: test | |
190 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
190 | date: Thu Jan 01 00:00:00 1970 +0000 | |
191 | summary: add |
|
191 | summary: add | |
192 |
|
192 | |||
193 | $ hg verify -q |
|
193 | $ hg verify -q | |
194 | $ hg cat -r tip foo |
|
194 | $ hg cat -r tip foo | |
195 | bleah |
|
195 | bleah | |
196 | $ echo z > z |
|
196 | $ echo z > z | |
197 | $ hg ci -A -m z z |
|
197 | $ hg ci -A -m z z | |
198 | created new head |
|
198 | created new head | |
199 |
|
199 | |||
200 | test pushkeys and bookmarks |
|
200 | test pushkeys and bookmarks | |
201 |
|
201 | |||
202 | $ cd $TESTTMP/local |
|
202 | $ cd $TESTTMP/local | |
203 | $ hg debugpushkey ssh://user@dummy/remote namespaces |
|
203 | $ hg debugpushkey ssh://user@dummy/remote namespaces | |
204 | bookmarks |
|
204 | bookmarks | |
205 | namespaces |
|
205 | namespaces | |
206 | phases |
|
206 | phases | |
207 | $ hg book foo -r 0 |
|
207 | $ hg book foo -r 0 | |
208 | $ hg out -B --config paths.default=bogus://invalid --config paths.default:pushurl=`hg paths default` |
|
208 | $ hg out -B --config paths.default=bogus://invalid --config paths.default:pushurl=`hg paths default` | |
209 | comparing with ssh://user@dummy/remote |
|
209 | comparing with ssh://user@dummy/remote | |
210 | searching for changed bookmarks |
|
210 | searching for changed bookmarks | |
211 | foo 1160648e36ce |
|
211 | foo 1160648e36ce | |
212 | $ hg push -B foo |
|
212 | $ hg push -B foo | |
213 | pushing to ssh://user@dummy/remote |
|
213 | pushing to ssh://user@dummy/remote | |
214 | searching for changes |
|
214 | searching for changes | |
215 | no changes found |
|
215 | no changes found | |
216 | exporting bookmark foo |
|
216 | exporting bookmark foo | |
217 | [1] |
|
217 | [1] | |
218 | $ hg debugpushkey ssh://user@dummy/remote bookmarks |
|
218 | $ hg debugpushkey ssh://user@dummy/remote bookmarks | |
219 | foo 1160648e36cec0054048a7edc4110c6f84fde594 |
|
219 | foo 1160648e36cec0054048a7edc4110c6f84fde594 | |
220 | $ hg book -f foo |
|
220 | $ hg book -f foo | |
221 | $ hg push --traceback |
|
221 | $ hg push --traceback | |
222 | pushing to ssh://user@dummy/remote |
|
222 | pushing to ssh://user@dummy/remote | |
223 | searching for changes |
|
223 | searching for changes | |
224 | no changes found |
|
224 | no changes found | |
225 | updating bookmark foo |
|
225 | updating bookmark foo | |
226 | [1] |
|
226 | [1] | |
227 | $ hg book -d foo |
|
227 | $ hg book -d foo | |
228 | $ hg in -B |
|
228 | $ hg in -B | |
229 | comparing with ssh://user@dummy/remote |
|
229 | comparing with ssh://user@dummy/remote | |
230 | searching for changed bookmarks |
|
230 | searching for changed bookmarks | |
231 | foo a28a9d1a809c |
|
231 | foo a28a9d1a809c | |
232 | $ hg book -f -r 0 foo |
|
232 | $ hg book -f -r 0 foo | |
233 | $ hg pull -B foo |
|
233 | $ hg pull -B foo | |
234 | pulling from ssh://user@dummy/remote |
|
234 | pulling from ssh://user@dummy/remote | |
235 | no changes found |
|
235 | no changes found | |
236 | updating bookmark foo |
|
236 | updating bookmark foo | |
237 | $ hg book -d foo |
|
237 | $ hg book -d foo | |
238 | $ hg push -B foo |
|
238 | $ hg push -B foo | |
239 | pushing to ssh://user@dummy/remote |
|
239 | pushing to ssh://user@dummy/remote | |
240 | searching for changes |
|
240 | searching for changes | |
241 | no changes found |
|
241 | no changes found | |
242 | deleting remote bookmark foo |
|
242 | deleting remote bookmark foo | |
243 | [1] |
|
243 | [1] | |
244 |
|
244 | |||
245 | a bad, evil hook that prints to stdout |
|
245 | a bad, evil hook that prints to stdout | |
246 |
|
246 | |||
247 | $ cat <<EOF > $TESTTMP/badhook |
|
247 | $ cat <<EOF > $TESTTMP/badhook | |
248 | > import sys |
|
248 | > import sys | |
249 | > sys.stdout.write("KABOOM\n") |
|
249 | > sys.stdout.write("KABOOM\n") | |
250 | > sys.stdout.flush() |
|
250 | > sys.stdout.flush() | |
251 | > EOF |
|
251 | > EOF | |
252 |
|
252 | |||
253 | $ cat <<EOF > $TESTTMP/badpyhook.py |
|
253 | $ cat <<EOF > $TESTTMP/badpyhook.py | |
254 | > import sys |
|
254 | > import sys | |
255 | > def hook(ui, repo, hooktype, **kwargs): |
|
255 | > def hook(ui, repo, hooktype, **kwargs): | |
256 | > sys.stdout.write("KABOOM IN PROCESS\n") |
|
256 | > sys.stdout.write("KABOOM IN PROCESS\n") | |
257 | > sys.stdout.flush() |
|
257 | > sys.stdout.flush() | |
258 | > EOF |
|
258 | > EOF | |
259 |
|
259 | |||
260 | $ cat <<EOF >> ../remote/.hg/hgrc |
|
260 | $ cat <<EOF >> ../remote/.hg/hgrc | |
261 | > [hooks] |
|
261 | > [hooks] | |
262 | > changegroup.stdout = "$PYTHON" $TESTTMP/badhook |
|
262 | > changegroup.stdout = "$PYTHON" $TESTTMP/badhook | |
263 | > changegroup.pystdout = python:$TESTTMP/badpyhook.py:hook |
|
263 | > changegroup.pystdout = python:$TESTTMP/badpyhook.py:hook | |
264 | > EOF |
|
264 | > EOF | |
265 | $ echo r > r |
|
265 | $ echo r > r | |
266 | $ hg ci -A -m z r |
|
266 | $ hg ci -A -m z r | |
267 |
|
267 | |||
268 | push should succeed even though it has an unexpected response |
|
268 | push should succeed even though it has an unexpected response | |
269 |
|
269 | |||
270 | $ hg push |
|
270 | $ hg push | |
271 | pushing to ssh://user@dummy/remote |
|
271 | pushing to ssh://user@dummy/remote | |
272 | searching for changes |
|
272 | searching for changes | |
273 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 |
|
273 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 | |
274 | remote: adding changesets |
|
274 | remote: adding changesets | |
275 | remote: adding manifests |
|
275 | remote: adding manifests | |
276 | remote: adding file changes |
|
276 | remote: adding file changes | |
277 | remote: added 1 changesets with 1 changes to 1 files |
|
277 | remote: added 1 changesets with 1 changes to 1 files | |
278 | remote: KABOOM |
|
278 | remote: KABOOM | |
279 | remote: KABOOM IN PROCESS |
|
279 | remote: KABOOM IN PROCESS | |
280 | $ hg -R ../remote heads |
|
280 | $ hg -R ../remote heads | |
281 | changeset: 5:1383141674ec |
|
281 | changeset: 5:1383141674ec | |
282 | tag: tip |
|
282 | tag: tip | |
283 | parent: 3:a28a9d1a809c |
|
283 | parent: 3:a28a9d1a809c | |
284 | user: test |
|
284 | user: test | |
285 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
285 | date: Thu Jan 01 00:00:00 1970 +0000 | |
286 | summary: z |
|
286 | summary: z | |
287 |
|
287 | |||
288 | changeset: 4:6c0482d977a3 |
|
288 | changeset: 4:6c0482d977a3 | |
289 | parent: 0:1160648e36ce |
|
289 | parent: 0:1160648e36ce | |
290 | user: test |
|
290 | user: test | |
291 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
291 | date: Thu Jan 01 00:00:00 1970 +0000 | |
292 | summary: z |
|
292 | summary: z | |
293 |
|
293 | |||
294 |
|
294 | |||
295 | #if chg |
|
295 | #if chg | |
296 |
|
296 | |||
297 | try again with remote chg, which should succeed as well |
|
297 | try again with remote chg, which should succeed as well | |
298 |
|
298 | |||
299 | $ hg rollback -R ../remote |
|
299 | $ hg rollback -R ../remote | |
300 | repository tip rolled back to revision 4 (undo serve) |
|
300 | repository tip rolled back to revision 4 (undo serve) | |
301 |
|
301 | |||
302 | $ hg push --config ui.remotecmd=chg |
|
302 | $ hg push --config ui.remotecmd=chg | |
303 | pushing to ssh://user@dummy/remote |
|
303 | pushing to ssh://user@dummy/remote | |
304 | searching for changes |
|
304 | searching for changes | |
305 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 |
|
305 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 | |
306 | remote: adding changesets |
|
306 | remote: adding changesets | |
307 | remote: adding manifests |
|
307 | remote: adding manifests | |
308 | remote: adding file changes |
|
308 | remote: adding file changes | |
309 | remote: added 1 changesets with 1 changes to 1 files |
|
309 | remote: added 1 changesets with 1 changes to 1 files | |
310 | remote: KABOOM |
|
310 | remote: KABOOM | |
311 | remote: KABOOM IN PROCESS |
|
311 | remote: KABOOM IN PROCESS | |
312 |
|
312 | |||
313 | #endif |
|
313 | #endif | |
314 |
|
314 | |||
315 | clone bookmarks |
|
315 | clone bookmarks | |
316 |
|
316 | |||
317 | $ hg -R ../remote bookmark test |
|
317 | $ hg -R ../remote bookmark test | |
318 | $ hg -R ../remote bookmarks |
|
318 | $ hg -R ../remote bookmarks | |
319 | * test 4:6c0482d977a3 |
|
319 | * test 4:6c0482d977a3 | |
320 | $ hg clone ssh://user@dummy/remote local-bookmarks |
|
320 | $ hg clone ssh://user@dummy/remote local-bookmarks | |
321 | requesting all changes |
|
321 | requesting all changes | |
322 | adding changesets |
|
322 | adding changesets | |
323 | adding manifests |
|
323 | adding manifests | |
324 | adding file changes |
|
324 | adding file changes | |
325 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
325 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
326 | new changesets 1160648e36ce:1383141674ec |
|
326 | new changesets 1160648e36ce:1383141674ec | |
327 | updating to branch default |
|
327 | updating to branch default | |
328 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
328 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
329 | $ hg -R local-bookmarks bookmarks |
|
329 | $ hg -R local-bookmarks bookmarks | |
330 | test 4:6c0482d977a3 |
|
330 | test 4:6c0482d977a3 | |
331 |
|
331 | |||
332 | passwords in ssh urls are not supported |
|
332 | passwords in ssh urls are not supported | |
333 | (we use a glob here because different Python versions give different |
|
333 | (we use a glob here because different Python versions give different | |
334 | results here) |
|
334 | results here) | |
335 |
|
335 | |||
336 | $ hg push ssh://user:erroneouspwd@dummy/remote |
|
336 | $ hg push ssh://user:erroneouspwd@dummy/remote | |
337 | pushing to ssh://user:*@dummy/remote (glob) |
|
337 | pushing to ssh://user:*@dummy/remote (glob) | |
338 | abort: password in URL not supported |
|
338 | abort: password in URL not supported | |
339 | [255] |
|
339 | [255] | |
340 |
|
340 | |||
341 | $ cd $TESTTMP |
|
341 | $ cd $TESTTMP | |
342 |
|
342 | |||
343 | hide outer repo |
|
343 | hide outer repo | |
344 | $ hg init |
|
344 | $ hg init | |
345 |
|
345 | |||
346 | Test remote paths with spaces (issue2983): |
|
346 | Test remote paths with spaces (issue2983): | |
347 |
|
347 | |||
348 | $ hg init "ssh://user@dummy/a repo" |
|
348 | $ hg init "ssh://user@dummy/a repo" | |
349 | $ touch "$TESTTMP/a repo/test" |
|
349 | $ touch "$TESTTMP/a repo/test" | |
350 | $ hg -R 'a repo' commit -A -m "test" |
|
350 | $ hg -R 'a repo' commit -A -m "test" | |
351 | adding test |
|
351 | adding test | |
352 | $ hg -R 'a repo' tag tag |
|
352 | $ hg -R 'a repo' tag tag | |
353 | $ hg id "ssh://user@dummy/a repo" |
|
353 | $ hg id "ssh://user@dummy/a repo" | |
354 | 73649e48688a |
|
354 | 73649e48688a | |
355 |
|
355 | |||
356 | $ hg id "ssh://user@dummy/a repo#noNoNO" |
|
356 | $ hg id "ssh://user@dummy/a repo#noNoNO" | |
357 | abort: unknown revision 'noNoNO' |
|
357 | abort: unknown revision 'noNoNO' | |
358 | [255] |
|
358 | [255] | |
359 |
|
359 | |||
360 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): |
|
360 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): | |
361 |
|
361 | |||
362 | $ hg clone "ssh://user@dummy/a repo" |
|
362 | $ hg clone "ssh://user@dummy/a repo" | |
363 | destination directory: a repo |
|
363 | destination directory: a repo | |
364 | abort: destination 'a repo' is not empty |
|
364 | abort: destination 'a repo' is not empty | |
365 | [10] |
|
365 | [10] | |
366 |
|
366 | |||
367 | #if no-rhg |
|
367 | #if no-rhg | |
368 | Make sure hg is really paranoid in serve --stdio mode. It used to be |
|
368 | Make sure hg is really paranoid in serve --stdio mode. It used to be | |
369 | possible to get a debugger REPL by specifying a repo named --debugger. |
|
369 | possible to get a debugger REPL by specifying a repo named --debugger. | |
370 | $ hg -R --debugger serve --stdio |
|
370 | $ hg -R --debugger serve --stdio | |
371 | abort: potentially unsafe serve --stdio invocation: ['-R', '--debugger', 'serve', '--stdio'] |
|
371 | abort: potentially unsafe serve --stdio invocation: ['-R', '--debugger', 'serve', '--stdio'] | |
372 | [255] |
|
372 | [255] | |
373 | $ hg -R --config=ui.debugger=yes serve --stdio |
|
373 | $ hg -R --config=ui.debugger=yes serve --stdio | |
374 | abort: potentially unsafe serve --stdio invocation: ['-R', '--config=ui.debugger=yes', 'serve', '--stdio'] |
|
374 | abort: potentially unsafe serve --stdio invocation: ['-R', '--config=ui.debugger=yes', 'serve', '--stdio'] | |
375 | [255] |
|
375 | [255] | |
376 | Abbreviations of 'serve' also don't work, to avoid shenanigans. |
|
376 | Abbreviations of 'serve' also don't work, to avoid shenanigans. | |
377 | $ hg -R narf serv --stdio |
|
377 | $ hg -R narf serv --stdio | |
378 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] |
|
378 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] | |
379 | [255] |
|
379 | [255] | |
380 | #else |
|
380 | #else | |
381 | rhg aborts early on -R without a repository at that path |
|
381 | rhg aborts early on -R without a repository at that path | |
382 | $ hg -R --debugger serve --stdio |
|
382 | $ hg -R --debugger serve --stdio | |
383 | abort: potentially unsafe serve --stdio invocation: ['-R', '--debugger', 'serve', '--stdio'] (missing-correct-output !) |
|
383 | abort: potentially unsafe serve --stdio invocation: ['-R', '--debugger', 'serve', '--stdio'] (missing-correct-output !) | |
384 | abort: repository --debugger not found (known-bad-output !) |
|
384 | abort: repository --debugger not found (known-bad-output !) | |
385 | [255] |
|
385 | [255] | |
386 | $ hg -R --config=ui.debugger=yes serve --stdio |
|
386 | $ hg -R --config=ui.debugger=yes serve --stdio | |
387 | abort: potentially unsafe serve --stdio invocation: ['-R', '--config=ui.debugger=yes', 'serve', '--stdio'] (missing-correct-output !) |
|
387 | abort: potentially unsafe serve --stdio invocation: ['-R', '--config=ui.debugger=yes', 'serve', '--stdio'] (missing-correct-output !) | |
388 | abort: repository --config=ui.debugger=yes not found (known-bad-output !) |
|
388 | abort: repository --config=ui.debugger=yes not found (known-bad-output !) | |
389 | [255] |
|
389 | [255] | |
390 | $ hg -R narf serv --stdio |
|
390 | $ hg -R narf serv --stdio | |
391 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] (missing-correct-output !) |
|
391 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] (missing-correct-output !) | |
392 | abort: repository narf not found (known-bad-output !) |
|
392 | abort: repository narf not found (known-bad-output !) | |
393 | [255] |
|
393 | [255] | |
394 | If the repo does exist, rhg finds an unsupported command and falls back to Python |
|
394 | If the repo does exist, rhg finds an unsupported command and falls back to Python | |
395 | which still does the right thing |
|
395 | which still does the right thing | |
396 | $ hg init narf |
|
396 | $ hg init narf | |
397 | $ hg -R narf serv --stdio |
|
397 | $ hg -R narf serv --stdio | |
398 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] |
|
398 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] | |
399 | [255] |
|
399 | [255] | |
400 | #endif |
|
400 | #endif | |
401 |
|
401 | |||
402 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might |
|
402 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might | |
403 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right |
|
403 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right | |
404 | parameters: |
|
404 | parameters: | |
405 |
|
405 | |||
406 | $ cat > ssh.sh << EOF |
|
406 | $ cat > ssh.sh << EOF | |
407 | > userhost="\$1" |
|
407 | > userhost="\$1" | |
408 | > SSH_ORIGINAL_COMMAND="\$2" |
|
408 | > SSH_ORIGINAL_COMMAND="\$2" | |
409 | > export SSH_ORIGINAL_COMMAND |
|
409 | > export SSH_ORIGINAL_COMMAND | |
410 | > PYTHONPATH="$PYTHONPATH" |
|
410 | > PYTHONPATH="$PYTHONPATH" | |
411 | > export PYTHONPATH |
|
411 | > export PYTHONPATH | |
412 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" |
|
412 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" | |
413 | > EOF |
|
413 | > EOF | |
414 |
|
414 | |||
415 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" |
|
415 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" | |
416 | 73649e48688a |
|
416 | 73649e48688a | |
417 |
|
417 | |||
418 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" |
|
418 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" | |
419 | remote: Illegal repository "$TESTTMP/a'repo" |
|
419 | remote: Illegal repository "$TESTTMP/a'repo" | |
420 | abort: no suitable response from remote hg |
|
420 | abort: no suitable response from remote hg | |
421 | [255] |
|
421 | [255] | |
422 |
|
422 | |||
423 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" |
|
423 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" | |
424 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" |
|
424 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" | |
425 | abort: no suitable response from remote hg |
|
425 | abort: no suitable response from remote hg | |
426 | [255] |
|
426 | [255] | |
427 |
|
427 | |||
428 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" "$PYTHON" "$TESTDIR/../contrib/hg-ssh" |
|
428 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" "$PYTHON" "$TESTDIR/../contrib/hg-ssh" | |
429 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation |
|
429 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation | |
430 | [255] |
|
430 | [255] | |
431 |
|
431 | |||
432 | Test hg-ssh in read-only mode: |
|
432 | Test hg-ssh in read-only mode: | |
433 |
|
433 | |||
434 | $ cat > ssh.sh << EOF |
|
434 | $ cat > ssh.sh << EOF | |
435 | > userhost="\$1" |
|
435 | > userhost="\$1" | |
436 | > SSH_ORIGINAL_COMMAND="\$2" |
|
436 | > SSH_ORIGINAL_COMMAND="\$2" | |
437 | > export SSH_ORIGINAL_COMMAND |
|
437 | > export SSH_ORIGINAL_COMMAND | |
438 | > PYTHONPATH="$PYTHONPATH" |
|
438 | > PYTHONPATH="$PYTHONPATH" | |
439 | > export PYTHONPATH |
|
439 | > export PYTHONPATH | |
440 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" |
|
440 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" | |
441 | > EOF |
|
441 | > EOF | |
442 |
|
442 | |||
443 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local |
|
443 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local | |
444 | requesting all changes |
|
444 | requesting all changes | |
445 | adding changesets |
|
445 | adding changesets | |
446 | adding manifests |
|
446 | adding manifests | |
447 | adding file changes |
|
447 | adding file changes | |
448 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
448 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
449 | new changesets 1160648e36ce:1383141674ec |
|
449 | new changesets 1160648e36ce:1383141674ec | |
450 | updating to branch default |
|
450 | updating to branch default | |
451 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
451 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
452 |
|
452 | |||
453 | $ cd read-only-local |
|
453 | $ cd read-only-local | |
454 | $ echo "baz" > bar |
|
454 | $ echo "baz" > bar | |
455 | $ hg ci -A -m "unpushable commit" bar |
|
455 | $ hg ci -A -m "unpushable commit" bar | |
456 | $ hg push --ssh "sh ../ssh.sh" |
|
456 | $ hg push --ssh "sh ../ssh.sh" | |
457 | pushing to ssh://user@dummy/*/remote (glob) |
|
457 | pushing to ssh://user@dummy/*/remote (glob) | |
458 | searching for changes |
|
458 | searching for changes | |
459 | remote: $EACCES$ |
|
459 | remote: $EACCES$ | |
460 | remote: pretxnopen.hg-ssh hook failed |
|
460 | remote: pretxnopen.hg-ssh hook failed | |
461 | abort: push failed on remote |
|
461 | abort: push failed on remote | |
462 | [100] |
|
462 | [100] | |
463 |
|
463 | |||
464 | $ cd $TESTTMP |
|
464 | $ cd $TESTTMP | |
465 |
|
465 | |||
466 | stderr from remote commands should be printed before stdout from local code (issue4336) |
|
466 | stderr from remote commands should be printed before stdout from local code (issue4336) | |
467 |
|
467 | |||
468 | $ hg clone remote stderr-ordering |
|
468 | $ hg clone remote stderr-ordering | |
469 | updating to branch default |
|
469 | updating to branch default | |
470 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
470 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
471 | $ cd stderr-ordering |
|
471 | $ cd stderr-ordering | |
472 | $ cat >> localwrite.py << EOF |
|
472 | $ cat >> localwrite.py << EOF | |
473 | > from mercurial import exchange, extensions |
|
473 | > from mercurial import exchange, extensions | |
474 | > |
|
474 | > | |
475 | > def wrappedpush(orig, repo, *args, **kwargs): |
|
475 | > def wrappedpush(orig, repo, *args, **kwargs): | |
476 | > res = orig(repo, *args, **kwargs) |
|
476 | > res = orig(repo, *args, **kwargs) | |
477 | > repo.ui.write(b'local stdout\n') |
|
477 | > repo.ui.write(b'local stdout\n') | |
478 | > repo.ui.flush() |
|
478 | > repo.ui.flush() | |
479 | > return res |
|
479 | > return res | |
480 | > |
|
480 | > | |
481 | > def extsetup(ui): |
|
481 | > def extsetup(ui): | |
482 |
> extensions.wrapfunction(exchange, |
|
482 | > extensions.wrapfunction(exchange, 'push', wrappedpush) | |
483 |
|
|
483 | > EOF | |
484 |
|
484 | |||
485 | $ cat >> .hg/hgrc << EOF |
|
485 | $ cat >> .hg/hgrc << EOF | |
486 | > [paths] |
|
486 | > [paths] | |
487 | > default-push = ssh://user@dummy/remote |
|
487 | > default-push = ssh://user@dummy/remote | |
488 | > [extensions] |
|
488 | > [extensions] | |
489 | > localwrite = localwrite.py |
|
489 | > localwrite = localwrite.py | |
490 | > EOF |
|
490 | > EOF | |
491 |
|
491 | |||
492 | $ echo localwrite > foo |
|
492 | $ echo localwrite > foo | |
493 | $ hg commit -m 'testing localwrite' |
|
493 | $ hg commit -m 'testing localwrite' | |
494 | $ hg push |
|
494 | $ hg push | |
495 | pushing to ssh://user@dummy/remote |
|
495 | pushing to ssh://user@dummy/remote | |
496 | searching for changes |
|
496 | searching for changes | |
497 | remote: adding changesets |
|
497 | remote: adding changesets | |
498 | remote: adding manifests |
|
498 | remote: adding manifests | |
499 | remote: adding file changes |
|
499 | remote: adding file changes | |
500 | remote: added 1 changesets with 1 changes to 1 files |
|
500 | remote: added 1 changesets with 1 changes to 1 files | |
501 | remote: KABOOM |
|
501 | remote: KABOOM | |
502 | remote: KABOOM IN PROCESS |
|
502 | remote: KABOOM IN PROCESS | |
503 | local stdout |
|
503 | local stdout | |
504 |
|
504 | |||
505 | debug output |
|
505 | debug output | |
506 |
|
506 | |||
507 | $ hg pull --debug ssh://user@dummy/remote --config devel.debug.peer-request=yes |
|
507 | $ hg pull --debug ssh://user@dummy/remote --config devel.debug.peer-request=yes | |
508 | pulling from ssh://user@dummy/remote |
|
508 | pulling from ssh://user@dummy/remote | |
509 | running .* ".*[/\\]dummyssh" ['"]user@dummy['"] ['"]hg -R remote serve --stdio['"] (re) |
|
509 | running .* ".*[/\\]dummyssh" ['"]user@dummy['"] ['"]hg -R remote serve --stdio['"] (re) | |
510 | devel-peer-request: hello+between |
|
510 | devel-peer-request: hello+between | |
511 | devel-peer-request: pairs: 81 bytes |
|
511 | devel-peer-request: pairs: 81 bytes | |
512 | sending hello command |
|
512 | sending hello command | |
513 | sending between command |
|
513 | sending between command | |
514 | remote: \d+ (re) |
|
514 | remote: \d+ (re) | |
515 | remote: capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (re) |
|
515 | remote: capabilities: batch branchmap \$USUAL_BUNDLE2_CAPS\$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=[^ ,]+(,[^ ,]+)* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (re) | |
516 | remote: 1 |
|
516 | remote: 1 | |
517 | devel-peer-request: protocaps |
|
517 | devel-peer-request: protocaps | |
518 | devel-peer-request: caps: * bytes (glob) |
|
518 | devel-peer-request: caps: * bytes (glob) | |
519 | sending protocaps command |
|
519 | sending protocaps command | |
520 | query 1; heads |
|
520 | query 1; heads | |
521 | devel-peer-request: batched-content |
|
521 | devel-peer-request: batched-content | |
522 | devel-peer-request: - heads (0 arguments) |
|
522 | devel-peer-request: - heads (0 arguments) | |
523 | devel-peer-request: - known (1 arguments) |
|
523 | devel-peer-request: - known (1 arguments) | |
524 | devel-peer-request: batch |
|
524 | devel-peer-request: batch | |
525 | devel-peer-request: cmds: 141 bytes |
|
525 | devel-peer-request: cmds: 141 bytes | |
526 | sending batch command |
|
526 | sending batch command | |
527 | searching for changes |
|
527 | searching for changes | |
528 | all remote heads known locally |
|
528 | all remote heads known locally | |
529 | no changes found |
|
529 | no changes found | |
530 | devel-peer-request: getbundle |
|
530 | devel-peer-request: getbundle | |
531 | devel-peer-request: bookmarks: 1 bytes |
|
531 | devel-peer-request: bookmarks: 1 bytes | |
532 | devel-peer-request: bundlecaps: 275 bytes |
|
532 | devel-peer-request: bundlecaps: 275 bytes | |
533 | devel-peer-request: cg: 1 bytes |
|
533 | devel-peer-request: cg: 1 bytes | |
534 | devel-peer-request: common: 122 bytes |
|
534 | devel-peer-request: common: 122 bytes | |
535 | devel-peer-request: heads: 122 bytes |
|
535 | devel-peer-request: heads: 122 bytes | |
536 | devel-peer-request: listkeys: 9 bytes |
|
536 | devel-peer-request: listkeys: 9 bytes | |
537 | devel-peer-request: phases: 1 bytes |
|
537 | devel-peer-request: phases: 1 bytes | |
538 | sending getbundle command |
|
538 | sending getbundle command | |
539 | bundle2-input-bundle: with-transaction |
|
539 | bundle2-input-bundle: with-transaction | |
540 | bundle2-input-part: "bookmarks" supported |
|
540 | bundle2-input-part: "bookmarks" supported | |
541 | bundle2-input-part: total payload size 26 |
|
541 | bundle2-input-part: total payload size 26 | |
542 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
542 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
543 | bundle2-input-part: total payload size 45 |
|
543 | bundle2-input-part: total payload size 45 | |
544 | bundle2-input-part: "phase-heads" supported |
|
544 | bundle2-input-part: "phase-heads" supported | |
545 | bundle2-input-part: total payload size 72 |
|
545 | bundle2-input-part: total payload size 72 | |
546 | bundle2-input-bundle: 3 parts total |
|
546 | bundle2-input-bundle: 3 parts total | |
547 | checking for updated bookmarks |
|
547 | checking for updated bookmarks | |
548 |
|
548 | |||
549 | $ cd $TESTTMP |
|
549 | $ cd $TESTTMP | |
550 |
|
550 | |||
551 | $ cat dummylog |
|
551 | $ cat dummylog | |
552 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
552 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
553 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
553 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
554 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/nonexistent serve --stdio |
|
554 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/nonexistent serve --stdio | |
555 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
555 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
556 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio (no-reposimplestore !) |
|
556 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio (no-reposimplestore !) | |
557 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) |
|
557 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) | |
558 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) |
|
558 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) | |
559 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio |
|
559 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio | |
560 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
560 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
561 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
561 | Got arguments 1:user@dummy 2:hg -R local serve --stdio | |
562 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio |
|
562 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio | |
563 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
563 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
564 | changegroup-in-remote hook: HG_BUNDLE2=1 |
|
564 | changegroup-in-remote hook: HG_BUNDLE2=1 | |
565 | HG_HOOKNAME=changegroup |
|
565 | HG_HOOKNAME=changegroup | |
566 | HG_HOOKTYPE=changegroup |
|
566 | HG_HOOKTYPE=changegroup | |
567 | HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 |
|
567 | HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 | |
568 | HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 |
|
568 | HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 | |
569 | HG_SOURCE=serve |
|
569 | HG_SOURCE=serve | |
570 | HG_TXNID=TXN:$ID$ |
|
570 | HG_TXNID=TXN:$ID$ | |
571 | HG_TXNNAME=serve |
|
571 | HG_TXNNAME=serve | |
572 | HG_URL=remote:ssh:$LOCALIP |
|
572 | HG_URL=remote:ssh:$LOCALIP | |
573 |
|
573 | |||
574 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
574 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
575 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
575 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
576 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
576 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
577 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
577 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
578 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
578 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
579 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
579 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
580 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
580 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
581 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
581 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
582 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
582 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
583 | changegroup-in-remote hook: HG_BUNDLE2=1 |
|
583 | changegroup-in-remote hook: HG_BUNDLE2=1 | |
584 | HG_HOOKNAME=changegroup |
|
584 | HG_HOOKNAME=changegroup | |
585 | HG_HOOKTYPE=changegroup |
|
585 | HG_HOOKTYPE=changegroup | |
586 | HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 |
|
586 | HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 | |
587 | HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 |
|
587 | HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 | |
588 | HG_SOURCE=serve |
|
588 | HG_SOURCE=serve | |
589 | HG_TXNID=TXN:$ID$ |
|
589 | HG_TXNID=TXN:$ID$ | |
590 | HG_TXNNAME=serve |
|
590 | HG_TXNNAME=serve | |
591 | HG_URL=remote:ssh:$LOCALIP |
|
591 | HG_URL=remote:ssh:$LOCALIP | |
592 |
|
592 | |||
593 | Got arguments 1:user@dummy 2:chg -R remote serve --stdio (chg !) |
|
593 | Got arguments 1:user@dummy 2:chg -R remote serve --stdio (chg !) | |
594 | changegroup-in-remote hook: HG_BUNDLE2=1 (chg !) |
|
594 | changegroup-in-remote hook: HG_BUNDLE2=1 (chg !) | |
595 | HG_HOOKNAME=changegroup (chg !) |
|
595 | HG_HOOKNAME=changegroup (chg !) | |
596 | HG_HOOKTYPE=changegroup (chg !) |
|
596 | HG_HOOKTYPE=changegroup (chg !) | |
597 | HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 (chg !) |
|
597 | HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 (chg !) | |
598 | HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 (chg !) |
|
598 | HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 (chg !) | |
599 | HG_SOURCE=serve (chg !) |
|
599 | HG_SOURCE=serve (chg !) | |
600 | HG_TXNID=TXN:$ID$ (chg !) |
|
600 | HG_TXNID=TXN:$ID$ (chg !) | |
601 | HG_TXNNAME=serve (chg !) |
|
601 | HG_TXNNAME=serve (chg !) | |
602 | HG_URL=remote:ssh:$LOCALIP (chg !) |
|
602 | HG_URL=remote:ssh:$LOCALIP (chg !) | |
603 | (chg !) |
|
603 | (chg !) | |
604 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
604 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
605 | Got arguments 1:user@dummy 2:hg init 'a repo' |
|
605 | Got arguments 1:user@dummy 2:hg init 'a repo' | |
606 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
606 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
607 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
607 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
608 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
608 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
609 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
609 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
610 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
610 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
611 | changegroup-in-remote hook: HG_BUNDLE2=1 |
|
611 | changegroup-in-remote hook: HG_BUNDLE2=1 | |
612 | HG_HOOKNAME=changegroup |
|
612 | HG_HOOKNAME=changegroup | |
613 | HG_HOOKTYPE=changegroup |
|
613 | HG_HOOKTYPE=changegroup | |
614 | HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 |
|
614 | HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 | |
615 | HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 |
|
615 | HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 | |
616 | HG_SOURCE=serve |
|
616 | HG_SOURCE=serve | |
617 | HG_TXNID=TXN:$ID$ |
|
617 | HG_TXNID=TXN:$ID$ | |
618 | HG_TXNNAME=serve |
|
618 | HG_TXNNAME=serve | |
619 | HG_URL=remote:ssh:$LOCALIP |
|
619 | HG_URL=remote:ssh:$LOCALIP | |
620 |
|
620 | |||
621 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
621 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
622 |
|
622 | |||
623 |
|
623 | |||
624 | remote hook failure is attributed to remote |
|
624 | remote hook failure is attributed to remote | |
625 |
|
625 | |||
626 | $ cat > $TESTTMP/failhook << EOF |
|
626 | $ cat > $TESTTMP/failhook << EOF | |
627 | > def hook(ui, repo, **kwargs): |
|
627 | > def hook(ui, repo, **kwargs): | |
628 | > ui.write(b'hook failure!\n') |
|
628 | > ui.write(b'hook failure!\n') | |
629 | > ui.flush() |
|
629 | > ui.flush() | |
630 | > return 1 |
|
630 | > return 1 | |
631 | > EOF |
|
631 | > EOF | |
632 |
|
632 | |||
633 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc |
|
633 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc | |
634 |
|
634 | |||
635 | $ hg -q clone ssh://user@dummy/remote hookout |
|
635 | $ hg -q clone ssh://user@dummy/remote hookout | |
636 | $ cd hookout |
|
636 | $ cd hookout | |
637 | $ touch hookfailure |
|
637 | $ touch hookfailure | |
638 | $ hg -q commit -A -m 'remote hook failure' |
|
638 | $ hg -q commit -A -m 'remote hook failure' | |
639 | $ hg push |
|
639 | $ hg push | |
640 | pushing to ssh://user@dummy/remote |
|
640 | pushing to ssh://user@dummy/remote | |
641 | searching for changes |
|
641 | searching for changes | |
642 | remote: adding changesets |
|
642 | remote: adding changesets | |
643 | remote: adding manifests |
|
643 | remote: adding manifests | |
644 | remote: adding file changes |
|
644 | remote: adding file changes | |
645 | remote: hook failure! |
|
645 | remote: hook failure! | |
646 | remote: transaction abort! |
|
646 | remote: transaction abort! | |
647 | remote: rollback completed |
|
647 | remote: rollback completed | |
648 | remote: pretxnchangegroup.fail hook failed |
|
648 | remote: pretxnchangegroup.fail hook failed | |
649 | abort: push failed on remote |
|
649 | abort: push failed on remote | |
650 | [100] |
|
650 | [100] | |
651 |
|
651 | |||
652 | abort during pull is properly reported as such |
|
652 | abort during pull is properly reported as such | |
653 |
|
653 | |||
654 | $ echo morefoo >> ../remote/foo |
|
654 | $ echo morefoo >> ../remote/foo | |
655 | $ hg -R ../remote commit --message "more foo to be pulled" |
|
655 | $ hg -R ../remote commit --message "more foo to be pulled" | |
656 | $ cat >> ../remote/.hg/hgrc << EOF |
|
656 | $ cat >> ../remote/.hg/hgrc << EOF | |
657 | > [extensions] |
|
657 | > [extensions] | |
658 | > crash = ${TESTDIR}/crashgetbundler.py |
|
658 | > crash = ${TESTDIR}/crashgetbundler.py | |
659 | > EOF |
|
659 | > EOF | |
660 | $ hg pull |
|
660 | $ hg pull | |
661 | pulling from ssh://user@dummy/remote |
|
661 | pulling from ssh://user@dummy/remote | |
662 | searching for changes |
|
662 | searching for changes | |
663 | remote: abort: this is an exercise |
|
663 | remote: abort: this is an exercise | |
664 | abort: pull failed on remote |
|
664 | abort: pull failed on remote | |
665 | [100] |
|
665 | [100] | |
666 |
|
666 | |||
667 | abort with no error hint when there is a ssh problem when pulling |
|
667 | abort with no error hint when there is a ssh problem when pulling | |
668 |
|
668 | |||
669 | $ hg pull ssh://brokenrepository |
|
669 | $ hg pull ssh://brokenrepository | |
670 | pulling from ssh://brokenrepository/ |
|
670 | pulling from ssh://brokenrepository/ | |
671 | abort: no suitable response from remote hg |
|
671 | abort: no suitable response from remote hg | |
672 | [255] |
|
672 | [255] | |
673 |
|
673 | |||
674 | abort with configured error hint when there is a ssh problem when pulling |
|
674 | abort with configured error hint when there is a ssh problem when pulling | |
675 |
|
675 | |||
676 | $ hg pull ssh://brokenrepository \ |
|
676 | $ hg pull ssh://brokenrepository \ | |
677 | > --config ui.ssherrorhint="Please see http://company/internalwiki/ssh.html" |
|
677 | > --config ui.ssherrorhint="Please see http://company/internalwiki/ssh.html" | |
678 | pulling from ssh://brokenrepository/ |
|
678 | pulling from ssh://brokenrepository/ | |
679 | abort: no suitable response from remote hg |
|
679 | abort: no suitable response from remote hg | |
680 | (Please see http://company/internalwiki/ssh.html) |
|
680 | (Please see http://company/internalwiki/ssh.html) | |
681 | [255] |
|
681 | [255] | |
682 |
|
682 | |||
683 | test that custom environment is passed down to ssh executable |
|
683 | test that custom environment is passed down to ssh executable | |
684 | $ cat >>dumpenv <<EOF |
|
684 | $ cat >>dumpenv <<EOF | |
685 | > #! /bin/sh |
|
685 | > #! /bin/sh | |
686 | > echo \$VAR >&2 |
|
686 | > echo \$VAR >&2 | |
687 | > EOF |
|
687 | > EOF | |
688 | $ chmod +x dumpenv |
|
688 | $ chmod +x dumpenv | |
689 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" |
|
689 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" | |
690 | pulling from ssh://something/ |
|
690 | pulling from ssh://something/ | |
691 | remote: |
|
691 | remote: | |
692 | abort: no suitable response from remote hg |
|
692 | abort: no suitable response from remote hg | |
693 | [255] |
|
693 | [255] | |
694 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" --config sshenv.VAR=17 |
|
694 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" --config sshenv.VAR=17 | |
695 | pulling from ssh://something/ |
|
695 | pulling from ssh://something/ | |
696 | remote: 17 |
|
696 | remote: 17 | |
697 | abort: no suitable response from remote hg |
|
697 | abort: no suitable response from remote hg | |
698 | [255] |
|
698 | [255] | |
699 |
|
699 |
@@ -1,1458 +1,1458 b'' | |||||
1 | $ echo "[extensions]" >> $HGRCPATH |
|
1 | $ echo "[extensions]" >> $HGRCPATH | |
2 | $ echo "strip=" >> $HGRCPATH |
|
2 | $ echo "strip=" >> $HGRCPATH | |
3 | $ echo "drawdag=$TESTDIR/drawdag.py" >> $HGRCPATH |
|
3 | $ echo "drawdag=$TESTDIR/drawdag.py" >> $HGRCPATH | |
4 |
|
4 | |||
5 | $ restore() { |
|
5 | $ restore() { | |
6 | > hg unbundle -q .hg/strip-backup/* |
|
6 | > hg unbundle -q .hg/strip-backup/* | |
7 | > rm .hg/strip-backup/* |
|
7 | > rm .hg/strip-backup/* | |
8 | > } |
|
8 | > } | |
9 | $ teststrip() { |
|
9 | $ teststrip() { | |
10 | > hg up -C $1 |
|
10 | > hg up -C $1 | |
11 | > echo % before update $1, strip $2 |
|
11 | > echo % before update $1, strip $2 | |
12 | > hg log -G -T '{rev}:{node}' |
|
12 | > hg log -G -T '{rev}:{node}' | |
13 | > hg --traceback debugstrip $2 |
|
13 | > hg --traceback debugstrip $2 | |
14 | > echo % after update $1, strip $2 |
|
14 | > echo % after update $1, strip $2 | |
15 | > hg log -G -T '{rev}:{node}' |
|
15 | > hg log -G -T '{rev}:{node}' | |
16 | > restore |
|
16 | > restore | |
17 | > } |
|
17 | > } | |
18 |
|
18 | |||
19 | $ hg init test |
|
19 | $ hg init test | |
20 | $ cd test |
|
20 | $ cd test | |
21 |
|
21 | |||
22 | $ echo foo > bar |
|
22 | $ echo foo > bar | |
23 | $ hg ci -Ama |
|
23 | $ hg ci -Ama | |
24 | adding bar |
|
24 | adding bar | |
25 |
|
25 | |||
26 | $ echo more >> bar |
|
26 | $ echo more >> bar | |
27 | $ hg ci -Amb |
|
27 | $ hg ci -Amb | |
28 |
|
28 | |||
29 | $ echo blah >> bar |
|
29 | $ echo blah >> bar | |
30 | $ hg ci -Amc |
|
30 | $ hg ci -Amc | |
31 |
|
31 | |||
32 | $ hg up 1 |
|
32 | $ hg up 1 | |
33 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
33 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
34 | $ echo blah >> bar |
|
34 | $ echo blah >> bar | |
35 | $ hg ci -Amd |
|
35 | $ hg ci -Amd | |
36 | created new head |
|
36 | created new head | |
37 |
|
37 | |||
38 | $ echo final >> bar |
|
38 | $ echo final >> bar | |
39 | $ hg ci -Ame |
|
39 | $ hg ci -Ame | |
40 |
|
40 | |||
41 | $ hg log |
|
41 | $ hg log | |
42 | changeset: 4:443431ffac4f |
|
42 | changeset: 4:443431ffac4f | |
43 | tag: tip |
|
43 | tag: tip | |
44 | user: test |
|
44 | user: test | |
45 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
45 | date: Thu Jan 01 00:00:00 1970 +0000 | |
46 | summary: e |
|
46 | summary: e | |
47 |
|
47 | |||
48 | changeset: 3:65bd5f99a4a3 |
|
48 | changeset: 3:65bd5f99a4a3 | |
49 | parent: 1:ef3a871183d7 |
|
49 | parent: 1:ef3a871183d7 | |
50 | user: test |
|
50 | user: test | |
51 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
51 | date: Thu Jan 01 00:00:00 1970 +0000 | |
52 | summary: d |
|
52 | summary: d | |
53 |
|
53 | |||
54 | changeset: 2:264128213d29 |
|
54 | changeset: 2:264128213d29 | |
55 | user: test |
|
55 | user: test | |
56 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
56 | date: Thu Jan 01 00:00:00 1970 +0000 | |
57 | summary: c |
|
57 | summary: c | |
58 |
|
58 | |||
59 | changeset: 1:ef3a871183d7 |
|
59 | changeset: 1:ef3a871183d7 | |
60 | user: test |
|
60 | user: test | |
61 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
61 | date: Thu Jan 01 00:00:00 1970 +0000 | |
62 | summary: b |
|
62 | summary: b | |
63 |
|
63 | |||
64 | changeset: 0:9ab35a2d17cb |
|
64 | changeset: 0:9ab35a2d17cb | |
65 | user: test |
|
65 | user: test | |
66 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
66 | date: Thu Jan 01 00:00:00 1970 +0000 | |
67 | summary: a |
|
67 | summary: a | |
68 |
|
68 | |||
69 |
|
69 | |||
70 | $ teststrip 4 4 |
|
70 | $ teststrip 4 4 | |
71 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
71 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
72 | % before update 4, strip 4 |
|
72 | % before update 4, strip 4 | |
73 | @ 4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce |
|
73 | @ 4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce | |
74 | | |
|
74 | | | |
75 | o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64 |
|
75 | o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64 | |
76 | | |
|
76 | | | |
77 | | o 2:264128213d290d868c54642d13aeaa3675551a78 |
|
77 | | o 2:264128213d290d868c54642d13aeaa3675551a78 | |
78 | |/ |
|
78 | |/ | |
79 | o 1:ef3a871183d7199c541cc140218298bbfcc6c28a |
|
79 | o 1:ef3a871183d7199c541cc140218298bbfcc6c28a | |
80 | | |
|
80 | | | |
81 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b |
|
81 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b | |
82 |
|
82 | |||
83 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
83 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
84 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
84 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
85 | % after update 4, strip 4 |
|
85 | % after update 4, strip 4 | |
86 | @ 3:65bd5f99a4a376cdea23a1153f07856b0d881d64 |
|
86 | @ 3:65bd5f99a4a376cdea23a1153f07856b0d881d64 | |
87 | | |
|
87 | | | |
88 | | o 2:264128213d290d868c54642d13aeaa3675551a78 |
|
88 | | o 2:264128213d290d868c54642d13aeaa3675551a78 | |
89 | |/ |
|
89 | |/ | |
90 | o 1:ef3a871183d7199c541cc140218298bbfcc6c28a |
|
90 | o 1:ef3a871183d7199c541cc140218298bbfcc6c28a | |
91 | | |
|
91 | | | |
92 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b |
|
92 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b | |
93 |
|
93 | |||
94 | $ teststrip 4 3 |
|
94 | $ teststrip 4 3 | |
95 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
95 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
96 | % before update 4, strip 3 |
|
96 | % before update 4, strip 3 | |
97 | @ 4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce |
|
97 | @ 4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce | |
98 | | |
|
98 | | | |
99 | o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64 |
|
99 | o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64 | |
100 | | |
|
100 | | | |
101 | | o 2:264128213d290d868c54642d13aeaa3675551a78 |
|
101 | | o 2:264128213d290d868c54642d13aeaa3675551a78 | |
102 | |/ |
|
102 | |/ | |
103 | o 1:ef3a871183d7199c541cc140218298bbfcc6c28a |
|
103 | o 1:ef3a871183d7199c541cc140218298bbfcc6c28a | |
104 | | |
|
104 | | | |
105 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b |
|
105 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b | |
106 |
|
106 | |||
107 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
107 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
108 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
108 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
109 | % after update 4, strip 3 |
|
109 | % after update 4, strip 3 | |
110 | o 2:264128213d290d868c54642d13aeaa3675551a78 |
|
110 | o 2:264128213d290d868c54642d13aeaa3675551a78 | |
111 | | |
|
111 | | | |
112 | @ 1:ef3a871183d7199c541cc140218298bbfcc6c28a |
|
112 | @ 1:ef3a871183d7199c541cc140218298bbfcc6c28a | |
113 | | |
|
113 | | | |
114 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b |
|
114 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b | |
115 |
|
115 | |||
116 | $ teststrip 1 4 |
|
116 | $ teststrip 1 4 | |
117 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
117 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
118 | % before update 1, strip 4 |
|
118 | % before update 1, strip 4 | |
119 | o 4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce |
|
119 | o 4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce | |
120 | | |
|
120 | | | |
121 | o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64 |
|
121 | o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64 | |
122 | | |
|
122 | | | |
123 | | o 2:264128213d290d868c54642d13aeaa3675551a78 |
|
123 | | o 2:264128213d290d868c54642d13aeaa3675551a78 | |
124 | |/ |
|
124 | |/ | |
125 | @ 1:ef3a871183d7199c541cc140218298bbfcc6c28a |
|
125 | @ 1:ef3a871183d7199c541cc140218298bbfcc6c28a | |
126 | | |
|
126 | | | |
127 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b |
|
127 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b | |
128 |
|
128 | |||
129 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
129 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
130 | % after update 1, strip 4 |
|
130 | % after update 1, strip 4 | |
131 | o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64 |
|
131 | o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64 | |
132 | | |
|
132 | | | |
133 | | o 2:264128213d290d868c54642d13aeaa3675551a78 |
|
133 | | o 2:264128213d290d868c54642d13aeaa3675551a78 | |
134 | |/ |
|
134 | |/ | |
135 | @ 1:ef3a871183d7199c541cc140218298bbfcc6c28a |
|
135 | @ 1:ef3a871183d7199c541cc140218298bbfcc6c28a | |
136 | | |
|
136 | | | |
137 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b |
|
137 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b | |
138 |
|
138 | |||
139 | $ teststrip 4 2 |
|
139 | $ teststrip 4 2 | |
140 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
140 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
141 | % before update 4, strip 2 |
|
141 | % before update 4, strip 2 | |
142 | @ 4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce |
|
142 | @ 4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce | |
143 | | |
|
143 | | | |
144 | o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64 |
|
144 | o 3:65bd5f99a4a376cdea23a1153f07856b0d881d64 | |
145 | | |
|
145 | | | |
146 | | o 2:264128213d290d868c54642d13aeaa3675551a78 |
|
146 | | o 2:264128213d290d868c54642d13aeaa3675551a78 | |
147 | |/ |
|
147 | |/ | |
148 | o 1:ef3a871183d7199c541cc140218298bbfcc6c28a |
|
148 | o 1:ef3a871183d7199c541cc140218298bbfcc6c28a | |
149 | | |
|
149 | | | |
150 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b |
|
150 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b | |
151 |
|
151 | |||
152 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
152 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
153 | % after update 4, strip 2 |
|
153 | % after update 4, strip 2 | |
154 | @ 3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce |
|
154 | @ 3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce | |
155 | | |
|
155 | | | |
156 | o 2:65bd5f99a4a376cdea23a1153f07856b0d881d64 |
|
156 | o 2:65bd5f99a4a376cdea23a1153f07856b0d881d64 | |
157 | | |
|
157 | | | |
158 | o 1:ef3a871183d7199c541cc140218298bbfcc6c28a |
|
158 | o 1:ef3a871183d7199c541cc140218298bbfcc6c28a | |
159 | | |
|
159 | | | |
160 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b |
|
160 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b | |
161 |
|
161 | |||
162 | $ teststrip 4 1 |
|
162 | $ teststrip 4 1 | |
163 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
163 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
164 | % before update 4, strip 1 |
|
164 | % before update 4, strip 1 | |
165 | @ 4:264128213d290d868c54642d13aeaa3675551a78 |
|
165 | @ 4:264128213d290d868c54642d13aeaa3675551a78 | |
166 | | |
|
166 | | | |
167 | | o 3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce |
|
167 | | o 3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce | |
168 | | | |
|
168 | | | | |
169 | | o 2:65bd5f99a4a376cdea23a1153f07856b0d881d64 |
|
169 | | o 2:65bd5f99a4a376cdea23a1153f07856b0d881d64 | |
170 | |/ |
|
170 | |/ | |
171 | o 1:ef3a871183d7199c541cc140218298bbfcc6c28a |
|
171 | o 1:ef3a871183d7199c541cc140218298bbfcc6c28a | |
172 | | |
|
172 | | | |
173 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b |
|
173 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b | |
174 |
|
174 | |||
175 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
175 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
176 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
176 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
177 | % after update 4, strip 1 |
|
177 | % after update 4, strip 1 | |
178 | @ 0:9ab35a2d17cb64271241ea881efcc19dd953215b |
|
178 | @ 0:9ab35a2d17cb64271241ea881efcc19dd953215b | |
179 |
|
179 | |||
180 | $ teststrip null 4 |
|
180 | $ teststrip null 4 | |
181 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
181 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
182 | % before update null, strip 4 |
|
182 | % before update null, strip 4 | |
183 | o 4:264128213d290d868c54642d13aeaa3675551a78 |
|
183 | o 4:264128213d290d868c54642d13aeaa3675551a78 | |
184 | | |
|
184 | | | |
185 | | o 3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce |
|
185 | | o 3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce | |
186 | | | |
|
186 | | | | |
187 | | o 2:65bd5f99a4a376cdea23a1153f07856b0d881d64 |
|
187 | | o 2:65bd5f99a4a376cdea23a1153f07856b0d881d64 | |
188 | |/ |
|
188 | |/ | |
189 | o 1:ef3a871183d7199c541cc140218298bbfcc6c28a |
|
189 | o 1:ef3a871183d7199c541cc140218298bbfcc6c28a | |
190 | | |
|
190 | | | |
191 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b |
|
191 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b | |
192 |
|
192 | |||
193 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
193 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
194 | % after update null, strip 4 |
|
194 | % after update null, strip 4 | |
195 | o 3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce |
|
195 | o 3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce | |
196 | | |
|
196 | | | |
197 | o 2:65bd5f99a4a376cdea23a1153f07856b0d881d64 |
|
197 | o 2:65bd5f99a4a376cdea23a1153f07856b0d881d64 | |
198 | | |
|
198 | | | |
199 | o 1:ef3a871183d7199c541cc140218298bbfcc6c28a |
|
199 | o 1:ef3a871183d7199c541cc140218298bbfcc6c28a | |
200 | | |
|
200 | | | |
201 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b |
|
201 | o 0:9ab35a2d17cb64271241ea881efcc19dd953215b | |
202 |
|
202 | |||
203 |
|
203 | |||
204 | $ hg log |
|
204 | $ hg log | |
205 | changeset: 4:264128213d29 |
|
205 | changeset: 4:264128213d29 | |
206 | tag: tip |
|
206 | tag: tip | |
207 | parent: 1:ef3a871183d7 |
|
207 | parent: 1:ef3a871183d7 | |
208 | user: test |
|
208 | user: test | |
209 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
209 | date: Thu Jan 01 00:00:00 1970 +0000 | |
210 | summary: c |
|
210 | summary: c | |
211 |
|
211 | |||
212 | changeset: 3:443431ffac4f |
|
212 | changeset: 3:443431ffac4f | |
213 | user: test |
|
213 | user: test | |
214 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
214 | date: Thu Jan 01 00:00:00 1970 +0000 | |
215 | summary: e |
|
215 | summary: e | |
216 |
|
216 | |||
217 | changeset: 2:65bd5f99a4a3 |
|
217 | changeset: 2:65bd5f99a4a3 | |
218 | user: test |
|
218 | user: test | |
219 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
219 | date: Thu Jan 01 00:00:00 1970 +0000 | |
220 | summary: d |
|
220 | summary: d | |
221 |
|
221 | |||
222 | changeset: 1:ef3a871183d7 |
|
222 | changeset: 1:ef3a871183d7 | |
223 | user: test |
|
223 | user: test | |
224 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
224 | date: Thu Jan 01 00:00:00 1970 +0000 | |
225 | summary: b |
|
225 | summary: b | |
226 |
|
226 | |||
227 | changeset: 0:9ab35a2d17cb |
|
227 | changeset: 0:9ab35a2d17cb | |
228 | user: test |
|
228 | user: test | |
229 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
229 | date: Thu Jan 01 00:00:00 1970 +0000 | |
230 | summary: a |
|
230 | summary: a | |
231 |
|
231 | |||
232 | $ hg up -C 4 |
|
232 | $ hg up -C 4 | |
233 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
233 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
234 | $ hg parents |
|
234 | $ hg parents | |
235 | changeset: 4:264128213d29 |
|
235 | changeset: 4:264128213d29 | |
236 | tag: tip |
|
236 | tag: tip | |
237 | parent: 1:ef3a871183d7 |
|
237 | parent: 1:ef3a871183d7 | |
238 | user: test |
|
238 | user: test | |
239 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
239 | date: Thu Jan 01 00:00:00 1970 +0000 | |
240 | summary: c |
|
240 | summary: c | |
241 |
|
241 | |||
242 |
|
242 | |||
243 | $ hg --traceback strip 4 |
|
243 | $ hg --traceback strip 4 | |
244 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
244 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
245 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/264128213d29-0b39d6bf-backup.hg |
|
245 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/264128213d29-0b39d6bf-backup.hg | |
246 | $ hg parents |
|
246 | $ hg parents | |
247 | changeset: 1:ef3a871183d7 |
|
247 | changeset: 1:ef3a871183d7 | |
248 | user: test |
|
248 | user: test | |
249 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
249 | date: Thu Jan 01 00:00:00 1970 +0000 | |
250 | summary: b |
|
250 | summary: b | |
251 |
|
251 | |||
252 | $ hg debugbundle .hg/strip-backup/* |
|
252 | $ hg debugbundle .hg/strip-backup/* | |
253 | Stream params: {Compression: BZ} |
|
253 | Stream params: {Compression: BZ} | |
254 | changegroup -- {nbchanges: 1, version: 03} (mandatory: True) |
|
254 | changegroup -- {nbchanges: 1, version: 03} (mandatory: True) | |
255 | 264128213d290d868c54642d13aeaa3675551a78 |
|
255 | 264128213d290d868c54642d13aeaa3675551a78 | |
256 | cache:rev-branch-cache -- {} (mandatory: False) |
|
256 | cache:rev-branch-cache -- {} (mandatory: False) | |
257 | phase-heads -- {} (mandatory: True) |
|
257 | phase-heads -- {} (mandatory: True) | |
258 | 264128213d290d868c54642d13aeaa3675551a78 draft |
|
258 | 264128213d290d868c54642d13aeaa3675551a78 draft | |
259 | $ hg unbundle .hg/strip-backup/* |
|
259 | $ hg unbundle .hg/strip-backup/* | |
260 | adding changesets |
|
260 | adding changesets | |
261 | adding manifests |
|
261 | adding manifests | |
262 | adding file changes |
|
262 | adding file changes | |
263 | added 1 changesets with 0 changes to 1 files (+1 heads) |
|
263 | added 1 changesets with 0 changes to 1 files (+1 heads) | |
264 | new changesets 264128213d29 (1 drafts) |
|
264 | new changesets 264128213d29 (1 drafts) | |
265 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
265 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
266 | $ rm .hg/strip-backup/* |
|
266 | $ rm .hg/strip-backup/* | |
267 | $ hg log --graph |
|
267 | $ hg log --graph | |
268 | o changeset: 4:264128213d29 |
|
268 | o changeset: 4:264128213d29 | |
269 | | tag: tip |
|
269 | | tag: tip | |
270 | | parent: 1:ef3a871183d7 |
|
270 | | parent: 1:ef3a871183d7 | |
271 | | user: test |
|
271 | | user: test | |
272 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
272 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
273 | | summary: c |
|
273 | | summary: c | |
274 | | |
|
274 | | | |
275 | | o changeset: 3:443431ffac4f |
|
275 | | o changeset: 3:443431ffac4f | |
276 | | | user: test |
|
276 | | | user: test | |
277 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
277 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
278 | | | summary: e |
|
278 | | | summary: e | |
279 | | | |
|
279 | | | | |
280 | | o changeset: 2:65bd5f99a4a3 |
|
280 | | o changeset: 2:65bd5f99a4a3 | |
281 | |/ user: test |
|
281 | |/ user: test | |
282 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
282 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
283 | | summary: d |
|
283 | | summary: d | |
284 | | |
|
284 | | | |
285 | @ changeset: 1:ef3a871183d7 |
|
285 | @ changeset: 1:ef3a871183d7 | |
286 | | user: test |
|
286 | | user: test | |
287 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
287 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
288 | | summary: b |
|
288 | | summary: b | |
289 | | |
|
289 | | | |
290 | o changeset: 0:9ab35a2d17cb |
|
290 | o changeset: 0:9ab35a2d17cb | |
291 | user: test |
|
291 | user: test | |
292 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
292 | date: Thu Jan 01 00:00:00 1970 +0000 | |
293 | summary: a |
|
293 | summary: a | |
294 |
|
294 | |||
295 | $ hg up -C 2 |
|
295 | $ hg up -C 2 | |
296 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
296 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
297 | $ hg merge 4 |
|
297 | $ hg merge 4 | |
298 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
298 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
299 | (branch merge, don't forget to commit) |
|
299 | (branch merge, don't forget to commit) | |
300 |
|
300 | |||
301 | before strip of merge parent |
|
301 | before strip of merge parent | |
302 |
|
302 | |||
303 | $ hg parents |
|
303 | $ hg parents | |
304 | changeset: 2:65bd5f99a4a3 |
|
304 | changeset: 2:65bd5f99a4a3 | |
305 | user: test |
|
305 | user: test | |
306 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
306 | date: Thu Jan 01 00:00:00 1970 +0000 | |
307 | summary: d |
|
307 | summary: d | |
308 |
|
308 | |||
309 | changeset: 4:264128213d29 |
|
309 | changeset: 4:264128213d29 | |
310 | tag: tip |
|
310 | tag: tip | |
311 | parent: 1:ef3a871183d7 |
|
311 | parent: 1:ef3a871183d7 | |
312 | user: test |
|
312 | user: test | |
313 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
313 | date: Thu Jan 01 00:00:00 1970 +0000 | |
314 | summary: c |
|
314 | summary: c | |
315 |
|
315 | |||
316 | ##strip not allowed with merge in progress |
|
316 | ##strip not allowed with merge in progress | |
317 | $ hg strip 4 |
|
317 | $ hg strip 4 | |
318 | abort: outstanding uncommitted merge |
|
318 | abort: outstanding uncommitted merge | |
319 | (use 'hg commit' or 'hg merge --abort') |
|
319 | (use 'hg commit' or 'hg merge --abort') | |
320 | [20] |
|
320 | [20] | |
321 | ##strip allowed --force with merge in progress |
|
321 | ##strip allowed --force with merge in progress | |
322 | $ hg strip 4 --force |
|
322 | $ hg strip 4 --force | |
323 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
323 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
324 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
324 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
325 |
|
325 | |||
326 | after strip of merge parent |
|
326 | after strip of merge parent | |
327 |
|
327 | |||
328 | $ hg parents |
|
328 | $ hg parents | |
329 | changeset: 1:ef3a871183d7 |
|
329 | changeset: 1:ef3a871183d7 | |
330 | user: test |
|
330 | user: test | |
331 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
331 | date: Thu Jan 01 00:00:00 1970 +0000 | |
332 | summary: b |
|
332 | summary: b | |
333 |
|
333 | |||
334 | $ restore |
|
334 | $ restore | |
335 |
|
335 | |||
336 | $ hg up |
|
336 | $ hg up | |
337 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
337 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
338 | updated to "264128213d29: c" |
|
338 | updated to "264128213d29: c" | |
339 | 1 other heads for branch "default" |
|
339 | 1 other heads for branch "default" | |
340 | $ hg log -G |
|
340 | $ hg log -G | |
341 | @ changeset: 4:264128213d29 |
|
341 | @ changeset: 4:264128213d29 | |
342 | | tag: tip |
|
342 | | tag: tip | |
343 | | parent: 1:ef3a871183d7 |
|
343 | | parent: 1:ef3a871183d7 | |
344 | | user: test |
|
344 | | user: test | |
345 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
345 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
346 | | summary: c |
|
346 | | summary: c | |
347 | | |
|
347 | | | |
348 | | o changeset: 3:443431ffac4f |
|
348 | | o changeset: 3:443431ffac4f | |
349 | | | user: test |
|
349 | | | user: test | |
350 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
350 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
351 | | | summary: e |
|
351 | | | summary: e | |
352 | | | |
|
352 | | | | |
353 | | o changeset: 2:65bd5f99a4a3 |
|
353 | | o changeset: 2:65bd5f99a4a3 | |
354 | |/ user: test |
|
354 | |/ user: test | |
355 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
355 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
356 | | summary: d |
|
356 | | summary: d | |
357 | | |
|
357 | | | |
358 | o changeset: 1:ef3a871183d7 |
|
358 | o changeset: 1:ef3a871183d7 | |
359 | | user: test |
|
359 | | user: test | |
360 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
360 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
361 | | summary: b |
|
361 | | summary: b | |
362 | | |
|
362 | | | |
363 | o changeset: 0:9ab35a2d17cb |
|
363 | o changeset: 0:9ab35a2d17cb | |
364 | user: test |
|
364 | user: test | |
365 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
365 | date: Thu Jan 01 00:00:00 1970 +0000 | |
366 | summary: a |
|
366 | summary: a | |
367 |
|
367 | |||
368 |
|
368 | |||
369 | 2 is parent of 3, only one strip should happen |
|
369 | 2 is parent of 3, only one strip should happen | |
370 |
|
370 | |||
371 | $ hg strip "roots(2)" 3 |
|
371 | $ hg strip "roots(2)" 3 | |
372 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
372 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
373 | $ hg log -G |
|
373 | $ hg log -G | |
374 | @ changeset: 2:264128213d29 |
|
374 | @ changeset: 2:264128213d29 | |
375 | | tag: tip |
|
375 | | tag: tip | |
376 | | user: test |
|
376 | | user: test | |
377 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
377 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
378 | | summary: c |
|
378 | | summary: c | |
379 | | |
|
379 | | | |
380 | o changeset: 1:ef3a871183d7 |
|
380 | o changeset: 1:ef3a871183d7 | |
381 | | user: test |
|
381 | | user: test | |
382 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
382 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
383 | | summary: b |
|
383 | | summary: b | |
384 | | |
|
384 | | | |
385 | o changeset: 0:9ab35a2d17cb |
|
385 | o changeset: 0:9ab35a2d17cb | |
386 | user: test |
|
386 | user: test | |
387 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
387 | date: Thu Jan 01 00:00:00 1970 +0000 | |
388 | summary: a |
|
388 | summary: a | |
389 |
|
389 | |||
390 | $ restore |
|
390 | $ restore | |
391 | $ hg log -G |
|
391 | $ hg log -G | |
392 | o changeset: 4:443431ffac4f |
|
392 | o changeset: 4:443431ffac4f | |
393 | | tag: tip |
|
393 | | tag: tip | |
394 | | user: test |
|
394 | | user: test | |
395 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
395 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
396 | | summary: e |
|
396 | | summary: e | |
397 | | |
|
397 | | | |
398 | o changeset: 3:65bd5f99a4a3 |
|
398 | o changeset: 3:65bd5f99a4a3 | |
399 | | parent: 1:ef3a871183d7 |
|
399 | | parent: 1:ef3a871183d7 | |
400 | | user: test |
|
400 | | user: test | |
401 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
401 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
402 | | summary: d |
|
402 | | summary: d | |
403 | | |
|
403 | | | |
404 | | @ changeset: 2:264128213d29 |
|
404 | | @ changeset: 2:264128213d29 | |
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: c |
|
407 | | summary: c | |
408 | | |
|
408 | | | |
409 | o changeset: 1:ef3a871183d7 |
|
409 | o changeset: 1:ef3a871183d7 | |
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: b |
|
412 | | summary: b | |
413 | | |
|
413 | | | |
414 | o changeset: 0:9ab35a2d17cb |
|
414 | o changeset: 0:9ab35a2d17cb | |
415 | user: test |
|
415 | user: test | |
416 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
416 | date: Thu Jan 01 00:00:00 1970 +0000 | |
417 | summary: a |
|
417 | summary: a | |
418 |
|
418 | |||
419 | Failed hook while applying "saveheads" bundle. |
|
419 | Failed hook while applying "saveheads" bundle. | |
420 |
|
420 | |||
421 | $ hg strip 2 --config hooks.pretxnchangegroup.bad=false |
|
421 | $ hg strip 2 --config hooks.pretxnchangegroup.bad=false | |
422 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
422 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
423 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
423 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
424 | transaction abort! |
|
424 | transaction abort! | |
425 | rollback completed |
|
425 | rollback completed | |
426 | strip failed, backup bundle stored in '$TESTTMP/test/.hg/strip-backup/*-backup.hg' (glob) |
|
426 | strip failed, backup bundle stored in '$TESTTMP/test/.hg/strip-backup/*-backup.hg' (glob) | |
427 | strip failed, unrecovered changes stored in '$TESTTMP/test/.hg/strip-backup/*-temp.hg' (glob) |
|
427 | strip failed, unrecovered changes stored in '$TESTTMP/test/.hg/strip-backup/*-temp.hg' (glob) | |
428 | (fix the problem, then recover the changesets with "hg unbundle '$TESTTMP/test/.hg/strip-backup/*-temp.hg'") (glob) |
|
428 | (fix the problem, then recover the changesets with "hg unbundle '$TESTTMP/test/.hg/strip-backup/*-temp.hg'") (glob) | |
429 | abort: pretxnchangegroup.bad hook exited with status 1 |
|
429 | abort: pretxnchangegroup.bad hook exited with status 1 | |
430 | [40] |
|
430 | [40] | |
431 | $ restore |
|
431 | $ restore | |
432 | $ hg log -G |
|
432 | $ hg log -G | |
433 | o changeset: 4:443431ffac4f |
|
433 | o changeset: 4:443431ffac4f | |
434 | | tag: tip |
|
434 | | tag: tip | |
435 | | user: test |
|
435 | | user: test | |
436 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
436 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
437 | | summary: e |
|
437 | | summary: e | |
438 | | |
|
438 | | | |
439 | o changeset: 3:65bd5f99a4a3 |
|
439 | o changeset: 3:65bd5f99a4a3 | |
440 | | parent: 1:ef3a871183d7 |
|
440 | | parent: 1:ef3a871183d7 | |
441 | | user: test |
|
441 | | user: test | |
442 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
442 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
443 | | summary: d |
|
443 | | summary: d | |
444 | | |
|
444 | | | |
445 | | o changeset: 2:264128213d29 |
|
445 | | o changeset: 2:264128213d29 | |
446 | |/ user: test |
|
446 | |/ user: test | |
447 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
447 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
448 | | summary: c |
|
448 | | summary: c | |
449 | | |
|
449 | | | |
450 | @ changeset: 1:ef3a871183d7 |
|
450 | @ changeset: 1:ef3a871183d7 | |
451 | | user: test |
|
451 | | user: test | |
452 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
452 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
453 | | summary: b |
|
453 | | summary: b | |
454 | | |
|
454 | | | |
455 | o changeset: 0:9ab35a2d17cb |
|
455 | o changeset: 0:9ab35a2d17cb | |
456 | user: test |
|
456 | user: test | |
457 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
457 | date: Thu Jan 01 00:00:00 1970 +0000 | |
458 | summary: a |
|
458 | summary: a | |
459 |
|
459 | |||
460 |
|
460 | |||
461 | 2 different branches: 2 strips |
|
461 | 2 different branches: 2 strips | |
462 |
|
462 | |||
463 | $ hg strip 2 4 |
|
463 | $ hg strip 2 4 | |
464 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
464 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
465 | $ hg log -G |
|
465 | $ hg log -G | |
466 | o changeset: 2:65bd5f99a4a3 |
|
466 | o changeset: 2:65bd5f99a4a3 | |
467 | | tag: tip |
|
467 | | tag: tip | |
468 | | user: test |
|
468 | | user: test | |
469 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
469 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
470 | | summary: d |
|
470 | | summary: d | |
471 | | |
|
471 | | | |
472 | @ changeset: 1:ef3a871183d7 |
|
472 | @ changeset: 1:ef3a871183d7 | |
473 | | user: test |
|
473 | | user: test | |
474 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
474 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
475 | | summary: b |
|
475 | | summary: b | |
476 | | |
|
476 | | | |
477 | o changeset: 0:9ab35a2d17cb |
|
477 | o changeset: 0:9ab35a2d17cb | |
478 | user: test |
|
478 | user: test | |
479 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
479 | date: Thu Jan 01 00:00:00 1970 +0000 | |
480 | summary: a |
|
480 | summary: a | |
481 |
|
481 | |||
482 | $ restore |
|
482 | $ restore | |
483 |
|
483 | |||
484 | 2 different branches and a common ancestor: 1 strip |
|
484 | 2 different branches and a common ancestor: 1 strip | |
485 |
|
485 | |||
486 | $ hg strip 1 "2|4" |
|
486 | $ hg strip 1 "2|4" | |
487 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
487 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
488 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
488 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
489 | $ restore |
|
489 | $ restore | |
490 |
|
490 | |||
491 | verify fncache is kept up-to-date |
|
491 | verify fncache is kept up-to-date | |
492 |
|
492 | |||
493 | $ touch a |
|
493 | $ touch a | |
494 | $ hg ci -qAm a |
|
494 | $ hg ci -qAm a | |
495 | #if repofncache |
|
495 | #if repofncache | |
496 | $ cat .hg/store/fncache | sort |
|
496 | $ cat .hg/store/fncache | sort | |
497 | data/a.i |
|
497 | data/a.i | |
498 | data/bar.i |
|
498 | data/bar.i | |
499 | #endif |
|
499 | #endif | |
500 |
|
500 | |||
501 | $ hg strip tip |
|
501 | $ hg strip tip | |
502 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
502 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
503 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
503 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
504 | #if repofncache |
|
504 | #if repofncache | |
505 | $ cat .hg/store/fncache |
|
505 | $ cat .hg/store/fncache | |
506 | data/bar.i |
|
506 | data/bar.i | |
507 | #endif |
|
507 | #endif | |
508 |
|
508 | |||
509 | stripping an empty revset |
|
509 | stripping an empty revset | |
510 |
|
510 | |||
511 | $ hg strip "1 and not 1" |
|
511 | $ hg strip "1 and not 1" | |
512 | abort: empty revision set |
|
512 | abort: empty revision set | |
513 | [255] |
|
513 | [255] | |
514 |
|
514 | |||
515 | remove branchy history for qimport tests |
|
515 | remove branchy history for qimport tests | |
516 |
|
516 | |||
517 | $ hg strip 3 |
|
517 | $ hg strip 3 | |
518 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
518 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
519 |
|
519 | |||
520 |
|
520 | |||
521 | strip of applied mq should cleanup status file |
|
521 | strip of applied mq should cleanup status file | |
522 |
|
522 | |||
523 | $ echo "mq=" >> $HGRCPATH |
|
523 | $ echo "mq=" >> $HGRCPATH | |
524 | $ hg up -C 3 |
|
524 | $ hg up -C 3 | |
525 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
525 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
526 | $ echo fooagain >> bar |
|
526 | $ echo fooagain >> bar | |
527 | $ hg ci -mf |
|
527 | $ hg ci -mf | |
528 | $ hg qimport -r tip:2 |
|
528 | $ hg qimport -r tip:2 | |
529 |
|
529 | |||
530 | applied patches before strip |
|
530 | applied patches before strip | |
531 |
|
531 | |||
532 | $ hg qapplied |
|
532 | $ hg qapplied | |
533 | d |
|
533 | d | |
534 | e |
|
534 | e | |
535 | f |
|
535 | f | |
536 |
|
536 | |||
537 | stripping revision in queue |
|
537 | stripping revision in queue | |
538 |
|
538 | |||
539 | $ hg strip 3 |
|
539 | $ hg strip 3 | |
540 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
540 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
541 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
541 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
542 |
|
542 | |||
543 | applied patches after stripping rev in queue |
|
543 | applied patches after stripping rev in queue | |
544 |
|
544 | |||
545 | $ hg qapplied |
|
545 | $ hg qapplied | |
546 | d |
|
546 | d | |
547 |
|
547 | |||
548 | stripping ancestor of queue |
|
548 | stripping ancestor of queue | |
549 |
|
549 | |||
550 | $ hg strip 1 |
|
550 | $ hg strip 1 | |
551 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
551 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
552 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
552 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
553 |
|
553 | |||
554 | applied patches after stripping ancestor of queue |
|
554 | applied patches after stripping ancestor of queue | |
555 |
|
555 | |||
556 | $ hg qapplied |
|
556 | $ hg qapplied | |
557 |
|
557 | |||
558 | Verify strip protects against stripping wc parent when there are uncommitted mods |
|
558 | Verify strip protects against stripping wc parent when there are uncommitted mods | |
559 |
|
559 | |||
560 | $ echo b > b |
|
560 | $ echo b > b | |
561 | $ echo bb > bar |
|
561 | $ echo bb > bar | |
562 | $ hg add b |
|
562 | $ hg add b | |
563 | $ hg ci -m 'b' |
|
563 | $ hg ci -m 'b' | |
564 | $ hg log --graph |
|
564 | $ hg log --graph | |
565 | @ changeset: 1:76dcf9fab855 |
|
565 | @ changeset: 1:76dcf9fab855 | |
566 | | tag: tip |
|
566 | | tag: tip | |
567 | | user: test |
|
567 | | user: test | |
568 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
568 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
569 | | summary: b |
|
569 | | summary: b | |
570 | | |
|
570 | | | |
571 | o changeset: 0:9ab35a2d17cb |
|
571 | o changeset: 0:9ab35a2d17cb | |
572 | user: test |
|
572 | user: test | |
573 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
573 | date: Thu Jan 01 00:00:00 1970 +0000 | |
574 | summary: a |
|
574 | summary: a | |
575 |
|
575 | |||
576 | $ hg up 0 |
|
576 | $ hg up 0 | |
577 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
577 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
578 | $ echo c > bar |
|
578 | $ echo c > bar | |
579 | $ hg up -t false |
|
579 | $ hg up -t false | |
580 | merging bar |
|
580 | merging bar | |
581 | merging bar failed! |
|
581 | merging bar failed! | |
582 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
582 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
583 | use 'hg resolve' to retry unresolved file merges |
|
583 | use 'hg resolve' to retry unresolved file merges | |
584 | [1] |
|
584 | [1] | |
585 | $ hg sum |
|
585 | $ hg sum | |
586 | parent: 1:76dcf9fab855 tip |
|
586 | parent: 1:76dcf9fab855 tip | |
587 | b |
|
587 | b | |
588 | branch: default |
|
588 | branch: default | |
589 | commit: 1 modified, 1 unknown, 1 unresolved |
|
589 | commit: 1 modified, 1 unknown, 1 unresolved | |
590 | update: (current) |
|
590 | update: (current) | |
591 | phases: 2 draft |
|
591 | phases: 2 draft | |
592 | mq: 3 unapplied |
|
592 | mq: 3 unapplied | |
593 |
|
593 | |||
594 | $ hg log --graph |
|
594 | $ hg log --graph | |
595 | @ changeset: 1:76dcf9fab855 |
|
595 | @ changeset: 1:76dcf9fab855 | |
596 | | tag: tip |
|
596 | | tag: tip | |
597 | | user: test |
|
597 | | user: test | |
598 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
598 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
599 | | summary: b |
|
599 | | summary: b | |
600 | | |
|
600 | | | |
601 | % changeset: 0:9ab35a2d17cb |
|
601 | % changeset: 0:9ab35a2d17cb | |
602 | user: test |
|
602 | user: test | |
603 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
603 | date: Thu Jan 01 00:00:00 1970 +0000 | |
604 | summary: a |
|
604 | summary: a | |
605 |
|
605 | |||
606 | $ echo c > b |
|
606 | $ echo c > b | |
607 | $ hg strip tip |
|
607 | $ hg strip tip | |
608 | abort: uncommitted changes |
|
608 | abort: uncommitted changes | |
609 | [20] |
|
609 | [20] | |
610 | $ hg strip tip --keep |
|
610 | $ hg strip tip --keep | |
611 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
611 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
612 | $ hg log --graph |
|
612 | $ hg log --graph | |
613 | @ changeset: 0:9ab35a2d17cb |
|
613 | @ changeset: 0:9ab35a2d17cb | |
614 | tag: tip |
|
614 | tag: tip | |
615 | user: test |
|
615 | user: test | |
616 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
616 | date: Thu Jan 01 00:00:00 1970 +0000 | |
617 | summary: a |
|
617 | summary: a | |
618 |
|
618 | |||
619 | $ hg status |
|
619 | $ hg status | |
620 | M bar |
|
620 | M bar | |
621 | ? b |
|
621 | ? b | |
622 | ? bar.orig |
|
622 | ? bar.orig | |
623 |
|
623 | |||
624 | $ rm bar.orig |
|
624 | $ rm bar.orig | |
625 | $ hg sum |
|
625 | $ hg sum | |
626 | parent: 0:9ab35a2d17cb tip |
|
626 | parent: 0:9ab35a2d17cb tip | |
627 | a |
|
627 | a | |
628 | branch: default |
|
628 | branch: default | |
629 | commit: 1 modified, 1 unknown |
|
629 | commit: 1 modified, 1 unknown | |
630 | update: (current) |
|
630 | update: (current) | |
631 | phases: 1 draft |
|
631 | phases: 1 draft | |
632 | mq: 3 unapplied |
|
632 | mq: 3 unapplied | |
633 |
|
633 | |||
634 | Strip adds, removes, modifies with --keep |
|
634 | Strip adds, removes, modifies with --keep | |
635 |
|
635 | |||
636 | $ touch b |
|
636 | $ touch b | |
637 | $ hg add b |
|
637 | $ hg add b | |
638 | $ hg commit -mb |
|
638 | $ hg commit -mb | |
639 | $ touch c |
|
639 | $ touch c | |
640 |
|
640 | |||
641 | ... with a clean working dir |
|
641 | ... with a clean working dir | |
642 |
|
642 | |||
643 | $ hg add c |
|
643 | $ hg add c | |
644 | $ hg rm bar |
|
644 | $ hg rm bar | |
645 | $ hg commit -mc |
|
645 | $ hg commit -mc | |
646 | $ hg status |
|
646 | $ hg status | |
647 | $ hg strip --keep tip |
|
647 | $ hg strip --keep tip | |
648 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
648 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
649 | $ hg status |
|
649 | $ hg status | |
650 | ! bar |
|
650 | ! bar | |
651 | ? c |
|
651 | ? c | |
652 |
|
652 | |||
653 | ... with a dirty working dir |
|
653 | ... with a dirty working dir | |
654 |
|
654 | |||
655 | $ hg add c |
|
655 | $ hg add c | |
656 | $ hg rm bar |
|
656 | $ hg rm bar | |
657 | $ hg commit -mc |
|
657 | $ hg commit -mc | |
658 | $ hg status |
|
658 | $ hg status | |
659 | $ echo b > b |
|
659 | $ echo b > b | |
660 | $ echo d > d |
|
660 | $ echo d > d | |
661 | $ hg strip --keep tip |
|
661 | $ hg strip --keep tip | |
662 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
662 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
663 | $ hg status |
|
663 | $ hg status | |
664 | M b |
|
664 | M b | |
665 | ! bar |
|
665 | ! bar | |
666 | ? c |
|
666 | ? c | |
667 | ? d |
|
667 | ? d | |
668 |
|
668 | |||
669 | ... after updating the dirstate |
|
669 | ... after updating the dirstate | |
670 | $ hg add c |
|
670 | $ hg add c | |
671 | $ hg commit -mc |
|
671 | $ hg commit -mc | |
672 | $ hg rm c |
|
672 | $ hg rm c | |
673 | $ hg commit -mc |
|
673 | $ hg commit -mc | |
674 | $ hg strip --keep '.^' -q |
|
674 | $ hg strip --keep '.^' -q | |
675 | $ cd .. |
|
675 | $ cd .. | |
676 |
|
676 | |||
677 | stripping many nodes on a complex graph (issue3299) |
|
677 | stripping many nodes on a complex graph (issue3299) | |
678 |
|
678 | |||
679 | $ hg init issue3299 |
|
679 | $ hg init issue3299 | |
680 | $ cd issue3299 |
|
680 | $ cd issue3299 | |
681 | $ hg debugbuilddag '@a.:a@b.:b.:x<a@a.:a<b@b.:b<a@a.:a' |
|
681 | $ hg debugbuilddag '@a.:a@b.:b.:x<a@a.:a<b@b.:b<a@a.:a' | |
682 | $ hg strip 'not ancestors(x)' |
|
682 | $ hg strip 'not ancestors(x)' | |
683 | saved backup bundle to $TESTTMP/issue3299/.hg/strip-backup/*-backup.hg (glob) |
|
683 | saved backup bundle to $TESTTMP/issue3299/.hg/strip-backup/*-backup.hg (glob) | |
684 |
|
684 | |||
685 | test hg strip -B bookmark |
|
685 | test hg strip -B bookmark | |
686 |
|
686 | |||
687 | $ cd .. |
|
687 | $ cd .. | |
688 | $ hg init bookmarks |
|
688 | $ hg init bookmarks | |
689 | $ cd bookmarks |
|
689 | $ cd bookmarks | |
690 | $ hg debugbuilddag '..<2.*1/2:m<2+3:c<m+3:a<2.:b<m+2:d<2.:e<m+1:f' |
|
690 | $ hg debugbuilddag '..<2.*1/2:m<2+3:c<m+3:a<2.:b<m+2:d<2.:e<m+1:f' | |
691 | $ hg bookmark -r 'a' 'todelete' |
|
691 | $ hg bookmark -r 'a' 'todelete' | |
692 | $ hg bookmark -r 'b' 'B' |
|
692 | $ hg bookmark -r 'b' 'B' | |
693 | $ hg bookmark -r 'b' 'nostrip' |
|
693 | $ hg bookmark -r 'b' 'nostrip' | |
694 | $ hg bookmark -r 'c' 'delete' |
|
694 | $ hg bookmark -r 'c' 'delete' | |
695 | $ hg bookmark -r 'd' 'multipledelete1' |
|
695 | $ hg bookmark -r 'd' 'multipledelete1' | |
696 | $ hg bookmark -r 'e' 'multipledelete2' |
|
696 | $ hg bookmark -r 'e' 'multipledelete2' | |
697 | $ hg bookmark -r 'f' 'singlenode1' |
|
697 | $ hg bookmark -r 'f' 'singlenode1' | |
698 | $ hg bookmark -r 'f' 'singlenode2' |
|
698 | $ hg bookmark -r 'f' 'singlenode2' | |
699 | $ hg up -C todelete |
|
699 | $ hg up -C todelete | |
700 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
700 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
701 | (activating bookmark todelete) |
|
701 | (activating bookmark todelete) | |
702 | $ hg strip -B nostrip |
|
702 | $ hg strip -B nostrip | |
703 | bookmark 'nostrip' deleted |
|
703 | bookmark 'nostrip' deleted | |
704 | abort: empty revision set |
|
704 | abort: empty revision set | |
705 | [255] |
|
705 | [255] | |
706 | $ hg strip -B todelete |
|
706 | $ hg strip -B todelete | |
707 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
707 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
708 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob) |
|
708 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob) | |
709 | bookmark 'todelete' deleted |
|
709 | bookmark 'todelete' deleted | |
710 | $ hg id -ir dcbb326fdec2 |
|
710 | $ hg id -ir dcbb326fdec2 | |
711 | abort: unknown revision 'dcbb326fdec2' |
|
711 | abort: unknown revision 'dcbb326fdec2' | |
712 | [10] |
|
712 | [10] | |
713 | $ hg id -ir d62d843c9a01 |
|
713 | $ hg id -ir d62d843c9a01 | |
714 | d62d843c9a01 |
|
714 | d62d843c9a01 | |
715 | $ hg bookmarks |
|
715 | $ hg bookmarks | |
716 | B 9:ff43616e5d0f |
|
716 | B 9:ff43616e5d0f | |
717 | delete 6:2702dd0c91e7 |
|
717 | delete 6:2702dd0c91e7 | |
718 | multipledelete1 11:e46a4836065c |
|
718 | multipledelete1 11:e46a4836065c | |
719 | multipledelete2 12:b4594d867745 |
|
719 | multipledelete2 12:b4594d867745 | |
720 | singlenode1 13:43227190fef8 |
|
720 | singlenode1 13:43227190fef8 | |
721 | singlenode2 13:43227190fef8 |
|
721 | singlenode2 13:43227190fef8 | |
722 | $ hg strip -B multipledelete1 -B multipledelete2 |
|
722 | $ hg strip -B multipledelete1 -B multipledelete2 | |
723 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/e46a4836065c-89ec65c2-backup.hg |
|
723 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/e46a4836065c-89ec65c2-backup.hg | |
724 | bookmark 'multipledelete1' deleted |
|
724 | bookmark 'multipledelete1' deleted | |
725 | bookmark 'multipledelete2' deleted |
|
725 | bookmark 'multipledelete2' deleted | |
726 | $ hg id -ir e46a4836065c |
|
726 | $ hg id -ir e46a4836065c | |
727 | abort: unknown revision 'e46a4836065c' |
|
727 | abort: unknown revision 'e46a4836065c' | |
728 | [10] |
|
728 | [10] | |
729 | $ hg id -ir b4594d867745 |
|
729 | $ hg id -ir b4594d867745 | |
730 | abort: unknown revision 'b4594d867745' |
|
730 | abort: unknown revision 'b4594d867745' | |
731 | [10] |
|
731 | [10] | |
732 | $ hg strip -B singlenode1 -B singlenode2 |
|
732 | $ hg strip -B singlenode1 -B singlenode2 | |
733 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/43227190fef8-8da858f2-backup.hg |
|
733 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/43227190fef8-8da858f2-backup.hg | |
734 | bookmark 'singlenode1' deleted |
|
734 | bookmark 'singlenode1' deleted | |
735 | bookmark 'singlenode2' deleted |
|
735 | bookmark 'singlenode2' deleted | |
736 | $ hg id -ir 43227190fef8 |
|
736 | $ hg id -ir 43227190fef8 | |
737 | abort: unknown revision '43227190fef8' |
|
737 | abort: unknown revision '43227190fef8' | |
738 | [10] |
|
738 | [10] | |
739 | $ hg strip -B unknownbookmark |
|
739 | $ hg strip -B unknownbookmark | |
740 | abort: bookmark 'unknownbookmark' not found |
|
740 | abort: bookmark 'unknownbookmark' not found | |
741 | [255] |
|
741 | [255] | |
742 | $ hg strip -B unknownbookmark1 -B unknownbookmark2 |
|
742 | $ hg strip -B unknownbookmark1 -B unknownbookmark2 | |
743 | abort: bookmark 'unknownbookmark1,unknownbookmark2' not found |
|
743 | abort: bookmark 'unknownbookmark1,unknownbookmark2' not found | |
744 | [255] |
|
744 | [255] | |
745 | $ hg strip -B delete -B unknownbookmark |
|
745 | $ hg strip -B delete -B unknownbookmark | |
746 | abort: bookmark 'unknownbookmark' not found |
|
746 | abort: bookmark 'unknownbookmark' not found | |
747 | [255] |
|
747 | [255] | |
748 | $ hg strip -B delete |
|
748 | $ hg strip -B delete | |
749 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob) |
|
749 | saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob) | |
750 | bookmark 'delete' deleted |
|
750 | bookmark 'delete' deleted | |
751 | $ hg id -ir 6:2702dd0c91e7 |
|
751 | $ hg id -ir 6:2702dd0c91e7 | |
752 | abort: unknown revision '2702dd0c91e7' |
|
752 | abort: unknown revision '2702dd0c91e7' | |
753 | [10] |
|
753 | [10] | |
754 | $ hg update B |
|
754 | $ hg update B | |
755 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
755 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
756 | (activating bookmark B) |
|
756 | (activating bookmark B) | |
757 | $ echo a > a |
|
757 | $ echo a > a | |
758 | $ hg add a |
|
758 | $ hg add a | |
759 | $ hg strip -B B |
|
759 | $ hg strip -B B | |
760 | abort: uncommitted changes |
|
760 | abort: uncommitted changes | |
761 | [20] |
|
761 | [20] | |
762 | $ hg bookmarks |
|
762 | $ hg bookmarks | |
763 | * B 6:ff43616e5d0f |
|
763 | * B 6:ff43616e5d0f | |
764 |
|
764 | |||
765 | Make sure no one adds back a -b option: |
|
765 | Make sure no one adds back a -b option: | |
766 |
|
766 | |||
767 | $ hg strip -b tip |
|
767 | $ hg strip -b tip | |
768 | hg debugstrip: option -b not recognized |
|
768 | hg debugstrip: option -b not recognized | |
769 | hg debugstrip [-k] [-f] [-B bookmark] [-r] REV... |
|
769 | hg debugstrip [-k] [-f] [-B bookmark] [-r] REV... | |
770 |
|
770 | |||
771 | strip changesets and all their descendants from the repository |
|
771 | strip changesets and all their descendants from the repository | |
772 |
|
772 | |||
773 | options ([+] can be repeated): |
|
773 | options ([+] can be repeated): | |
774 |
|
774 | |||
775 | -r --rev REV [+] strip specified revision (optional, can specify |
|
775 | -r --rev REV [+] strip specified revision (optional, can specify | |
776 | revisions without this option) |
|
776 | revisions without this option) | |
777 | -f --force force removal of changesets, discard uncommitted |
|
777 | -f --force force removal of changesets, discard uncommitted | |
778 | changes (no backup) |
|
778 | changes (no backup) | |
779 | --no-backup do not save backup bundle |
|
779 | --no-backup do not save backup bundle | |
780 | -k --keep do not modify working directory during strip |
|
780 | -k --keep do not modify working directory during strip | |
781 | -B --bookmark BOOKMARK [+] remove revs only reachable from given bookmark |
|
781 | -B --bookmark BOOKMARK [+] remove revs only reachable from given bookmark | |
782 | --mq operate on patch repository |
|
782 | --mq operate on patch repository | |
783 |
|
783 | |||
784 | (use 'hg debugstrip -h' to show more help) |
|
784 | (use 'hg debugstrip -h' to show more help) | |
785 | [10] |
|
785 | [10] | |
786 |
|
786 | |||
787 | $ cd .. |
|
787 | $ cd .. | |
788 |
|
788 | |||
789 | Verify bundles don't get overwritten: |
|
789 | Verify bundles don't get overwritten: | |
790 |
|
790 | |||
791 | $ hg init doublebundle |
|
791 | $ hg init doublebundle | |
792 | $ cd doublebundle |
|
792 | $ cd doublebundle | |
793 | $ touch a |
|
793 | $ touch a | |
794 | $ hg commit -Aqm a |
|
794 | $ hg commit -Aqm a | |
795 | $ touch b |
|
795 | $ touch b | |
796 | $ hg commit -Aqm b |
|
796 | $ hg commit -Aqm b | |
797 | $ hg strip -r 0 |
|
797 | $ hg strip -r 0 | |
798 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
798 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
799 | saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-e68910bd-backup.hg |
|
799 | saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-e68910bd-backup.hg | |
800 | $ ls .hg/strip-backup |
|
800 | $ ls .hg/strip-backup | |
801 | 3903775176ed-e68910bd-backup.hg |
|
801 | 3903775176ed-e68910bd-backup.hg | |
802 | #if repobundlerepo |
|
802 | #if repobundlerepo | |
803 | $ hg pull -q -r 3903775176ed .hg/strip-backup/3903775176ed-e68910bd-backup.hg |
|
803 | $ hg pull -q -r 3903775176ed .hg/strip-backup/3903775176ed-e68910bd-backup.hg | |
804 | $ hg strip -r 0 |
|
804 | $ hg strip -r 0 | |
805 | saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-54390173-backup.hg |
|
805 | saved backup bundle to $TESTTMP/doublebundle/.hg/strip-backup/3903775176ed-54390173-backup.hg | |
806 | $ ls .hg/strip-backup |
|
806 | $ ls .hg/strip-backup | |
807 | 3903775176ed-54390173-backup.hg |
|
807 | 3903775176ed-54390173-backup.hg | |
808 | 3903775176ed-e68910bd-backup.hg |
|
808 | 3903775176ed-e68910bd-backup.hg | |
809 | #endif |
|
809 | #endif | |
810 | $ cd .. |
|
810 | $ cd .. | |
811 |
|
811 | |||
812 | Test that we only bundle the stripped changesets (issue4736) |
|
812 | Test that we only bundle the stripped changesets (issue4736) | |
813 | ------------------------------------------------------------ |
|
813 | ------------------------------------------------------------ | |
814 |
|
814 | |||
815 | initialization (previous repo is empty anyway) |
|
815 | initialization (previous repo is empty anyway) | |
816 |
|
816 | |||
817 | $ hg init issue4736 |
|
817 | $ hg init issue4736 | |
818 | $ cd issue4736 |
|
818 | $ cd issue4736 | |
819 | $ echo a > a |
|
819 | $ echo a > a | |
820 | $ hg add a |
|
820 | $ hg add a | |
821 | $ hg commit -m commitA |
|
821 | $ hg commit -m commitA | |
822 | $ echo b > b |
|
822 | $ echo b > b | |
823 | $ hg add b |
|
823 | $ hg add b | |
824 | $ hg commit -m commitB |
|
824 | $ hg commit -m commitB | |
825 | $ echo c > c |
|
825 | $ echo c > c | |
826 | $ hg add c |
|
826 | $ hg add c | |
827 | $ hg commit -m commitC |
|
827 | $ hg commit -m commitC | |
828 | $ hg up 'desc(commitB)' |
|
828 | $ hg up 'desc(commitB)' | |
829 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
829 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
830 | $ echo d > d |
|
830 | $ echo d > d | |
831 | $ hg add d |
|
831 | $ hg add d | |
832 | $ hg commit -m commitD |
|
832 | $ hg commit -m commitD | |
833 | created new head |
|
833 | created new head | |
834 | $ hg up 'desc(commitC)' |
|
834 | $ hg up 'desc(commitC)' | |
835 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
835 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
836 | $ hg merge 'desc(commitD)' |
|
836 | $ hg merge 'desc(commitD)' | |
837 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
837 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
838 | (branch merge, don't forget to commit) |
|
838 | (branch merge, don't forget to commit) | |
839 | $ hg ci -m 'mergeCD' |
|
839 | $ hg ci -m 'mergeCD' | |
840 | $ hg log -G |
|
840 | $ hg log -G | |
841 | @ changeset: 4:d8db9d137221 |
|
841 | @ changeset: 4:d8db9d137221 | |
842 | |\ tag: tip |
|
842 | |\ tag: tip | |
843 | | | parent: 2:5c51d8d6557d |
|
843 | | | parent: 2:5c51d8d6557d | |
844 | | | parent: 3:6625a5168474 |
|
844 | | | parent: 3:6625a5168474 | |
845 | | | user: test |
|
845 | | | user: test | |
846 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
846 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
847 | | | summary: mergeCD |
|
847 | | | summary: mergeCD | |
848 | | | |
|
848 | | | | |
849 | | o changeset: 3:6625a5168474 |
|
849 | | o changeset: 3:6625a5168474 | |
850 | | | parent: 1:eca11cf91c71 |
|
850 | | | parent: 1:eca11cf91c71 | |
851 | | | user: test |
|
851 | | | user: test | |
852 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
852 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
853 | | | summary: commitD |
|
853 | | | summary: commitD | |
854 | | | |
|
854 | | | | |
855 | o | changeset: 2:5c51d8d6557d |
|
855 | o | changeset: 2:5c51d8d6557d | |
856 | |/ user: test |
|
856 | |/ user: test | |
857 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
857 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
858 | | summary: commitC |
|
858 | | summary: commitC | |
859 | | |
|
859 | | | |
860 | o changeset: 1:eca11cf91c71 |
|
860 | o changeset: 1:eca11cf91c71 | |
861 | | user: test |
|
861 | | user: test | |
862 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
862 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
863 | | summary: commitB |
|
863 | | summary: commitB | |
864 | | |
|
864 | | | |
865 | o changeset: 0:105141ef12d0 |
|
865 | o changeset: 0:105141ef12d0 | |
866 | user: test |
|
866 | user: test | |
867 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
867 | date: Thu Jan 01 00:00:00 1970 +0000 | |
868 | summary: commitA |
|
868 | summary: commitA | |
869 |
|
869 | |||
870 |
|
870 | |||
871 | Check bundle behavior: |
|
871 | Check bundle behavior: | |
872 |
|
872 | |||
873 | $ hg bundle -r 'desc(mergeCD)' --base 'desc(commitC)' ../issue4736.hg |
|
873 | $ hg bundle -r 'desc(mergeCD)' --base 'desc(commitC)' ../issue4736.hg | |
874 | 2 changesets found |
|
874 | 2 changesets found | |
875 | #if repobundlerepo |
|
875 | #if repobundlerepo | |
876 | $ hg log -r 'bundle()' -R ../issue4736.hg |
|
876 | $ hg log -r 'bundle()' -R ../issue4736.hg | |
877 | changeset: 3:6625a5168474 |
|
877 | changeset: 3:6625a5168474 | |
878 | parent: 1:eca11cf91c71 |
|
878 | parent: 1:eca11cf91c71 | |
879 | user: test |
|
879 | user: test | |
880 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
880 | date: Thu Jan 01 00:00:00 1970 +0000 | |
881 | summary: commitD |
|
881 | summary: commitD | |
882 |
|
882 | |||
883 | changeset: 4:d8db9d137221 |
|
883 | changeset: 4:d8db9d137221 | |
884 | tag: tip |
|
884 | tag: tip | |
885 | parent: 2:5c51d8d6557d |
|
885 | parent: 2:5c51d8d6557d | |
886 | parent: 3:6625a5168474 |
|
886 | parent: 3:6625a5168474 | |
887 | user: test |
|
887 | user: test | |
888 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
888 | date: Thu Jan 01 00:00:00 1970 +0000 | |
889 | summary: mergeCD |
|
889 | summary: mergeCD | |
890 |
|
890 | |||
891 | #endif |
|
891 | #endif | |
892 |
|
892 | |||
893 | check strip behavior |
|
893 | check strip behavior | |
894 |
|
894 | |||
895 | $ hg --config extensions.strip= strip 'desc(commitD)' --debug |
|
895 | $ hg --config extensions.strip= strip 'desc(commitD)' --debug | |
896 | resolving manifests |
|
896 | resolving manifests | |
897 | branchmerge: False, force: True, partial: False |
|
897 | branchmerge: False, force: True, partial: False | |
898 | ancestor: d8db9d137221+, local: d8db9d137221+, remote: eca11cf91c71 |
|
898 | ancestor: d8db9d137221+, local: d8db9d137221+, remote: eca11cf91c71 | |
899 | c: other deleted -> r |
|
899 | c: other deleted -> r | |
900 | removing c |
|
900 | removing c | |
901 | d: other deleted -> r |
|
901 | d: other deleted -> r | |
902 | removing d |
|
902 | removing d | |
903 | starting 4 threads for background file closing (?) |
|
903 | starting 4 threads for background file closing (?) | |
904 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
904 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
905 | 2 changesets found |
|
905 | 2 changesets found | |
906 | list of changesets: |
|
906 | list of changesets: | |
907 | 6625a516847449b6f0fa3737b9ba56e9f0f3032c |
|
907 | 6625a516847449b6f0fa3737b9ba56e9f0f3032c | |
908 | d8db9d1372214336d2b5570f20ee468d2c72fa8b |
|
908 | d8db9d1372214336d2b5570f20ee468d2c72fa8b | |
909 | bundle2-output-bundle: "HG20", (1 params) 3 parts total |
|
909 | bundle2-output-bundle: "HG20", (1 params) 3 parts total | |
910 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload |
|
910 | bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload | |
911 | bundle2-output-part: "cache:rev-branch-cache" (advisory) streamed payload |
|
911 | bundle2-output-part: "cache:rev-branch-cache" (advisory) streamed payload | |
912 | bundle2-output-part: "phase-heads" 24 bytes payload |
|
912 | bundle2-output-part: "phase-heads" 24 bytes payload | |
913 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/6625a5168474-345bb43d-backup.hg |
|
913 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/6625a5168474-345bb43d-backup.hg | |
914 | updating the branch cache |
|
914 | updating the branch cache | |
915 | invalid branch cache (served): tip differs |
|
915 | invalid branch cache (served): tip differs | |
916 | $ hg log -G |
|
916 | $ hg log -G | |
917 | o changeset: 2:5c51d8d6557d |
|
917 | o changeset: 2:5c51d8d6557d | |
918 | | tag: tip |
|
918 | | tag: tip | |
919 | | user: test |
|
919 | | user: test | |
920 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
920 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
921 | | summary: commitC |
|
921 | | summary: commitC | |
922 | | |
|
922 | | | |
923 | @ changeset: 1:eca11cf91c71 |
|
923 | @ changeset: 1:eca11cf91c71 | |
924 | | user: test |
|
924 | | user: test | |
925 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
925 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
926 | | summary: commitB |
|
926 | | summary: commitB | |
927 | | |
|
927 | | | |
928 | o changeset: 0:105141ef12d0 |
|
928 | o changeset: 0:105141ef12d0 | |
929 | user: test |
|
929 | user: test | |
930 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
930 | date: Thu Jan 01 00:00:00 1970 +0000 | |
931 | summary: commitA |
|
931 | summary: commitA | |
932 |
|
932 | |||
933 |
|
933 | |||
934 | strip backup content |
|
934 | strip backup content | |
935 |
|
935 | |||
936 | #if repobundlerepo |
|
936 | #if repobundlerepo | |
937 | $ hg log -r 'bundle()' -R .hg/strip-backup/6625a5168474-*-backup.hg |
|
937 | $ hg log -r 'bundle()' -R .hg/strip-backup/6625a5168474-*-backup.hg | |
938 | changeset: 3:6625a5168474 |
|
938 | changeset: 3:6625a5168474 | |
939 | parent: 1:eca11cf91c71 |
|
939 | parent: 1:eca11cf91c71 | |
940 | user: test |
|
940 | user: test | |
941 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
941 | date: Thu Jan 01 00:00:00 1970 +0000 | |
942 | summary: commitD |
|
942 | summary: commitD | |
943 |
|
943 | |||
944 | changeset: 4:d8db9d137221 |
|
944 | changeset: 4:d8db9d137221 | |
945 | tag: tip |
|
945 | tag: tip | |
946 | parent: 2:5c51d8d6557d |
|
946 | parent: 2:5c51d8d6557d | |
947 | parent: 3:6625a5168474 |
|
947 | parent: 3:6625a5168474 | |
948 | user: test |
|
948 | user: test | |
949 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
949 | date: Thu Jan 01 00:00:00 1970 +0000 | |
950 | summary: mergeCD |
|
950 | summary: mergeCD | |
951 |
|
951 | |||
952 |
|
952 | |||
953 | #endif |
|
953 | #endif | |
954 |
|
954 | |||
955 | Check that the phase cache is properly invalidated after a strip with bookmark. |
|
955 | Check that the phase cache is properly invalidated after a strip with bookmark. | |
956 |
|
956 | |||
957 | $ cat > ../stripstalephasecache.py << EOF |
|
957 | $ cat > ../stripstalephasecache.py << EOF | |
958 | > from mercurial import extensions, localrepo |
|
958 | > from mercurial import extensions, localrepo | |
959 | > def transactioncallback(orig, repo, desc, *args, **kwargs): |
|
959 | > def transactioncallback(orig, repo, desc, *args, **kwargs): | |
960 | > def test(transaction): |
|
960 | > def test(transaction): | |
961 | > # observe cache inconsistency |
|
961 | > # observe cache inconsistency | |
962 | > try: |
|
962 | > try: | |
963 | > [repo.changelog.node(r) for r in repo.revs(b"not public()")] |
|
963 | > [repo.changelog.node(r) for r in repo.revs(b"not public()")] | |
964 | > except IndexError: |
|
964 | > except IndexError: | |
965 | > repo.ui.status(b"Index error!\n") |
|
965 | > repo.ui.status(b"Index error!\n") | |
966 | > transaction = orig(repo, desc, *args, **kwargs) |
|
966 | > transaction = orig(repo, desc, *args, **kwargs) | |
967 | > # warm up the phase cache |
|
967 | > # warm up the phase cache | |
968 | > list(repo.revs(b"not public()")) |
|
968 | > list(repo.revs(b"not public()")) | |
969 | > if desc != b'strip': |
|
969 | > if desc != b'strip': | |
970 | > transaction.addpostclose(b"phase invalidation test", test) |
|
970 | > transaction.addpostclose(b"phase invalidation test", test) | |
971 | > return transaction |
|
971 | > return transaction | |
972 | > def extsetup(ui): |
|
972 | > def extsetup(ui): | |
973 |
> extensions.wrapfunction(localrepo.localrepository, |
|
973 | > extensions.wrapfunction(localrepo.localrepository, "transaction", | |
974 | > transactioncallback) |
|
974 | > transactioncallback) | |
975 |
|
|
975 | > EOF | |
976 | $ hg up -C 2 |
|
976 | $ hg up -C 2 | |
977 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
977 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
978 | $ echo k > k |
|
978 | $ echo k > k | |
979 | $ hg add k |
|
979 | $ hg add k | |
980 | $ hg commit -m commitK |
|
980 | $ hg commit -m commitK | |
981 | $ echo l > l |
|
981 | $ echo l > l | |
982 | $ hg add l |
|
982 | $ hg add l | |
983 | $ hg commit -m commitL |
|
983 | $ hg commit -m commitL | |
984 | $ hg book -r tip blah |
|
984 | $ hg book -r tip blah | |
985 | $ hg strip ".^" --config extensions.crash=$TESTTMP/stripstalephasecache.py |
|
985 | $ hg strip ".^" --config extensions.crash=$TESTTMP/stripstalephasecache.py | |
986 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
986 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
987 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/8f0b4384875c-4fa10deb-backup.hg |
|
987 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/8f0b4384875c-4fa10deb-backup.hg | |
988 | $ hg up -C 1 |
|
988 | $ hg up -C 1 | |
989 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
989 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
990 |
|
990 | |||
991 | Error during post-close callback of the strip transaction |
|
991 | Error during post-close callback of the strip transaction | |
992 | (They should be gracefully handled and reported) |
|
992 | (They should be gracefully handled and reported) | |
993 |
|
993 | |||
994 | $ cat > ../crashstrip.py << EOF |
|
994 | $ cat > ../crashstrip.py << EOF | |
995 | > from mercurial import error |
|
995 | > from mercurial import error | |
996 | > def reposetup(ui, repo): |
|
996 | > def reposetup(ui, repo): | |
997 | > class crashstriprepo(repo.__class__): |
|
997 | > class crashstriprepo(repo.__class__): | |
998 | > def transaction(self, desc, *args, **kwargs): |
|
998 | > def transaction(self, desc, *args, **kwargs): | |
999 | > tr = super(crashstriprepo, self).transaction(desc, *args, **kwargs) |
|
999 | > tr = super(crashstriprepo, self).transaction(desc, *args, **kwargs) | |
1000 | > if desc == b'strip': |
|
1000 | > if desc == b'strip': | |
1001 | > def crash(tra): raise error.Abort(b'boom') |
|
1001 | > def crash(tra): raise error.Abort(b'boom') | |
1002 | > tr.addpostclose(b'crash', crash) |
|
1002 | > tr.addpostclose(b'crash', crash) | |
1003 | > return tr |
|
1003 | > return tr | |
1004 | > repo.__class__ = crashstriprepo |
|
1004 | > repo.__class__ = crashstriprepo | |
1005 | > EOF |
|
1005 | > EOF | |
1006 | $ hg strip tip --config extensions.crash=$TESTTMP/crashstrip.py |
|
1006 | $ hg strip tip --config extensions.crash=$TESTTMP/crashstrip.py | |
1007 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg |
|
1007 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg | |
1008 | strip failed, backup bundle stored in '$TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg' |
|
1008 | strip failed, backup bundle stored in '$TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg' | |
1009 | abort: boom |
|
1009 | abort: boom | |
1010 | [255] |
|
1010 | [255] | |
1011 |
|
1011 | |||
1012 | test stripping a working directory parent doesn't switch named branches |
|
1012 | test stripping a working directory parent doesn't switch named branches | |
1013 |
|
1013 | |||
1014 | $ hg log -G |
|
1014 | $ hg log -G | |
1015 | @ changeset: 1:eca11cf91c71 |
|
1015 | @ changeset: 1:eca11cf91c71 | |
1016 | | tag: tip |
|
1016 | | tag: tip | |
1017 | | user: test |
|
1017 | | user: test | |
1018 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1018 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1019 | | summary: commitB |
|
1019 | | summary: commitB | |
1020 | | |
|
1020 | | | |
1021 | o changeset: 0:105141ef12d0 |
|
1021 | o changeset: 0:105141ef12d0 | |
1022 | user: test |
|
1022 | user: test | |
1023 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1023 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1024 | summary: commitA |
|
1024 | summary: commitA | |
1025 |
|
1025 | |||
1026 |
|
1026 | |||
1027 | $ hg branch new-branch |
|
1027 | $ hg branch new-branch | |
1028 | marked working directory as branch new-branch |
|
1028 | marked working directory as branch new-branch | |
1029 | (branches are permanent and global, did you want a bookmark?) |
|
1029 | (branches are permanent and global, did you want a bookmark?) | |
1030 | $ hg ci -m "start new branch" |
|
1030 | $ hg ci -m "start new branch" | |
1031 | $ echo 'foo' > foo.txt |
|
1031 | $ echo 'foo' > foo.txt | |
1032 | $ hg ci -Aqm foo |
|
1032 | $ hg ci -Aqm foo | |
1033 | $ hg up default |
|
1033 | $ hg up default | |
1034 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1034 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1035 | $ echo 'bar' > bar.txt |
|
1035 | $ echo 'bar' > bar.txt | |
1036 | $ hg ci -Aqm bar |
|
1036 | $ hg ci -Aqm bar | |
1037 | $ hg up new-branch |
|
1037 | $ hg up new-branch | |
1038 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1038 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1039 | $ hg merge default |
|
1039 | $ hg merge default | |
1040 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1040 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1041 | (branch merge, don't forget to commit) |
|
1041 | (branch merge, don't forget to commit) | |
1042 | $ hg log -G |
|
1042 | $ hg log -G | |
1043 | @ changeset: 4:35358f982181 |
|
1043 | @ changeset: 4:35358f982181 | |
1044 | | tag: tip |
|
1044 | | tag: tip | |
1045 | | parent: 1:eca11cf91c71 |
|
1045 | | parent: 1:eca11cf91c71 | |
1046 | | user: test |
|
1046 | | user: test | |
1047 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1047 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1048 | | summary: bar |
|
1048 | | summary: bar | |
1049 | | |
|
1049 | | | |
1050 | | @ changeset: 3:f62c6c09b707 |
|
1050 | | @ changeset: 3:f62c6c09b707 | |
1051 | | | branch: new-branch |
|
1051 | | | branch: new-branch | |
1052 | | | user: test |
|
1052 | | | user: test | |
1053 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1053 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1054 | | | summary: foo |
|
1054 | | | summary: foo | |
1055 | | | |
|
1055 | | | | |
1056 | | o changeset: 2:b1d33a8cadd9 |
|
1056 | | o changeset: 2:b1d33a8cadd9 | |
1057 | |/ branch: new-branch |
|
1057 | |/ branch: new-branch | |
1058 | | user: test |
|
1058 | | user: test | |
1059 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1059 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1060 | | summary: start new branch |
|
1060 | | summary: start new branch | |
1061 | | |
|
1061 | | | |
1062 | o changeset: 1:eca11cf91c71 |
|
1062 | o changeset: 1:eca11cf91c71 | |
1063 | | user: test |
|
1063 | | user: test | |
1064 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1064 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1065 | | summary: commitB |
|
1065 | | summary: commitB | |
1066 | | |
|
1066 | | | |
1067 | o changeset: 0:105141ef12d0 |
|
1067 | o changeset: 0:105141ef12d0 | |
1068 | user: test |
|
1068 | user: test | |
1069 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1069 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1070 | summary: commitA |
|
1070 | summary: commitA | |
1071 |
|
1071 | |||
1072 |
|
1072 | |||
1073 | $ hg strip --force -r 35358f982181 |
|
1073 | $ hg strip --force -r 35358f982181 | |
1074 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1074 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1075 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-50d992d4-backup.hg |
|
1075 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-50d992d4-backup.hg | |
1076 | $ hg log -G |
|
1076 | $ hg log -G | |
1077 | @ changeset: 3:f62c6c09b707 |
|
1077 | @ changeset: 3:f62c6c09b707 | |
1078 | | branch: new-branch |
|
1078 | | branch: new-branch | |
1079 | | tag: tip |
|
1079 | | tag: tip | |
1080 | | user: test |
|
1080 | | user: test | |
1081 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1081 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1082 | | summary: foo |
|
1082 | | summary: foo | |
1083 | | |
|
1083 | | | |
1084 | o changeset: 2:b1d33a8cadd9 |
|
1084 | o changeset: 2:b1d33a8cadd9 | |
1085 | | branch: new-branch |
|
1085 | | branch: new-branch | |
1086 | | user: test |
|
1086 | | user: test | |
1087 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1087 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1088 | | summary: start new branch |
|
1088 | | summary: start new branch | |
1089 | | |
|
1089 | | | |
1090 | o changeset: 1:eca11cf91c71 |
|
1090 | o changeset: 1:eca11cf91c71 | |
1091 | | user: test |
|
1091 | | user: test | |
1092 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1092 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1093 | | summary: commitB |
|
1093 | | summary: commitB | |
1094 | | |
|
1094 | | | |
1095 | o changeset: 0:105141ef12d0 |
|
1095 | o changeset: 0:105141ef12d0 | |
1096 | user: test |
|
1096 | user: test | |
1097 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1097 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1098 | summary: commitA |
|
1098 | summary: commitA | |
1099 |
|
1099 | |||
1100 |
|
1100 | |||
1101 | $ hg up default |
|
1101 | $ hg up default | |
1102 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1102 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1103 | $ echo 'bar' > bar.txt |
|
1103 | $ echo 'bar' > bar.txt | |
1104 | $ hg ci -Aqm bar |
|
1104 | $ hg ci -Aqm bar | |
1105 | $ hg up new-branch |
|
1105 | $ hg up new-branch | |
1106 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1106 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1107 | $ hg merge default |
|
1107 | $ hg merge default | |
1108 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1108 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1109 | (branch merge, don't forget to commit) |
|
1109 | (branch merge, don't forget to commit) | |
1110 | $ hg ci -m merge |
|
1110 | $ hg ci -m merge | |
1111 | $ hg log -G |
|
1111 | $ hg log -G | |
1112 | @ changeset: 5:4cf5e92caec2 |
|
1112 | @ changeset: 5:4cf5e92caec2 | |
1113 | |\ branch: new-branch |
|
1113 | |\ branch: new-branch | |
1114 | | | tag: tip |
|
1114 | | | tag: tip | |
1115 | | | parent: 3:f62c6c09b707 |
|
1115 | | | parent: 3:f62c6c09b707 | |
1116 | | | parent: 4:35358f982181 |
|
1116 | | | parent: 4:35358f982181 | |
1117 | | | user: test |
|
1117 | | | user: test | |
1118 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1118 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1119 | | | summary: merge |
|
1119 | | | summary: merge | |
1120 | | | |
|
1120 | | | | |
1121 | | o changeset: 4:35358f982181 |
|
1121 | | o changeset: 4:35358f982181 | |
1122 | | | parent: 1:eca11cf91c71 |
|
1122 | | | parent: 1:eca11cf91c71 | |
1123 | | | user: test |
|
1123 | | | user: test | |
1124 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1124 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1125 | | | summary: bar |
|
1125 | | | summary: bar | |
1126 | | | |
|
1126 | | | | |
1127 | o | changeset: 3:f62c6c09b707 |
|
1127 | o | changeset: 3:f62c6c09b707 | |
1128 | | | branch: new-branch |
|
1128 | | | branch: new-branch | |
1129 | | | user: test |
|
1129 | | | user: test | |
1130 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1130 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1131 | | | summary: foo |
|
1131 | | | summary: foo | |
1132 | | | |
|
1132 | | | | |
1133 | o | changeset: 2:b1d33a8cadd9 |
|
1133 | o | changeset: 2:b1d33a8cadd9 | |
1134 | |/ branch: new-branch |
|
1134 | |/ branch: new-branch | |
1135 | | user: test |
|
1135 | | user: test | |
1136 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1136 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1137 | | summary: start new branch |
|
1137 | | summary: start new branch | |
1138 | | |
|
1138 | | | |
1139 | o changeset: 1:eca11cf91c71 |
|
1139 | o changeset: 1:eca11cf91c71 | |
1140 | | user: test |
|
1140 | | user: test | |
1141 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1141 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1142 | | summary: commitB |
|
1142 | | summary: commitB | |
1143 | | |
|
1143 | | | |
1144 | o changeset: 0:105141ef12d0 |
|
1144 | o changeset: 0:105141ef12d0 | |
1145 | user: test |
|
1145 | user: test | |
1146 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1146 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1147 | summary: commitA |
|
1147 | summary: commitA | |
1148 |
|
1148 | |||
1149 |
|
1149 | |||
1150 | $ hg strip -r 35358f982181 |
|
1150 | $ hg strip -r 35358f982181 | |
1151 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1151 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1152 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg |
|
1152 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg | |
1153 | $ hg log -G |
|
1153 | $ hg log -G | |
1154 | @ changeset: 3:f62c6c09b707 |
|
1154 | @ changeset: 3:f62c6c09b707 | |
1155 | | branch: new-branch |
|
1155 | | branch: new-branch | |
1156 | | tag: tip |
|
1156 | | tag: tip | |
1157 | | user: test |
|
1157 | | user: test | |
1158 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1158 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1159 | | summary: foo |
|
1159 | | summary: foo | |
1160 | | |
|
1160 | | | |
1161 | o changeset: 2:b1d33a8cadd9 |
|
1161 | o changeset: 2:b1d33a8cadd9 | |
1162 | | branch: new-branch |
|
1162 | | branch: new-branch | |
1163 | | user: test |
|
1163 | | user: test | |
1164 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1164 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1165 | | summary: start new branch |
|
1165 | | summary: start new branch | |
1166 | | |
|
1166 | | | |
1167 | o changeset: 1:eca11cf91c71 |
|
1167 | o changeset: 1:eca11cf91c71 | |
1168 | | user: test |
|
1168 | | user: test | |
1169 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1169 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1170 | | summary: commitB |
|
1170 | | summary: commitB | |
1171 | | |
|
1171 | | | |
1172 | o changeset: 0:105141ef12d0 |
|
1172 | o changeset: 0:105141ef12d0 | |
1173 | user: test |
|
1173 | user: test | |
1174 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1174 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1175 | summary: commitA |
|
1175 | summary: commitA | |
1176 |
|
1176 | |||
1177 |
|
1177 | |||
1178 | stripping a set containing a merge properly reset file content, including items on other branches |
|
1178 | stripping a set containing a merge properly reset file content, including items on other branches | |
1179 |
|
1179 | |||
1180 | The added file is moved to unknown, which is the behavior we have been seeing for other `hg strip --keep` call. |
|
1180 | The added file is moved to unknown, which is the behavior we have been seeing for other `hg strip --keep` call. | |
1181 |
|
1181 | |||
1182 | stripping a set containing a merge properly reset file content, including items on other branches |
|
1182 | stripping a set containing a merge properly reset file content, including items on other branches | |
1183 |
|
1183 | |||
1184 | The added file is moved to unknown, which is the behavior we have been seeing for other `hg strip --keep` call. |
|
1184 | The added file is moved to unknown, which is the behavior we have been seeing for other `hg strip --keep` call. | |
1185 |
|
1185 | |||
1186 | $ hg unbundle -u $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg |
|
1186 | $ hg unbundle -u $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg | |
1187 | adding changesets |
|
1187 | adding changesets | |
1188 | adding manifests |
|
1188 | adding manifests | |
1189 | adding file changes |
|
1189 | adding file changes | |
1190 | added 2 changesets with 1 changes to 1 files |
|
1190 | added 2 changesets with 1 changes to 1 files | |
1191 | new changesets 35358f982181:4cf5e92caec2 (2 drafts) |
|
1191 | new changesets 35358f982181:4cf5e92caec2 (2 drafts) | |
1192 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1192 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1193 |
|
1193 | |||
1194 | $ hg id |
|
1194 | $ hg id | |
1195 | 4cf5e92caec2 (new-branch) tip |
|
1195 | 4cf5e92caec2 (new-branch) tip | |
1196 | $ hg status --rev "f62c6c09b707" |
|
1196 | $ hg status --rev "f62c6c09b707" | |
1197 | A bar.txt |
|
1197 | A bar.txt | |
1198 | $ hg diff --rev "f62c6c09b707" |
|
1198 | $ hg diff --rev "f62c6c09b707" | |
1199 | diff -r f62c6c09b707 bar.txt |
|
1199 | diff -r f62c6c09b707 bar.txt | |
1200 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1200 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1201 | +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000 |
|
1201 | +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000 | |
1202 | @@ -0,0 +1,1 @@ |
|
1202 | @@ -0,0 +1,1 @@ | |
1203 | +bar |
|
1203 | +bar | |
1204 | $ hg log -G -v --rev 35358f982181:: --patch |
|
1204 | $ hg log -G -v --rev 35358f982181:: --patch | |
1205 | @ changeset: 5:4cf5e92caec2 |
|
1205 | @ changeset: 5:4cf5e92caec2 | |
1206 | |\ branch: new-branch |
|
1206 | |\ branch: new-branch | |
1207 | | ~ tag: tip |
|
1207 | | ~ tag: tip | |
1208 | | parent: 3:f62c6c09b707 |
|
1208 | | parent: 3:f62c6c09b707 | |
1209 | | parent: 4:35358f982181 |
|
1209 | | parent: 4:35358f982181 | |
1210 | | user: test |
|
1210 | | user: test | |
1211 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1211 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1212 | | description: |
|
1212 | | description: | |
1213 | | merge |
|
1213 | | merge | |
1214 | | |
|
1214 | | | |
1215 | | |
|
1215 | | | |
1216 | | diff -r f62c6c09b707 -r 4cf5e92caec2 bar.txt |
|
1216 | | diff -r f62c6c09b707 -r 4cf5e92caec2 bar.txt | |
1217 | | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1217 | | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1218 | | +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000 |
|
1218 | | +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000 | |
1219 | | @@ -0,0 +1,1 @@ |
|
1219 | | @@ -0,0 +1,1 @@ | |
1220 | | +bar |
|
1220 | | +bar | |
1221 | | |
|
1221 | | | |
1222 | o changeset: 4:35358f982181 |
|
1222 | o changeset: 4:35358f982181 | |
1223 | | parent: 1:eca11cf91c71 |
|
1223 | | parent: 1:eca11cf91c71 | |
1224 | ~ user: test |
|
1224 | ~ user: test | |
1225 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1225 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1226 | files: bar.txt |
|
1226 | files: bar.txt | |
1227 | description: |
|
1227 | description: | |
1228 | bar |
|
1228 | bar | |
1229 |
|
1229 | |||
1230 |
|
1230 | |||
1231 | diff -r eca11cf91c71 -r 35358f982181 bar.txt |
|
1231 | diff -r eca11cf91c71 -r 35358f982181 bar.txt | |
1232 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1232 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1233 | +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000 |
|
1233 | +++ b/bar.txt Thu Jan 01 00:00:00 1970 +0000 | |
1234 | @@ -0,0 +1,1 @@ |
|
1234 | @@ -0,0 +1,1 @@ | |
1235 | +bar |
|
1235 | +bar | |
1236 |
|
1236 | |||
1237 |
|
1237 | |||
1238 | $ hg strip -k -r 35358f982181 |
|
1238 | $ hg strip -k -r 35358f982181 | |
1239 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg |
|
1239 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg | |
1240 | $ hg log -G |
|
1240 | $ hg log -G | |
1241 | @ changeset: 3:f62c6c09b707 |
|
1241 | @ changeset: 3:f62c6c09b707 | |
1242 | | branch: new-branch |
|
1242 | | branch: new-branch | |
1243 | | tag: tip |
|
1243 | | tag: tip | |
1244 | | user: test |
|
1244 | | user: test | |
1245 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1245 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1246 | | summary: foo |
|
1246 | | summary: foo | |
1247 | | |
|
1247 | | | |
1248 | o changeset: 2:b1d33a8cadd9 |
|
1248 | o changeset: 2:b1d33a8cadd9 | |
1249 | | branch: new-branch |
|
1249 | | branch: new-branch | |
1250 | | user: test |
|
1250 | | user: test | |
1251 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1251 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1252 | | summary: start new branch |
|
1252 | | summary: start new branch | |
1253 | | |
|
1253 | | | |
1254 | o changeset: 1:eca11cf91c71 |
|
1254 | o changeset: 1:eca11cf91c71 | |
1255 | | user: test |
|
1255 | | user: test | |
1256 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1256 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1257 | | summary: commitB |
|
1257 | | summary: commitB | |
1258 | | |
|
1258 | | | |
1259 | o changeset: 0:105141ef12d0 |
|
1259 | o changeset: 0:105141ef12d0 | |
1260 | user: test |
|
1260 | user: test | |
1261 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1261 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1262 | summary: commitA |
|
1262 | summary: commitA | |
1263 |
|
1263 | |||
1264 |
|
1264 | |||
1265 | $ hg status -A |
|
1265 | $ hg status -A | |
1266 | ? bar.txt |
|
1266 | ? bar.txt | |
1267 | C a |
|
1267 | C a | |
1268 | C b |
|
1268 | C b | |
1269 | C foo.txt |
|
1269 | C foo.txt | |
1270 | $ cat bar.txt |
|
1270 | $ cat bar.txt | |
1271 | bar |
|
1271 | bar | |
1272 |
|
1272 | |||
1273 | Use delayedstrip to strip inside a transaction |
|
1273 | Use delayedstrip to strip inside a transaction | |
1274 |
|
1274 | |||
1275 | $ cd $TESTTMP |
|
1275 | $ cd $TESTTMP | |
1276 | $ hg init delayedstrip |
|
1276 | $ hg init delayedstrip | |
1277 | $ cd delayedstrip |
|
1277 | $ cd delayedstrip | |
1278 | $ hg debugdrawdag <<'EOS' |
|
1278 | $ hg debugdrawdag <<'EOS' | |
1279 | > D |
|
1279 | > D | |
1280 | > | |
|
1280 | > | | |
1281 | > C F H # Commit on top of "I", |
|
1281 | > C F H # Commit on top of "I", | |
1282 | > | |/| # Strip B+D+I+E+G+H+Z |
|
1282 | > | |/| # Strip B+D+I+E+G+H+Z | |
1283 | > I B E G |
|
1283 | > I B E G | |
1284 | > \|/ |
|
1284 | > \|/ | |
1285 | > A Z |
|
1285 | > A Z | |
1286 | > EOS |
|
1286 | > EOS | |
1287 | $ cp -R . ../scmutilcleanup |
|
1287 | $ cp -R . ../scmutilcleanup | |
1288 |
|
1288 | |||
1289 | $ hg up -C I |
|
1289 | $ hg up -C I | |
1290 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1290 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1291 | $ echo 3 >> I |
|
1291 | $ echo 3 >> I | |
1292 | $ cat > $TESTTMP/delayedstrip.py <<EOF |
|
1292 | $ cat > $TESTTMP/delayedstrip.py <<EOF | |
1293 | > from mercurial import commands, registrar, repair |
|
1293 | > from mercurial import commands, registrar, repair | |
1294 | > cmdtable = {} |
|
1294 | > cmdtable = {} | |
1295 | > command = registrar.command(cmdtable) |
|
1295 | > command = registrar.command(cmdtable) | |
1296 | > @command(b'testdelayedstrip') |
|
1296 | > @command(b'testdelayedstrip') | |
1297 | > def testdelayedstrip(ui, repo): |
|
1297 | > def testdelayedstrip(ui, repo): | |
1298 | > def getnodes(expr): |
|
1298 | > def getnodes(expr): | |
1299 | > return [repo.changelog.node(r) for r in repo.revs(expr)] |
|
1299 | > return [repo.changelog.node(r) for r in repo.revs(expr)] | |
1300 | > with repo.wlock(): |
|
1300 | > with repo.wlock(): | |
1301 | > with repo.lock(): |
|
1301 | > with repo.lock(): | |
1302 | > with repo.transaction(b'delayedstrip'): |
|
1302 | > with repo.transaction(b'delayedstrip'): | |
1303 | > repair.delayedstrip(ui, repo, getnodes(b'B+I+Z+D+E'), b'J') |
|
1303 | > repair.delayedstrip(ui, repo, getnodes(b'B+I+Z+D+E'), b'J') | |
1304 | > repair.delayedstrip(ui, repo, getnodes(b'G+H+Z'), b'I') |
|
1304 | > repair.delayedstrip(ui, repo, getnodes(b'G+H+Z'), b'I') | |
1305 | > commands.commit(ui, repo, message=b'J', date=b'0 0') |
|
1305 | > commands.commit(ui, repo, message=b'J', date=b'0 0') | |
1306 | > EOF |
|
1306 | > EOF | |
1307 | $ hg testdelayedstrip --config extensions.t=$TESTTMP/delayedstrip.py |
|
1307 | $ hg testdelayedstrip --config extensions.t=$TESTTMP/delayedstrip.py | |
1308 | warning: orphaned descendants detected, not stripping 08ebfeb61bac, 112478962961, 7fb047a69f22 |
|
1308 | warning: orphaned descendants detected, not stripping 08ebfeb61bac, 112478962961, 7fb047a69f22 | |
1309 | saved backup bundle to $TESTTMP/delayedstrip/.hg/strip-backup/f585351a92f8-17475721-I.hg |
|
1309 | saved backup bundle to $TESTTMP/delayedstrip/.hg/strip-backup/f585351a92f8-17475721-I.hg | |
1310 |
|
1310 | |||
1311 | $ hg log -G -T '{rev}:{node|short} {desc}' -r 'sort(all(), topo)' |
|
1311 | $ hg log -G -T '{rev}:{node|short} {desc}' -r 'sort(all(), topo)' | |
1312 | @ 6:2f2d51af6205 J |
|
1312 | @ 6:2f2d51af6205 J | |
1313 | | |
|
1313 | | | |
1314 | o 3:08ebfeb61bac I |
|
1314 | o 3:08ebfeb61bac I | |
1315 | | |
|
1315 | | | |
1316 | | o 5:64a8289d2492 F |
|
1316 | | o 5:64a8289d2492 F | |
1317 | | | |
|
1317 | | | | |
1318 | | o 2:7fb047a69f22 E |
|
1318 | | o 2:7fb047a69f22 E | |
1319 | |/ |
|
1319 | |/ | |
1320 | | o 4:26805aba1e60 C |
|
1320 | | o 4:26805aba1e60 C | |
1321 | | | |
|
1321 | | | | |
1322 | | o 1:112478962961 B |
|
1322 | | o 1:112478962961 B | |
1323 | |/ |
|
1323 | |/ | |
1324 | o 0:426bada5c675 A |
|
1324 | o 0:426bada5c675 A | |
1325 |
|
1325 | |||
1326 | Test high-level scmutil.cleanupnodes API |
|
1326 | Test high-level scmutil.cleanupnodes API | |
1327 |
|
1327 | |||
1328 | $ cd $TESTTMP/scmutilcleanup |
|
1328 | $ cd $TESTTMP/scmutilcleanup | |
1329 | $ hg debugdrawdag <<'EOS' |
|
1329 | $ hg debugdrawdag <<'EOS' | |
1330 | > D2 F2 G2 # D2, F2, G2 are replacements for D, F, G |
|
1330 | > D2 F2 G2 # D2, F2, G2 are replacements for D, F, G | |
1331 | > | | | |
|
1331 | > | | | | |
1332 | > C H G |
|
1332 | > C H G | |
1333 | > EOS |
|
1333 | > EOS | |
1334 | $ for i in B C D F G I Z; do |
|
1334 | $ for i in B C D F G I Z; do | |
1335 | > hg bookmark -i -r $i b-$i |
|
1335 | > hg bookmark -i -r $i b-$i | |
1336 | > done |
|
1336 | > done | |
1337 | $ hg bookmark -i -r E 'b-F@divergent1' |
|
1337 | $ hg bookmark -i -r E 'b-F@divergent1' | |
1338 | $ hg bookmark -i -r H 'b-F@divergent2' |
|
1338 | $ hg bookmark -i -r H 'b-F@divergent2' | |
1339 | $ hg bookmark -i -r G 'b-F@divergent3' |
|
1339 | $ hg bookmark -i -r G 'b-F@divergent3' | |
1340 | $ cp -R . ../scmutilcleanup.obsstore |
|
1340 | $ cp -R . ../scmutilcleanup.obsstore | |
1341 |
|
1341 | |||
1342 | $ cat > $TESTTMP/scmutilcleanup.py <<EOF |
|
1342 | $ cat > $TESTTMP/scmutilcleanup.py <<EOF | |
1343 | > from mercurial import registrar, scmutil |
|
1343 | > from mercurial import registrar, scmutil | |
1344 | > cmdtable = {} |
|
1344 | > cmdtable = {} | |
1345 | > command = registrar.command(cmdtable) |
|
1345 | > command = registrar.command(cmdtable) | |
1346 | > @command(b'testnodescleanup') |
|
1346 | > @command(b'testnodescleanup') | |
1347 | > def testnodescleanup(ui, repo): |
|
1347 | > def testnodescleanup(ui, repo): | |
1348 | > def nodes(expr): |
|
1348 | > def nodes(expr): | |
1349 | > return [repo.changelog.node(r) for r in repo.revs(expr)] |
|
1349 | > return [repo.changelog.node(r) for r in repo.revs(expr)] | |
1350 | > def node(expr): |
|
1350 | > def node(expr): | |
1351 | > return nodes(expr)[0] |
|
1351 | > return nodes(expr)[0] | |
1352 | > with repo.wlock(): |
|
1352 | > with repo.wlock(): | |
1353 | > with repo.lock(): |
|
1353 | > with repo.lock(): | |
1354 | > with repo.transaction(b'delayedstrip'): |
|
1354 | > with repo.transaction(b'delayedstrip'): | |
1355 | > mapping = {node(b'F'): [node(b'F2')], |
|
1355 | > mapping = {node(b'F'): [node(b'F2')], | |
1356 | > node(b'D'): [node(b'D2')], |
|
1356 | > node(b'D'): [node(b'D2')], | |
1357 | > node(b'G'): [node(b'G2')]} |
|
1357 | > node(b'G'): [node(b'G2')]} | |
1358 | > scmutil.cleanupnodes(repo, mapping, b'replace') |
|
1358 | > scmutil.cleanupnodes(repo, mapping, b'replace') | |
1359 | > scmutil.cleanupnodes(repo, nodes(b'((B::)+I+Z)-D2-obsolete()'), |
|
1359 | > scmutil.cleanupnodes(repo, nodes(b'((B::)+I+Z)-D2-obsolete()'), | |
1360 | > b'replace') |
|
1360 | > b'replace') | |
1361 | > EOF |
|
1361 | > EOF | |
1362 | $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py |
|
1362 | $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py | |
1363 | warning: orphaned descendants detected, not stripping 112478962961, 1fc8102cda62, 26805aba1e60 |
|
1363 | warning: orphaned descendants detected, not stripping 112478962961, 1fc8102cda62, 26805aba1e60 | |
1364 | saved backup bundle to $TESTTMP/scmutilcleanup/.hg/strip-backup/f585351a92f8-73fb7c03-replace.hg |
|
1364 | saved backup bundle to $TESTTMP/scmutilcleanup/.hg/strip-backup/f585351a92f8-73fb7c03-replace.hg | |
1365 |
|
1365 | |||
1366 | $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)' |
|
1366 | $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)' | |
1367 | o 8:1473d4b996d1 G2 b-F@divergent3 b-G |
|
1367 | o 8:1473d4b996d1 G2 b-F@divergent3 b-G | |
1368 | | |
|
1368 | | | |
1369 | | o 7:d11b3456a873 F2 b-F |
|
1369 | | o 7:d11b3456a873 F2 b-F | |
1370 | | | |
|
1370 | | | | |
1371 | | o 5:5cb05ba470a7 H |
|
1371 | | o 5:5cb05ba470a7 H | |
1372 | |/| |
|
1372 | |/| | |
1373 | | o 3:7fb047a69f22 E b-F@divergent1 |
|
1373 | | o 3:7fb047a69f22 E b-F@divergent1 | |
1374 | | | |
|
1374 | | | | |
1375 | | | o 6:7c78f703e465 D2 b-D |
|
1375 | | | o 6:7c78f703e465 D2 b-D | |
1376 | | | | |
|
1376 | | | | | |
1377 | | | o 4:26805aba1e60 C |
|
1377 | | | o 4:26805aba1e60 C | |
1378 | | | | |
|
1378 | | | | | |
1379 | | | o 2:112478962961 B |
|
1379 | | | o 2:112478962961 B | |
1380 | | |/ |
|
1380 | | |/ | |
1381 | o | 1:1fc8102cda62 G |
|
1381 | o | 1:1fc8102cda62 G | |
1382 | / |
|
1382 | / | |
1383 | o 0:426bada5c675 A b-B b-C b-I |
|
1383 | o 0:426bada5c675 A b-B b-C b-I | |
1384 |
|
1384 | |||
1385 | $ hg bookmark |
|
1385 | $ hg bookmark | |
1386 | b-B 0:426bada5c675 |
|
1386 | b-B 0:426bada5c675 | |
1387 | b-C 0:426bada5c675 |
|
1387 | b-C 0:426bada5c675 | |
1388 | b-D 6:7c78f703e465 |
|
1388 | b-D 6:7c78f703e465 | |
1389 | b-F 7:d11b3456a873 |
|
1389 | b-F 7:d11b3456a873 | |
1390 | b-F@divergent1 3:7fb047a69f22 |
|
1390 | b-F@divergent1 3:7fb047a69f22 | |
1391 | b-F@divergent3 8:1473d4b996d1 |
|
1391 | b-F@divergent3 8:1473d4b996d1 | |
1392 | b-G 8:1473d4b996d1 |
|
1392 | b-G 8:1473d4b996d1 | |
1393 | b-I 0:426bada5c675 |
|
1393 | b-I 0:426bada5c675 | |
1394 | b-Z -1:000000000000 |
|
1394 | b-Z -1:000000000000 | |
1395 |
|
1395 | |||
1396 | Test the above using obsstore "by the way". Not directly related to strip, but |
|
1396 | Test the above using obsstore "by the way". Not directly related to strip, but | |
1397 | we have reusable code here |
|
1397 | we have reusable code here | |
1398 |
|
1398 | |||
1399 | $ cd $TESTTMP/scmutilcleanup.obsstore |
|
1399 | $ cd $TESTTMP/scmutilcleanup.obsstore | |
1400 | $ cat >> .hg/hgrc <<EOF |
|
1400 | $ cat >> .hg/hgrc <<EOF | |
1401 | > [experimental] |
|
1401 | > [experimental] | |
1402 | > evolution=true |
|
1402 | > evolution=true | |
1403 | > evolution.track-operation=1 |
|
1403 | > evolution.track-operation=1 | |
1404 | > EOF |
|
1404 | > EOF | |
1405 |
|
1405 | |||
1406 | $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py |
|
1406 | $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py | |
1407 | 4 new orphan changesets |
|
1407 | 4 new orphan changesets | |
1408 |
|
1408 | |||
1409 | $ rm .hg/localtags |
|
1409 | $ rm .hg/localtags | |
1410 | $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)' |
|
1410 | $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)' | |
1411 | * 12:1473d4b996d1 G2 b-F@divergent3 b-G |
|
1411 | * 12:1473d4b996d1 G2 b-F@divergent3 b-G | |
1412 | | |
|
1412 | | | |
1413 | | * 11:d11b3456a873 F2 b-F |
|
1413 | | * 11:d11b3456a873 F2 b-F | |
1414 | | | |
|
1414 | | | | |
1415 | | * 8:5cb05ba470a7 H |
|
1415 | | * 8:5cb05ba470a7 H | |
1416 | |/| |
|
1416 | |/| | |
1417 | | o 4:7fb047a69f22 E b-F@divergent1 |
|
1417 | | o 4:7fb047a69f22 E b-F@divergent1 | |
1418 | | | |
|
1418 | | | | |
1419 | | | * 10:7c78f703e465 D2 b-D |
|
1419 | | | * 10:7c78f703e465 D2 b-D | |
1420 | | | | |
|
1420 | | | | | |
1421 | | | x 6:26805aba1e60 C |
|
1421 | | | x 6:26805aba1e60 C | |
1422 | | | | |
|
1422 | | | | | |
1423 | | | x 3:112478962961 B |
|
1423 | | | x 3:112478962961 B | |
1424 | | |/ |
|
1424 | | |/ | |
1425 | x | 1:1fc8102cda62 G |
|
1425 | x | 1:1fc8102cda62 G | |
1426 | / |
|
1426 | / | |
1427 | o 0:426bada5c675 A b-B b-C b-I |
|
1427 | o 0:426bada5c675 A b-B b-C b-I | |
1428 |
|
1428 | |||
1429 | $ hg debugobsolete |
|
1429 | $ hg debugobsolete | |
1430 | 1fc8102cda6204549f031015641606ccf5513ec3 1473d4b996d1d1b121de6b39fab6a04fbf9d873e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'replace', 'user': 'test'} |
|
1430 | 1fc8102cda6204549f031015641606ccf5513ec3 1473d4b996d1d1b121de6b39fab6a04fbf9d873e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'replace', 'user': 'test'} | |
1431 | 64a8289d249234b9886244d379f15e6b650b28e3 d11b3456a873daec7c7bc53e5622e8df6d741bd2 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'replace', 'user': 'test'} |
|
1431 | 64a8289d249234b9886244d379f15e6b650b28e3 d11b3456a873daec7c7bc53e5622e8df6d741bd2 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'replace', 'user': 'test'} | |
1432 | f585351a92f85104bff7c284233c338b10eb1df7 7c78f703e465d73102cc8780667ce269c5208a40 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'replace', 'user': 'test'} |
|
1432 | f585351a92f85104bff7c284233c338b10eb1df7 7c78f703e465d73102cc8780667ce269c5208a40 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'replace', 'user': 'test'} | |
1433 | 48b9aae0607f43ff110d84e6883c151942add5ab 0 {0000000000000000000000000000000000000000} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'} |
|
1433 | 48b9aae0607f43ff110d84e6883c151942add5ab 0 {0000000000000000000000000000000000000000} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'} | |
1434 | 112478962961147124edd43549aedd1a335e44bf 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'} |
|
1434 | 112478962961147124edd43549aedd1a335e44bf 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'} | |
1435 | 08ebfeb61bac6e3f12079de774d285a0d6689eba 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'} |
|
1435 | 08ebfeb61bac6e3f12079de774d285a0d6689eba 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'} | |
1436 | 26805aba1e600a82e93661149f2313866a221a7b 0 {112478962961147124edd43549aedd1a335e44bf} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'} |
|
1436 | 26805aba1e600a82e93661149f2313866a221a7b 0 {112478962961147124edd43549aedd1a335e44bf} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'replace', 'user': 'test'} | |
1437 | $ cd .. |
|
1437 | $ cd .. | |
1438 |
|
1438 | |||
1439 | Test that obsmarkers are restored even when not using generaldelta |
|
1439 | Test that obsmarkers are restored even when not using generaldelta | |
1440 |
|
1440 | |||
1441 | $ hg --config format.usegeneraldelta=no init issue5678 |
|
1441 | $ hg --config format.usegeneraldelta=no init issue5678 | |
1442 | $ cd issue5678 |
|
1442 | $ cd issue5678 | |
1443 | $ cat >> .hg/hgrc <<EOF |
|
1443 | $ cat >> .hg/hgrc <<EOF | |
1444 | > [experimental] |
|
1444 | > [experimental] | |
1445 | > evolution=true |
|
1445 | > evolution=true | |
1446 | > EOF |
|
1446 | > EOF | |
1447 | $ echo a > a |
|
1447 | $ echo a > a | |
1448 | $ hg ci -Aqm a |
|
1448 | $ hg ci -Aqm a | |
1449 | $ hg ci --amend -m a2 |
|
1449 | $ hg ci --amend -m a2 | |
1450 | $ hg debugobsolete |
|
1450 | $ hg debugobsolete | |
1451 | cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b 489bac576828490c0bb8d45eac9e5e172e4ec0a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1451 | cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b 489bac576828490c0bb8d45eac9e5e172e4ec0a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1452 | $ hg strip . |
|
1452 | $ hg strip . | |
1453 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1453 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1454 | saved backup bundle to $TESTTMP/issue5678/.hg/strip-backup/489bac576828-bef27e14-backup.hg |
|
1454 | saved backup bundle to $TESTTMP/issue5678/.hg/strip-backup/489bac576828-bef27e14-backup.hg | |
1455 | $ hg unbundle -q .hg/strip-backup/* |
|
1455 | $ hg unbundle -q .hg/strip-backup/* | |
1456 | $ hg debugobsolete |
|
1456 | $ hg debugobsolete | |
1457 | cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b 489bac576828490c0bb8d45eac9e5e172e4ec0a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} |
|
1457 | cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b 489bac576828490c0bb8d45eac9e5e172e4ec0a8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'} | |
1458 | $ cd .. |
|
1458 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now