Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2007-02-15 05:47:16 +0300
committerEric Wong <normalperson@yhbt.net>2007-02-23 11:57:13 +0300
commit60d9c97adf96533e4f02d3fc2fecec998104e8ea (patch)
tree0a682347c55b56d45896d610429fea45779fee50 /git-svn.perl
parent7447b4bc837d2f73fb4cd34f2a44a0cb120c5c39 (diff)
git-svn: allow dcommit for those who only fetch from SVM with useSvmProps
This allows users to use SVM (SVN::Mirror) to mirror a remote repository to use dcommit to commit to the repository that SVM was mirroring. When dcommit is used in this manner, the automatic fetch + rebase/reset does not happen; in which case the user will have to manually invoke svm/svk, run 'git svn fetch', and finally 'git rebase'. Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl10
1 files changed, 8 insertions, 2 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 201418e09c..bfe5d6b97e 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -309,8 +309,7 @@ sub cmd_dcommit {
die "Unable to determine upstream SVN information from ",
"$head history:\n $ctx\n";
}
- my $gs = Git::SVN->find_by_url($url) or
- die "Can't determine fetch information for $url\n";
+ my $gs = Git::SVN->find_by_url($url);
my $last_rev;
foreach my $d (@refs) {
if (!verify_ref("$d~1")) {
@@ -345,6 +344,13 @@ sub cmd_dcommit {
}
}
return if $_dry_run;
+ unless ($gs) {
+ warn "Could not determine fetch information for $url\n",
+ "Will not attempt to fetch and rebase commits.\n",
+ "This probably means you have useSvmProps and should\n",
+ "now resync your SVN::Mirror repository.\n";
+ return;
+ }
$gs->fetch;
# we always want to rebase against the current HEAD, not any
# head that was passed to us