From: Eric Wong <normalperson@yhbt.net>
To: git@vger.kernel.org, Junio C Hamano <junkio@cox.net>
Cc: Eric Wong <normalperson@yhbt.net>
Subject: [PATCH 2/13] git-svn: --branch-all-refs / -B support
Date: Tue, 13 Jun 2006 11:02:04 -0700 [thread overview]
Message-ID: <11502217381866-git-send-email-normalperson@yhbt.net> (raw)
In-Reply-To: <11502217352245-git-send-email-normalperson@yhbt.net>
This should make life easier for all those who type:
`git-rev-parse --symbolic --all | xargs -n1 echo -b`
every time they run git-svn fetch.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
contrib/git-svn/git-svn.perl | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/contrib/git-svn/git-svn.perl b/contrib/git-svn/git-svn.perl
index 089d597..c91160d 100755
--- a/contrib/git-svn/git-svn.perl
+++ b/contrib/git-svn/git-svn.perl
@@ -34,12 +34,13 @@ my $sha1 = qr/[a-f\d]{40}/;
my $sha1_short = qr/[a-f\d]{4,40}/;
my ($_revision,$_stdin,$_no_ignore_ext,$_no_stop_copy,$_help,$_rmdir,$_edit,
$_find_copies_harder, $_l, $_cp_similarity,
- $_version, $_upgrade, $_authors);
+ $_version, $_upgrade, $_authors, $_branch_all_refs);
my (@_branch_from, %tree_map, %users);
my ($_svn_co_url_revs, $_svn_pg_peg_revs);
my %fc_opts = ( 'no-ignore-externals' => \$_no_ignore_ext,
'branch|b=s' => \@_branch_from,
+ 'branch-all-refs|B' => \$_branch_all_refs,
'authors-file|A=s' => \$_authors );
# yes, 'native' sets "\n". Patches to fix this for non-*nix systems welcome:
@@ -108,6 +109,7 @@ usage(0) if $_help;
version() if $_version;
usage(1) unless defined $cmd;
load_authors() if $_authors;
+load_all_refs() if $_branch_all_refs;
svn_compat_check();
$cmd{$cmd}->[0]->(@ARGV);
exit 0;
@@ -1238,6 +1240,17 @@ sub map_tree_joins {
}
}
+sub load_all_refs {
+ if (@_branch_from) {
+ print STDERR '--branch|-b parameters are ignored when ',
+ "--branch-all-refs|-B is passed\n";
+ }
+
+ # don't worry about rev-list on non-commit objects/tags,
+ # it shouldn't blow up if a ref is a blob or tree...
+ chomp(@_branch_from = `git-rev-parse --symbolic --all`);
+}
+
# '<svn username> = real-name <email address>' mapping based on git-svnimport:
sub load_authors {
open my $authors, '<', $_authors or die "Can't open $_authors $!\n";
--
1.4.0
next prev parent reply other threads:[~2006-06-13 18:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-13 18:02 [PATCH 0/13] git-svn: better branch support, SVN:: lib usage, feature additions Eric Wong
2006-06-13 18:02 ` [PATCH 1/13] git-svn: support -C<num> passing to git-diff-tree Eric Wong
2006-06-13 18:02 ` Eric Wong [this message]
2006-06-13 18:02 ` [PATCH 3/13] git-svn: optimize --branch and --branch-all-ref Eric Wong
2006-06-13 18:02 ` [PATCH 4/13] git-svn: support manually placed initial trees from fetch Eric Wong
2006-06-13 18:02 ` [PATCH 5/13] git-svn: Move all git-svn-related paths into $GIT_DIR/svn Eric Wong
2006-06-13 18:02 ` [PATCH 6/13] git-svn: minor cleanups, extra error-checking Eric Wong
2006-06-13 18:02 ` [PATCH 7/13] git-svn: add --repack and --repack-flags= options Eric Wong
2006-06-13 18:02 ` [PATCH 8/13] git-svn: add --shared and --template= options to pass to init-db Eric Wong
2006-06-13 18:02 ` [PATCH 9/13] git-svn: add some functionality to better support branches in svn Eric Wong
2006-06-13 18:02 ` [PATCH 10/13] git-svn: add UTF-8 message test Eric Wong
2006-06-13 18:02 ` [PATCH 11/13] git-svn: add 'log' command, a facsimile of basic `svn log' Eric Wong
2006-06-13 18:02 ` [PATCH 12/13] git-svn: add support for Perl SVN::* libraries Eric Wong
2006-06-13 18:02 ` [PATCH 13/13] git-svn: make the $GIT_DIR/svn/*/revs directory obsolete 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=11502217381866-git-send-email-normalperson@yhbt.net \
--to=normalperson@yhbt.net \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).