Mercurial > hg
comparison tests/test-remotenames.t @ 35331:773a9a06047c
clone: add support for storing remotenames while cloning
If `experimental.remotenames` is set to True, we store the remotenames in case
of `hg pull`. This patch adds that support to clone command also.
Differential Revision: https://phab.mercurial-scm.org/D1601
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 06 Dec 2017 06:40:27 +0530 |
parents | 8fbb2678d8e8 |
children |
comparison
equal
deleted
inserted
replaced
35330:0c1aff6d73a7 | 35331:773a9a06047c |
---|---|
2 ============================================= | 2 ============================================= |
3 | 3 |
4 $ cat >> $HGRCPATH << EOF | 4 $ cat >> $HGRCPATH << EOF |
5 > [alias] | 5 > [alias] |
6 > glog = log -G -T '{rev}:{node|short} {desc}' | 6 > glog = log -G -T '{rev}:{node|short} {desc}' |
7 > [experimental] | |
8 > remotenames = True | |
7 > EOF | 9 > EOF |
8 | 10 |
9 Making a server repo | 11 Making a server repo |
10 -------------------- | 12 -------------------- |
11 | 13 |
44 | 46 |
45 Making a client repo | 47 Making a client repo |
46 -------------------- | 48 -------------------- |
47 | 49 |
48 $ cd .. | 50 $ cd .. |
49 $ hg init client | 51 |
52 $ hg clone server client | |
53 updating to branch default | |
54 8 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
55 | |
50 $ cd client | 56 $ cd client |
51 $ cat >> .hg/hgrc << EOF | |
52 > [experimental] | |
53 > remotenames = True | |
54 > EOF | |
55 | |
56 $ hg pull ../server/ | |
57 pulling from ../server/ | |
58 requesting all changes | |
59 adding changesets | |
60 adding manifests | |
61 adding file changes | |
62 added 9 changesets with 9 changes to 9 files (+1 heads) | |
63 adding remote bookmark bar | |
64 adding remote bookmark foo | |
65 new changesets 18d04c59bb5d:3e1487808078 | |
66 (run 'hg heads' to see heads) | |
67 | |
68 $ cat .hg/remotenames/bookmarks | 57 $ cat .hg/remotenames/bookmarks |
69 0 | 58 0 |
70 | 59 |
71 87d6d66763085b629e6d7ed56778c79827273022\x00file:$TESTTMP/server\x00bar (esc) | 60 87d6d66763085b629e6d7ed56778c79827273022\x00file:$TESTTMP/server\x00bar (esc) |
72 62615734edd52f06b6fb9c2beb429e4fe30d57b8\x00file:$TESTTMP/server\x00foo (esc) | 61 62615734edd52f06b6fb9c2beb429e4fe30d57b8\x00file:$TESTTMP/server\x00foo (esc) |