Mercurial > hg
comparison tests/test-mq-pull-from-bundle @ 5664:da72b4d24797
Fix income/pull with bundle and -R (issue 820).
Uses ui.setconfig() to tell bundlerepo where the main repo is. This is
needed for when the --repository option is used.
Adds tests to test-bundle and a new test script
test-mq-pull-from-bundle, which plays out the situation that initially
made me detect this bug
(hg -R .hg/patches pull ../bundle.hg).
author | Peter Arrenbrecht <peter.arrenbrecht@gmail.com> |
---|---|
date | Tue, 18 Dec 2007 14:11:13 -0600 |
parents | |
children | 5d14d71148b8 |
comparison
equal
deleted
inserted
replaced
5663:99fdef2e6793 | 5664:da72b4d24797 |
---|---|
1 #!/bin/sh | |
2 | |
3 echo "[extensions]" >> $HGRCPATH | |
4 echo "mq=" >> $HGRCPATH | |
5 echo "[defaults]" >> $HGRCPATH | |
6 echo "log = --template \"{rev}: {desc}\\n\"" >> $HGRCPATH | |
7 echo "heads = --template \"{rev}: {desc}\\n\"" >> $HGRCPATH | |
8 echo "incoming = --template \"{rev}: {desc}\\n\"" >> $HGRCPATH | |
9 | |
10 echo "====== .hgrc" | |
11 cat $HGRCPATH | |
12 | |
13 echo "====== Setup main" | |
14 hg init base | |
15 cd base | |
16 echo "One" > one | |
17 hg add | |
18 hg ci -m "main: one added." | |
19 echo "++" >> one | |
20 hg ci -m "main: one updated." | |
21 | |
22 echo "====== Bundle main" | |
23 hg bundle --base=null ../main.hg | |
24 cd .. | |
25 | |
26 echo "====== Incoming to fresh repo" | |
27 hg init fresh | |
28 echo ">> hg -R fresh incoming main.hg" | |
29 hg -R fresh incoming main.hg | |
30 echo ">> hg -R fresh incoming bundle:fresh+main.hg" | |
31 hg -R fresh incoming bundle:fresh+main.hg | |
32 | |
33 | |
34 echo "====== Setup queue" | |
35 cd base | |
36 hg qinit -c | |
37 hg qnew -m "patch: two added." two.patch | |
38 echo two > two | |
39 hg add | |
40 hg qrefresh | |
41 hg qcommit -m "queue: two.patch added." | |
42 hg qpop -a | |
43 | |
44 echo "====== Bundle queue" | |
45 hg -R .hg/patches bundle --base=null ../queue.hgq | |
46 cd .. | |
47 | |
48 | |
49 echo "====== Clone base" | |
50 hg clone base copy | |
51 cd copy | |
52 hg qinit -c | |
53 | |
54 echo "====== Incoming queue bundle" | |
55 echo ">> hg -R .hg/patches incoming ../queue.hgq" | |
56 hg -R .hg/patches incoming ../queue.hgq | |
57 | |
58 echo "====== Pull queue bundle" | |
59 echo ">> hg -R .hg/patches pull --update ../queue.hgq" | |
60 hg -R .hg/patches pull --update ../queue.hgq | |
61 echo ">> hg -R .hg/patches heads" | |
62 hg -R .hg/patches heads | |
63 echo ">> hg -R .hg/patches log" | |
64 hg -R .hg/patches log | |
65 echo ">> hg qseries" | |
66 hg qseries | |
67 cd .. | |
68 | |
69 | |
70 echo "====== Clone base again" | |
71 hg clone base copy2 | |
72 cd copy2 | |
73 hg qinit -c | |
74 | |
75 echo "====== Unbundle queue bundle" | |
76 echo ">> hg -R .hg/patches unbundle --update ../queue.hgq" | |
77 hg -R .hg/patches unbundle --update ../queue.hgq | |
78 echo ">> hg -R .hg/patches heads" | |
79 hg -R .hg/patches heads | |
80 echo ">> hg -R .hg/patches log" | |
81 hg -R .hg/patches log | |
82 echo ">> hg qseries" | |
83 hg qseries | |
84 cd .. |