git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avery Pennarun <apenwarr@gmail.com>
To: Dave Rodgman <dav1dr@eml.cc>
Cc: git@vger.kernel.org
Subject: Re: question: connecting to multiple remote svn projects
Date: Mon, 9 Nov 2009 13:43:46 -0500	[thread overview]
Message-ID: <32541b130911091043k78ac009dmb49ecdb0beaa597f@mail.gmail.com> (raw)
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.

> 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

      reply	other threads:[~2009-11-09 18:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-06 17:55 question: connecting to multiple remote svn projects Dave Rodgman
2009-11-06 19:51 ` Avery Pennarun
2009-11-09 10:59   ` Dave Rodgman
2009-11-09 18:43     ` Avery Pennarun [this message]

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=32541b130911091043k78ac009dmb49ecdb0beaa597f@mail.gmail.com \
    --to=apenwarr@gmail.com \
    --cc=dav1dr@eml.cc \
    --cc=git@vger.kernel.org \
    /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).