git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-svn: teach git-svn to populate svn:mergeinfo

From
BJBryan Jacobs <bjacobs@woti.com>
Date
Sep 7, 2011, 14:14 UTC
Message-ID
<20110907101434.281d037f@robyn.woti.com>
In-Reply-To
<20110906205750.GB12574@dcvr.yhbt.net>

On Tue, 6 Sep 2011 13:57:50 -0700 Eric Wong <normalperson@yhbt.net> wrote:

Show 7 quoted lines
> Bryan Jacobs <bjacobs@woti.com> wrote:
> > +sub split_merge_info_range {
> > +	my ($range) = @_;
> > +	if ($range =~ /(\d+)-(\d+)/o) {
> 
> No need for "/o" in regexps unless you have a (constant) variable
> expansion in there.

Okay, I'll take that out. I got into the habit of putting "optimize" on all regexes without an explicitly dynamic variable on some earlier Perl version.

Show 9 quoted lines
> > +sub merge_commit_fail {
> > +	my ($gs, $linear_refs, $d) = @_;
> > +	#while (1) {
> > +	#	my $cs = shift @$linear_refs or last;
> > +	#	command_noisy(qw/cherry-pick/, $cs);
> > +	#}
> > +	#command_noisy(qw/cherry-pick -m/, '1', $d);
> 
> Huh?  If there's commented-out code, it must be explained or removed.

I think I did explain that in my earlier comments. I'm still not happy with the recovery-from-aborted-commit-series handling. That commented bit was my attempt.

The best suggestion so far is to prescan the commits to fail-fast. I will do that in the next revision of the patch, just give me some time to put it together.

Show 10 quoted lines
> > +	fatal "Aborted after failed dcommit of merge revision";
> > +}
> 
> > +++ b/t/t9160-git-svn-mergeinfo-push.sh
> > @@ -0,0 +1,97 @@
> > +#!/bin/sh
> > +#
> > +# Copyright (c) 2007, 2009 Sam Vilain
> 
> That should be: "Copyright (c) 2011 Brian Jacobs", correct?

Well, the file was copied from one bearing the Vilain copyright bit. I'm not sure I entirely understand why it matters who holds the individual copyrights if you have a collective license which is going to be changed, but I can't just stick my own name on derived work - as the setup code for that unit is.

Show 7 quoted lines
> > +test_expect_success 'check svn:mergeinfo' '
> > +	mergeinfo=$(svn_cmd propget svn:mergeinfo
> > "$svnrepo"/branches/svnb1)
> > +	echo "$mergeinfo"
> 
> No need to echo unless you're debugging a test, right?
> 
Correct, leftover test-debugging cruft, will remove.
I will submit another revision shortly.
Bryan Jacobs
Previous: Eric Wong
Message 11 of 11 in “git-svn: teach git-svn to populate svn:mergeinfo”
  1. git-svn: teach git-svn to populate svn:mergeinfoBryan Jacobs, Sep 2, 2011
  2. Sam VilainSep 2, 2011
  3. Bryan JacobsSep 2, 2011
  4. Sam VilainSep 2, 2011
  5. Bryan JacobsSep 2, 2011
  6. Sam VilainSep 2, 2011
  7. Eric WongSep 3, 2011
  8. Bryan JacobsSep 6, 2011
  9. Eric WongSep 6, 2011
  10. Eric WongSep 6, 2011
  11. Bryan JacobsSep 7, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.