# HG changeset patch # User Matt Mackall # Date 2008-07-22 18:00:22 # Node ID cf319797d61c8076d2e8920a990e607aec376ef5 # Parent d8159dd15db3173c25ee728878e0d67224519463 minor status fixups diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -470,9 +470,8 @@ class workingctx(changectx): self._text = text if date: self._date = util.parsedate(date) - else: - self._date = util.makedate() - self._user = user + if user: + self._user = user if parents: self._parents = [changectx(self._repo, p) for p in parents] if changes: @@ -504,6 +503,12 @@ class workingctx(changectx): if name == '_status': self._status = self._repo.status(unknown=True) return self._status + elif name == '_user': + self._user = self._repo.ui.username() + return self._user + elif name == '_date': + self._date = util.makedate() + return self._date if name == '_manifest': self._buildmanifest() return self._manifest diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -968,6 +968,8 @@ class localrepository(repo.repository): if working: # we need to scan the working dir s = self.dirstate.status(match, listignored, listclean, listunknown) cmp, modified, added, removed, deleted, unknown, ignored, clean = s + removed.sort() + deleted.sort() # check for any possibly clean files if parentworking and cmp: @@ -1003,9 +1005,9 @@ class localrepository(repo.repository): # we are comparing working dir against non-parent # generate a pseudo-manifest for the working dir mf2 = mfmatches(self['.']) - mf2.flags = ctx2.flags # delay flag lookup for f in cmp + modified + added: mf2[f] = None + mf2.set(f, ctx2.flags(f)) for f in removed: if f in mf2: del mf2[f] @@ -1017,9 +1019,9 @@ class localrepository(repo.repository): modified, added, clean = [], [], [] for fn in util.sort(mf2): if fn in mf1: - if ((mf1[fn] != mf2[fn] and - (mf2[fn] or ctx1[fn].cmp(ctx2[fn].data()))) - or mf1.flags(fn) != mf2.flags(fn)): + if (mf1.flags(fn) != mf2.flags(fn) or + (mf1[fn] != mf2[fn] and + (mf2[fn] or ctx1[fn].cmp(ctx2[fn].data())))): modified.append(fn) elif listclean: clean.append(fn)