From owner-svn-src-user@FreeBSD.ORG Tue Sep 29 12:59:31 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C22471065692; Tue, 29 Sep 2009 12:59:31 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 979758FC28; Tue, 29 Sep 2009 12:59:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8TCxVj0085920; Tue, 29 Sep 2009 12:59:31 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8TCxVrK085918; Tue, 29 Sep 2009 12:59:31 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200909291259.n8TCxVrK085918@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 29 Sep 2009 12:59:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197616 - user/des/fmerge X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Sep 2009 12:59:31 -0000 Author: des Date: Tue Sep 29 12:59:31 2009 New Revision: 197616 URL: http://svn.freebsd.org/changeset/base/197616 Log: Further reduction of source / target confusion. Special-case head. Modified: user/des/fmerge/fmerge.pl Modified: user/des/fmerge/fmerge.pl ============================================================================== --- user/des/fmerge/fmerge.pl Tue Sep 29 12:20:10 2009 (r197615) +++ user/des/fmerge/fmerge.pl Tue Sep 29 12:59:31 2009 (r197616) @@ -36,19 +36,18 @@ our $debug; our $pretend; our $src_branch = "head"; # where we merge from -our $src_path; +our $src_path; # path relative to source branch our $src_url; # source URL our $tgt_branch; # where we merge to -our $tgt_path; +our $tgt_path; # path relative to target branch our $tgt_dir = "."; # target directory +our $tgt_url; # target URL our %revs = (0 => 0); our @ranges; -our $svn_path; -our $svn_url; -our $svn_root; -our $svn_branch; +our $svn_path; # path relative to branch +our $svn_root; # Repository root sub info(@) { print(STDERR join(' ', @_), "\n"); @@ -113,14 +112,14 @@ sub examine() { if ($key eq 'Path') { svn_check($value eq $tgt_dir, "path mismatch: $value != $tgt_dir"); } elsif ($key eq 'URL') { - $svn_url = $value; + $tgt_url = $value; } elsif ($key eq 'Repository Root') { $svn_root = $value; } } close($fh); - svn_check($svn_url =~ m@^\Q$svn_root\E(/.*)$@, "invalid svn URL: $svn_url"); + svn_check($tgt_url =~ m@^\Q$svn_root\E(/.*)$@, "invalid svn URL: $tgt_url"); $svn_path = $1; debug("guessing merge source / target directory"); @@ -133,20 +132,20 @@ sub examine() { debug("'$svn_path' =~ m\@^((?:/[\\w.-]+)+)\Q$subdir\E\$\@"); next unless $svn_path =~ m@^((?:/[\w.-]+)+)\Q$subdir\E$@; $svn_path = $subdir; - $svn_branch = $1; + $tgt_branch = $1; last; } close($fh); - if (!$svn_branch) { + if (!$tgt_branch) { # try to guess a stable / releng / release branch - debug("guessing source branch"); + debug("guessing target branch"); debug("'$svn_path' =~ s\@^/([\\w+.-]/\\d+(?:\\.\\d+)*)/?\@\@"); - $svn_path =~ s@^/(\w+/\d+(?:\.\d+)*)/?@@; - $svn_branch = $1; + $svn_path =~ s@^/(head|\w+/\d+(?:\.\d+)*)/?@@; + $tgt_branch = $1; } - svn_check($svn_branch, "unable to figure out source branch"); - debug("svn_branch = '$svn_branch'"); + svn_check($tgt_branch, "unable to figure out source branch"); + debug("tgt_branch = '$tgt_branch'"); debug("svn_path = '$svn_path'"); }