changeset 13094:a1dd7bd26a2b

subrepo: parse git status's human-readable output Older git versions do not have a machine-readable output, but the default format has not changed over time.
author Eric Eisner <ede@mit.edu>
date Mon, 06 Dec 2010 21:17:27 -0500
parents d0cbddfe3f4c
children 49c7e875482d
files mercurial/subrepo.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/subrepo.py	Mon Dec 06 21:17:27 2010 -0500
+++ b/mercurial/subrepo.py	Mon Dec 06 21:17:27 2010 -0500
@@ -719,10 +719,9 @@
         if self._state[1] != self._gitstate(): # version checked out changed?
             return True
         # check for staged changes or modified files; ignore untracked files
-        # docs say --porcelain flag is future-proof format
-        changed = self._gitcommand(['status', '--porcelain',
-                                    '--untracked-files=no'])
-        return bool(changed)
+        status = self._gitcommand(['status'])
+        return ('\n# Changed but not updated:' in status or
+                '\n# Changes to be committed:' in status)
 
     def get(self, state):
         source, revision, kind = state