##// END OF EJS Templates
mergeresult: add sort argument to getactions() method...
Pulkit Goyal -
r45896:27c6518b default
parent child Browse files
Show More
@@ -604,15 +604,23 b' class mergeresult(object):'
604 604 del self._filemapping[filename]
605 605 del self._actionmapping[action][filename]
606 606
607 def getactions(self, actions):
607 def getactions(self, actions, sort=False):
608 608 """ get list of files which are marked with these actions
609 if sort is true, files for each action is sorted and then added
609 610
610 611 Returns a list of tuple of form (filename, data, message)
611 612 """
612 613 res = []
613 614 for a in actions:
614 for f, (args, msg) in pycompat.iteritems(self._actionmapping[a]):
615 res.append((f, args, msg))
615 if sort:
616 for f in sorted(self._actionmapping[a]):
617 args, msg = self._actionmapping[a][f]
618 res.append((f, args, msg))
619 else:
620 for f, (args, msg) in pycompat.iteritems(
621 self._actionmapping[a]
622 ):
623 res.append((f, args, msg))
616 624 return res
617 625
618 626 @property
General Comments 0
You need to be logged in to leave comments. Login now