subrepo: clarify comments in dirty() methods
authorKevin Bullock <kbullock@ringworld.org>
Tue, 04 Jan 2011 10:42:00 -0600
changeset 13325 7ebdfa37842e
parent 13324 e5617047c926
child 13326 535a891284da
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.
mercurial/subrepo.py
--- a/mercurial/subrepo.py	Mon Jan 31 13:40:05 2011 +0100
+++ b/mercurial/subrepo.py	Tue Jan 04 10:42:00 2011 -0600
@@ -398,8 +398,8 @@
         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 @@
                                (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'])