Changeset 5463933cd03d…
Parent d3d32fce6f9c…
by
Changes to 3 files · Browse files at 5463933cd03d Showing diff from parent d3d32fce6f9c Diff from another changeset...
@@ -1196,12 +1196,8 @@ atexit.register(cleanup)
bfile = path
+ path = hglib.validate_synch_path(path, self.repo)
- for alias, path_aux in self.repo.ui.configitems('paths'):
- if path == alias:
- path = path_aux
- elif path == url.hidepassword(path_aux):
- path = path_aux
for badchar in (':', '*', '\\', '?', '#'):
bfile = bfile.replace(badchar, '')
@@ -1330,7 +1326,7 @@ q = Queue.Queue()
cmd = [q, 'outgoing', '--quiet', '--template', '{node}\n']
cmd += self.get_proxy_args()
- cmd += [path]
+ cmd += [hglib.validate_synch_path(path, self.repo)]
def threadfunc(q, *args):
try:
|
@@ -544,11 +544,7 @@ use_proxy = self.use_proxy.get_active()
text_entry = self.pathbox.get_child()
remote_path = hglib.fromutf(text_entry.get_text()).strip()
- for alias, path in self.paths:
- if remote_path == alias:
- remote_path = path
- elif remote_path == url.hidepassword(path):
- remote_path = path
+ remote_path = hglib.validate_synch_path(remote_path, self.repo)
cmdline = cmd[:]
cmdline += ['--verbose']
|
@@ -4,6 +4,7 @@ #
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2, incorporated herein by reference.
+from mercurial.url import url
import os
import sys
@@ -219,3 +220,17 @@ if not author:
author = util.shortuser(user)
return author
+
+def validate_synch_path(path, repo):
+ '''
+ Validate the path that must be used to sync operations (pull,
+ push, outgoing and incoming)
+ '''
+ return_path = path
+ for alias, path_aux in repo.ui.configitems('paths'):
+ if path == alias:
+ return_path = path_aux
+ elif path == url.hidepassword(path_aux):
+ return_path = path_aux
+ return return_path
+
|
Loading...