Re: git-svn: Finding the svn-URL of the current branch in git
From: Peter Baumann <hidden>
Date: 2016-06-15 22:43:28
On Tue, Aug 07, 2007 at 08:29:23PM +0200, Matthias Kleine wrote:
Hi there, when running "git-svn dcommit" git-svn tries to find the svn-URL of the current branch int git by looking for the most recent git log-entry corresponding to a commit in svn (see working_head_info in git-svn). In case a merge just happended this might be the URL of another branch. Would using "log --first-parent" instead of a plain "log" take care of this problem or would it have other undesirable consequences?
I had this situation, too.
a = svn branch 'a'
m b = svn branch 'b' (in my case, it was trunk)
/ \ m = a merge of branch 'a' and 'b', not yet commited to svn
a b
So trying to dcommit m, git svn can't figure out on which branch, as 'a'
and 'b' are both reachable. I had to use a graft file to lose one of the
parents, which let git-svn commit to SVN.
So for a short fix to get the work done, you could create a graft file
where you fake m to only have one parent.
On the longer run, I would make sense to have an option to explicitly
specify on which SVN branch 'git-svn dcommit' should operate.
-Peter