From: Michael J Gruber <git@drmicha.warpmail.net>
To: Orestis Markou <orestis@orestis.gr>
Cc: git@vger.kernel.org
Subject: Re: Editing git-svn metadata
Date: Mon, 04 May 2009 17:39:22 +0200 [thread overview]
Message-ID: <49FF0C2A.6050503@drmicha.warpmail.net> (raw)
In-Reply-To: <24ACA1E2-9B33-412D-A426-FAF3CF683ADA@orestis.gr>
Orestis Markou venit, vidit, dixit 02.05.2009 03:02:
> Hello,
>
> I couldn't find anything in the manpages for this, and I don't know
> where else to look for it.
>
> As mentioned here: http://article.gmane.org/gmane.comp.version-control.git/116382
> , an svn repository I'm working against has a weird layout on which
> git-svn chokes on. I'm working around that by using grafts to inform
> git about the history of the branches. It involves some manual work
> but it's fine.
>
> Another problem I have (possibly linked) is that branches are only
> detected after the first commit to them - the commit that creates the
> branch is not recorded by git-svn at all. This forces me to do a
> 'dummy' commit from svn in order to even see the branch in git-svn.
>
> Given that I have all the information I need (branch name, parent id),
> is there any file I can manually edit to inform git-svn about my
> branches?
>
> Alternatively, and more usefully to git in general, perhaps I can have
> a look at the git-svn code and add some diagnostics to see what's
> failing, and provide a patch? I looked for a developer guide but
> couldn't find one (only how to write tests).
It may depend on how you create branches in svn. The usual way is to
copy from trunk (or another branch) in the way the attached script does.
For me, the relevant output is
* master
remotes/mybranch
remotes/trunk
which is pretty much what it should be. Do you create (empty) branches
by doing a mkdir in an svn check out of the base dir (below trunk)?
Michael
--- %< ---
#!/bin/bash
rm -Rf svnrepo svnwc gitrepo
svnurl="file://localhost"`pwd`/svnrepo
svnadmin create svnrepo
svn co $svnurl svnwc
(
cd svnwc
mkdir trunk branches tags
svn add trunk branches tags
svn ci -m init
(
cd trunk
echo a > a
svn add a
svn ci -m A
svn cp -m mybranch $svnurl/trunk $svnurl/branches/mybranch
)
)
git svn clone -s $svnurl gitrepo
(
cd gitrepo
git branch -a
)
prev parent reply other threads:[~2009-05-04 15:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-02 1:02 Editing git-svn metadata Orestis Markou
2009-05-04 15:39 ` Michael J Gruber [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=49FF0C2A.6050503@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=orestis@orestis.gr \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.