# HG changeset patch # User Kevin Bullock # Date 2011-01-04 16:42:00 # Node ID 7ebdfa37842eff3a8f0bf4938340f89f2dcd998d # Parent e5617047c92694f9aa97fb9baf50de36872f09f8 subrepo: clarify comments in dirty() methods Just a little change to bring the comments in the dirty() methods of the various subrepo classes into a uniform structure. This clarifies the meaning of the states checked. diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -398,8 +398,8 @@ class hgsubrepo(abstractsubrepo): if r == '' and not ignoreupdate: # no state recorded return True w = self._repo[None] - # version checked out changed? if w.p1() != self._repo[r] and not ignoreupdate: + # different version checked out return True return w.dirty() # working directory changed @@ -744,8 +744,8 @@ class gitsubrepo(abstractsubrepo): (revision, self._relpath)) def dirty(self, ignoreupdate=False): - # version checked out changed? if not ignoreupdate and self._state[1] != self._gitstate(): + # different version checked out return True # check for staged changes or modified files; ignore untracked files out, code = self._gitdir(['diff-index', '--quiet', 'HEAD'])