summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5253dc3)
raw | patch | inline | side by side (parent: 5253dc3)
author | Sam Vilain <sam.vilain@catalyst.net.nz> | |
Thu, 22 Feb 2007 23:32:29 +0000 (12:32 +1300) | ||
committer | Eric Wong <normalperson@yhbt.net> | |
Fri, 23 Feb 2007 09:01:02 +0000 (01:01 -0800) |
http://foo@blah.com/path is the same as http://blah.com/path, so
remove usernames from URLs before storing them in commits, and when
reading them from commits.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
remove usernames from URLs before storing them in commits, and when
reading them from commits.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
git-svn.perl | patch | blob | history |
diff --git a/git-svn.perl b/git-svn.perl
index a6d98f1608f7a98d3368697717df380f2250686c..ea5afb7f8089732b0f2a1c2cb2eacf9632a245cd 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
$full_url =~ s#^\Q$svm->{replace}\E(/|$)#$svm->{source}$1# or
die "Failed to replace '$svm->{replace}' with ",
"'$svm->{source}' in $full_url\n";
+ # throw away username for storing in records
+ remove_username($full_url);
$log_entry{metadata} = "$full_url\@$r $uuid";
$log_entry{svm_revision} = $r;
$email ||= "$author\@$uuid"
my ($rev_list, $ctx) = command_output_pipe("rev-list", $self->refname);
my $latest;
my $full_url = $self->full_url;
+ remove_username($full_url);
my $svn_uuid;
while (<$rev_list>) {
chomp;
my $c = $_;
die "Non-SHA1: $c\n" unless $c =~ /^$::sha1$/o;
my ($url, $rev, $uuid) = ::cmt_metadata($c);
+ remove_username($url);
# ignore merges (from set-tree)
next if (!defined $rev || !$uuid);
$f
}
+sub remove_username {
+ $_[0] =~ s{^([^:]*://)[^@]+@}{$1};
+}
+
package Git::SVN::Prompt;
use strict;
use warnings;