convert: fix most test-check-code-hg violations in cvsps code
authorBryan O'Sullivan <bos@serpentine.com>
Tue, 08 Jan 2013 16:26:52 -0800
changeset 18265 246f290e162a
parent 18264 d6ebdbdd70a5
child 18266 09a2b6741695
convert: fix most test-check-code-hg violations in cvsps code
hgext/convert/cvsps.py
--- a/hgext/convert/cvsps.py	Tue Jan 08 16:16:29 2013 -0800
+++ b/hgext/convert/cvsps.py	Tue Jan 08 16:26:52 2013 -0800
@@ -304,9 +304,15 @@
             # as this state is re-entered for subsequent revisions of a file.
             match = re_50.match(line)
             assert match, _('expected revision number')
-            e = logentry(rcs=scache(rcs), file=scache(filename),
-                    revision=tuple([int(x) for x in match.group(1).split('.')]),
-                    branches=[], parent=None, commitid=None, mergepoint=None, branchpoints=set())
+            e = logentry(rcs=scache(rcs),
+                         file=scache(filename),
+                         revision=tuple([int(x) for x in
+                                         match.group(1).split('.')]),
+                         branches=[],
+                         parent=None,
+                         commitid=None,
+                         mergepoint=None,
+                         branchpoints=set())
 
             state = 6
 
@@ -503,7 +509,8 @@
     ui.status(_('creating changesets\n'))
 
     # Merge changesets
-    log.sort(key=lambda x: (x.commitid, x.comment, x.author, x.branch, x.date, x.branchpoints))
+    log.sort(key=lambda x: (x.commitid, x.comment, x.author, x.branch, x.date,
+                            x.branchpoints))
 
     changesets = []
     files = set()
@@ -527,20 +534,17 @@
         # should both start off of the bar changeset. No provisions are
         # made to ensure that this is, in fact, what happens.
         if not (c and e.branchpoints == c.branchpoints and
-                  (   # cvs commitids
-                      (e.commitid is not None and e.commitid == c.commitid)
-                      or
-                      ( # no commitids, use fuzzy commit detection
-                        (e.commitid is None or c.commitid is None) and
-                        e.comment == c.comment and
-                        e.author == c.author and
-                        e.branch == c.branch and
-                        ((c.date[0] + c.date[1]) <=
-                         (e.date[0] + e.date[1]) <=
-                         (c.date[0] + c.date[1]) + fuzz) and
-                        e.file not in files
-                      )
-                  )):
+                (# cvs commitids
+                 (e.commitid is not None and e.commitid == c.commitid) or
+                 (# no commitids, use fuzzy commit detection
+                  (e.commitid is None or c.commitid is None) and
+                   e.comment == c.comment and
+                   e.author == c.author and
+                   e.branch == c.branch and
+                   ((c.date[0] + c.date[1]) <=
+                    (e.date[0] + e.date[1]) <=
+                    (c.date[0] + c.date[1]) + fuzz) and
+                   e.file not in files))):
             c = changeset(comment=e.comment, author=e.author,
                           branch=e.branch, date=e.date,
                           entries=[], mergepoint=e.mergepoint,
@@ -823,7 +827,7 @@
             ui.write(('Tag%s: %s \n' % (['', 's'][len(cs.tags) > 1],
                                   ','.join(cs.tags) or '(none)')))
             if cs.branchpoints:
-                ui.write('Branchpoints: %s \n' % ', '.join(cs.branchpoints))
+                ui.write(('Branchpoints: %s \n') % ', '.join(cs.branchpoints))
             if opts["parents"] and cs.parents:
                 if len(cs.parents) > 1:
                     ui.write(('Parents: %s\n' %