# git-svn dcommit fail

6 messages from 2007-07-04 to 2007-07-05. Participants: Dongsheng Song, Steven Grimm, Kees-Jan Dijkzeul, Junio C Hamano.
Thread: https://gitlist.dev/t/8855

## Dongsheng Song, 2007-07-04 09:56

Subject: git-svn dcommit fail
Message-ID: <4b3406f0707040256x31f0909cie126d950c60374f1@mail.gmail.com>
URL: https://gitlist.dev/e/4b3406f0707040256x31f0909cie126d950c60374f1%40mail.gmail.com

```
After some merge operation,

$ git-svn rebase
Current branch master is up to date.
$ git-svn dcommit
Unable to extract revision information from commit
f10ff0772f96ec434b27d47efaee082190bb8516~1

Thanks for some help.

---
Dongsheng

```

## Steven Grimm, 2007-07-05 07:11

Subject: Re: git-svn dcommit fail
Message-ID: <468C999C.60701@midwinter.com>
URL: https://gitlist.dev/e/468C999C.60701%40midwinter.com
In-Reply-To: <4b3406f0707040256x31f0909cie126d950c60374f1@mail.gmail.com>

```
Dongsheng Song wrote:
> After some merge operation,

git-svn doesn't support nonlinear history in any of the official 
releases, though there will be some support in the next release (you can 
try it out by grabbing the latest version from git.git's master branch). 
If you don't want to run a prerelease version of git, you need to avoid 
doing non-squash merges into branches that you are going to check into 
an svn repository.

Squash merges (git merge --squash) work fine, though. They will be 
recorded in your history as a regular commit, not a merge, so git-svn 
won't be confused by them.

-Steve

```

## Kees-Jan Dijkzeul, 2007-07-05 08:28

Subject: Fwd: git-svn dcommit fail
Message-ID: <fa0b6e200707050128h6bc3caa4rd661c64128ac7367@mail.gmail.com>
URL: https://gitlist.dev/e/fa0b6e200707050128h6bc3caa4rd661c64128ac7367%40mail.gmail.com
In-Reply-To: <fa0b6e200707050126m17a23de6uad4909533306eb06@mail.gmail.com>

```
This one should have gone to the list. Sorry, Steven, for mailing privately.

---------- Forwarded message ----------
From: Kees-Jan Dijkzeul <k.j.dijkzeul@gmail.com>
Date: Jul 5, 2007 10:26 AM
Subject: Re: git-svn dcommit fail
To: Steven Grimm <koreth@midwinter.com>


On 7/5/07, Steven Grimm <koreth@midwinter.com> wrote:
> git-svn doesn't support nonlinear history in any of the official
> releases, though there will be some support in the next release (you can
> try it out by grabbing the latest version from git.git's master branch).

I just fetched the master branch. For me it is at commit
d44c782bbd6b0e806e056f9e8ff8cd8e426e67a3.
At this point, git-svn is identical to the one in 1.5.2.3.

I've attempted to use git to merge two subversion branches, but when
dcommitting attempts to commit the correct delta to the wrong branch,
and subsequently claims that "Your file or directory is probably out
of date" (which, in a weird way, makes sense).

I'd be happy to test this support for nonlinear history, but so far,
I've been unable to locate the correct commit.

Groetjes,

Kees-Jan

```

## Junio C Hamano, 2007-07-05 08:47

Subject: Re: Fwd: git-svn dcommit fail
Message-ID: <7v1wfndyow.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v1wfndyow.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <fa0b6e200707050128h6bc3caa4rd661c64128ac7367@mail.gmail.com>

```
"Kees-Jan Dijkzeul" <k.j.dijkzeul@gmail.com> writes:

> I just fetched the master branch. For me it is at commit
> d44c782bbd6b0e806e056f9e8ff8cd8e426e67a3.

You must be kiding.  That was made on Jun 6, 2007, which is
ancient if not prehistoric in git timescale.

Could you double check?

```

## Kees-Jan Dijkzeul, 2007-07-05 11:06

Subject: Re: Fwd: git-svn dcommit fail
Message-ID: <fa0b6e200707050406i831816co80ff1500dae6bf54@mail.gmail.com>
URL: https://gitlist.dev/e/fa0b6e200707050406i831816co80ff1500dae6bf54%40mail.gmail.com
In-Reply-To: <7v1wfndyow.fsf@assigned-by-dhcp.cox.net>

```
On 7/5/07, Junio C Hamano <gitster@pobox.com> wrote:
> Could you double check?

*Blush*. I should have caught that one myself. I'm now at commit
114fd812f78ea375ee6782d4ff0203f3ae20b076, which still exhibits the
same problem.

Basically, the problem is as follows: My head commit is a merge:
$ git show HEAD
commit e135f26dbae66f539b486646a12aa51e71c196a1
Merge: bb8ac98... f453e1e...

Both parents are svn-commits.

When I do a dry-run, I get
$ git-svn dcommit -n
diff-tree e135f26dbae66f539b486646a12aa51e71c196a1~1
e135f26dbae66f539b486646a12aa51e71c196a1

As far as I'm concerned, this is correct. This is the delta that
should be committed to the svn branch who's head is
e135f26dbae66f539b486646a12aa51e71c196a1~1 (obviously).

However, function "working_head_info" of git-svn returns the other
parent as the working head. As a result, committing the diff to svn
fails.

I've observed that the call to cmt_metadata("$d~1") (line 382 of
git-svn) does return the correct svn branch, so it would seem to me
that it makes much more sense to commit to that.

Any thoughts, tips, tricks?

Thanks!

Kees-Jan

```

## Steven Grimm, 2007-07-05 16:18

Subject: Re: Fwd: git-svn dcommit fail
Message-ID: <468D19EE.6@midwinter.com>
URL: https://gitlist.dev/e/468D19EE.6%40midwinter.com
In-Reply-To: <fa0b6e200707050406i831816co80ff1500dae6bf54@mail.gmail.com>

```
Kees-Jan Dijkzeul wrote:
> Basically, the problem is as follows: My head commit is a merge:
> $ git show HEAD
> commit e135f26dbae66f539b486646a12aa51e71c196a1
> Merge: bb8ac98... f453e1e...
>
> Both parents are svn-commits.

That seems to be a case that the current merge support in git-svn can't 
handle. I'll refer you to the test I did when the merge support first 
landed on the mailing list:

http://www.spinics.net/lists/git/msg33628.html

The current code seems to be aimed at using branches for local 
development on the git side rather than dealing with relationships 
between multiple svn branches.

I'll also point out this utility, which may be of use to you. It is not 
perfect but it works.

http://www.spinics.net/lists/git/msg29119.html

-Steve

```
