subrepo: use working copy of .hgsub to filter status (issue2901)

This commit is contained in:
Matt Mackall 2011-07-13 17:41:49 -05:00
parent 1f03009146
commit c78a7611d4
3 changed files with 5 additions and 2 deletions

View File

@ -1195,7 +1195,7 @@ class localrepository(repo.repository):
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

View File

@ -36,7 +36,6 @@ qnew on repo w/svn subrepo
$ hg add .hgsub
$ hg status -S -X '**/format'
A .hgsub
? sub/.svn/entries
$ hg qnew -m0 0.diff
committing subrepository sub
$ cd sub

View File

@ -19,6 +19,7 @@ delete .hgsub and revert it
$ 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 @@ delete .hgsub and update
$ 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 @@ delete .hgsubstate and update
$ 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