Using Mercurial 1.9. The specific git subrepository doesn't matter, it just so happens to be the one I was working with when I ran into this issue. $ hg clone myrepo $ cd myrepo $ echo 'phonegap = [git]https://github.com/phonegap/phonegap.git' > .hgsub $ hg add .hgsub $ git checkout https://github.com/phonegap/phonegap.git phonegap $ hg status You will notice that there are tons of unversioned files. $ hg commit -m 'Initial commit. Set up phonegap subrepo.' $ hg status Now everything looks peachy. From #mercurial: 15:57:33 <mpm> Still a bug. Can I get you to file an issue? 15:57:56 <AlexMax> mpm: Really? What is the expected output? 15:58:08 <AlexMax> should .hgsub take effect immediately without having to be commited? 15:58:23 <mpm> For this purpose, I'd say yes. 15:58:33 <AlexMax> Okay, I'll file a bug then 15:58:48 <timeless> i think the .hgsub should appear dirty, but everything else shouldn't
Note that the first command should actually be $ hg init, not $ hg clone.
Fixed by http://selenic.com/repo/hg/rev/f73c7b70df68 Matt Mackall <mpm@selenic.com> subrepo: use working copy of .hgsub to filter status (issue2901) (please test the fix)
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:21 EDT --- This bug was previously known as _bug_ 2901 at http://mercurial.selenic.com/bts/issue2901