Show More
@@ -24,11 +24,11 b' from . import (' | |||
|
24 | 24 | discovery, |
|
25 | 25 | error, |
|
26 | 26 | lock as lockmod, |
|
27 | logexchange, | |
|
27 | 28 | obsolete, |
|
28 | 29 | phases, |
|
29 | 30 | pushkey, |
|
30 | 31 | pycompat, |
|
31 | remotenames, | |
|
32 | 32 | scmutil, |
|
33 | 33 | sslutil, |
|
34 | 34 | streamclone, |
@@ -1366,7 +1366,7 b' def pull(repo, remote, heads=None, force' | |||
|
1366 | 1366 | |
|
1367 | 1367 | # storing remotenames |
|
1368 | 1368 | if repo.ui.configbool('experimental', 'remotenames'): |
|
1369 |
|
|
|
1369 | logexchange.pullremotenames(repo, remote) | |
|
1370 | 1370 | |
|
1371 | 1371 | return pullop |
|
1372 | 1372 |
@@ -28,10 +28,10 b' from . import (' | |||
|
28 | 28 | httppeer, |
|
29 | 29 | localrepo, |
|
30 | 30 | lock, |
|
31 | logexchange, | |
|
31 | 32 | merge as mergemod, |
|
32 | 33 | node, |
|
33 | 34 | phases, |
|
34 | remotenames, | |
|
35 | 35 | repoview, |
|
36 | 36 | scmutil, |
|
37 | 37 | sshpeer, |
@@ -691,7 +691,7 b' def clone(ui, peeropts, source, dest=Non' | |||
|
691 | 691 | destrepo.ui.setconfig('paths', 'default', defaulturl, 'clone') |
|
692 | 692 | |
|
693 | 693 | if ui.configbool('experimental', 'remotenames'): |
|
694 |
|
|
|
694 | logexchange.pullremotenames(destrepo, srcpeer) | |
|
695 | 695 | |
|
696 | 696 | if update: |
|
697 | 697 | if update is not True: |
@@ -1,4 +1,4 b'' | |||
|
1 | # remotenames.py | |
|
1 | # logexchange.py | |
|
2 | 2 | # |
|
3 | 3 | # Copyright 2017 Augie Fackler <raf@durin42.com> |
|
4 | 4 | # Copyright 2017 Sean Farley <sean@farley.io> |
@@ -15,11 +15,11 b' from . import (' | |||
|
15 | 15 | ) |
|
16 | 16 | |
|
17 | 17 | # directory name in .hg/ in which remotenames files will be present |
|
18 |
remotenamedir = ' |
|
|
18 | remotenamedir = 'logexchange' | |
|
19 | 19 | |
|
20 | 20 | def readremotenamefile(repo, filename): |
|
21 | 21 | """ |
|
22 |
reads a file from .hg/ |
|
|
22 | reads a file from .hg/logexchange/ directory and yields it's content | |
|
23 | 23 | filename: the file to be read |
|
24 | 24 | yield a tuple (node, remotepath, name) |
|
25 | 25 | """ |
@@ -46,7 +46,7 b' def readremotenamefile(repo, filename):' | |||
|
46 | 46 | |
|
47 | 47 | def readremotenames(repo): |
|
48 | 48 | """ |
|
49 |
read the details about the remotenames stored in .hg/ |
|
|
49 | read the details about the remotenames stored in .hg/logexchange/ and | |
|
50 | 50 | yields a tuple (node, remotepath, name). It does not yields information |
|
51 | 51 | about whether an entry yielded is branch or bookmark. To get that |
|
52 | 52 | information, call the respective functions. |
@@ -83,7 +83,7 b' def writeremotenamefile(repo, remotepath' | |||
|
83 | 83 | def saveremotenames(repo, remotepath, branches=None, bookmarks=None): |
|
84 | 84 | """ |
|
85 | 85 | save remotenames i.e. remotebookmarks and remotebranches in their |
|
86 |
respective files under ".hg/ |
|
|
86 | respective files under ".hg/logexchange/" directory. | |
|
87 | 87 | """ |
|
88 | 88 | wlock = repo.wlock() |
|
89 | 89 | try: |
@@ -54,13 +54,13 b' Making a client repo' | |||
|
54 | 54 | 8 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
55 | 55 | |
|
56 | 56 | $ cd client |
|
57 |
$ cat .hg/ |
|
|
57 | $ cat .hg/logexchange/bookmarks | |
|
58 | 58 | 0 |
|
59 | 59 | |
|
60 | 60 | 87d6d66763085b629e6d7ed56778c79827273022\x00file:$TESTTMP/server\x00bar (esc) |
|
61 | 61 | 62615734edd52f06b6fb9c2beb429e4fe30d57b8\x00file:$TESTTMP/server\x00foo (esc) |
|
62 | 62 | |
|
63 |
$ cat .hg/ |
|
|
63 | $ cat .hg/logexchange/branches | |
|
64 | 64 | 0 |
|
65 | 65 | |
|
66 | 66 | ec2426147f0e39dbc9cef599b066be6035ce691d\x00file:$TESTTMP/server\x00default (esc) |
@@ -91,7 +91,7 b' Pulling form the new server' | |||
|
91 | 91 | pulling from ../server2/ |
|
92 | 92 | searching for changes |
|
93 | 93 | no changes found |
|
94 |
$ cat .hg/ |
|
|
94 | $ cat .hg/logexchange/bookmarks | |
|
95 | 95 | 0 |
|
96 | 96 | |
|
97 | 97 | 62615734edd52f06b6fb9c2beb429e4fe30d57b8\x00file:$TESTTMP/server\x00foo (esc) |
@@ -99,7 +99,7 b' Pulling form the new server' | |||
|
99 | 99 | 87d6d66763085b629e6d7ed56778c79827273022\x00file:$TESTTMP/server2\x00bar (esc) |
|
100 | 100 | 62615734edd52f06b6fb9c2beb429e4fe30d57b8\x00file:$TESTTMP/server2\x00foo (esc) |
|
101 | 101 | |
|
102 |
$ cat .hg/ |
|
|
102 | $ cat .hg/logexchange/branches | |
|
103 | 103 | 0 |
|
104 | 104 | |
|
105 | 105 | 3e1487808078543b0af6d10dadf5d46943578db0\x00file:$TESTTMP/server\x00wat (esc) |
General Comments 0
You need to be logged in to leave comments.
Login now