# HG changeset patch # User Martin von Zweigbergk # Date 1415839871 28800 # Node ID 24f67ad49da79c09c302cdd9aafc90b711bb2d07 # Parent c10dc5568069f9efdd5e0f1de01cc4d0e0f0629c context.status: make _dirstatestatus() return an status tuple Letting _dirstatestatus() return an scmutil.status instance also means that _buildstatus() will always return such an instance, so we can remove the conversion from the call sites. diff -r c10dc5568069 -r 24f67ad49da7 mercurial/context.py --- a/mercurial/context.py Wed Nov 12 21:19:07 2014 -0800 +++ b/mercurial/context.py Wed Nov 12 16:51:11 2014 -0800 @@ -129,7 +129,8 @@ unknown = [fn for fn in unknown if fn not in mf1] ignored = [fn for fn in ignored if fn not in mf1] - return [modified, added, removed, deleted, unknown, ignored, clean] + return scmutil.status(modified, added, removed, deleted, unknown, + ignored, clean) @propertycache def substate(self): @@ -304,7 +305,6 @@ r = ctx2._buildstatus(ctx1, r, match, listignored, listclean, listunknown) - r = scmutil.status(*r) if reversed: # Reverse added and removed. Clear deleted, unknown and ignored as # these make no sense to reverse. @@ -1419,7 +1419,8 @@ if fixup and listclean: clean += fixup - return [modified, added, removed, deleted, unknown, ignored, clean] + return scmutil.status(modified, added, removed, deleted, unknown, + ignored, clean) def _buildstatus(self, other, s, match, listignored, listclean, listunknown): @@ -1434,12 +1435,12 @@ # Filter out symlinks that, in the case of FAT32 and NTFS filesytems, # might have accidentally ended up with the entire contents of the file # they are susposed to be linking to. - s[0] = self._filtersuspectsymlink(s[0]) + s.modified[:] = self._filtersuspectsymlink(s.modified) if other != self._repo['.']: s = super(workingctx, self)._buildstatus(other, s, match, listignored, listclean, listunknown) - self._status = scmutil.status(*s) + self._status = s return s def _matchstatus(self, other, match):