git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: Eduardo Pereira Habkost <ehabkost@mandriva.com>
Cc: git list <git@vger.kernel.org>
Subject: Re: [ANNOUNCE] git-svn - bidirection operations between svn and git
Date: Thu, 16 Feb 2006 11:25:50 -0800	[thread overview]
Message-ID: <20060216192550.GD12055@hand.yhbt.net> (raw)
In-Reply-To: <20060216134248.GC4271@duckman.conectiva>

Eduardo Pereira Habkost <ehabkost@mandriva.com> wrote:
> On Wed, Feb 15, 2006 at 11:38:26PM -0800, Eric Wong wrote:
> > Hello, I've written a simple tool for interoperating between git and
> > svn.  I wrote this so I could use git to work on projects where other
> > developers use Subversion.  I really hate using svn, but some projects I
> > work on require it, and svk isn't nearly as fast nor simple as git.
> 
> Great, I was doing some testing with git-svnimport for this, but I missed
> a tool to automatically commit to svn what I have in my GIT tree.
> 
> > 
> > git-svn does not replace git-svnimport, git-svnimport handles branches
> > and tags automatically, but is too inflexible about repository layouts
> > to be useful for a good number of projects I follow, and of course
> > git-svnimport can't commit to Subversion repositories :)
> 
> I am already using git-svnimport to keep a "mirror" of some subversion
> repositories, here (automatically udpated on crontab). Do you plan to
> allow "integration" with repositories that are just clones of
> git-svnimport'ed repositories?

It's possible, just not very obvious at the moment.  git-svn was written
as quickly as possible without regard to svnimport compatibility since I
had some repos that didn't work with svnimport to begin with.

The 'ADDITIONAL FETCH ARGUMENTS' part of the manpage is worth reading
for you.  Basically, you can define equalities
"(svn revision number)=(git commit)" as arguments to git-svn fetch to 
add parents for all the revisions it imports.

If I were you, I'd only want git-svn to care about partial history,
since you already have the rest of it from git-svnimport.  You can do
this:

	svn_revno=<last svn revision number you imported from git-svnimport>
	git_commit=<equivalent commit sha1 name of svn_revno above>
	git-svn fetch --revision $svn_revno:HEAD $svn_revno=$git_commit

> I plan to keep using git-svnimport and the standard git tools to work
> using the "svn mirror on git" as the main repository, but I plan to use
> "git-svn commit" to commit to the SVN repositories. I want this "commit
> tool" to not affect the current repository in any way, just like git-push:
> only send the commits to the remote repository and don't change anything
> in the local repository.
 
> However, it seems that "git-svn commit" does some tasks assuming we
> are on a "git-svn aware" repository (e.g. the "resyncing" just after
> the commit). Would you accept patches to allow using "git-svn commit"
> to commit changes from any GIT repository (i.e. not "svn-git aware"
> repositories) to any SVN repository, just like "git-push" would work
> for a GIT repository?
>
> However, I am not sure if the easier way would be changing git-svn to
> do this for me or writing a different script just for this task.

You should be 95% there just by exporting the svn_checkout_tree()
function to the command-line.  Perhaps automating reading of the
$svn_rev variable can be in order.

-- 
Eric Wong

  reply	other threads:[~2006-02-16 19:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-16  7:38 [ANNOUNCE] git-svn - bidirection operations between svn and git Eric Wong
2006-02-16  8:01 ` Junio C Hamano
2006-02-16  8:08   ` Aneesh Kumar
2006-02-16  8:19     ` Junio C Hamano
2006-02-16  8:30       ` Aneesh Kumar
2006-02-16  9:20         ` Junio C Hamano
2006-02-16 11:20           ` Aneesh Kumar
2006-02-16 11:57             ` Petr Baudis
2006-02-16 12:01               ` Aneesh Kumar
2006-02-16  8:48   ` Eric Wong
2006-02-16 13:42 ` Eduardo Pereira Habkost
2006-02-16 19:25   ` Eric Wong [this message]
     [not found] ` <43F4A4B1.4010307@blairos.org>
     [not found]   ` <20060216190426.GC12055@hand.yhbt.net>
     [not found]     ` <43F4CF5E.1010700@blairos.org>
     [not found]       ` <20060216194532.GA4446@Muzzle>
2006-02-16 19:47         ` [PATCH] git-svn: fix revision order when XML::Simple is not loaded Eric Wong
2006-02-16 21:44           ` Eric Wong
2006-02-17  2:13           ` [PATCH] git-svn: ensure fetch always works chronologically Eric Wong

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20060216192550.GD12055@hand.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=ehabkost@mandriva.com \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).