summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-01-18 20:40:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-01-18 20:40:28 (GMT)
commit02f55e660ccbd2fa1e3b2c686200f0037568f854 (patch)
tree539fedc6422e51fdd2282586bf2aecf8acd23c00 /git-svn.perl
parentbbc6f64b4eca0b792060ae8b8ccb58526dbbc076 (diff)
parent2934a484fdaf9ceea4da2e9402a2f54dcaf59fb1 (diff)
downloadgit-02f55e660ccbd2fa1e3b2c686200f0037568f854.zip
git-02f55e660ccbd2fa1e3b2c686200f0037568f854.tar.gz
git-02f55e660ccbd2fa1e3b2c686200f0037568f854.tar.bz2
Merge git://bogomips.org/git-svn
* git://bogomips.org/git-svn: git-svn: teach find-rev to find near matches git svn: do not overescape URLs (fallback case) Git::SVN::Editor::T: pass $deletions to ->A and ->D
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl12
1 files changed, 10 insertions, 2 deletions
diff --git a/git-svn.perl b/git-svn.perl
index bd5266c..d086694 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -114,6 +114,7 @@ my ($_stdin, $_help, $_edit,
$_message, $_file, $_branch_dest,
$_template, $_shared,
$_version, $_fetch_all, $_no_rebase, $_fetch_parent,
+ $_before, $_after,
$_merge, $_strategy, $_preserve_merges, $_dry_run, $_local,
$_prefix, $_no_checkout, $_url, $_verbose,
$_commit_url, $_tag, $_merge_info, $_interactive);
@@ -258,7 +259,8 @@ my %cmd = (
} ],
'find-rev' => [ \&cmd_find_rev,
"Translate between SVN revision numbers and tree-ish",
- {} ],
+ { 'before' => \$_before,
+ 'after' => \$_after } ],
'rebase' => [ \&cmd_rebase, "Fetch and rebase your working directory",
{ 'merge|m|M' => \$_merge,
'verbose|v' => \$_verbose,
@@ -1191,7 +1193,13 @@ sub cmd_find_rev {
"$head history\n";
}
my $desired_revision = substr($revision_or_hash, 1);
- $result = $gs->rev_map_get($desired_revision, $uuid);
+ if ($_before) {
+ $result = $gs->find_rev_before($desired_revision, 1);
+ } elsif ($_after) {
+ $result = $gs->find_rev_after($desired_revision, 1);
+ } else {
+ $result = $gs->rev_map_get($desired_revision, $uuid);
+ }
} else {
my (undef, $rev, undef) = cmt_metadata($revision_or_hash);
$result = $rev;