[PATCH 1 of 3] subrepo: explicitly request clean and unknown files in status for git's add

Matt Harbison mharbison72 at gmail.com
Tue Mar 3 20:44:40 CST 2015


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1425435449 18000
#      Tue Mar 03 21:17:29 2015 -0500
# Node ID 6ea246c0b6db75b5891bc7e0b9bde880475a5253
# Parent  390410a6545d9088dc84392009f51500e3935a1c
subrepo: explicitly request clean and unknown files in status for git's add

No behavior changes here since gitsubrepo.status() doesn't currently populate
clean, and ignores whether unknown files were actually requested.  But this is
in line with other calls to status, and should avoid future surprises.

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -1528,7 +1528,8 @@
             return []
 
         (modified, added, removed,
-         deleted, unknown, ignored, clean) = self.status(None)
+         deleted, unknown, ignored, clean) = self.status(None, unknown=True,
+                                                         clean=True)
 
         tracked = set()
         # dirstates 'amn' warn, 'r' is added again


More information about the Mercurial-devel mailing list