git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Branchaud <marcnarc@xiplink.com>
To: Changsheng Jiang <jiangzuoyan@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: how to fetch a new svn branch after clone?
Date: Thu, 16 Jul 2009 16:26:02 -0400	[thread overview]
Message-ID: <4A5F8CDA.5080202@xiplink.com> (raw)
In-Reply-To: <eafc0afe0907160830m29e2f3d3jf5c0e9db29cace54@mail.gmail.com>

The latest 1.6.4-rc1 contains patches to git-svn for it to support more than one branch URL in an svn repository.

However, before I describe that, can you confirm whether your new branch is in fact named

	http://svn.example.com/project/test

or is it really

	http://svn.example.com/project/test/<branchname>

Because if it's the former then I'm not sure if git-svn can handle your new branch.  The problem is that even though the branch is named 'test' it's a sibling to the 'branches' 'tags' and 'trunk' paths in the repository.  For git-svn to pick up branches, you point it at the path *containing* the branch names.  In the former case, to pick up project/test as the 'test' branch you'd have to point git-svn at the project directory, and that would cause it to also pick up project/tags, project/branches, and project/trunk as other branches (named 'tags', 'branches' and 'trunk').

However, in the latter (test/<branchname>) case, with 1.6.4, I *think* git-svn will pick up the new branches under test if you add a new 'branches' line to the svn-remote's section in your .git/config file.  Something like

	branches = test/*:refs/remotes/*

might let you see the new branches.  The reason I can't be more certain is that if you've done a 'git svn fetch' since the branch was created then git-svn might not pick up the branch-creation commits later.  Unfortunately I don't know git-svn well enough to say for certain.

		M.


Changsheng Jiang wrote:
> Hi list,
> 
> I know how to clone a svn repository with all branches and tags at the
> initial step, but I find no answers of how to fetch a new svn branch
> after clone.
> 
> For example, this
> 
> git svn clone http://svn.example.com/project -T trunk -b branches -t tags
> 
> will clone all branches. but that clone, the svn repository has a new
> branch test with url http://svn.example.com/project/test, how to clone
> it as the initial step?
> 
> Thanks.
> 
>                                                      Changsheng Jiang
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-07-16 20:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-16 15:30 how to fetch a new svn branch after clone? Changsheng Jiang
2009-07-16 20:26 ` Marc Branchaud [this message]
2009-07-17  2:00   ` Changsheng Jiang
     [not found]     ` <6786ed4f0907161918t5d4489a5uf1c315b07f850e2e@mail.gmail.com>
2009-07-17  2:25       ` Changsheng Jiang
2009-07-17 16:09     ` Marc Branchaud

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A5F8CDA.5080202@xiplink.com \
    --to=marcnarc@xiplink.com \
    --cc=git@vger.kernel.org \
    --cc=jiangzuoyan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).