##// END OF EJS Templates
share: use the 'sharedpath' attr on repo instead of reloading from the file...
Matt Harbison -
r23626:012a7b48 default
parent child Browse files
Show More
@@ -91,18 +91,13 b' def _getsrcrepo(repo):'
91 91 Returns the source repository object for a given shared repository.
92 92 If repo is not a shared repository, return None.
93 93 """
94 srcrepo = None
95 try:
96 # strip because some tools write with newline after
97 sharedpath = repo.vfs.read('sharedpath').strip()
98 # the sharedpath always ends in the .hg; we want the path to the repo
99 source = repo.vfs.split(sharedpath)[0]
100 srcurl, branches = parseurl(source)
101 srcrepo = repository(repo.ui, srcurl)
102 except IOError, inst:
103 if inst.errno != errno.ENOENT:
104 raise
105 return srcrepo
94 if repo.sharedpath == repo.path:
95 return None
96
97 # the sharedpath always ends in the .hg; we want the path to the repo
98 source = repo.vfs.split(repo.sharedpath)[0]
99 srcurl, branches = parseurl(source)
100 return repository(repo.ui, srcurl)
106 101
107 102 def getbkfile(orig, self, repo):
108 103 if _hassharedbookmarks(repo):
General Comments 0
You need to be logged in to leave comments. Login now