changeset 9436:96379c93ba6f

improve code readability
author Andrey Somov <py4fun@gmail.com>
date Wed, 09 Sep 2009 11:12:36 +0200
parents aa92ce9586d8
children 1c4e4004f3a6
files mercurial/dispatch.py mercurial/repo.py mercurial/ui.py
diffstat 3 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dispatch.py	Thu Sep 10 10:31:12 2009 +0200
+++ b/mercurial/dispatch.py	Wed Sep 09 11:12:36 2009 +0200
@@ -335,7 +335,7 @@
     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"))
--- a/mercurial/repo.py	Thu Sep 10 10:31:12 2009 +0200
+++ b/mercurial/repo.py	Wed Sep 09 11:12:36 2009 +0200
@@ -40,4 +40,5 @@
         url = self.url()
         if url.endswith('/'):
             return url + path
-        return url + '/' + path
+        else:
+            return url + '/' + path
--- a/mercurial/ui.py	Thu Sep 10 10:31:12 2009 +0200
+++ b/mercurial/ui.py	Wed Sep 09 11:12:36 2009 +0200
@@ -199,7 +199,7 @@
     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