Mercurial > hg
comparison mercurial/tags.py @ 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 | 774da7121fc9 |
children | dd4ce44ff53c |
comparison
equal
deleted
inserted
replaced
16588:72319bfd7966 | 16589:fe9a53726484 |
---|---|
179 if cachefile: | 179 if cachefile: |
180 try: | 180 try: |
181 for line in cachelines: | 181 for line in cachelines: |
182 if line == "\n": | 182 if line == "\n": |
183 break | 183 break |
184 line = line.rstrip().split() | 184 line = line.split() |
185 cacherevs.append(int(line[0])) | 185 cacherevs.append(int(line[0])) |
186 headnode = bin(line[1]) | 186 headnode = bin(line[1]) |
187 cacheheads.append(headnode) | 187 cacheheads.append(headnode) |
188 if len(line) == 3: | 188 if len(line) == 3: |
189 fnode = bin(line[2]) | 189 fnode = bin(line[2]) |