git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-svn: multiple fetch lines

From
Nathan Gray <n8gray@n8gray.org>
Date
Dec 19, 2011, 21:40 UTC
Message-ID
<CA+7g9JzatFYViMk302uU-X=YQGF2wEsmASkLPm0tDfQvpL_-vQ@mail.gmail.com>
In-Reply-To
<20111217100521.GA12610@elie.hsd1.il.comcast.net>
Hi,
On Sat, Dec 17, 2011 at 2:05 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 14 quoted lines
> Hi Nathan,
>
> Nathan Gray wrote:
>
>> I'm in a conversation with the support fellow of the very nice Tower
>> git interface for OS X and we need clarification on a point.  Does
>> git-svn explicitly support multiple "fetch =" lines in an svn-remote
>> section or is it just an accident that it works?  My belief is that
>> such support is intended and his is that it is accidental.
>
> It's true that the documentation is not as clear about this as one
> might like.  Documentation/git-svn.txt leaves it to the reader to
> infer that this is supported by analogy with "fetch =" lines in native
> git [remote] sections:
Thanks Jonathan, that's just what I suspected.
[snip]
> Perhaps such an example would be useful for the git-svn(1) manpage,
> too.  Any ideas for where to add such a note, and how it should be
> worded?  (Of course, if you can phrase such an idea in patch form,
> that would be the most convenient.)

The existing CONFIGURATION section of the man page seems like a sensible place to mention multiple fetch entries. I've also found the documentation on creating branches in the presence of multiple branch keys to be confusing and in need of an example, so maybe that could go in as well. How about something along these lines:

""" In order to simplify working with messy subversion repositories you can configure multiple fetch, branches, and tags keys. For example:

[svn-remote "messy-repo"]
  url = http://server.org/svn
  fetch = trunk/project-a:refs/remotes/project-a/trunk
  fetch = branches/demos/june-project-a-demo:refs/remotes/project-a/demos/june-demo
  branches = branches/server/*:refs/remotes/project-a/branches/*
  branches = branches/demos/2011/*:refs/remotes/project-a/2011-demos/*
  tags = tags/server/*:refs/remotes/project-a/tags/*

To create a branch in this configuration you need to specify the location for the new branch using the -d or --destination flag. For example:

git svn branch -d wtf-goes-here-anyway?? release-2-3-0 """

The thing about the -d option that confuses me is that I'm not sure if I'm supposed to be supplying a full svn path, a partial svn path, the glob from the config file, etc. An example would make it obvious. Personally, I always take the coward's way out and comment out the extra branches keys, make the branch without -d, then restore them in order to avoid any potential problems. :^)

Thanks, -Nathan

-- 
HexaLex: A New Angle on Crossword Games for iPhone and iPod Touch
http://hexalex.com
On The App Store: http://bit.ly/8Mj1CU
On Facebook: http://bit.ly/9MIJiV
On Twitter: http://twitter.com/hexalexgame
http://n8gray.org
Previous: Jonathan NiederNext: Jonathan Nieder
Message 3 of 11 in “git-svn: multiple fetch lines”
  1. Nathan GrayDec 16, 2011
  2. Jonathan NiederDec 17, 2011
  3. Nathan GrayDec 19, 2011
  4. 0/2 Re: git-svn: multiple fetch linesJonathan Nieder, Dec 20, 2011
  5. 1/2 git-svn: multiple fetch/branches/tags keys are supportedJonathan Nieder, Dec 20, 2011
  6. Nathan GrayDec 20, 2011
  7. 2/2 git-svn: clarify explanation of --destination argumentJonathan Nieder, Dec 20, 2011
  8. 0/2 git-svn: improve documentation of multiple fetch linesJonathan Nieder, May 13, 2013
  9. 1/2 git-svn: multiple fetch/branches/tags keys are supportedJonathan Nieder, May 13, 2013
  10. 2/2 git-svn: clarify explanation of --destination argumentJonathan Nieder, May 13, 2013
  11. Eric WongMay 15, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.