[PATCH 2 of 4] changelog: remove redundant parenthesis
Gregory Szorc
gregory.szorc at gmail.com
Sun Feb 28 02:27:31 EST 2016
# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1456640747 28800
# Sat Feb 27 22:25:47 2016 -0800
# Node ID 2d5c509edd9094ebc26b177db85842a46caf9c38
# Parent 28cf83f79951bba88e324c66e66261e06030dc46
changelog: remove redundant parenthesis
You don't need to surround returned tuples with parens.
diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -332,17 +332,17 @@ class changelog(revlog.revlog):
: older versions ignore it
files\n\n : files modified by the cset, no \n or \r allowed
(.*) : comment (free text, ideally utf-8)
changelog v0 doesn't use extra
"""
text = self.revision(node)
if not text:
- return (nullid, "", (0, 0), [], "", _defaultextra)
+ return nullid, "", (0, 0), [], "", _defaultextra
last = text.index("\n\n")
desc = encoding.tolocal(text[last + 2:])
l = text[:last].split('\n')
manifest = bin(l[0])
user = encoding.tolocal(l[1])
tdata = l[2].split(' ', 2)
if len(tdata) != 3:
@@ -353,17 +353,17 @@ class changelog(revlog.revlog):
except ValueError:
timezone = 0
extra = _defaultextra
else:
time, timezone = float(tdata[0]), int(tdata[1])
extra = decodeextra(tdata[2])
files = l[3:]
- return (manifest, user, (time, timezone), files, desc, extra)
+ return manifest, user, (time, timezone), files, desc, extra
def readfiles(self, node):
"""
short version of read that only returns the files modified by the cset
"""
text = self.revision(node)
if not text:
return []
More information about the Mercurial-devel
mailing list