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

login
register
mail settings
Submitter Matt Harbison
Date March 4, 2015, 2:44 a.m.
Message ID <6ea246c0b6db75b5891b.1425437080@Envy>
Download mbox | patch
Permalink /patch/7892/
State Accepted
Headers show

Comments

Matt Harbison - March 4, 2015, 2:44 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@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.

Patch

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