equal
deleted
inserted
replaced
103 |
103 |
104 # determine the remote path from the repo, if possible; else just |
104 # determine the remote path from the repo, if possible; else just |
105 # use the string given to us |
105 # use the string given to us |
106 rpath = remote |
106 rpath = remote |
107 if local: |
107 if local: |
108 rpath = remote._repo.root |
108 rpath = util.pconvert(remote._repo.root) |
109 elif not isinstance(remote, bytes): |
109 elif not isinstance(remote, bytes): |
110 rpath = remote._url |
110 rpath = remote._url |
111 |
111 |
112 # represent the remotepath with user defined path name if exists |
112 # represent the remotepath with user defined path name if exists |
113 for path, url in repo.ui.configitems('paths'): |
113 for path, url in repo.ui.configitems('paths'): |
114 # remove auth info from user defined url |
114 # remove auth info from user defined url |
115 noauthurl = util.removeauth(url) |
115 noauthurl = util.removeauth(url) |
|
116 |
|
117 # Standardize on unix style paths, otherwise some {remotenames} end up |
|
118 # being an absolute path on Windows. |
|
119 url = util.pconvert(bytes(url)) |
|
120 noauthurl = util.pconvert(noauthurl) |
116 if url == rpath or noauthurl == rpath: |
121 if url == rpath or noauthurl == rpath: |
117 rpath = path |
122 rpath = path |
118 break |
123 break |
119 |
124 |
120 return rpath |
125 return rpath |