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