comparison mercurial/crecord.py @ 29079:90bb5bdb0b2f

crecord: remove skipfolded keyword argument from patchnode.previtem() It wasn't used, it wasn't implemented. Probably was a copy-paste bonus from patchnode.nextitem()
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 05 May 2016 18:13:25 +0800
parents eeacfa36ed3f
children 38f373497784
comparison
equal deleted inserted replaced
29078:eeacfa36ed3f 29079:90bb5bdb0b2f
162 return self.parentitem().parentitem().nextsibling() 162 return self.parentitem().parentitem().nextsibling()
163 163
164 except AttributeError: # parent and/or grandparent was None 164 except AttributeError: # parent and/or grandparent was None
165 return None 165 return None
166 166
167 def previtem(self, constrainlevel=True, skipfolded=True): 167 def previtem(self, constrainlevel=True):
168 """ 168 """
169 If constrainLevel == True, return the closest previous item 169 If constrainLevel == True, return the closest previous item
170 of the same type where there are no items of different types between 170 of the same type where there are no items of different types between
171 the current item and this closest item. 171 the current item and this closest item.
172 172
173 If constrainLevel == False, then try to return the previous item 173 If constrainLevel == False, then try to return the previous item
174 closest to this item, regardless of item's type (header, hunk, or 174 closest to this item, regardless of item's type (header, hunk, or
175 HunkLine). 175 HunkLine).
176
177 If skipFolded == True, and the current item is folded, then the items
178 that are hidden due to folding will be skipped when determining the
179 next item.
180 176
181 If it is not possible to get the previous item, return None. 177 If it is not possible to get the previous item, return None.
182 """ 178 """
183 if constrainlevel: 179 if constrainlevel:
184 return self.prevsibling() 180 return self.prevsibling()