changeset 16589:fe9a53726484

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.
author Martin Geisler <mg@aragost.com>
date Fri, 04 May 2012 15:29:07 +0200
parents 72319bfd7966
children 7f76c97361e0
files mercurial/tags.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)