changeset 14870:f73c7b70df68 stable

subrepo: use working copy of .hgsub to filter status (issue2901)
author Matt Mackall <mpm@selenic.com>
date Wed, 13 Jul 2011 17:41:49 -0500
parents eb914541a950
children 3e9a5c3e24d8 29d324c2bc93
files mercurial/localrepo.py tests/test-mq-subrepo-svn.t tests/test-subrepo-missing.t
diffstat 3 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Wed Jul 13 16:28:46 2011 -0500
+++ b/mercurial/localrepo.py	Wed Jul 13 17:41:49 2011 -0500
@@ -1195,7 +1195,7 @@
         if working: # we need to scan the working dir
             subrepos = []
             if '.hgsub' in self.dirstate:
-                subrepos = ctx1.substate.keys()
+                subrepos = ctx2.substate.keys()
             s = self.dirstate.status(match, subrepos, listignored,
                                      listclean, listunknown)
             cmp, modified, added, removed, deleted, unknown, ignored, clean = s
--- a/tests/test-mq-subrepo-svn.t	Wed Jul 13 16:28:46 2011 -0500
+++ b/tests/test-mq-subrepo-svn.t	Wed Jul 13 17:41:49 2011 -0500
@@ -36,7 +36,6 @@
   $ hg add .hgsub
   $ hg status -S -X '**/format'
   A .hgsub
-  ? sub/.svn/entries
   $ hg qnew -m0 0.diff
   committing subrepository sub
   $ cd sub
--- a/tests/test-subrepo-missing.t	Wed Jul 13 16:28:46 2011 -0500
+++ b/tests/test-subrepo-missing.t	Wed Jul 13 17:41:49 2011 -0500
@@ -19,6 +19,7 @@
   $ rm .hgsub
   $ hg revert .hgsub
   warning: subrepo spec file .hgsub not found
+  warning: subrepo spec file .hgsub not found
 
 delete .hgsubstate and revert it
 
@@ -30,8 +31,10 @@
   $ rm .hgsub
   $ hg up 0
   warning: subrepo spec file .hgsub not found
+  warning: subrepo spec file .hgsub not found
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg st
+  warning: subrepo spec file .hgsub not found
   ! .hgsub
   $ ls subrepo
   a
@@ -40,6 +43,7 @@
 
   $ hg up -C
   warning: subrepo spec file .hgsub not found
+  warning: subrepo spec file .hgsub not found
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ rm .hgsubstate
   $ hg up 0