| 1 |
this structure seems to tickle a bug in bundle's search for |
| 2 |
changesets, so first we have to recreate it |
| 3 |
|
| 4 |
o 8 |
| 5 |
| |
| 6 |
| o 7 |
| 7 |
| | |
| 8 |
| o 6 |
| 9 |
|/| |
| 10 |
o | 5 |
| 11 |
| | |
| 12 |
o | 4 |
| 13 |
| | |
| 14 |
| o 3 |
| 15 |
| | |
| 16 |
| o 2 |
| 17 |
|/ |
| 18 |
o 1 |
| 19 |
| |
| 20 |
o 0 |
| 21 |
|
| 22 |
$ mkrev() |
| 23 |
> { |
| 24 |
> revno=$1 |
| 25 |
> echo "rev $revno" |
| 26 |
> echo "rev $revno" > foo.txt |
| 27 |
> hg -q ci -m"rev $revno" |
| 28 |
> } |
| 29 |
|
| 30 |
setup test repo1 |
| 31 |
|
| 32 |
$ hg init repo1 |
| 33 |
$ cd repo1 |
| 34 |
$ echo "rev 0" > foo.txt |
| 35 |
$ hg ci -Am"rev 0" |
| 36 |
adding foo.txt |
| 37 |
$ mkrev 1 |
| 38 |
rev 1 |
| 39 |
|
| 40 |
first branch |
| 41 |
|
| 42 |
$ mkrev 2 |
| 43 |
rev 2 |
| 44 |
$ mkrev 3 |
| 45 |
rev 3 |
| 46 |
|
| 47 |
back to rev 1 to create second branch |
| 48 |
|
| 49 |
$ hg up -r1 |
| 50 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 51 |
$ mkrev 4 |
| 52 |
rev 4 |
| 53 |
$ mkrev 5 |
| 54 |
rev 5 |
| 55 |
|
| 56 |
merge first branch to second branch |
| 57 |
|
| 58 |
$ hg up -C -r5 |
| 59 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 60 |
$ HGMERGE=internal:local hg merge |
| 61 |
0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
| 62 |
(branch merge, don't forget to commit) |
| 63 |
$ echo "merge rev 5, rev 3" > foo.txt |
| 64 |
$ hg ci -m"merge first branch to second branch" |
| 65 |
|
| 66 |
one more commit following the merge |
| 67 |
|
| 68 |
$ mkrev 7 |
| 69 |
rev 7 |
| 70 |
|
| 71 |
back to "second branch" to make another head |
| 72 |
|
| 73 |
$ hg up -r5 |
| 74 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 75 |
$ mkrev 8 |
| 76 |
rev 8 |
| 77 |
|
| 78 |
the story so far |
| 79 |
|
| 80 |
$ hg log -G --template "{rev}\n" |
| 81 |
@ 8 |
| 82 |
| |
| 83 |
| o 7 |
| 84 |
| | |
| 85 |
| o 6 |
| 86 |
|/| |
| 87 |
o | 5 |
| 88 |
| | |
| 89 |
o | 4 |
| 90 |
| | |
| 91 |
| o 3 |
| 92 |
| | |
| 93 |
| o 2 |
| 94 |
|/ |
| 95 |
o 1 |
| 96 |
| |
| 97 |
o 0 |
| 98 |
|
| 99 |
|
| 100 |
check that "hg outgoing" really does the right thing |
| 101 |
|
| 102 |
sanity check of outgoing: expect revs 4 5 6 7 8 |
| 103 |
|
| 104 |
$ hg clone -r3 . ../repo2 |
| 105 |
adding changesets |
| 106 |
adding manifests |
| 107 |
adding file changes |
| 108 |
added 4 changesets with 4 changes to 1 files |
| 109 |
new changesets 6ae4cca4e39a:478f191e53f8 |
| 110 |
updating to branch default |
| 111 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 112 |
|
| 113 |
this should (and does) report 5 outgoing revisions: 4 5 6 7 8 |
| 114 |
|
| 115 |
$ hg outgoing --template "{rev}\n" ../repo2 |
| 116 |
comparing with ../repo2 |
| 117 |
searching for changes |
| 118 |
4 |
| 119 |
5 |
| 120 |
6 |
| 121 |
7 |
| 122 |
8 |
| 123 |
|
| 124 |
test bundle (destination repo): expect 5 revisions |
| 125 |
|
| 126 |
this should bundle the same 5 revisions that outgoing reported, but it |
| 127 |
|
| 128 |
actually bundles 7 |
| 129 |
|
| 130 |
$ hg bundle foo.bundle ../repo2 |
| 131 |
searching for changes |
| 132 |
5 changesets found |
| 133 |
|
| 134 |
test bundle (base revision): expect 5 revisions |
| 135 |
|
| 136 |
this should (and does) give exactly the same result as bundle |
| 137 |
|
| 138 |
with a destination repo... i.e. it's wrong too |
| 139 |
|
| 140 |
$ hg bundle --base 3 foo.bundle |
| 141 |
5 changesets found |
| 142 |
|
| 143 |
$ cd .. |