# HG changeset patch # User Eric Eisner # Date 2010-12-20 18:59:33 # 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'])