On Thu, Feb 3, 2011 at 11:50, Jason Merrill <ja...@redhat.com> wrote:
> On 02/03/2011 08:03 AM, Diego Novillo wrote:
>>
>> - I wanted to merge branch 'b2' into branch 'b1'
>>
>> $ git checkout b1
>> $ git svn rebase
>> $ git merge b2
>> < ... fix whatever needs fixing in the merge ... >
>> $ git rebase -i @{u}
>
> I'm surprised at the error that you saw, but I'm not surprised that you had
> trouble.
>
>> In looking for online references to the problem, I found several
>> postings recommending not to do svn branch merges using git-svn
>>
>> (http://stackoverflow.com/questions/190431/is-git-svn-dcommit-after-merging-in-git-dangerous).
>>
>> Jason, Tom, do you merge svn branches using git svn?  How do you do it?
>
> I don't, really.  Since the SVN repository doesn't know the merge history,
> trying to merge and rebase is likely to get confused.  I don't remember
> exactly what I did when I was dealing with the lambda branch, but I think I
> just did periodic diffs much like old-style SVN merges.
>
> For constexpr I switched to having the branch only in git, which made things
> much easier.
>
> Have you tried "git merge --squash" without the rebase?  That seems like it
> might do the trick for you.

Thanks.  I *think* --squash did the trick.  I'm hesitant to commit it
now, though.  How can I tell what commit log will be used by 'git svn
dcommit'?  This is the state of my merged branch.  I think this means
I'm OK to commit this with dcommit, right?

-----------------------------------------------------------------------------------------------
$ git status
# On branch pph
# Your branch is ahead of 'origin/pph' by 1 commit.
#
nothing to commit (working directory clean)

$ git svn dcommit --dry-run
Committing to svn+ssh://gcc.gnu.org/svn/gcc/branches/pph ...
diff-tree e63fc545a2c33a4535d025e2b43be0a5c12c3f7e~1
e63fc545a2c33a4535d025e2b43be0a5c12c3f7e

$ git log -2
commit e63fc545a2c33a4535d025e2b43be0a5c12c3f7e
Author: Diego Novillo <dnovi...@google.com>
Date:   Thu Feb 3 12:55:55 2011 -0500

    Merge from google/integration.

commit 692d5c0ae306ec34b69d998040d5a1180c4347ad
Author: dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Feb 3 15:00:21 2011 +0000

    Initialized svnmerge tracking from google/integration.

    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/pph@169789
138bc75d-0d04-0410-961f-82ee72b054a4
-----------------------------------------------------------------------------------------------

Reply via email to