--- a/mercurial/crecord.py Wed May 04 21:02:03 2016 -0400
+++ b/mercurial/crecord.py Thu May 05 11:19:52 2016 +0800
@@ -91,6 +91,7 @@
def allchildren(self):
"Return a list of all of the direct children of this node"
raise NotImplementedError("method must be implemented by subclass")
+
def nextsibling(self):
"""
Return the closest next item of the same type where there are no items
@@ -110,7 +111,6 @@
def parentitem(self):
raise NotImplementedError("method must be implemented by subclass")
-
def nextitem(self, constrainlevel=True, skipfolded=True):
"""
If constrainLevel == True, return the closest next item
@@ -236,7 +236,6 @@
self.neverunfolded = True
self.hunks = [uihunk(h, self) for h in self.hunks]
-
def prettystr(self):
x = stringio()
self.pretty(x)
@@ -392,6 +391,7 @@
def allchildren(self):
"return a list of all of the direct children of this node"
return self.changedlines
+
def countchanges(self):
"""changedlines -> (n+,n-)"""
add = len([l for l in self.changedlines if l.applied
@@ -455,6 +455,7 @@
def __getattr__(self, name):
return getattr(self._hunk, name)
+
def __repr__(self):
return '<hunk %r@%d>' % (self.filename(), self.fromline)
@@ -766,7 +767,6 @@
# negative values scroll in pgup direction
self.scrolllines(selstart - padstartbuffered)
-
def scrolllines(self, numlines):
"scroll the screen up (down) by numlines when numlines >0 (<0)."
self.firstlineofpadtoprint += numlines
@@ -894,7 +894,6 @@
if isinstance(item, (uiheader, uihunk)):
item.folded = not item.folded
-
def alignstring(self, instr, window):
"""
add whitespace to the end of a string in order to make it fill
@@ -1133,7 +1132,6 @@
lineprefix = " "*self.hunkindentnumchars + checkbox
frtoline = " " + hunk.getfromtoline().strip("\n")
-
outstr += self.printstring(self.chunkpad, lineprefix, towin=towin,
align=False) # add uncolored checkbox/indent
outstr += self.printstring(self.chunkpad, frtoline, pair=colorpair,