tags: line.rstrip().split() can be replaced with line.split()
authorMartin Geisler <mg@aragost.com>
Fri, 04 May 2012 15:29:07 +0200
changeset 16589 fe9a53726484
parent 16588 72319bfd7966
child 16590 7f76c97361e0
tags: line.rstrip().split() can be replaced with line.split() The line looks like "123 <node> <node>" and does not start with whitespace: it was therefore not significant that rstrip was used instead of strip. Furthermore, the first part is fed to int, which will itself strip away whitespace before converting the string to an integer.
mercurial/tags.py
--- a/mercurial/tags.py	Fri May 04 15:24:00 2012 +0200
+++ b/mercurial/tags.py	Fri May 04 15:29:07 2012 +0200
@@ -181,7 +181,7 @@
             for line in cachelines:
                 if line == "\n":
                     break
-                line = line.rstrip().split()
+                line = line.split()
                 cacherevs.append(int(line[0]))
                 headnode = bin(line[1])
                 cacheheads.append(headnode)