Submitter | Eugeny Pozharsky |
---|---|
Date | March 27, 2013, 11:16 a.m. |
Message ID | <CAGwaKEaXm6cGDCh6PXDPg0XZuxdn5eMKiQ0u2GYWT74+9gV_fQ@mail.gmail.com> |
Download | mbox | patch |
Permalink | /patch/1200/ |
State | Accepted, archived |
Headers | show |
Comments
On Wed, Mar 27, 2013 at 4:16 AM, Eugeny Pozharsky <pozheg@gmail.com> wrote: > opener: clone of git sub-repository creates incorrect git branch > (issue3870) > This looks fine, but please add a test so that we don't accidentally regress your fix.
On Apr 16, 2013, at 10:20 PM, Kevin Bullock <kbullock+mercurial@ringworld.org> wrote: > Crewed with a test added, thanks. > > (Noticed after I pushed that 'opener:' is the wrong label here, both for this patch and for my test. Hrrrg.) Good news, crew is draft-phase. I've reputed both patches with the component changed to "subrepo".
Patch
diff -r af9ddea2cb99 -r b8fcb5c31f1b mercurial/subrepo.py --- a/mercurial/subrepo.py Thu Feb 28 13:11:42 2013 -0800 +++ b/mercurial/subrepo.py Wed Mar 27 14:11:12 2013 +0300 @@ -1151,7 +1151,7 @@ if remote not in tracking: # create a new local tracking branch - local = remote.split('/', 2)[2] + local = remote.split('/', 3)[3] checkout(['-b', local, remote]) elif self._gitisancestor(branch2rev[tracking[remote]], remote): # When updating to a tracked remote branch,