diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3352,7 +3352,7 @@ def locate(ui, repo, *pats, **opts): _('show changesets within the given named branch'), _('BRANCH')), ('P', 'prune', [], _('do not display revision or any of its ancestors'), _('REV')), - ('h', 'hidden', False, _('show hidden changesets')), + ('', 'hidden', False, _('show hidden changesets')), ] + logopts + walkopts, _('[OPTION]... [FILE]')) def log(ui, repo, *pats, **opts): diff --git a/mercurial/url.py b/mercurial/url.py --- a/mercurial/url.py +++ b/mercurial/url.py @@ -93,13 +93,15 @@ class proxyhandler(urllib2.ProxyHandler) proxies = {} # urllib2 takes proxy values from the environment and those - # will take precedence if found, so drop them - for env in ["HTTP_PROXY", "http_proxy", "no_proxy"]: - try: - if env in os.environ: - del os.environ[env] - except OSError: - pass + # will take precedence if found. So, if there's a config entry + # defining a proxy, drop the environment ones + if ui.config("http_proxy", "host"): + for env in ["HTTP_PROXY", "http_proxy", "no_proxy"]: + try: + if env in os.environ: + del os.environ[env] + except OSError: + pass urllib2.ProxyHandler.__init__(self, proxies) self.ui = ui diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -1460,6 +1460,8 @@ class url(object): >>> url(r'\\blah\blah\blah') + >>> url(r'\\blah\blah\blah#baz') + Authentication credentials: @@ -1488,6 +1490,11 @@ class url(object): self._hostport = '' self._origpath = path + if parsefragment and '#' in path: + path, self.fragment = path.split('#', 1) + if not path: + path = None + # special case for Windows drive letters and UNC paths if hasdriveletter(path) or path.startswith(r'\\'): self.path = path @@ -1515,10 +1522,6 @@ class url(object): self.path = '' return else: - if parsefragment and '#' in path: - path, self.fragment = path.split('#', 1) - if not path: - path = None if self._localpath: self.path = path return diff --git a/tests/test-keyword.t b/tests/test-keyword.t --- a/tests/test-keyword.t +++ b/tests/test-keyword.t @@ -444,6 +444,8 @@ record added file alone r committed changeset 3:899491280810 overwriting r expanding keywords + - status call required for dirstate.normallookup() check + $ hg status r $ hg --verbose rollback repository tip rolled back to revision 2 (undo commit) working directory now based on revision 2 @@ -834,6 +836,8 @@ kwexpand/kwshrink on selected files $ hg copy a x/a $ hg --verbose kwshrink a overwriting a shrinking keywords + - sleep required for dirstate.normal() check + $ sleep 1 $ hg status a $ hg --verbose kwexpand a overwriting a expanding keywords