diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -335,7 +335,7 @@ def _dispatch(ui, args): path = _findrepo(os.getcwd()) or "" if not path: lui = ui - if path: + else: try: lui = ui.copy() lui.readconfig(os.path.join(path, ".hg", "hgrc")) diff --git a/mercurial/repo.py b/mercurial/repo.py --- a/mercurial/repo.py +++ b/mercurial/repo.py @@ -40,4 +40,5 @@ class repository(object): url = self.url() if url.endswith('/'): return url + path - return url + '/' + path + else: + return url + '/' + path diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -199,7 +199,7 @@ class ui(object): def _path(self, loc): p = self.config('paths', loc) if p and '%%' in p: - self.warn('(deprecated \'%%\' in path %s=%s from %s)\n' % + self.warn("(deprecated '%%' in path %s=%s from %s)\n" % (loc, p, self.configsource('paths', loc))) p = p.replace('%%', '%') return p