All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: Sam Vilain <sam.vilain@catalyst.net.nz>
Cc: Git Central <git@vger.kernel.org>, stephen@touset.org
Subject: Re: [PATCH] git-svn: allow to specify svn branch for commands
Date: Mon, 4 Jun 2007 21:14:47 -0700	[thread overview]
Message-ID: <20070605041446.GA4266@untitled> (raw)
In-Reply-To: <1181014957993-git-send-email-sam.vilain@catalyst.net.nz>

Sam Vilain <sam.vilain@catalyst.net.nz> wrote:
> "git-svn dcommit" ends up making an arbitrary decision when pushing
> back merges.  Allow the user to specify which one is used, albeit in a
> rather hack-ish way.

Frightening...  Perhaps we should echo the final URL out
to the user and prompt them for confirmation.

> ---
>  Documentation/git-svn.txt |   11 +++++++++++
>  git-svn.perl              |   16 +++++++++-------
>  2 files changed, 20 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
> index c0d7d95..3e64522 100644
> --- a/Documentation/git-svn.txt
> +++ b/Documentation/git-svn.txt
> @@ -69,6 +69,17 @@ COMMANDS
>  	argument if that is what you want.  This is useful if
>  	you wish to track multiple projects that share a common
>  	repository.
> +-B<svn_branch>;;
> +--branch=<svn_branch>;;
> +	Normally, git-svn is capable of figuring out which branch you
> +	are working on.  However, if you are doing merges between svn
> +	branches using git then the decision about which branch to
> +	dcommit to will end up being made based on which of the
> +	branches you are merging has the newest upstream commit.  This
> +	option enables a global filter that tells git-svn what to look
> +	for in the git-svn-id: line - specify a repository UUID or a
> +	branch name here.  So, it may be used with "git-svn log",
> +	"git-svn dcommit", etc.

This should clarify that a Perl regular expression is used.
'.' can match '-' or '_' which is also pretty common in version
numbers.  Perhaps give an -F(ixed-string) option like grep does?

>  sub working_head_info {
> -	my ($head, $refs) = @_;
> +	my ($head, $refs, $grep) = @_;
>  	my ($fh, $ctx) = command_output_pipe('rev-list', $head);
>  	while (my $hash = <$fh>) {
>  		chomp($hash);
>  		my ($url, $rev, $uuid) = cmt_metadata($hash);
> +		next unless (!$grep or $url =~ m{$grep} or $uuid =~ m{$grep});
> @@ -3394,7 +3396,7 @@ sub git_svn_log_cmd {

-- 
Eric Wong

  reply	other threads:[~2007-06-05  4:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-05  3:42 [PATCH] git-svn: allow to specify svn branch for commands Sam Vilain
2007-06-05  4:14 ` Eric Wong [this message]
2007-06-05  4:23   ` Sam Vilain
2007-06-05  9:56     ` Eric Wong
2007-06-05  4:16 ` Stephen Touset
2007-06-05  9:56   ` Eric Wong

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=20070605041446.GA4266@untitled \
    --to=normalperson@yhbt.net \
    --cc=git@vger.kernel.org \
    --cc=sam.vilain@catalyst.net.nz \
    --cc=stephen@touset.org \
    /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.