Mercurial > public > mercurial-scm > hg
diff hgext/mq.py @ 22925:68df36ce3d8a
strip: make checklocalchanges() return full status tuple
By making checklocalchanges() return the full instance of the status
class instead of just the first 4 elements of it, we can take
advantage of the field names and not require the caller to remember
the element indices.
author | Martin von Zweigbergk <martinvonz@gmail.com> |
---|---|
date | Sat, 04 Oct 2014 20:53:05 -0700 |
parents | 5d4c17d11d7e |
children | b6f7cf47f5d1 |
line wrap: on
line diff
--- a/hgext/mq.py Sat Oct 04 21:58:01 2014 -0700 +++ b/hgext/mq.py Sat Oct 04 20:53:05 2014 -0700 @@ -1359,11 +1359,12 @@ tobackup = set() if (not nobackup and force) or keepchanges: - m, a, r, d = self.checklocalchanges(repo, force=True) + status = self.checklocalchanges(repo, force=True) if keepchanges: - tobackup.update(m + a + r + d) + tobackup.update(status.modified + status.added + + status.removed + status.deleted) else: - tobackup.update(m + a) + tobackup.update(status.modified + status.added) s = self.series[start:end] all_files = set() @@ -1447,13 +1448,13 @@ tobackup = set() if update: - m, a, r, d = self.checklocalchanges( - repo, force=force or keepchanges) + s = self.checklocalchanges(repo, force=force or keepchanges) if force: if not nobackup: - tobackup.update(m + a) + tobackup.update(s.modified + s.added) elif keepchanges: - tobackup.update(m + a + r + d) + tobackup.update(s.modified + s.added + + s.removed + s.deleted) self.applieddirty = True end = len(self.applied)