git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniele Segato <daniele.bilug@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Cc: Eric Wong <normalperson@yhbt.net>
Subject: [Git-SVN] Manage merges bewteen remote branches. git-svn or svn?
Date: Tue, 23 Feb 2010 12:58:31 +0100	[thread overview]
Message-ID: <9accb4401002230358k669937fai400890658b14c4fb@mail.gmail.com> (raw)

I'm trying to understand the best way to deal with remote branches
merging in git-svn.

This is the situation (more or less) that I had to manage:

master: tracking remote svn trunk
v1.x: tracking remote svn branches/v1.x

at the moment v1.x just branched from trunk

master
    |
    |
    |
    |   v1.x
    |  /
    | /
    |/
branch point


now i should start to merge into v1.x the work from trunk/master.
some of the last commit on master will be left there for later merging.

so i branched from master~10 (example) and cherry-picket the commit i
want to put into


I see three root from now on and no one i really like:
1.
git checkout v1.x
git merge --squash myTemporaryBranch

this way it's ok the first time but i'll have a lot of conflict later
when i will do (again):
git merge --squash master


2.
git checkout v1.x
# this will not work because of the svnid:
#git rebase myTemporaryBranch

so I did:
for commit in `git rev-list --reverse --cherry-pick
v1.x..myTemporaryBranch`; do
    git cherry-pick-svn $commit;
done;

the cherry-pick-svn is an alias i defined myself like this:
cherry-pick-svn =  !GIT_EDITOR='sed -i /^git-svn-id:/d' git cherry-pick -e

it just strip out the git-svn-id line from the commit comment.

this way i have all the history but i think i'll have conflict any
way, can you confirm?
furthermore it will take a lot of space into the SVN server.

3.
use svn directly.
never did an svn merge with svn so I still don't know exactly how it work
may be someone of you can tell me if this could work or not. this way
I should always do my mergings with subversion directly



What would you do?
thanks and regards,
Daniele Segato

                 reply	other threads:[~2010-02-23 12:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=9accb4401002230358k669937fai400890658b14c4fb@mail.gmail.com \
    --to=daniele.bilug@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.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).