[PATCH 2 of 5] subrepo: support ignoreupdate in gitsubrepo's dirty()

Eric Eisner ede at MIT.EDU
Mon Dec 20 13:11:08 CST 2010


# HG changeset patch
# User Eric Eisner <ede at mit.edu>
# Date 1292871573 18000
# Node ID b512a7074349121fd602b85379ed4cba0aa49214
# Parent  c4d857f5405deba304b22ec3fc3d772ec58593b8
subrepo: support ignoreupdate in gitsubrepo's dirty()

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -727,8 +727,9 @@ class gitsubrepo(abstractsubrepo):
             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'])


More information about the Mercurial-devel mailing list