subrepo: support ignoreupdate in gitsubrepo's dirty()
authorEric Eisner <ede@mit.edu>
Mon, 20 Dec 2010 13:59:33 -0500
changeset 13179 b512a7074349
parent 13178 c4d857f5405d
child 13180 a79e0688a5ee
subrepo: support ignoreupdate in gitsubrepo's dirty()
mercurial/subrepo.py
--- a/mercurial/subrepo.py	Mon Dec 20 13:59:19 2010 -0500
+++ b/mercurial/subrepo.py	Mon Dec 20 13:59:33 2010 -0500
@@ -727,8 +727,9 @@
             raise util.Abort(_("revision %s does not exist in subrepo %s\n") %
                                (revision, self._path))
 
-    def dirty(self):
-        if self._state[1] != self._gitstate(): # version checked out changed?
+    def dirty(self, ignoreupdate=False):
+        # version checked out changed?
+        if not ignoreupdate and self._state[1] != self._gitstate():
             return True
         # check for staged changes or modified files; ignore untracked files
         out, code = self._gitdir(['diff-index', '--quiet', 'HEAD'])