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