From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: Warren Harris <warrensomebody@gmail.com>
Cc: "J.H." <warthog19@eaglescrag.net>, git@vger.kernel.org
Subject: Re: git export to svn
Date: Sun, 26 Oct 2008 10:15:54 +0100 [thread overview]
Message-ID: <20081026091554.GC3612@atjola.homenet> (raw)
In-Reply-To: <2F1954CC-E013-4861-87F8-F89CF37CE53C@gmail.com>
On 2008.10.25 13:29:50 -0700, Warren Harris wrote:
> I tried a fetch, but still no luck:
>
> $ git svn fetch
> W: Ignoring error from SVN, path probably does not exist: (175002): RA
> layer request failed: REPORT of '/svn/!svn/bc/100': Could not read chunk
> size: Secure connection truncated (https://svn)
> W: Do not be alarmed at the above message git-svn is just searching
> aggressively for old history.
> This may take a while on large repositories
> r58084 = c01dadf89b552077da132273485e7569d8694518 (trunk)
> A ...
> r58088 = 7916f3a02ad6c759985bd9fb886423c373a72125 (trunk)
>
> $ git svn rebase
> Unable to determine upstream SVN information from working tree history
Means that your current branch is not based on what git-svn has fetched,
which is expected when you use "svn init" + "svn fetch" after you
already started working.
What's the actual relationship between your local history and the
history you fetched from svn?
If your local stuff started from revision X, which you manually imported
from svn, you can just rebase it:
git rebase --onto <svn-revision-X> <your-revision-X>
If you have a bunch of merges in your local history, you might want to
merge your stuff into the svn-based branch instead. When you dcommit,
the svn repo will only see one big "do it all" commit though.
For that, you would create a graft, so that your first "real" local
commit gets the svn revision X commit as its parent. That is, from:
S---S---SX---S---S---S (svn)
LX--------L---L---L---L (local)
You want to go to:
S---S---SX---S---S---S (svn)
\
LX L---L---L---L (local)
Where 'S' means that the commit came from SVN, and L means that it is a
"local" commit. SX and LX are the commits that have the same tree
attached (same directories/files), but have a different hash due to how
they were created. The graft overrides the parent-child relation for the
first "L" commit, so that it actually appears as being branched off of SX.
And then, you'd merge local into svn, so you get:
S---S---SX---S---S---S--M (svn)
\ /
LX L---L---L---L (local)
If possible, go with the rebase though. That at least gives a somewhat
reasonable history in the svn repo as well. Also note that when you go
with the merge way, make sure that the svn branch is totally uptodate
before you merge and that the merge commit is the only one to be
dcommitted. Otherwise, funny stuff might happen, and rebase might kick
in anyway, I don't exactly remember what git-svn does, but it wasn't
pleasant :-)
Björn
next prev parent reply other threads:[~2008-10-26 9:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-25 18:40 git export to svn Warren Harris
2008-10-25 18:43 ` J.H.
2008-10-25 19:11 ` Warren Harris
2008-10-25 20:12 ` J.H.
2008-10-25 20:29 ` Warren Harris
2008-10-26 9:15 ` Björn Steinbrink [this message]
2008-10-26 16:24 ` Warren Harris
2008-10-26 17:15 ` Björn Steinbrink
2008-10-29 3:40 ` Warren Harris
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=20081026091554.GC3612@atjola.homenet \
--to=b.steinbrink@gmx.de \
--cc=git@vger.kernel.org \
--cc=warrensomebody@gmail.com \
--cc=warthog19@eaglescrag.net \
/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).