Bug 2901 - .hgsub on new repository does not take effect until commit
Summary: .hgsub on new repository does not take effect until commit
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-13 14:06 UTC by Alex Mayfield
Modified: 2012-05-13 04:48 UTC (History)
4 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Mayfield 2011-07-13 14:06 UTC
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
Comment 1 Alex Mayfield 2011-07-13 14:14 UTC
Note that the first command should actually be $ hg init, not $ hg clone.
Comment 2 HG Bot 2011-07-13 19:00 UTC
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)
Comment 3 Bugzilla 2012-05-12 09:21 UTC

--- 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