From: "Carlos Martín Nieto" <cmn@elego.de>
To: Bryan Jacobs <bjacobs@woti.com>
Cc: Michael Haggerty <mhagger@alum.mit.edu>, git@vger.kernel.org
Subject: Re: git-svn and mergeinfo
Date: Tue, 06 Sep 2011 14:56:38 +0200 [thread overview]
Message-ID: <1315313800.9839.10.camel@bee.lab.cmartin.tk> (raw)
In-Reply-To: <20110901104327.14d4dba6@robyn.woti.com>
[-- Attachment #1: Type: text/plain, Size: 2036 bytes --]
On Thu, 2011-09-01 at 10:43 -0400, Bryan Jacobs wrote:
> On Thu, 01 Sep 2011 10:59:51 +0200
> Michael Haggerty <mhagger@alum.mit.edu> wrote:
>
> > On 08/29/2011 07:20 PM, Bryan Jacobs wrote:
> > > I have been (ab)using git-svn for committing to a central SVN
> > > repository while doing my work locally with git. To this end, I've
> > > written a set of scripts and hooks which perform squash merges
> > > locally and then dcommit them with proper svn:mergeinfo
> > > annotations. The final result is the perfect appearance of having
> > > done a native SVN merge in the central repository, while using only
> > > local git commands and gaining the full benefit of git's conflict
> > > resolution and developer convenience.
> > >
> > > However, to make this work with git 1.7.6, I needed to make *one*
> > > change to the git internals: --merge-info does not allow setting
> > > mergeinfo for more than one branch. Because it's a complete
> > > overwrite operation instead of an update, this is a serious issue
> > > preventing its use for nontrivial branches.
> > >
> > > Might I suggest adding a block like the following around line 552 of
> > > git-svn?
> > >
> > > if (defined($_merge_info))
> > > {
> > > $_merge_info =~ tr{ }{\n};
> > > }
> >
> > Naive question: why can't you pass a newline (properly quoted, of
> > course) directly within the string argument to the --mergeinfo option?
>
> The only way I know of to do that in bash is to assign the
> newline-bearing string to a variable, and then use the variable in a
> command line option. Extremely awkward.
You can also save the mergeinfo to a file, add the line, and use
--mergeinfo=$(cat /tmp/some-file) to set it. It is indeed awkward, but
blindly replacing every space with a newline is not always the right
option. If a merged directory contains a space, this change will break
the mergeinfo, even if you're properly quoting your variable or using
the $(cat /some/file) method.
Cheers,
cmn
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2011-09-06 12:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-29 17:20 git-svn and mergeinfo Bryan Jacobs
2011-08-29 19:26 ` git bug reporting Jeff King
2011-08-29 19:34 ` Bryan Jacobs
2011-08-29 20:44 ` Junio C Hamano
2011-08-31 14:03 ` Sverre Rabbelier
2011-08-31 13:59 ` git-svn and mergeinfo Sverre Rabbelier
2011-08-31 16:55 ` Bryan Jacobs
2011-08-31 17:01 ` Sverre Rabbelier
2011-09-01 8:59 ` Michael Haggerty
2011-09-01 14:43 ` Bryan Jacobs
2011-09-01 16:00 ` Junio C Hamano
2011-09-06 12:56 ` Carlos Martín Nieto [this message]
2011-09-06 13:52 ` Bryan Jacobs
2011-09-06 14:28 ` Carlos Martín Nieto
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=1315313800.9839.10.camel@bee.lab.cmartin.tk \
--to=cmn@elego.de \
--cc=bjacobs@woti.com \
--cc=git@vger.kernel.org \
--cc=mhagger@alum.mit.edu \
/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.