| 1 |
https://bz.mercurial-scm.org/1306 |
| 2 |
|
| 3 |
Initialize remote repo with branches: |
| 4 |
|
| 5 |
$ hg init remote |
| 6 |
$ cd remote |
| 7 |
|
| 8 |
$ echo a > a |
| 9 |
$ hg ci -Ama |
| 10 |
adding a |
| 11 |
|
| 12 |
$ hg branch br |
| 13 |
marked working directory as branch br |
| 14 |
(branches are permanent and global, did you want a bookmark?) |
| 15 |
$ hg ci -Amb |
| 16 |
|
| 17 |
$ echo c > c |
| 18 |
$ hg ci -Amc |
| 19 |
adding c |
| 20 |
|
| 21 |
$ hg log |
| 22 |
changeset: 2:ae3d9c30ec50 |
| 23 |
branch: br |
| 24 |
tag: tip |
| 25 |
user: test |
| 26 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 27 |
summary: c |
| 28 |
|
| 29 |
changeset: 1:3f7f930ca414 |
| 30 |
branch: br |
| 31 |
user: test |
| 32 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 33 |
summary: b |
| 34 |
|
| 35 |
changeset: 0:cb9a9f314b8b |
| 36 |
user: test |
| 37 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 38 |
summary: a |
| 39 |
|
| 40 |
|
| 41 |
$ cd .. |
| 42 |
|
| 43 |
Try cloning -r branch: |
| 44 |
|
| 45 |
$ hg clone -rbr remote local1 |
| 46 |
adding changesets |
| 47 |
adding manifests |
| 48 |
adding file changes |
| 49 |
added 3 changesets with 2 changes to 2 files |
| 50 |
new changesets cb9a9f314b8b:ae3d9c30ec50 |
| 51 |
updating to branch br |
| 52 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 53 |
|
| 54 |
$ hg -R local1 parents |
| 55 |
changeset: 2:ae3d9c30ec50 |
| 56 |
branch: br |
| 57 |
tag: tip |
| 58 |
user: test |
| 59 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 60 |
summary: c |
| 61 |
|
| 62 |
|
| 63 |
Try cloning -rother clone#branch: |
| 64 |
|
| 65 |
$ hg clone -r0 remote#br local2 |
| 66 |
adding changesets |
| 67 |
adding manifests |
| 68 |
adding file changes |
| 69 |
added 3 changesets with 2 changes to 2 files |
| 70 |
new changesets cb9a9f314b8b:ae3d9c30ec50 |
| 71 |
updating to branch default |
| 72 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 73 |
|
| 74 |
$ hg -R local2 parents |
| 75 |
changeset: 0:cb9a9f314b8b |
| 76 |
user: test |
| 77 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 78 |
summary: a |
| 79 |
|
| 80 |
|
| 81 |
Try cloning -r1 clone#branch: |
| 82 |
|
| 83 |
$ hg clone -r1 remote#br local3 |
| 84 |
adding changesets |
| 85 |
adding manifests |
| 86 |
adding file changes |
| 87 |
added 3 changesets with 2 changes to 2 files |
| 88 |
new changesets cb9a9f314b8b:ae3d9c30ec50 |
| 89 |
updating to branch br |
| 90 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 91 |
|
| 92 |
$ hg -R local3 parents |
| 93 |
changeset: 1:3f7f930ca414 |
| 94 |
branch: br |
| 95 |
user: test |
| 96 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 97 |
summary: b |
| 98 |
|
| 99 |
|