improve code readability
authorAndrey Somov <py4fun@gmail.com>
Wed, 09 Sep 2009 11:12:36 +0200
changeset 9436 96379c93ba6f
parent 9435 aa92ce9586d8
child 9437 1c4e4004f3a6
improve code readability
mercurial/dispatch.py
mercurial/repo.py
mercurial/ui.py
--- 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