{"thread":{"id":"4364","subject":"Re: [PATCH] git-svnimport: Improved detection of merges.","startedAt":"2006-06-01T07:12:51Z","lastAt":"2006-06-01T09:58:41Z","messageCount":4,"participants":["Junio C Hamano","Eric Wong","Florian Forster"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"21046","messageId":"7vlkshs618.fsf@assigned-by-dhcp.cox.net","threadId":"4364","inReplyTo":"11490715283626-git-send-email-octo@verplant.org","subject":"Re: [PATCH] git-svnimport: Improved detection of merges.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-01T07:12:51Z","receivedAt":"2006-06-01T07:12:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Florian Forster <octo@verplant.org> writes:\n\n> The regexes detecting merges (while still relying on the commit messages,\n> though) have been improved to catch saner (and hopefully more) messages. The\n> old regex was so generic that it often matched something else and missed the\n> actual merge-message.\n\n> Also, the regex given with the `-M' commandline-option is checked first:\n> Explicitely given regexes should be considered better than the builtin ones,\n> and should therefore be given a chance to match a message first.\n\nThe latter part sounds immensely sane.  The former I am not a\ngood judge, since I do not interact with subversion repositories\nmyself.  Opinions from real svn users?\n\n\nBTW, did anybody received the latest \"What's in git.git\" I sent\nout about 20 minutes ago?\n"},{"id":"21049","messageId":"20060601092238.GB9333@hand.yhbt.net","threadId":"4364","inReplyTo":"7vlkshs618.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] git-svnimport: Improved detection of merges.","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-06-01T09:22:39Z","receivedAt":"2006-06-01T09:22:39Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Junio C Hamano <junkio@cox.net> wrote:\n> Florian Forster <octo@verplant.org> writes:\n> \n> > The regexes detecting merges (while still relying on the commit messages,\n> > though) have been improved to catch saner (and hopefully more) messages. The\n> > old regex was so generic that it often matched something else and missed the\n> > actual merge-message.\n> \n> > Also, the regex given with the `-M' commandline-option is checked first:\n> > Explicitely given regexes should be considered better than the builtin ones,\n> > and should therefore be given a chance to match a message first.\n> \n> The latter part sounds immensely sane.  The former I am not a\n> good judge, since I do not interact with subversion repositories\n> myself.  Opinions from real svn users?\n\nSounds sane to me, but I've not seen the patch from Florian.\n\nI've been toying around a bit with enhanced branch/merge-tracking\nsupport in git-svn, too.\n\n> \n> BTW, did anybody received the latest \"What's in git.git\" I sent\n> out about 20 minutes ago?\n\nNope, I haven't seen that nor Florian's patch (assuming it was sent to\nthe ml).  Ah, I just saw (part #2) pop up.\n\n-- \nEric Wong\n"},{"id":"21054","messageId":"20060601093603.GY2315@verplant.org","threadId":"4364","inReplyTo":"20060601092238.GB9333@hand.yhbt.net","subject":"Re: [PATCH] git-svnimport: Improved detection of merges.","fromName":"Florian Forster","fromEmail":"octo@verplant.org","sentAt":"2006-06-01T09:36:03Z","receivedAt":"2006-06-01T09:36:03Z","isPatch":true,"sender":{"key":"octo@verplant.org","avatar":null},"body":"Hi,\n\nOn Thu, Jun 01, 2006 at 02:22:39AM -0700, Eric Wong wrote:\n> Nope, I haven't seen that nor Florian's patch (assuming it was sent to\n> the ml).  Ah, I just saw (part #2) pop up.\n\nsorry, I'm new to the git development and didn't know that patches\nshould be sent to the ML. I've attached that patch I sent to Junio to\nthis mail.\n\nFlorian Forster <octo@verplant.org> writes:\n> The regexes detecting merges (while still relying on the commit\n> messages, though) have been improved to catch saner (and hopefully\n> more) messages. The old regex was so generic that it often matched\n> something else and missed the actual merge-message.\n\nThe assumption here is that merges are between branches or between a\nbranch and the trunk. The regexes therefore match things like\n(parenthesis showing what is being used as the branch name if it\nmatches).\n - `branch/(name)'\n - `(trunk)'\n - `(name) branch'\n\nPrior to the patch `git-svnimport' would match the message\n  ``Merging from branch/foo to branch/bar''\nand return `from' as the branch name.\n\nRegards,\nFlorian Forster\n-- \nFlorian octo Forster\nHacker in training\nGnuPG: 0x91523C3D\nhttp://verplant.org/\n\n\nFrom nobody Mon Sep 17 00:00:00 2001\nFrom: Florian Forster <octo@verplant.org>\nDate: Wed, 31 May 2006 12:28:41 +0200\nSubject: [PATCH] git-svnimport: Improved detection of merges.\n\nThe regexes detecting merges (while still relying on the commit messages,\nthough) have been improved to catch saner (and hopefully more) messages. The\nold regex was so generic that it often matched something else and missed the\nactual merge-message.\nAlso, the regex given with the `-M' commandline-option is checked first:\nExplicitely given regexes should be considered better than the builtin ones,\nand should therefore be given a chance to match a message first.\n\n---\n\n git-svnimport.perl |   11 +++++++++--\n 1 files changed, 9 insertions(+), 2 deletions(-)\n\n1075d5b0cd92dbb8dc77838b2da2d8190904b351\ndiff --git a/git-svnimport.perl b/git-svnimport.perl\nindex 61f559f..38ac732 100755\n--- a/git-svnimport.perl\n+++ b/git-svnimport.perl\n@@ -63,10 +63,17 @@ my $svn_dir = $ARGV[1];\n \n our @mergerx = ();\n if ($opt_m) {\n-\t@mergerx = ( qr/\\W(?:from|of|merge|merging|merged) (\\w+)/i );\n+\tmy $branch_esc = quotemeta ($branch_name);\n+\tmy $trunk_esc  = quotemeta ($trunk_name);\n+\t@mergerx =\n+\t(\n+\t\tqr!\\b(?:merg(?:ed?|ing))\\b.*?\\b((?:(?<=$branch_esc/)[\\w\\.\\-]+)|(?:$trunk_esc))\\b!i,\n+\t\tqr!\\b(?:from|of)\\W+((?:(?<=$branch_esc/)[\\w\\.\\-]+)|(?:$trunk_esc))\\b!i,\n+\t\tqr!\\b(?:from|of)\\W+(?:the )?([\\w\\.\\-]+)[-\\s]branch\\b!i\n+\t);\n }\n if ($opt_M) {\n-\tpush (@mergerx, qr/$opt_M/);\n+\tunshift (@mergerx, qr/$opt_M/);\n }\n \n # Absolutize filename now, since we will have chdir'ed by the time we\n-- \n1.3.3\n\n"},{"id":"21055","messageId":"7v64jlgpta.fsf@assigned-by-dhcp.cox.net","threadId":"4364","inReplyTo":"20060601093603.GY2315@verplant.org","subject":"Re: [PATCH] git-svnimport: Improved detection of merges.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-01T09:58:41Z","receivedAt":"2006-06-01T09:58:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Florian Forster <octo@verplant.org> writes:\n\n> On Thu, Jun 01, 2006 at 02:22:39AM -0700, Eric Wong wrote:\n>> Nope, I haven't seen that nor Florian's patch (assuming it was sent to\n>> the ml).  Ah, I just saw (part #2) pop up.\n>\n> sorry, I'm new to the git development and didn't know that patches\n> should be sent to the ML. I've attached that patch I sent to Junio to\n> this mail.\n\nThanks for a resend.\n\nThe patch is already queued in \"next\", so svn people might want\nto take a peek there.\n"}]}