| 1 |
$ cat <<EOF >> $HGRCPATH |
| 2 |
> [extensions] |
| 3 |
> mq= |
| 4 |
> [alias] |
| 5 |
> tlog = log --template "{rev}: {node|short} {desc}\\n" |
| 6 |
> theads = heads --template "{rev}: {desc}\\n" |
| 7 |
> tincoming = incoming --template "{rev}: {desc}\\n" |
| 8 |
> EOF |
| 9 |
|
| 10 |
Setup main: |
| 11 |
|
| 12 |
$ hg init base |
| 13 |
$ cd base |
| 14 |
$ echo "One" > one |
| 15 |
$ hg add |
| 16 |
adding one |
| 17 |
$ hg ci -m "main: one added" |
| 18 |
$ echo "++" >> one |
| 19 |
$ hg ci -m "main: one updated" |
| 20 |
|
| 21 |
Bundle main: |
| 22 |
|
| 23 |
$ hg bundle --base=null ../main.hg |
| 24 |
2 changesets found |
| 25 |
|
| 26 |
$ cd .. |
| 27 |
|
| 28 |
Incoming to fresh repo: |
| 29 |
|
| 30 |
$ hg init fresh |
| 31 |
|
| 32 |
$ hg -R fresh tincoming main.hg |
| 33 |
comparing with main.hg |
| 34 |
0: main: one added |
| 35 |
1: main: one updated |
| 36 |
$ test -f ./fresh/.hg/hg-bundle* && echo 'temp. bundle file remained' || true |
| 37 |
|
| 38 |
$ hg -R fresh tincoming bundle:fresh+main.hg |
| 39 |
comparing with bundle:fresh+main.hg |
| 40 |
0: main: one added |
| 41 |
1: main: one updated |
| 42 |
|
| 43 |
|
| 44 |
Setup queue: |
| 45 |
|
| 46 |
$ cd base |
| 47 |
$ hg qinit -c |
| 48 |
$ hg qnew -m "patch: two added" two.patch |
| 49 |
$ echo two > two |
| 50 |
$ hg add |
| 51 |
adding two |
| 52 |
$ hg qrefresh |
| 53 |
$ hg qcommit -m "queue: two.patch added" |
| 54 |
$ hg qpop -a |
| 55 |
popping two.patch |
| 56 |
patch queue now empty |
| 57 |
|
| 58 |
Bundle queue: |
| 59 |
|
| 60 |
$ hg -R .hg/patches bundle --base=null ../queue.hgq |
| 61 |
1 changesets found |
| 62 |
$ test -f ./fresh/.hg/hg-bundle* && echo 'temp. bundle file remained' || true |
| 63 |
|
| 64 |
$ cd .. |
| 65 |
|
| 66 |
|
| 67 |
Clone base: |
| 68 |
|
| 69 |
$ hg clone base copy |
| 70 |
updating to branch default |
| 71 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 72 |
$ cd copy |
| 73 |
$ hg qinit -c |
| 74 |
|
| 75 |
Incoming queue bundle: |
| 76 |
|
| 77 |
$ hg -R .hg/patches tincoming ../queue.hgq |
| 78 |
comparing with ../queue.hgq |
| 79 |
0: queue: two.patch added |
| 80 |
$ test -f .hg/hg-bundle* && echo 'temp. bundle file remained' || true |
| 81 |
|
| 82 |
Pull queue bundle: |
| 83 |
|
| 84 |
$ hg -R .hg/patches pull --update ../queue.hgq |
| 85 |
pulling from ../queue.hgq |
| 86 |
requesting all changes |
| 87 |
adding changesets |
| 88 |
adding manifests |
| 89 |
adding file changes |
| 90 |
added 1 changesets with 3 changes to 3 files |
| 91 |
new changesets d7553909353d (1 drafts) |
| 92 |
merging series |
| 93 |
2 files updated, 1 files merged, 0 files removed, 0 files unresolved |
| 94 |
$ test -f .hg/patches/hg-bundle* && echo 'temp. bundle file remained' || true |
| 95 |
|
| 96 |
$ hg -R .hg/patches theads |
| 97 |
0: queue: two.patch added |
| 98 |
|
| 99 |
$ hg -R .hg/patches tlog |
| 100 |
0: d7553909353d queue: two.patch added |
| 101 |
|
| 102 |
$ hg qseries |
| 103 |
two.patch |
| 104 |
|
| 105 |
$ cd .. |
| 106 |
|
| 107 |
|
| 108 |
Clone base again: |
| 109 |
|
| 110 |
$ hg clone base copy2 |
| 111 |
updating to branch default |
| 112 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 113 |
$ cd copy2 |
| 114 |
$ hg qinit -c |
| 115 |
|
| 116 |
Unbundle queue bundle: |
| 117 |
|
| 118 |
$ hg -R .hg/patches unbundle --update ../queue.hgq |
| 119 |
adding changesets |
| 120 |
adding manifests |
| 121 |
adding file changes |
| 122 |
added 1 changesets with 3 changes to 3 files |
| 123 |
new changesets d7553909353d (1 drafts) |
| 124 |
merging series |
| 125 |
2 files updated, 1 files merged, 0 files removed, 0 files unresolved |
| 126 |
|
| 127 |
$ hg -R .hg/patches theads |
| 128 |
0: queue: two.patch added |
| 129 |
|
| 130 |
$ hg -R .hg/patches tlog |
| 131 |
0: d7553909353d queue: two.patch added |
| 132 |
|
| 133 |
$ hg qseries |
| 134 |
two.patch |
| 135 |
|
| 136 |
$ cd .. |
| 137 |
|