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

Re: question: connecting to multiple remote svn projects

From
Avery Pennarun <apenwarr@gmail.com>
Date
Nov 9, 2009, 18:43 UTC
Message-ID
<32541b130911091043k78ac009dmb49ecdb0beaa597f@mail.gmail.com>
In-Reply-To
<hd8smd$79e$2@ger.gmane.org>
On Mon, Nov 9, 2009 at 5:59 AM, Dave Rodgman <dav1dr@eml.cc> wrote:
> As far as I can understand, git-submodule pulls in a specific commit,
> as does git subtree? I've experimented a little but with not much success.

Well, they both pull in a specific commit *and* all the history leading up to it, although the two of them do it in slightly different ways.

Show 7 quoted lines
> I want "git svn rebase" (or some equivalent command, or series of
> commands) to update the contents of module1/work to the latest commit
> into this branch, and similarly "git svn dcommit" should also commit into
> module1, module2, etc. Basically, I want my working copy to have the same
> functionality as if moduleX/work was the actual layout in subversion. I'm
> using git as a client for a svn repository, rather than doing a one-time
> import. Is this possible?

Yes. Both tools will work for two-way svn import/export, although submodules will probably be a bit more convenient.

Essentially, you create one branch (and one git-svn remote entry) for each svn subproject, and one branch for the combined project. In the combined project, your .gitmodules should use '.' as the submodule repository path (since all your submodule objects are in the same local repo).

Then you 'git svn fetch' to retrieve the latest from each svn project.

Then, in each submodule, you can 'git pull .. git-svn-branchname' to get the latest stuff from git-svn for that branch.

Then, in the combined project, you 'git commit' to lock in those commits.
It's a little screwy, but it works :)
Avery
Previous: Dave Rodgman
Message 4 of 4 in “question: connecting to multiple remote svn projects”
  1. Dave RodgmanNov 6, 2009
  2. Avery PennarunNov 6, 2009
  3. Dave RodgmanNov 9, 2009
  4. Avery PennarunNov 9, 2009

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.