diff hgext/convert/hg.py @ 7877:eba7f12b0c51

cleanup: whitespace cleanup
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
date Mon, 23 Mar 2009 13:13:27 +0100
parents 553aa0cbeab6
children 6ee71f78497c
line wrap: on
line diff
--- a/hgext/convert/hg.py	Mon Mar 23 13:13:11 2009 +0100
+++ b/hgext/convert/hg.py	Mon Mar 23 13:13:27 2009 +0100
@@ -155,35 +155,33 @@
         return p2
 
     def puttags(self, tags):
-         try:
-             parentctx = self.repo[self.tagsbranch]
-             tagparent = parentctx.node()
-         except error.RepoError:
-             parentctx = None
-             tagparent = nullid
+        try:
+            parentctx = self.repo[self.tagsbranch]
+            tagparent = parentctx.node()
+        except error.RepoError:
+            parentctx = None
+            tagparent = nullid
 
-         try:
-             oldlines = util.sort(parentctx['.hgtags'].data().splitlines(1))
-         except:
-             oldlines = []
+        try:
+            oldlines = util.sort(parentctx['.hgtags'].data().splitlines(1))
+        except:
+            oldlines = []
 
-         newlines = util.sort([("%s %s\n" % (tags[tag], tag)) for tag in tags])
-
-         if newlines == oldlines:
-             return None
-         data = "".join(newlines)
-
-         def getfilectx(repo, memctx, f):
+        newlines = util.sort([("%s %s\n" % (tags[tag], tag)) for tag in tags])
+        if newlines == oldlines:
+            return None
+        data = "".join(newlines)
+        def getfilectx(repo, memctx, f):
             return context.memfilectx(f, data, False, False, None)
 
-         self.ui.status(_("updating tags\n"))
-         date = "%s 0" % int(time.mktime(time.gmtime()))
-         extra = {'branch': self.tagsbranch}
-         ctx = context.memctx(self.repo, (tagparent, None), "update tags",
-                              [".hgtags"], getfilectx, "convert-repo", date,
-                              extra)
-         self.repo.commitctx(ctx)
-         return hex(self.repo.changelog.tip())
+        self.ui.status(_("updating tags\n"))
+        date = "%s 0" % int(time.mktime(time.gmtime()))
+        extra = {'branch': self.tagsbranch}
+        ctx = context.memctx(self.repo, (tagparent, None), "update tags",
+                             [".hgtags"], getfilectx, "convert-repo", date,
+                             extra)
+        self.repo.commitctx(ctx)
+        return hex(self.repo.changelog.tip())
 
     def setfilemapmode(self, active):
         self.filemapmode = active