##// END OF EJS Templates
crecord: add/remove blank lines (coding style)
av6 -
r29076:36d3535c default
parent child Browse files
Show More
@@ -91,6 +91,7 b' class patchnode(object):'
91 91 def allchildren(self):
92 92 "Return a list of all of the direct children of this node"
93 93 raise NotImplementedError("method must be implemented by subclass")
94
94 95 def nextsibling(self):
95 96 """
96 97 Return the closest next item of the same type where there are no items
@@ -110,7 +111,6 b' class patchnode(object):'
110 111 def parentitem(self):
111 112 raise NotImplementedError("method must be implemented by subclass")
112 113
113
114 114 def nextitem(self, constrainlevel=True, skipfolded=True):
115 115 """
116 116 If constrainLevel == True, return the closest next item
@@ -236,7 +236,6 b' class uiheader(patchnode):'
236 236 self.neverunfolded = True
237 237 self.hunks = [uihunk(h, self) for h in self.hunks]
238 238
239
240 239 def prettystr(self):
241 240 x = stringio()
242 241 self.pretty(x)
@@ -392,6 +391,7 b' class uihunk(patchnode):'
392 391 def allchildren(self):
393 392 "return a list of all of the direct children of this node"
394 393 return self.changedlines
394
395 395 def countchanges(self):
396 396 """changedlines -> (n+,n-)"""
397 397 add = len([l for l in self.changedlines if l.applied
@@ -455,6 +455,7 b' class uihunk(patchnode):'
455 455
456 456 def __getattr__(self, name):
457 457 return getattr(self._hunk, name)
458
458 459 def __repr__(self):
459 460 return '<hunk %r@%d>' % (self.filename(), self.fromline)
460 461
@@ -766,7 +767,6 b' class curseschunkselector(object):'
766 767 # negative values scroll in pgup direction
767 768 self.scrolllines(selstart - padstartbuffered)
768 769
769
770 770 def scrolllines(self, numlines):
771 771 "scroll the screen up (down) by numlines when numlines >0 (<0)."
772 772 self.firstlineofpadtoprint += numlines
@@ -894,7 +894,6 b' class curseschunkselector(object):'
894 894 if isinstance(item, (uiheader, uihunk)):
895 895 item.folded = not item.folded
896 896
897
898 897 def alignstring(self, instr, window):
899 898 """
900 899 add whitespace to the end of a string in order to make it fill
@@ -1133,7 +1132,6 b' class curseschunkselector(object):'
1133 1132 lineprefix = " "*self.hunkindentnumchars + checkbox
1134 1133 frtoline = " " + hunk.getfromtoline().strip("\n")
1135 1134
1136
1137 1135 outstr += self.printstring(self.chunkpad, lineprefix, towin=towin,
1138 1136 align=False) # add uncolored checkbox/indent
1139 1137 outstr += self.printstring(self.chunkpad, frtoline, pair=colorpair,
General Comments 0
You need to be logged in to leave comments. Login now