git: upgraded package to upstream

Upgraded dev-vcs/git to version 1.8.3.2-r1 on amd64, arm, x86

BUG=None
TEST=`cbuildbot chromiumos-sdk`

Change-Id: I5c44b5b5a1abb30532923a4c41cee8fdc6b5178b
Reviewed-on: https://chromium-review.googlesource.com/184300
Reviewed-by: Yu-Ju Hong <yjhong@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest
index ca60299..3b73720 100644
--- a/dev-vcs/git/Manifest
+++ b/dev-vcs/git/Manifest
@@ -1,3 +1,3 @@
-DIST git-1.8.1.5.tar.gz 4306780 SHA256 f8b0be6e53e866f83cde64fa947011ebac56077bd1273c2e894038878986b955 SHA512 19ee4c76c66595f24d5093648202840f39356c111124017beeb32a4d79e8ce362d901ff4a09ad67c1392c5d1e48068a3a4634ad2865d8231e70b197a1cf0fdd3 WHIRLPOOL 559a89140b95bc413b6be5f4d09abc75a038d50381ae0fa61a5fa1c190edf92a5cf9ec2a938ba5d1ccd5563bb19883254773599749bb12488761c125b510b5e2
-DIST git-htmldocs-1.8.1.5.tar.gz 2060977 SHA256 108e34217b2668945ca78b36b08ceeb9fe283617fe68b8f181219076bb225de0 SHA512 0b46a95a47df4326633d10295eeb09d41cee78d9c30775f7784690715e3b5d607ff26027f4cd6036f31dfc458ba2757ceb5ed6ea675a863a5dc69d8e5a7b34f5 WHIRLPOOL d273fbee9fb0a68ef3f0d19ba2249481bd15ff69b289e046e975fccda7639102519aa79bff94f6317e6b73cc414128b8b8619fcda1a910b74770b0aba1694d26
-DIST git-manpages-1.8.1.5.tar.gz 528540 SHA256 b171761f13deb738a2464c9d3967c12539067a34d6f2bfa5739a1006786fd24a SHA512 c0106da12ae3beeba3c23e68b37113082d829fe80160c53df51aac207557a2045c662b4d01b5a1cb211e75f9f7629290b7ecf3907b3bdc828820382793414e8e WHIRLPOOL 3da3b254707c06cb069fa462561634a4f5869fadab6ab8a07301eeb0b2244f159415d409d71c5ebceb4a74ef51f645f2f4c9ca19080a84ee370b5787740d08c2
+DIST git-1.8.3.2.tar.gz 4474347 SHA256 2f798db86859c85608fe4120f52a1b1cb13ca9c4daa4f59eb1dc090280f46473 SHA512 6e19948821dfbf78c5b9ea95614d3c10f4625583e3c17b6c55110b74f28679e525c449179cf49c2587a86c3b7fd7b6a27589824fcea0ec6fb69ca752a6942931 WHIRLPOOL 26892e039b67b35ae9df0a124d0812b36a22f481f146561b733a758b89a00770c05902c2820f2a783bc0fac07ecb335accbc939d21481da821177e0548d6a077
+DIST git-htmldocs-1.8.3.2.tar.gz 2115320 SHA256 805b7fc4399daf9258e8cc28ecc3dd043fdd7f339447f4d84674826916109246 SHA512 0890b60bfa110ca7eaf7aaddbf0aca9574f608addc384cece3c91c8c04ef6397064a0669f3d61d0a65eb120b626ccd85df26f04438ca301f349136cd55e5080a WHIRLPOOL 377c39ac7988a3c1bb6e80333c43878d38fe5eecbb75dcbcbef3c2186842fcc170a552d72be891f1479c336fdd6c5ac1ce1ca2c0adf9a8238bd057f093c3f912
+DIST git-manpages-1.8.3.2.tar.gz 542769 SHA256 599bc8f6c56986a994a237cfebb53b4fab9051576775e32d0353e0455ab84115 SHA512 42fd781b924355c969ce381aae828f877059472741d7b53b0d1aad53f04c8a27b6b161b5dfc353098370ead73ccb9cdc86ac5374cf02829134f8c4d70bcbb7cf WHIRLPOOL 90226006a35b7b6e644f887981f2725238ff428f572425942701614e14fab5c8c5c602746de93a113d83d9b9c76ea1805a9c7cfa353305b0f817c33976048d77
diff --git a/dev-vcs/git/files/git-1.7.12-git-svn-backport.patch b/dev-vcs/git/files/git-1.7.12-git-svn-backport.patch
deleted file mode 100644
index 0a254ec..0000000
--- a/dev-vcs/git/files/git-1.7.12-git-svn-backport.patch
+++ /dev/null
@@ -1,1288 +0,0 @@
-commit 0dfcf2dacd4be3f0c647a987b78def5136429165
-Merge: 889d358 5eaa1fd
-Author: Junio C Hamano <gitster@pobox.com>
-Date:   Tue Aug 21 15:27:57 2012 -0700
-
-    Merge branch 'ms/git-svn-1.7' into jch
-    
-    A series by Michael Schwern via Eric to update git-svn to revamp the
-    way URLs are internally passed around, to make it work with SVN 1.7.
-    
-    Will merge to 'next' after pinging Eric to double check and then to 'master'.
-    
-    * ms/git-svn-1.7:
-      git-svn: remove ad-hoc canonicalizations
-      git-svn: canonicalize newly-minted URLs
-      git-svn: introduce add_path_to_url function
-      git-svn: canonicalize earlier
-      git-svn: replace URL escapes with canonicalization
-      git-svn: attempt to mimic SVN 1.7 URL canonicalization
-      t9107: fix typo
-      t9118: workaround inconsistency between SVN versions
-      Git::SVN{,::Ra}: canonicalize earlier
-      git-svn: path canonicalization uses SVN API
-      Git::SVN::Utils: remove irrelevant comment
-      git-svn: add join_paths() to safely concatenate paths
-      git-svn: factor out _collapse_dotdot function
-      git-svn: use SVN 1.7 to canonicalize when possible
-      git-svn: move canonicalization to Git::SVN::Utils
-      use Git::SVN{,::RA}->url accessor globally
-      use Git::SVN->path accessor globally
-      Git::SVN::Ra: use accessor for URLs
-      Git::SVN: use accessor for URLs internally
-      Git::SVN: use accessors internally for path
-
-diff --git a/git-svn.perl b/git-svn.perl
-index 828b8f0..0d77ffb 100755
---- a/git-svn.perl
-+++ b/git-svn.perl
-@@ -29,7 +29,16 @@ use Git::SVN::Prompt;
- use Git::SVN::Log;
- use Git::SVN::Migration;
- 
--use Git::SVN::Utils qw(fatal can_compress);
-+use Git::SVN::Utils qw(
-+	fatal
-+	can_compress
-+	canonicalize_path
-+	canonicalize_url
-+	join_paths
-+	add_path_to_url
-+	join_paths
-+);
-+
- use Git qw(
- 	git_cmd_try
- 	command
-@@ -1231,7 +1240,7 @@ sub cmd_show_ignore {
- 	my ($url, $rev, $uuid, $gs) = working_head_info('HEAD');
- 	$gs ||= Git::SVN->new;
- 	my $r = (defined $_revision ? $_revision : $gs->ra->get_latest_revnum);
--	$gs->prop_walk($gs->{path}, $r, sub {
-+	$gs->prop_walk($gs->path, $r, sub {
- 		my ($gs, $path, $props) = @_;
- 		print STDOUT "\n# $path\n";
- 		my $s = $props->{'svn:ignore'} or return;
-@@ -1247,7 +1256,7 @@ sub cmd_show_externals {
- 	my ($url, $rev, $uuid, $gs) = working_head_info('HEAD');
- 	$gs ||= Git::SVN->new;
- 	my $r = (defined $_revision ? $_revision : $gs->ra->get_latest_revnum);
--	$gs->prop_walk($gs->{path}, $r, sub {
-+	$gs->prop_walk($gs->path, $r, sub {
- 		my ($gs, $path, $props) = @_;
- 		print STDOUT "\n# $path\n";
- 		my $s = $props->{'svn:externals'} or return;
-@@ -1262,7 +1271,7 @@ sub cmd_create_ignore {
- 	my ($url, $rev, $uuid, $gs) = working_head_info('HEAD');
- 	$gs ||= Git::SVN->new;
- 	my $r = (defined $_revision ? $_revision : $gs->ra->get_latest_revnum);
--	$gs->prop_walk($gs->{path}, $r, sub {
-+	$gs->prop_walk($gs->path, $r, sub {
- 		my ($gs, $path, $props) = @_;
- 		# $path is of the form /path/to/dir/
- 		$path = '.' . $path;
-@@ -1292,31 +1301,6 @@ sub cmd_mkdirs {
- 	$gs->mkemptydirs($_revision);
- }
- 
--sub canonicalize_path {
--	my ($path) = @_;
--	my $dot_slash_added = 0;
--	if (substr($path, 0, 1) ne "/") {
--		$path = "./" . $path;
--		$dot_slash_added = 1;
--	}
--	# File::Spec->canonpath doesn't collapse x/../y into y (for a
--	# good reason), so let's do this manually.
--	$path =~ s#/+#/#g;
--	$path =~ s#/\.(?:/|$)#/#g;
--	$path =~ s#/[^/]+/\.\.##g;
--	$path =~ s#/$##g;
--	$path =~ s#^\./## if $dot_slash_added;
--	$path =~ s#^/##;
--	$path =~ s#^\.$##;
--	return $path;
--}
--
--sub canonicalize_url {
--	my ($url) = @_;
--	$url =~ s#^([^:]+://[^/]*/)(.*)$#$1 . canonicalize_path($2)#e;
--	return $url;
--}
--
- # get_svnprops(PATH)
- # ------------------
- # Helper for cmd_propget and cmd_proplist below.
-@@ -1330,7 +1314,7 @@ sub get_svnprops {
- 	$path = $cmd_dir_prefix . $path;
- 	fatal("No such file or directory: $path") unless -e $path;
- 	my $is_dir = -d $path ? 1 : 0;
--	$path = $gs->{path} . '/' . $path;
-+	$path = join_paths($gs->{path}, $path);
- 
- 	# canonicalize the path (otherwise libsvn will abort or fail to
- 	# find the file)
-@@ -1431,8 +1415,8 @@ sub cmd_commit_diff {
- 			fatal("Needed URL or usable git-svn --id in ",
- 			      "the command-line\n", $usage);
- 		}
--		$url = $gs->{url};
--		$svn_path = $gs->{path};
-+		$url = $gs->url;
-+		$svn_path = $gs->path;
- 	}
- 	unless (defined $_revision) {
- 		fatal("-r|--revision is a required argument\n", $usage);
-@@ -1466,24 +1450,6 @@ sub cmd_commit_diff {
- 	}
- }
- 
--sub escape_uri_only {
--	my ($uri) = @_;
--	my @tmp;
--	foreach (split m{/}, $uri) {
--		s/([^~\w.%+-]|%(?![a-fA-F0-9]{2}))/sprintf("%%%02X",ord($1))/eg;
--		push @tmp, $_;
--	}
--	join('/', @tmp);
--}
--
--sub escape_url {
--	my ($url) = @_;
--	if ($url =~ m#^([^:]+)://([^/]*)(.*)$#) {
--		my ($scheme, $domain, $uri) = ($1, $2, escape_uri_only($3));
--		$url = "$scheme://$domain$uri";
--	}
--	$url;
--}
- 
- sub cmd_info {
- 	my $path = canonicalize_path(defined($_[0]) ? $_[0] : ".");
-@@ -1508,21 +1474,21 @@ sub cmd_info {
- 	# canonicalize_path() will return "" to make libsvn 1.5.x happy,
- 	$path = "." if $path eq "";
- 
--	my $full_url = $url . ($fullpath eq "" ? "" : "/$fullpath");
-+	my $full_url = canonicalize_url( add_path_to_url( $url, $fullpath ) );
- 
- 	if ($_url) {
--		print escape_url($full_url), "\n";
-+		print "$full_url\n";
- 		return;
- 	}
- 
- 	my $result = "Path: $path\n";
- 	$result .= "Name: " . basename($path) . "\n" if $file_type ne "dir";
--	$result .= "URL: " . escape_url($full_url) . "\n";
-+	$result .= "URL: $full_url\n";
- 
- 	eval {
- 		my $repos_root = $gs->repos_root;
- 		Git::SVN::remove_username($repos_root);
--		$result .= "Repository Root: " . escape_url($repos_root) . "\n";
-+		$result .= "Repository Root: " . canonicalize_url($repos_root) . "\n";
- 	};
- 	if ($@) {
- 		$result .= "Repository Root: (offline)\n";
-@@ -1669,7 +1635,9 @@ sub post_fetch_checkout {
- 
- sub complete_svn_url {
- 	my ($url, $path) = @_;
--	$path =~ s#/+$##;
-+	$path = canonicalize_path($path);
-+
-+	# If the path is not a URL...
- 	if ($path !~ m#^[a-z\+]+://#) {
- 		if (!defined $url || $url !~ m#^[a-z\+]+://#) {
- 			fatal("E: '$path' is not a complete URL ",
-@@ -1686,7 +1654,7 @@ sub complete_url_ls_init {
- 		print STDERR "W: $switch not specified\n";
- 		return;
- 	}
--	$repo_path =~ s#/+$##;
-+	$repo_path = canonicalize_path($repo_path);
- 	if ($repo_path =~ m#^[a-z\+]+://#) {
- 		$ra = Git::SVN::Ra->new($repo_path);
- 		$repo_path = '';
-@@ -1697,18 +1665,18 @@ sub complete_url_ls_init {
- 			      "and a separate URL is not specified");
- 		}
- 	}
--	my $url = $ra->{url};
-+	my $url = $ra->url;
- 	my $gs = Git::SVN->init($url, undef, undef, undef, 1);
- 	my $k = "svn-remote.$gs->{repo_id}.url";
- 	my $orig_url = eval { command_oneline(qw/config --get/, $k) };
--	if ($orig_url && ($orig_url ne $gs->{url})) {
-+	if ($orig_url && ($orig_url ne $gs->url)) {
- 		die "$k already set: $orig_url\n",
--		    "wanted to set to: $gs->{url}\n";
-+		    "wanted to set to: $gs->url\n";
- 	}
--	command_oneline('config', $k, $gs->{url}) unless $orig_url;
--	my $remote_path = "$gs->{path}/$repo_path";
-+	command_oneline('config', $k, $gs->url) unless $orig_url;
-+
-+	my $remote_path = join_paths( $gs->path, $repo_path );
- 	$remote_path =~ s{%([0-9A-F]{2})}{chr hex($1)}ieg;
--	$remote_path =~ s#/+#/#g;
- 	$remote_path =~ s#^/##g;
- 	$remote_path .= "/*" if $remote_path !~ /\*/;
- 	my ($n) = ($switch =~ /^--(\w+)/);
-diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm
-index 8478d0c..acb2539 100644
---- a/perl/Git/SVN.pm
-+++ b/perl/Git/SVN.pm
-@@ -23,7 +23,14 @@ use Git qw(
-     command_output_pipe
-     command_close_pipe
- );
--use Git::SVN::Utils qw(fatal can_compress);
-+use Git::SVN::Utils qw(
-+	fatal
-+	can_compress
-+	join_paths
-+	canonicalize_path
-+	canonicalize_url
-+	add_path_to_url
-+);
- 
- my $can_use_yaml;
- BEGIN {
-@@ -195,9 +202,9 @@ sub read_all_remotes {
- 		} elsif (m!^(.+)\.usesvmprops=\s*(.*)\s*$!) {
- 			$r->{$1}->{svm} = {};
- 		} elsif (m!^(.+)\.url=\s*(.*)\s*$!) {
--			$r->{$1}->{url} = $2;
-+			$r->{$1}->{url} = canonicalize_url($2);
- 		} elsif (m!^(.+)\.pushurl=\s*(.*)\s*$!) {
--			$r->{$1}->{pushurl} = $2;
-+			$r->{$1}->{pushurl} = canonicalize_url($2);
- 		} elsif (m!^(.+)\.ignore-refs=\s*(.*)\s*$!) {
- 			$r->{$1}->{ignore_refs_regex} = $2;
- 		} elsif (m!^(.+)\.(branches|tags)=$svn_refspec$!) {
-@@ -290,7 +297,7 @@ sub find_existing_remote {
- 
- sub init_remote_config {
- 	my ($self, $url, $no_write) = @_;
--	$url =~ s!/+$!!; # strip trailing slash
-+	$url = canonicalize_url($url);
- 	my $r = read_all_remotes();
- 	my $existing = find_existing_remote($url, $r);
- 	if ($existing) {
-@@ -314,12 +321,10 @@ sub init_remote_config {
- 				print STDERR "Using higher level of URL: ",
- 					     "$url => $min_url\n";
- 			}
--			my $old_path = $self->{path};
--			$self->{path} = $url;
--			$self->{path} =~ s!^\Q$min_url\E(/|$)!!;
--			if (length $old_path) {
--				$self->{path} .= "/$old_path";
--			}
-+			my $old_path = $self->path;
-+			$url =~ s!^\Q$min_url\E(/|$)!!;
-+			$url = join_paths($url, $old_path);
-+			$self->path($url);
- 			$url = $min_url;
- 		}
- 	}
-@@ -343,18 +348,22 @@ sub init_remote_config {
- 	unless ($no_write) {
- 		command_noisy('config',
- 			      "svn-remote.$self->{repo_id}.url", $url);
--		$self->{path} =~ s{^/}{};
--		$self->{path} =~ s{%([0-9A-F]{2})}{chr hex($1)}ieg;
-+		my $path = $self->path;
-+		$path =~ s{^/}{};
-+		$path =~ s{%([0-9A-F]{2})}{chr hex($1)}ieg;
-+		$self->path($path);
- 		command_noisy('config', '--add',
- 			      "svn-remote.$self->{repo_id}.fetch",
--			      "$self->{path}:".$self->refname);
-+			      $self->path.":".$self->refname);
- 	}
--	$self->{url} = $url;
-+	$self->url($url);
- }
- 
- sub find_by_url { # repos_root and, path are optional
- 	my ($class, $full_url, $repos_root, $path) = @_;
- 
-+	$full_url = canonicalize_url($full_url);
-+
- 	return undef unless defined $full_url;
- 	remove_username($full_url);
- 	remove_username($repos_root) if defined $repos_root;
-@@ -393,6 +402,11 @@ sub find_by_url { # repos_root and, path are optional
- 			}
- 			$p =~ s#^\Q$z\E(?:/|$)#$prefix# or next;
- 		}
-+
-+		# remote fetch paths are not URI escaped.  Decode ours
-+		# so they match
-+		$p = uri_decode($p);
-+
- 		foreach my $f (keys %$fetch) {
- 			next if $f ne $p;
- 			return Git::SVN->new($fetch->{$f}, $repo_id, $f);
-@@ -435,20 +449,25 @@ sub new {
- 		}
- 	}
- 	my $self = _new($class, $repo_id, $ref_id, $path);
--	if (!defined $self->{path} || !length $self->{path}) {
-+	if (!defined $self->path || !length $self->path) {
- 		my $fetch = command_oneline('config', '--get',
- 		                            "svn-remote.$repo_id.fetch",
- 		                            ":$ref_id\$") or
- 		     die "Failed to read \"svn-remote.$repo_id.fetch\" ",
- 		         "\":$ref_id\$\" in config\n";
--		($self->{path}, undef) = split(/\s*:\s*/, $fetch);
-+		my($path) = split(/\s*:\s*/, $fetch);
-+		$self->path($path);
- 	}
--	$self->{path} =~ s{/+}{/}g;
--	$self->{path} =~ s{\A/}{};
--	$self->{path} =~ s{/\z}{};
--	$self->{url} = command_oneline('config', '--get',
--	                               "svn-remote.$repo_id.url") or
-+	{
-+		my $path = $self->path;
-+		$path =~ s{\A/}{};
-+		$path =~ s{/\z}{};
-+		$self->path($path);
-+	}
-+	my $url = command_oneline('config', '--get',
-+	                          "svn-remote.$repo_id.url") or
-                   die "Failed to read \"svn-remote.$repo_id.url\" in config\n";
-+	$self->url($url);
- 	$self->{pushurl} = eval { command_oneline('config', '--get',
- 	                          "svn-remote.$repo_id.pushurl") };
- 	$self->rebuild;
-@@ -552,8 +571,7 @@ sub _set_svm_vars {
- 		# username is of no interest
- 		$src =~ s{(^[a-z\+]*://)[^/@]*@}{$1};
- 
--		my $replace = $ra->{url};
--		$replace .= "/$path" if length $path;
-+		my $replace = add_path_to_url($ra->url, $path);
- 
- 		my $section = "svn-remote.$self->{repo_id}";
- 		tmp_config("$section.svm-source", $src);
-@@ -567,20 +585,21 @@ sub _set_svm_vars {
- 	}
- 
- 	my $r = $ra->get_latest_revnum;
--	my $path = $self->{path};
-+	my $path = $self->path;
- 	my %tried;
- 	while (length $path) {
--		unless ($tried{"$self->{url}/$path"}) {
-+		my $try = add_path_to_url($self->url, $path);
-+		unless ($tried{$try}) {
- 			return $ra if $self->read_svm_props($ra, $path, $r);
--			$tried{"$self->{url}/$path"} = 1;
-+			$tried{$try} = 1;
- 		}
- 		$path =~ s#/?[^/]+$##;
- 	}
- 	die "Path: '$path' should be ''\n" if $path ne '';
- 	return $ra if $self->read_svm_props($ra, $path, $r);
--	$tried{"$self->{url}/$path"} = 1;
-+	$tried{ add_path_to_url($self->url, $path) } = 1;
- 
--	if ($ra->{repos_root} eq $self->{url}) {
-+	if ($ra->{repos_root} eq $self->url) {
- 		die @err, (map { "  $_\n" } keys %tried), "\n";
- 	}
- 
-@@ -590,20 +609,21 @@ sub _set_svm_vars {
- 	$path = $ra->{svn_path};
- 	$ra = Git::SVN::Ra->new($ra->{repos_root});
- 	while (length $path) {
--		unless ($tried{"$ra->{url}/$path"}) {
-+		my $try = add_path_to_url($ra->url, $path);
-+		unless ($tried{$try}) {
- 			$ok = $self->read_svm_props($ra, $path, $r);
- 			last if $ok;
--			$tried{"$ra->{url}/$path"} = 1;
-+			$tried{$try} = 1;
- 		}
- 		$path =~ s#/?[^/]+$##;
- 	}
- 	die "Path: '$path' should be ''\n" if $path ne '';
- 	$ok ||= $self->read_svm_props($ra, $path, $r);
--	$tried{"$ra->{url}/$path"} = 1;
-+	$tried{ add_path_to_url($ra->url, $path) } = 1;
- 	if (!$ok) {
- 		die @err, (map { "  $_\n" } keys %tried), "\n";
- 	}
--	Git::SVN::Ra->new($self->{url});
-+	Git::SVN::Ra->new($self->url);
- }
- 
- sub svnsync {
-@@ -670,7 +690,7 @@ sub ra_uuid {
- 		if (!$@ && $uuid && $uuid =~ /^([a-f\d\-]{30,})$/i) {
- 			$self->{ra_uuid} = $uuid;
- 		} else {
--			die "ra_uuid called without URL\n" unless $self->{url};
-+			die "ra_uuid called without URL\n" unless $self->url;
- 			$self->{ra_uuid} = $self->ra->get_uuid;
- 			tmp_config('--add', $key, $self->{ra_uuid});
- 		}
-@@ -694,7 +714,7 @@ sub repos_root {
- 
- sub ra {
- 	my ($self) = shift;
--	my $ra = Git::SVN::Ra->new($self->{url});
-+	my $ra = Git::SVN::Ra->new($self->url);
- 	$self->_set_repos_root($ra->{repos_root});
- 	if ($self->use_svm_props && !$self->{svm}) {
- 		if ($self->no_metadata) {
-@@ -728,7 +748,7 @@ sub prop_walk {
- 	$path =~ s#^/*#/#g;
- 	my $p = $path;
- 	# Strip the irrelevant part of the path.
--	$p =~ s#^/+\Q$self->{path}\E(/|$)#/#;
-+	$p =~ s#^/+\Q@{[$self->path]}\E(/|$)#/#;
- 	# Ensure the path is terminated by a `/'.
- 	$p =~ s#/*$#/#;
- 
-@@ -749,7 +769,7 @@ sub prop_walk {
- 
- 	foreach (sort keys %$dirent) {
- 		next if $dirent->{$_}->{kind} != $SVN::Node::dir;
--		$self->prop_walk($self->{path} . $p . $_, $rev, $sub);
-+		$self->prop_walk($self->path . $p . $_, $rev, $sub);
- 	}
- }
- 
-@@ -919,20 +939,19 @@ sub rewrite_uuid {
- 
- sub metadata_url {
- 	my ($self) = @_;
--	($self->rewrite_root || $self->{url}) .
--	   (length $self->{path} ? '/' . $self->{path} : '');
-+	my $url = $self->rewrite_root || $self->url;
-+	return canonicalize_url( add_path_to_url( $url, $self->path ) );
- }
- 
- sub full_url {
- 	my ($self) = @_;
--	$self->{url} . (length $self->{path} ? '/' . $self->{path} : '');
-+	return canonicalize_url( add_path_to_url( $self->url, $self->path ) );
- }
- 
- sub full_pushurl {
- 	my ($self) = @_;
- 	if ($self->{pushurl}) {
--		return $self->{pushurl} . (length $self->{path} ? '/' .
--		       $self->{path} : '');
-+		return canonicalize_url( add_path_to_url( $self->{pushurl}, $self->path ) );
- 	} else {
- 		return $self->full_url;
- 	}
-@@ -1048,20 +1067,20 @@ sub do_git_commit {
- 
- sub match_paths {
- 	my ($self, $paths, $r) = @_;
--	return 1 if $self->{path} eq '';
--	if (my $path = $paths->{"/$self->{path}"}) {
-+	return 1 if $self->path eq '';
-+	if (my $path = $paths->{"/".$self->path}) {
- 		return ($path->{action} eq 'D') ? 0 : 1;
- 	}
--	$self->{path_regex} ||= qr/^\/\Q$self->{path}\E\//;
-+	$self->{path_regex} ||= qr{^/\Q@{[$self->path]}\E/};
- 	if (grep /$self->{path_regex}/, keys %$paths) {
- 		return 1;
- 	}
- 	my $c = '';
--	foreach (split m#/#, $self->{path}) {
-+	foreach (split m#/#, $self->path) {
- 		$c .= "/$_";
- 		next unless ($paths->{$c} &&
- 		             ($paths->{$c}->{action} =~ /^[AR]$/));
--		if ($self->ra->check_path($self->{path}, $r) ==
-+		if ($self->ra->check_path($self->path, $r) ==
- 		    $SVN::Node::dir) {
- 			return 1;
- 		}
-@@ -1075,14 +1094,14 @@ sub find_parent_branch {
- 	unless (defined $paths) {
- 		my $err_handler = $SVN::Error::handler;
- 		$SVN::Error::handler = \&Git::SVN::Ra::skip_unknown_revs;
--		$self->ra->get_log([$self->{path}], $rev, $rev, 0, 1, 1,
-+		$self->ra->get_log([$self->path], $rev, $rev, 0, 1, 1,
- 				   sub { $paths = $_[0] });
- 		$SVN::Error::handler = $err_handler;
- 	}
- 	return undef unless defined $paths;
- 
- 	# look for a parent from another branch:
--	my @b_path_components = split m#/#, $self->{path};
-+	my @b_path_components = split m#/#, $self->path;
- 	my @a_path_components;
- 	my $i;
- 	while (@b_path_components) {
-@@ -1099,8 +1118,8 @@ sub find_parent_branch {
- 	}
- 	my $r = $i->{copyfrom_rev};
- 	my $repos_root = $self->ra->{repos_root};
--	my $url = $self->ra->{url};
--	my $new_url = $url . $branch_from;
-+	my $url = $self->ra->url;
-+	my $new_url = canonicalize_url( add_path_to_url( $url, $branch_from ) );
- 	print STDERR  "Found possible branch point: ",
- 	              "$new_url => ", $self->full_url, ", $r\n"
- 	              unless $::_q > 1;
-@@ -1114,7 +1133,7 @@ sub find_parent_branch {
- 			($base, $head) = parse_revision_argument(0, $r);
- 		} else {
- 			if ($r0 < $r) {
--				$gs->ra->get_log([$gs->{path}], $r0 + 1, $r, 1,
-+				$gs->ra->get_log([$gs->path], $r0 + 1, $r, 1,
- 					0, 1, sub { $base = $_[1] - 1 });
- 			}
- 		}
-@@ -1136,7 +1155,7 @@ sub find_parent_branch {
- 			# at the moment), so we can't rely on it
- 			$self->{last_rev} = $r0;
- 			$self->{last_commit} = $parent;
--			$ed = Git::SVN::Fetcher->new($self, $gs->{path});
-+			$ed = Git::SVN::Fetcher->new($self, $gs->path);
- 			$gs->ra->gs_do_switch($r0, $rev, $gs,
- 					      $self->full_url, $ed)
- 			  or die "SVN connection failed somewhere...\n";
-@@ -1235,7 +1254,7 @@ sub mkemptydirs {
- 		close $fh;
- 	}
- 
--	my $strip = qr/\A\Q$self->{path}\E(?:\/|$)/;
-+	my $strip = qr/\A\Q@{[$self->path]}\E(?:\/|$)/;
- 	foreach my $d (sort keys %empty_dirs) {
- 		$d = uri_decode($d);
- 		$d =~ s/$strip//;
-@@ -1429,12 +1448,11 @@ sub find_extra_svk_parents {
- 	for my $ticket ( @tickets ) {
- 		my ($uuid, $path, $rev) = split /:/, $ticket;
- 		if ( $uuid eq $self->ra_uuid ) {
--			my $url = $self->{url};
--			my $repos_root = $url;
-+			my $repos_root = $self->url;
- 			my $branch_from = $path;
- 			$branch_from =~ s{^/}{};
--			my $gs = $self->other_gs($repos_root."/".$branch_from,
--			                         $url,
-+			my $gs = $self->other_gs(add_path_to_url( $repos_root, $branch_from ),
-+			                         $repos_root,
- 			                         $branch_from,
- 			                         $rev,
- 			                         $self->{ref_id});
-@@ -1693,7 +1711,7 @@ sub find_extra_svn_parents {
- 	# are now marked as merge, we can add the tip as a parent.
- 	my @merges = split "\n", $mergeinfo;
- 	my @merge_tips;
--	my $url = $self->{url};
-+	my $url = $self->url;
- 	my $uuid = $self->ra_uuid;
- 	my %ranges;
- 	for my $merge ( @merges ) {
-@@ -1875,8 +1893,9 @@ sub make_log_entry {
- 		$email ||= "$author\@$uuid";
- 		$commit_email ||= "$author\@$uuid";
- 	} elsif ($self->use_svnsync_props) {
--		my $full_url = $self->svnsync->{url};
--		$full_url .= "/$self->{path}" if length $self->{path};
-+		my $full_url = canonicalize_url(
-+			add_path_to_url( $self->svnsync->{url}, $self->path )
-+		);
- 		remove_username($full_url);
- 		my $uuid = $self->svnsync->{uuid};
- 		$log_entry{metadata} = "$full_url\@$rev $uuid";
-@@ -1923,7 +1942,7 @@ sub set_tree {
- 	                tree_b => $tree,
- 	                editor_cb => sub {
- 			       $self->set_tree_cb($log_entry, $tree, @_) },
--	                svn_path => $self->{path} );
-+	                svn_path => $self->path );
- 	if (!Git::SVN::Editor->new(\%ed_opts)->apply_diff) {
- 		print "No changes\nr$self->{last_rev} = $tree\n";
- 	}
-@@ -2299,10 +2318,39 @@ sub _new {
- 
- 	$_[3] = $path = '' unless (defined $path);
- 	mkpath([$dir]);
--	bless {
-+	my $obj = bless {
- 		ref_id => $ref_id, dir => $dir, index => "$dir/index",
--	        path => $path, config => "$ENV{GIT_DIR}/svn/config",
-+	        config => "$ENV{GIT_DIR}/svn/config",
- 	        map_root => "$dir/.rev_map", repo_id => $repo_id }, $class;
-+
-+	# Ensure it gets canonicalized
-+	$obj->path($path);
-+
-+	return $obj;
-+}
-+
-+sub path {
-+	my $self = shift;
-+
-+	if (@_) {
-+		my $path = shift;
-+		$self->{path} = canonicalize_path($path);
-+		return;
-+	}
-+
-+	return $self->{path};
-+}
-+
-+sub url {
-+	my $self = shift;
-+
-+	if (@_) {
-+		my $url = shift;
-+		$self->{url} = canonicalize_url($url);
-+		return;
-+	}
-+
-+	return $self->{url};
- }
- 
- # for read-only access of old .rev_db formats
-diff --git a/perl/Git/SVN/Fetcher.pm b/perl/Git/SVN/Fetcher.pm
-index 76fae9b..046a7a2 100644
---- a/perl/Git/SVN/Fetcher.pm
-+++ b/perl/Git/SVN/Fetcher.pm
-@@ -83,7 +83,7 @@ sub _mark_empty_symlinks {
- 	chomp(my $empty_blob = `git hash-object -t blob --stdin < /dev/null`);
- 	my ($ls, $ctx) = command_output_pipe(qw/ls-tree -r -z/, $cmt);
- 	local $/ = "\0";
--	my $pfx = defined($switch_path) ? $switch_path : $git_svn->{path};
-+	my $pfx = defined($switch_path) ? $switch_path : $git_svn->path;
- 	$pfx .= '/' if length($pfx);
- 	while (<$ls>) {
- 		chomp;
-diff --git a/perl/Git/SVN/Migration.pm b/perl/Git/SVN/Migration.pm
-index 75d7429..30daf35 100644
---- a/perl/Git/SVN/Migration.pm
-+++ b/perl/Git/SVN/Migration.pm
-@@ -177,14 +177,14 @@ sub minimize_connections {
- 		my $ra = Git::SVN::Ra->new($url);
- 
- 		# skip existing cases where we already connect to the root
--		if (($ra->{url} eq $ra->{repos_root}) ||
-+		if (($ra->url eq $ra->{repos_root}) ||
- 		    ($ra->{repos_root} eq $repo_id)) {
--			$root_repos->{$ra->{url}} = $repo_id;
-+			$root_repos->{$ra->url} = $repo_id;
- 			next;
- 		}
- 
- 		my $root_ra = Git::SVN::Ra->new($ra->{repos_root});
--		my $root_path = $ra->{url};
-+		my $root_path = $ra->url;
- 		$root_path =~ s#^\Q$ra->{repos_root}\E(/|$)##;
- 		foreach my $path (keys %$fetch) {
- 			my $ref_id = $fetch->{$path};
-diff --git a/perl/Git/SVN/Ra.pm b/perl/Git/SVN/Ra.pm
-index 23ff43e..90ec30b 100644
---- a/perl/Git/SVN/Ra.pm
-+++ b/perl/Git/SVN/Ra.pm
-@@ -3,6 +3,12 @@ use vars qw/@ISA $config_dir $_ignore_refs_regex $_log_window_size/;
- use strict;
- use warnings;
- use SVN::Client;
-+use Git::SVN::Utils qw(
-+	canonicalize_url
-+	canonicalize_path
-+	add_path_to_url
-+);
-+
- use SVN::Ra;
- BEGIN {
- 	@ISA = qw(SVN::Ra);
-@@ -62,29 +68,11 @@ sub _auth_providers () {
- 	\@rv;
- }
- 
--sub escape_uri_only {
--	my ($uri) = @_;
--	my @tmp;
--	foreach (split m{/}, $uri) {
--		s/([^~\w.%+-]|%(?![a-fA-F0-9]{2}))/sprintf("%%%02X",ord($1))/eg;
--		push @tmp, $_;
--	}
--	join('/', @tmp);
--}
--
--sub escape_url {
--	my ($url) = @_;
--	if ($url =~ m#^(https?)://([^/]+)(.*)$#) {
--		my ($scheme, $domain, $uri) = ($1, $2, escape_uri_only($3));
--		$url = "$scheme://$domain$uri";
--	}
--	$url;
--}
- 
- sub new {
- 	my ($class, $url) = @_;
--	$url =~ s!/+$!!;
--	return $RA if ($RA && $RA->{url} eq $url);
-+	$url = canonicalize_url($url);
-+	return $RA if ($RA && $RA->url eq $url);
- 
- 	::_req_svn();
- 
-@@ -115,17 +103,34 @@ sub new {
- 			$Git::SVN::Prompt::_no_auth_cache = 1;
- 		}
- 	} # no warnings 'once'
--	my $self = SVN::Ra->new(url => escape_url($url), auth => $baton,
-+
-+	my $self = SVN::Ra->new(url => $url, auth => $baton,
- 	                      config => $config,
- 			      pool => SVN::Pool->new,
- 	                      auth_provider_callbacks => $callbacks);
--	$self->{url} = $url;
-+	$RA = bless $self, $class;
-+
-+	# Make sure its canonicalized
-+	$self->url($url);
- 	$self->{svn_path} = $url;
- 	$self->{repos_root} = $self->get_repos_root;
- 	$self->{svn_path} =~ s#^\Q$self->{repos_root}\E(/|$)##;
- 	$self->{cache} = { check_path => { r => 0, data => {} },
- 	                   get_dir => { r => 0, data => {} } };
--	$RA = bless $self, $class;
-+
-+	return $RA;
-+}
-+
-+sub url {
-+	my $self = shift;
-+
-+	if (@_) {
-+		my $url = shift;
-+		$self->{url} = canonicalize_url($url);
-+		return;
-+	}
-+
-+	return $self->{url};
- }
- 
- sub check_path {
-@@ -195,6 +200,7 @@ sub get_log {
- 				qw/copyfrom_path copyfrom_rev action/;
- 			if ($s{'copyfrom_path'}) {
- 				$s{'copyfrom_path'} =~ s/$prefix_regex//;
-+				$s{'copyfrom_path'} = canonicalize_path($s{'copyfrom_path'});
- 			}
- 			$_[0]{$p} = \%s;
- 		}
-@@ -246,7 +252,7 @@ sub get_commit_editor {
- sub gs_do_update {
- 	my ($self, $rev_a, $rev_b, $gs, $editor) = @_;
- 	my $new = ($rev_a == $rev_b);
--	my $path = $gs->{path};
-+	my $path = $gs->path;
- 
- 	if ($new && -e $gs->{index}) {
- 		unlink $gs->{index} or die
-@@ -282,30 +288,33 @@ sub gs_do_update {
- # svn_ra_reparent didn't work before 1.4)
- sub gs_do_switch {
- 	my ($self, $rev_a, $rev_b, $gs, $url_b, $editor) = @_;
--	my $path = $gs->{path};
-+	my $path = $gs->path;
- 	my $pool = SVN::Pool->new;
- 
--	my $full_url = $self->{url};
--	my $old_url = $full_url;
--	$full_url .= '/' . $path if length $path;
-+	my $old_url = $self->url;
-+	my $full_url = add_path_to_url( $self->url, $path );
- 	my ($ra, $reparented);
- 
- 	if ($old_url =~ m#^svn(\+ssh)?://# ||
- 	    ($full_url =~ m#^https?://# &&
--	     escape_url($full_url) ne $full_url)) {
-+	     canonicalize_url($full_url) ne $full_url)) {
- 		$_[0] = undef;
- 		$self = undef;
- 		$RA = undef;
- 		$ra = Git::SVN::Ra->new($full_url);
- 		$ra_invalid = 1;
- 	} elsif ($old_url ne $full_url) {
--		SVN::_Ra::svn_ra_reparent($self->{session}, $full_url, $pool);
--		$self->{url} = $full_url;
-+		SVN::_Ra::svn_ra_reparent(
-+			$self->{session},
-+			canonicalize_url($full_url),
-+			$pool
-+		);
-+		$self->url($full_url);
- 		$reparented = 1;
- 	}
- 
- 	$ra ||= $self;
--	$url_b = escape_url($url_b);
-+	$url_b = canonicalize_url($url_b);
- 	my $reporter = $ra->do_switch($rev_b, '', 1, $url_b, $editor, $pool);
- 	my @lock = (::compare_svn_version('1.2.0') >= 0) ? (undef) : ();
- 	$reporter->set_path('', $rev_a, 0, @lock, $pool);
-@@ -313,7 +322,7 @@ sub gs_do_switch {
- 
- 	if ($reparented) {
- 		SVN::_Ra::svn_ra_reparent($self->{session}, $old_url, $pool);
--		$self->{url} = $old_url;
-+		$self->url($old_url);
- 	}
- 
- 	$pool->clear;
-@@ -326,7 +335,7 @@ sub longest_common_path {
- 	my $common_max = scalar @$gsv;
- 
- 	foreach my $gs (@$gsv) {
--		my @tmp = split m#/#, $gs->{path};
-+		my @tmp = split m#/#, $gs->path;
- 		my $p = '';
- 		foreach (@tmp) {
- 			$p .= length($p) ? "/$_" : $_;
-@@ -362,7 +371,7 @@ sub gs_fetch_loop_common {
- 	my $inc = $_log_window_size;
- 	my ($min, $max) = ($base, $head < $base + $inc ? $head : $base + $inc);
- 	my $longest_path = longest_common_path($gsv, $globs);
--	my $ra_url = $self->{url};
-+	my $ra_url = $self->url;
- 	my $find_trailing_edge;
- 	while (1) {
- 		my %revs;
-@@ -508,7 +517,7 @@ sub match_globs {
- 				 ($self->check_path($p, $r) !=
- 				  $SVN::Node::dir));
- 			next unless $p =~ /$g->{path}->{regex}/;
--			$exists->{$p} = Git::SVN->init($self->{url}, $p, undef,
-+			$exists->{$p} = Git::SVN->init($self->url, $p, undef,
- 					 $g->{ref}->full_path($de), 1);
- 		}
- 	}
-@@ -532,7 +541,7 @@ sub match_globs {
- 			next if ($self->check_path($pathname, $r) !=
- 			         $SVN::Node::dir);
- 			$exists->{$pathname} = Git::SVN->init(
--			                      $self->{url}, $pathname, undef,
-+			                      $self->url, $pathname, undef,
- 			                      $g->{ref}->full_path($p), 1);
- 		}
- 		my $c = '';
-@@ -548,19 +557,20 @@ sub match_globs {
- 
- sub minimize_url {
- 	my ($self) = @_;
--	return $self->{url} if ($self->{url} eq $self->{repos_root});
-+	return $self->url if ($self->url eq $self->{repos_root});
- 	my $url = $self->{repos_root};
- 	my @components = split(m!/!, $self->{svn_path});
- 	my $c = '';
- 	do {
--		$url .= "/$c" if length $c;
-+		$url = add_path_to_url($url, $c);
- 		eval {
- 			my $ra = (ref $self)->new($url);
- 			my $latest = $ra->get_latest_revnum;
- 			$ra->get_log("", $latest, 0, 1, 0, 1, sub {});
- 		};
- 	} while ($@ && ($c = shift @components));
--	$url;
-+
-+	return canonicalize_url($url);
- }
- 
- sub can_do_switch {
-@@ -568,7 +578,7 @@ sub can_do_switch {
- 	unless (defined $can_do_switch) {
- 		my $pool = SVN::Pool->new;
- 		my $rep = eval {
--			$self->do_switch(1, '', 0, $self->{url},
-+			$self->do_switch(1, '', 0, $self->url,
- 			                 SVN::Delta::Editor->new, $pool);
- 		};
- 		if ($@) {
-diff --git a/perl/Git/SVN/Utils.pm b/perl/Git/SVN/Utils.pm
-index 496006b..4bb4dde 100644
---- a/perl/Git/SVN/Utils.pm
-+++ b/perl/Git/SVN/Utils.pm
-@@ -3,9 +3,18 @@ package Git::SVN::Utils;
- use strict;
- use warnings;
- 
-+use SVN::Core;
-+
- use base qw(Exporter);
- 
--our @EXPORT_OK = qw(fatal can_compress);
-+our @EXPORT_OK = qw(
-+	fatal
-+	can_compress
-+	canonicalize_path
-+	canonicalize_url
-+	join_paths
-+	add_path_to_url
-+);
- 
- 
- =head1 NAME
-@@ -56,4 +65,169 @@ sub can_compress {
- }
- 
- 
-+=head3 canonicalize_path
-+
-+    my $canoncalized_path = canonicalize_path($path);
-+
-+Converts $path into a canonical form which is safe to pass to the SVN
-+API as a file path.
-+
-+=cut
-+
-+# Turn foo/../bar into bar
-+sub _collapse_dotdot {
-+	my $path = shift;
-+
-+	1 while $path =~ s{/[^/]+/+\.\.}{};
-+	1 while $path =~ s{[^/]+/+\.\./}{};
-+	1 while $path =~ s{[^/]+/+\.\.}{};
-+
-+	return $path;
-+}
-+
-+
-+sub canonicalize_path {
-+	my $path = shift;
-+	my $rv;
-+
-+	# The 1.7 way to do it
-+	if ( defined &SVN::_Core::svn_dirent_canonicalize ) {
-+		$path = _collapse_dotdot($path);
-+		$rv = SVN::_Core::svn_dirent_canonicalize($path);
-+	}
-+	# The 1.6 way to do it
-+	# This can return undef on subversion-perl-1.4.2-2.el5 (CentOS 5.2)
-+	elsif ( defined &SVN::_Core::svn_path_canonicalize ) {
-+		$path = _collapse_dotdot($path);
-+		$rv = SVN::_Core::svn_path_canonicalize($path);
-+	}
-+
-+	return $rv if defined $rv;
-+
-+	# No SVN API canonicalization is available, or the SVN API
-+	# didn't return a successful result, do it ourselves
-+	return _canonicalize_path_ourselves($path);
-+}
-+
-+
-+sub _canonicalize_path_ourselves {
-+	my ($path) = @_;
-+	my $dot_slash_added = 0;
-+	if (substr($path, 0, 1) ne "/") {
-+		$path = "./" . $path;
-+		$dot_slash_added = 1;
-+	}
-+	$path =~ s#/+#/#g;
-+	$path =~ s#/\.(?:/|$)#/#g;
-+	$path = _collapse_dotdot($path);
-+	$path =~ s#/$##g;
-+	$path =~ s#^\./## if $dot_slash_added;
-+	$path =~ s#^/##;
-+	$path =~ s#^\.$##;
-+	return $path;
-+}
-+
-+
-+=head3 canonicalize_url
-+
-+    my $canonicalized_url = canonicalize_url($url);
-+
-+Converts $url into a canonical form which is safe to pass to the SVN
-+API as a URL.
-+
-+=cut
-+
-+sub canonicalize_url {
-+	my $url = shift;
-+
-+	# The 1.7 way to do it
-+	if ( defined &SVN::_Core::svn_uri_canonicalize ) {
-+		return SVN::_Core::svn_uri_canonicalize($url);
-+	}
-+	# There wasn't a 1.6 way to do it, so we do it ourself.
-+	else {
-+		return _canonicalize_url_ourselves($url);
-+	}
-+}
-+
-+
-+sub _canonicalize_url_path {
-+	my ($uri_path) = @_;
-+
-+	my @parts;
-+	foreach my $part (split m{/+}, $uri_path) {
-+		$part =~ s/([^~\w.%+-]|%(?![a-fA-F0-9]{2}))/sprintf("%%%02X",ord($1))/eg;
-+		push @parts, $part;
-+	}
-+
-+	return join('/', @parts);
-+}
-+
-+sub _canonicalize_url_ourselves {
-+	my ($url) = @_;
-+	if ($url =~ m#^([^:]+)://([^/]*)(.*)$#) {
-+		my ($scheme, $domain, $uri) = ($1, $2, _canonicalize_url_path(canonicalize_path($3)));
-+		$url = "$scheme://$domain$uri";
-+	}
-+	$url;
-+}
-+
-+
-+=head3 join_paths
-+
-+    my $new_path = join_paths(@paths);
-+
-+Appends @paths together into a single path.  Any empty paths are ignored.
-+
-+=cut
-+
-+sub join_paths {
-+	my @paths = @_;
-+
-+	@paths = grep { defined $_ && length $_ } @paths;
-+
-+	return '' unless @paths;
-+	return $paths[0] if @paths == 1;
-+
-+	my $new_path = shift @paths;
-+	$new_path =~ s{/+$}{};
-+
-+	my $last_path = pop @paths;
-+	$last_path =~ s{^/+}{};
-+
-+	for my $path (@paths) {
-+		$path =~ s{^/+}{};
-+		$path =~ s{/+$}{};
-+		$new_path .= "/$path";
-+	}
-+
-+	return $new_path .= "/$last_path";
-+}
-+
-+
-+=head3 add_path_to_url
-+
-+    my $new_url = add_path_to_url($url, $path);
-+
-+Appends $path onto the $url.  If $path is empty, $url is returned unchanged.
-+
-+=cut
-+
-+sub add_path_to_url {
-+	my($url, $path) = @_;
-+
-+	return $url if !defined $path or !length $path;
-+
-+	# Strip trailing and leading slashes so we don't
-+	# wind up with http://x.com///path
-+	$url  =~ s{/+$}{};
-+	$path =~ s{^/+}{};
-+
-+	# If a path has a % in it, URI escape it so it's not
-+	# mistaken for a URI escape later.
-+	$path =~ s{%}{%25}g;
-+
-+	return join '/', $url, $path;
-+}
-+
- 1;
-diff --git a/t/Git-SVN/Utils/add_path_to_url.t b/t/Git-SVN/Utils/add_path_to_url.t
-new file mode 100644
-index 0000000..bfbd878
---- /dev/null
-+++ b/t/Git-SVN/Utils/add_path_to_url.t
-@@ -0,0 +1,27 @@
-+#!/usr/bin/env perl
-+
-+use strict;
-+use warnings;
-+
-+use Test::More 'no_plan';
-+
-+use Git::SVN::Utils qw(
-+	add_path_to_url
-+);
-+
-+# A reference cannot be a hash key, so we use an array.
-+my @tests = (
-+	["http://x.com", "bar"]			=> 'http://x.com/bar',
-+	["http://x.com", ""]			=> 'http://x.com',
-+	["http://x.com/foo/", undef]		=> 'http://x.com/foo/',
-+	["http://x.com/foo/", "/bar/baz/"]	=> 'http://x.com/foo/bar/baz/',
-+	["http://x.com", 'per%cent']		=> 'http://x.com/per%25cent',
-+);
-+
-+while(@tests) {
-+	my($have, $want) = splice @tests, 0, 2;
-+
-+	my $args = join ", ", map { qq['$_'] } map { defined($_) ? $_ : 'undef' } @$have;
-+	my $name = "add_path_to_url($args) eq $want";
-+	is add_path_to_url(@$have), $want, $name;
-+}
-diff --git a/t/Git-SVN/Utils/canonicalize_url.t b/t/Git-SVN/Utils/canonicalize_url.t
-new file mode 100644
-index 0000000..05795ab
---- /dev/null
-+++ b/t/Git-SVN/Utils/canonicalize_url.t
-@@ -0,0 +1,26 @@
-+#!/usr/bin/env perl
-+
-+# Test our own home rolled URL canonicalizer.  Test the private one
-+# directly because we can't predict what the SVN API is doing to do.
-+
-+use strict;
-+use warnings;
-+
-+use Test::More 'no_plan';
-+
-+use Git::SVN::Utils;
-+my $canonicalize_url = \&Git::SVN::Utils::_canonicalize_url_ourselves;
-+
-+my %tests = (
-+	"http://x.com"			=> "http://x.com",
-+	"http://x.com/"			=> "http://x.com",
-+	"http://x.com/foo/bar"		=> "http://x.com/foo/bar",
-+	"http://x.com//foo//bar//"	=> "http://x.com/foo/bar",
-+	"http://x.com/  /%/"		=> "http://x.com/%20%20/%25",
-+);
-+
-+for my $arg (keys %tests) {
-+	my $want = $tests{$arg};
-+
-+	is $canonicalize_url->($arg), $want, "canonicalize_url('$arg') => $want";
-+}
-diff --git a/t/Git-SVN/Utils/collapse_dotdot.t b/t/Git-SVN/Utils/collapse_dotdot.t
-new file mode 100644
-index 0000000..1da1cce
---- /dev/null
-+++ b/t/Git-SVN/Utils/collapse_dotdot.t
-@@ -0,0 +1,23 @@
-+#!/usr/bin/env perl
-+
-+use strict;
-+use warnings;
-+
-+use Test::More 'no_plan';
-+
-+use Git::SVN::Utils;
-+my $collapse_dotdot = \&Git::SVN::Utils::_collapse_dotdot;
-+
-+my %tests = (
-+	"foo/bar/baz"			=> "foo/bar/baz",
-+	".."				=> "..",
-+	"foo/.."			=> "",
-+	"/foo/bar/../../baz"		=> "/baz",
-+	"deeply/.././deeply/nested"	=> "./deeply/nested",
-+);
-+
-+for my $arg (keys %tests) {
-+	my $want = $tests{$arg};
-+
-+	is $collapse_dotdot->($arg), $want, "_collapse_dotdot('$arg') => $want";
-+}
-diff --git a/t/Git-SVN/Utils/join_paths.t b/t/Git-SVN/Utils/join_paths.t
-new file mode 100644
-index 0000000..d4488e7
---- /dev/null
-+++ b/t/Git-SVN/Utils/join_paths.t
-@@ -0,0 +1,32 @@
-+#!/usr/bin/env perl
-+
-+use strict;
-+use warnings;
-+
-+use Test::More 'no_plan';
-+
-+use Git::SVN::Utils qw(
-+	join_paths
-+);
-+
-+# A reference cannot be a hash key, so we use an array.
-+my @tests = (
-+	[]					=> '',
-+	["/x.com", "bar"]			=> '/x.com/bar',
-+	["x.com", ""]				=> 'x.com',
-+	["/x.com/foo/", undef, "bar"]		=> '/x.com/foo/bar',
-+	["x.com/foo/", "/bar/baz/"]		=> 'x.com/foo/bar/baz/',
-+	["foo", "bar"]				=> 'foo/bar',
-+	["/foo/bar", "baz", "/biff"]		=> '/foo/bar/baz/biff',
-+	["", undef, "."]			=> '.',
-+	[]					=> '',
-+
-+);
-+
-+while(@tests) {
-+	my($have, $want) = splice @tests, 0, 2;
-+
-+	my $args = join ", ", map { qq['$_'] } map { defined($_) ? $_ : 'undef' } @$have;
-+	my $name = "join_paths($args) eq '$want'";
-+	is join_paths(@$have), $want, $name;
-+}
-diff --git a/t/t9107-git-svn-migrate.sh b/t/t9107-git-svn-migrate.sh
-index 289fc31..ee73013 100755
---- a/t/t9107-git-svn-migrate.sh
-+++ b/t/t9107-git-svn-migrate.sh
-@@ -27,15 +27,17 @@ test_expect_success 'setup old-looking metadata' '
- head=`git rev-parse --verify refs/heads/git-svn-HEAD^0`
- test_expect_success 'git-svn-HEAD is a real HEAD' "test -n '$head'"
- 
-+svnrepo_escaped=`echo $svnrepo | sed 's/ /%20/'`
-+
- test_expect_success 'initialize old-style (v0) git svn layout' '
- 	mkdir -p "$GIT_DIR"/git-svn/info "$GIT_DIR"/svn/info &&
- 	echo "$svnrepo" > "$GIT_DIR"/git-svn/info/url &&
- 	echo "$svnrepo" > "$GIT_DIR"/svn/info/url &&
- 	git svn migrate &&
--	! test -d "$GIT_DIR"/git svn &&
-+	! test -d "$GIT_DIR"/git-svn &&
- 	git rev-parse --verify refs/${remotes_git_svn}^0 &&
- 	git rev-parse --verify refs/remotes/svn^0 &&
--	test "$(git config --get svn-remote.svn.url)" = "$svnrepo" &&
-+	test "$(git config --get svn-remote.svn.url)" = "$svnrepo_escaped" &&
- 	test `git config --get svn-remote.svn.fetch` = \
-              ":refs/${remotes_git_svn}"
- 	'
-diff --git a/t/t9118-git-svn-funky-branch-names.sh b/t/t9118-git-svn-funky-branch-names.sh
-index 63fc982..193d3ca 100755
---- a/t/t9118-git-svn-funky-branch-names.sh
-+++ b/t/t9118-git-svn-funky-branch-names.sh
-@@ -32,6 +32,11 @@ test_expect_success 'setup svnrepo' '
- 	start_httpd
- 	'
- 
-+# SVN 1.7 will truncate "not-a%40{0]" to just "not-a".
-+# Look at what SVN wound up naming the branch and use that.
-+# Be sure to escape the @ if it shows up.
-+non_reflog=`svn_cmd ls "$svnrepo/pr ject/branches" | grep not-a | sed 's/\///' | sed 's/@/%40/'`
-+
- test_expect_success 'test clone with funky branch names' '
- 	git svn clone -s "$svnrepo/pr ject" project &&
- 	(
-@@ -42,7 +47,7 @@ test_expect_success 'test clone with funky branch names' '
- 		git rev-parse "refs/remotes/%2Eleading_dot" &&
- 		git rev-parse "refs/remotes/trailing_dot%2E" &&
- 		git rev-parse "refs/remotes/trailing_dotlock%2Elock" &&
--		git rev-parse "refs/remotes/not-a%40{0}reflog"
-+		git rev-parse "refs/remotes/$non_reflog"
- 	)
- 	'
- 
diff --git a/dev-vcs/git/files/git-1.7.12-optional-cvs.patch b/dev-vcs/git/files/git-1.8.2-optional-cvs.patch
similarity index 72%
rename from dev-vcs/git/files/git-1.7.12-optional-cvs.patch
rename to dev-vcs/git/files/git-1.8.2-optional-cvs.patch
index bd8413d..4fa0b3e 100644
--- a/dev-vcs/git/files/git-1.7.12-optional-cvs.patch
+++ b/dev-vcs/git/files/git-1.8.2-optional-cvs.patch
@@ -4,12 +4,12 @@
 Subject: [PATCH] Makefile: Add NO_CVS define to disable all CVS interface
  utilities
 
-Forward-ported from 1.7.10.2 to current git.git v1.7.12 tag PLUS fix-svn branch.
+Forward-ported from 1.7.12 to current git.git v1.8.2
 
-diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.7.12.orig/Makefile git-1.7.12/Makefile
---- git-1.7.12.orig/Makefile	2012-08-20 01:22:48.000000000 +0000
-+++ git-1.7.12/Makefile	2012-08-22 04:23:48.335032122 +0000
-@@ -224,6 +224,8 @@
+diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.8.2.orig/Makefile git-1.8.2/Makefile
+--- git-1.8.2.orig/Makefile	2013-03-13 12:15:22.000000000 -0700
++++ git-1.8.2/Makefile	2013-03-19 16:58:52.922806111 -0700
+@@ -259,6 +259,8 @@
  #
  # Define NO_TCLTK if you do not want Tcl/Tk GUI.
  #
@@ -18,7 +18,7 @@
  # The TCL_PATH variable governs the location of the Tcl interpreter
  # used to optimize git-gui for your system.  Only used if NO_TCLTK
  # is not set.  Defaults to the bare 'tclsh'.
-@@ -405,6 +407,7 @@
+@@ -431,6 +433,7 @@
  PROGRAM_OBJS =
  PROGRAMS =
  SCRIPT_PERL =
@@ -26,7 +26,7 @@
  SCRIPT_PYTHON =
  SCRIPT_SH =
  SCRIPT_LIB =
-@@ -445,18 +448,19 @@
+@@ -471,19 +474,20 @@
  SCRIPT_PERL += git-add--interactive.perl
  SCRIPT_PERL += git-difftool.perl
  SCRIPT_PERL += git-archimport.perl
@@ -41,16 +41,17 @@
 +SCRIPT_PERL_CVS += git-cvsimport.perl
 +SCRIPT_PERL_CVS += git-cvsserver.perl
 +
- SCRIPT_PYTHON += git-remote-testgit.py
+ SCRIPT_PYTHON += git-remote-testpy.py
  SCRIPT_PYTHON += git-p4.py
  
- SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
--	  $(patsubst %.perl,%,$(SCRIPT_PERL)) \
-+	  $(patsubst %.perl,%,$(SCRIPT_PERL) $(SCRIPT_PERL_CVS)) \
- 	  $(patsubst %.py,%,$(SCRIPT_PYTHON)) \
- 	  git-instaweb
+ # Generated files for scripts
+ SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH))
+-SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL))
++SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL) $(SCRIPT_PERL_CVS))
+ SCRIPT_PYTHON_GEN = $(patsubst %.py,%,$(SCRIPT_PYTHON))
  
-@@ -2088,8 +2092,18 @@
+ # Individual rules to allow e.g.
+@@ -1745,8 +1749,18 @@
  	$(QUIET_GEN)$(cmd_munge_script) && \
  	mv $@+ $@
  
@@ -70,7 +71,7 @@
  
  perl/perl.mak: perl/PM.stamp
  
-@@ -2101,7 +2115,7 @@
+@@ -1758,7 +1772,7 @@
  perl/perl.mak: GIT-CFLAGS GIT-PREFIX perl/Makefile perl/Makefile.PL
  	$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
  
@@ -79,7 +80,7 @@
  	$(QUIET_GEN)$(RM) $@ $@+ && \
  	INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
  	sed -e '1{' \
-@@ -2126,14 +2140,17 @@
+@@ -1783,14 +1797,17 @@
  	chmod +x $@+ && \
  	mv $@+ $@
  else # NO_PERL
@@ -98,10 +99,10 @@
 -endif # NO_PERL
  
  ifndef NO_PYTHON
- $(patsubst %.py,%,$(SCRIPT_PYTHON)): GIT-CFLAGS GIT-PREFIX
-diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.7.12.orig/t/t9200-git-cvsexportcommit.sh git-1.7.12/t/t9200-git-cvsexportcommit.sh
---- git-1.7.12.orig/t/t9200-git-cvsexportcommit.sh	2012-08-20 01:22:48.000000000 +0000
-+++ git-1.7.12/t/t9200-git-cvsexportcommit.sh	2012-08-22 04:19:23.650741974 +0000
+ $(patsubst %.py,%,$(SCRIPT_PYTHON)): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS
+diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.8.2.orig/t/t9200-git-cvsexportcommit.sh git-1.8.2/t/t9200-git-cvsexportcommit.sh
+--- git-1.8.2.orig/t/t9200-git-cvsexportcommit.sh	2013-03-13 12:15:22.000000000 -0700
++++ git-1.8.2/t/t9200-git-cvsexportcommit.sh	2013-03-19 16:56:29.124993905 -0700
 @@ -12,6 +12,11 @@
  	test_done
  fi
@@ -114,9 +115,9 @@
  cvs >/dev/null 2>&1
  if test $? -ne 1
  then
-diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.7.12.orig/t/t9400-git-cvsserver-server.sh git-1.7.12/t/t9400-git-cvsserver-server.sh
---- git-1.7.12.orig/t/t9400-git-cvsserver-server.sh	2012-08-20 01:22:48.000000000 +0000
-+++ git-1.7.12/t/t9400-git-cvsserver-server.sh	2012-08-22 04:19:23.650741974 +0000
+diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.8.2.orig/t/t9400-git-cvsserver-server.sh git-1.8.2/t/t9400-git-cvsserver-server.sh
+--- git-1.8.2.orig/t/t9400-git-cvsserver-server.sh	2013-03-13 12:15:22.000000000 -0700
++++ git-1.8.2/t/t9400-git-cvsserver-server.sh	2013-03-19 16:56:29.124993905 -0700
 @@ -11,9 +11,15 @@
  . ./test-lib.sh
  
@@ -134,11 +135,11 @@
  cvs >/dev/null 2>&1
  if test $? -ne 1
  then
-diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.7.12.orig/t/t9401-git-cvsserver-crlf.sh git-1.7.12/t/t9401-git-cvsserver-crlf.sh
---- git-1.7.12.orig/t/t9401-git-cvsserver-crlf.sh	2012-08-20 01:22:48.000000000 +0000
-+++ git-1.7.12/t/t9401-git-cvsserver-crlf.sh	2012-08-22 04:19:23.650741974 +0000
-@@ -38,15 +38,20 @@
-     fi
+diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.8.2.orig/t/t9401-git-cvsserver-crlf.sh git-1.8.2/t/t9401-git-cvsserver-crlf.sh
+--- git-1.8.2.orig/t/t9401-git-cvsserver-crlf.sh	2013-03-13 12:15:22.000000000 -0700
++++ git-1.8.2/t/t9401-git-cvsserver-crlf.sh	2013-03-19 16:56:29.125993925 -0700
+@@ -57,15 +57,20 @@
+     return $stat
  }
  
 -cvs >/dev/null 2>&1
@@ -163,9 +164,9 @@
      test_done
  fi
  "$PERL_PATH" -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
-diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.7.12.orig/t/t9600-cvsimport.sh git-1.7.12/t/t9600-cvsimport.sh
---- git-1.7.12.orig/t/t9600-cvsimport.sh	2012-08-20 01:22:48.000000000 +0000
-+++ git-1.7.12/t/t9600-cvsimport.sh	2012-08-22 04:19:23.650741974 +0000
+diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.8.2.orig/t/t9600-cvsimport.sh git-1.8.2/t/t9600-cvsimport.sh
+--- git-1.8.2.orig/t/t9600-cvsimport.sh	2013-03-13 12:15:22.000000000 -0700
++++ git-1.8.2/t/t9600-cvsimport.sh	2013-03-19 16:56:29.125993925 -0700
 @@ -3,14 +3,25 @@
  test_description='git cvsimport basic tests'
  . ./lib-cvs.sh
@@ -292,9 +293,9 @@
 +test_expect_success 'test entire HEAD' 'test_cmp_branch_tree master'
  
  test_done
-diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.7.12.orig/t/t9601-cvsimport-vendor-branch.sh git-1.7.12/t/t9601-cvsimport-vendor-branch.sh
---- git-1.7.12.orig/t/t9601-cvsimport-vendor-branch.sh	2012-08-20 01:22:48.000000000 +0000
-+++ git-1.7.12/t/t9601-cvsimport-vendor-branch.sh	2012-08-22 04:19:23.650741974 +0000
+diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.8.2.orig/t/t9601-cvsimport-vendor-branch.sh git-1.8.2/t/t9601-cvsimport-vendor-branch.sh
+--- git-1.8.2.orig/t/t9601-cvsimport-vendor-branch.sh	2013-03-13 12:15:22.000000000 -0700
++++ git-1.8.2/t/t9601-cvsimport-vendor-branch.sh	2013-03-19 16:56:29.125993925 -0700
 @@ -34,6 +34,17 @@
  test_description='git cvsimport handling of vendor branches'
  . ./lib-cvs.sh
@@ -313,9 +314,9 @@
  setup_cvs_test_repository t9601
  
  test_expect_success PERL 'import a module with a vendor branch' '
-diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.7.12.orig/t/t9602-cvsimport-branches-tags.sh git-1.7.12/t/t9602-cvsimport-branches-tags.sh
---- git-1.7.12.orig/t/t9602-cvsimport-branches-tags.sh	2012-08-20 01:22:48.000000000 +0000
-+++ git-1.7.12/t/t9602-cvsimport-branches-tags.sh	2012-08-22 04:19:23.650741974 +0000
+diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.8.2.orig/t/t9602-cvsimport-branches-tags.sh git-1.8.2/t/t9602-cvsimport-branches-tags.sh
+--- git-1.8.2.orig/t/t9602-cvsimport-branches-tags.sh	2013-03-13 12:15:22.000000000 -0700
++++ git-1.8.2/t/t9602-cvsimport-branches-tags.sh	2013-03-19 16:56:29.126993944 -0700
 @@ -6,6 +6,17 @@
  test_description='git cvsimport handling of branches and tags'
  . ./lib-cvs.sh
@@ -334,9 +335,9 @@
  setup_cvs_test_repository t9602
  
  test_expect_success PERL 'import module' '
-diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.7.12.orig/t/t9603-cvsimport-patchsets.sh git-1.7.12/t/t9603-cvsimport-patchsets.sh
---- git-1.7.12.orig/t/t9603-cvsimport-patchsets.sh	2012-08-20 01:22:48.000000000 +0000
-+++ git-1.7.12/t/t9603-cvsimport-patchsets.sh	2012-08-22 04:19:23.650741974 +0000
+diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.8.2.orig/t/t9603-cvsimport-patchsets.sh git-1.8.2/t/t9603-cvsimport-patchsets.sh
+--- git-1.8.2.orig/t/t9603-cvsimport-patchsets.sh	2013-03-13 12:15:22.000000000 -0700
++++ git-1.8.2/t/t9603-cvsimport-patchsets.sh	2013-03-19 16:56:29.126993944 -0700
 @@ -14,6 +14,17 @@
  test_description='git cvsimport testing for correct patchset estimation'
  . ./lib-cvs.sh
@@ -355,10 +356,10 @@
  setup_cvs_test_repository t9603
  
  test_expect_failure 'import with criss cross times on revisions' '
-diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.7.12.orig/t/test-lib.sh git-1.7.12/t/test-lib.sh
---- git-1.7.12.orig/t/test-lib.sh	2012-08-20 01:22:48.000000000 +0000
-+++ git-1.7.12/t/test-lib.sh	2012-08-22 04:19:23.650741974 +0000
-@@ -618,6 +618,7 @@
+diff -Nuar --exclude '*.orig' --exclude '*.rej' git-1.8.2.orig/t/test-lib.sh git-1.8.2/t/test-lib.sh
+--- git-1.8.2.orig/t/test-lib.sh	2013-03-13 12:15:22.000000000 -0700
++++ git-1.8.2/t/test-lib.sh	2013-03-19 16:56:29.126993944 -0700
+@@ -686,6 +686,7 @@
  esac
  
  ( COLUMNS=1 && test $COLUMNS = 1 ) && test_set_prereq COLUMNS_CAN_BE_1
diff --git a/dev-vcs/git/git-1.8.1.5-r1.ebuild b/dev-vcs/git/git-1.8.3.2-r1.ebuild
similarity index 88%
rename from dev-vcs/git/git-1.8.1.5-r1.ebuild
rename to dev-vcs/git/git-1.8.3.2-r1.ebuild
index efa061e..d956c42 100644
--- a/dev-vcs/git/git-1.8.1.5-r1.ebuild
+++ b/dev-vcs/git/git-1.8.3.2-r1.ebuild
@@ -1,17 +1,17 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-1.8.1.5-r1.ebuild,v 1.5 2013/10/15 14:32:02 zlogene Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-1.8.3.2-r1.ebuild,v 1.11 2014/01/18 09:26:02 vapier Exp $
 
-EAPI=4
+EAPI=5
 
 GENTOO_DEPEND_ON_PERL=no
 
 # bug #329479: git-remote-testgit is not multiple-version aware
-PYTHON_DEPEND="python? 2"
+PYTHON_COMPAT=( python2_{6,7} )
 [[ ${PV} == *9999 ]] && SCM="git-2"
 EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
 
-inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python systemd ${SCM}
+inherit toolchain-funcs eutils elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM}
 
 MY_PV="${PV/_rc/.rc}"
 MY_P="${PN}-${MY_PV}"
@@ -32,10 +32,10 @@
 			${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
 			${SRC_URI_GOOG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX}
 			)"
-	KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+	KEYWORDS="*"
 else
 	SRC_URI=""
-	KEYWORDS=""
+	KEYWORDS="*"
 fi
 
 LICENSE="GPL-2"
@@ -47,7 +47,7 @@
 	dev-libs/openssl
 	sys-libs/zlib
 	pcre? ( dev-libs/libpcre )
-	perl? ( dev-lang/perl[-build] )
+	perl? ( dev-lang/perl[-build(-)] )
 	tk? ( dev-lang/tk )
 	curl? (
 		net-misc/curl
@@ -67,9 +67,10 @@
 			)
 	python? ( gtk?
 	(
-		>=dev-python/pygtk-2.8
-		dev-python/pygtksourceview:2
-	) )"
+		>=dev-python/pygtk-2.8[${PYTHON_USEDEP}]
+		>=dev-python/pygtksourceview-2.10.1-r1:2[${PYTHON_USEDEP}]
+	)
+		${PYTHON_DEPS} )"
 
 # This is how info docs are created with Git:
 #   .txt/asciidoc --(asciidoc)---------> .xml/docbook
@@ -101,17 +102,18 @@
 	cvs? ( perl )
 	subversion? ( perl )
 	webdav? ( curl )
+	gtk? ( python )
+	python? ( ${PYTHON_REQUIRED_USE} )
 "
 
 pkg_setup() {
-	if use subversion && has_version dev-vcs/subversion && built_with_use --missing false dev-vcs/subversion dso ; then
+	if use subversion && has_version "dev-vcs/subversion[dso]"; then
 		ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
 		ewarn "with USE=dso, there may be weird crashes in git-svn. You"
 		ewarn "have been warned."
 	fi
 	if use python ; then
-		python_set_active_version 2
-		python_pkg_setup
+		python-single-r1_pkg_setup
 	fi
 }
 
@@ -140,6 +142,9 @@
 	myopts="${myopts} OLD_ICONV="
 	myopts="${myopts} NO_EXTERNAL_GREP="
 
+	# For svn-fe
+	extlibs="-lz -lssl ${S}/xdiff/lib.a $(usex threads -lpthread '')"
+
 	# can't define this to null, since the entire makefile depends on it
 	sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
 
@@ -150,7 +155,8 @@
 	use tk \
 		|| myopts="${myopts} NO_TCLTK=YesPlease"
 	use pcre \
-		&& myopts="${myopts} USE_LIBPCRE=yes"
+		&& myopts="${myopts} USE_LIBPCRE=yes" \
+		&& extlibs="${extlibs} -lpcre"
 	use perl \
 		&& myopts="${myopts} INSTALLDIRS=vendor" \
 		|| myopts="${myopts} NO_PERL=YesPlease"
@@ -159,7 +165,8 @@
 	use subversion \
 		|| myopts="${myopts} NO_SVN_TESTS=YesPlease"
 	use threads \
-		&& myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease"
+		&& myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease" \
+		|| myopts="${myopts} NO_PTHREADS=YesPlease"
 	use cvs \
 		|| myopts="${myopts} NO_CVS=YesPlease"
 # Disabled until ~m68k-mint can be keyworded again
@@ -191,6 +198,7 @@
 		myopts="${myopts} NO_NSEC=YesPlease"
 
 	export MY_MAKEOPTS="${myopts}"
+	export EXTLIBS="${extlibs}"
 }
 
 src_unpack() {
@@ -211,12 +219,8 @@
 }
 
 src_prepare() {
-	# bug #418431 - stated for upstream 1.7.13. Developed by Michael Schwern,
-	# funded as a bounty by the Gentoo Foundation. Merged upstream in 1.8.0.
-	#epatch "${FILESDIR}"/git-1.7.12-git-svn-backport.patch
-
 	# bug #350330 - automagic CVS when we don't want it is bad.
-	epatch "${FILESDIR}"/git-1.7.12-optional-cvs.patch
+	epatch "${FILESDIR}"/git-1.8.2-optional-cvs.patch
 
 	sed -i \
 		-e 's:^\(CFLAGS =\).*$:\1 $(OPTCFLAGS) -Wall:' \
@@ -225,7 +229,7 @@
 		-e 's:^\(AR = \).*$:\1$(OPTAR):' \
 		-e "s:\(PYTHON_PATH = \)\(.*\)$:\1${EPREFIX}\2:" \
 		-e "s:\(PERL_PATH = \)\(.*\)$:\1${EPREFIX}\2:" \
-		Makefile || die "sed failed"
+		Makefile contrib/svn-fe/Makefile || die "sed failed"
 
 	# Never install the private copy of Error.pm (bug #296310)
 	sed -i \
@@ -247,7 +251,7 @@
 	# bug #326625: PERL_PATH, PERL_MM_OPT
 	# bug #320647: PYTHON_PATH
 	PYTHON_PATH=""
-	use python && PYTHON_PATH="$(PYTHON -a)"
+	use python && PYTHON_PATH="${PYTHON}"
 	emake ${MY_MAKEOPTS} \
 		DESTDIR="${D}" \
 		OPTCFLAGS="${CFLAGS}" \
@@ -260,6 +264,7 @@
 		PYTHON_PATH="${PYTHON_PATH}" \
 		PERL_MM_OPT="" \
 		GIT_TEST_OPTS="--no-color" \
+		V=1 \
 		"$@"
 	# This is the fix for bug #326625, but it also causes breakage, see bug
 	# #352693.
@@ -278,8 +283,7 @@
 	git_emake || die "emake failed"
 
 	if use emacs ; then
-		elisp-compile contrib/emacs/git{,-blame}.el \
-			|| die "emacs modules failed"
+		elisp-compile contrib/emacs/git{,-blame}.el
 	fi
 
 	if use perl && use cgi ; then
@@ -310,7 +314,7 @@
 
 	if use subversion ; then
 		cd "${S}"/contrib/svn-fe
-		git_emake || die "emake svn-fe failed"
+		git_emake EXTLIBS="${EXTLIBS}" || die "emake svn-fe failed"
 		if use doc ; then
 			git_emake svn-fe.{1,html} || die "emake svn-fe.1 svn-fe.html failed"
 		fi
@@ -356,25 +360,25 @@
 	newbashcomp contrib/completion/git-prompt.sh ${PN}-prompt
 
 	if use emacs ; then
-		elisp-install ${PN} contrib/emacs/git.{el,elc} || die
-		elisp-install ${PN} contrib/emacs/git-blame.{el,elc} || die
-		#elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc} || die
+		elisp-install ${PN} contrib/emacs/git.{el,elc}
+		elisp-install ${PN} contrib/emacs/git-blame.{el,elc}
+		#elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc}
 		# don't add automatically to the load-path, so the sitefile
 		# can do a conditional loading
 		touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
-		elisp-site-file-install "${FILESDIR}"/${SITEFILE} || die
+		elisp-site-file-install "${FILESDIR}"/${SITEFILE}
 	fi
 
 	if use python && use gtk ; then
-		dobin "${S}"/contrib/gitview/gitview
-		python_convert_shebangs ${PYTHON_ABI} "${ED}"/usr/bin/gitview
+		python_doscript "${S}"/contrib/gitview/gitview
 		dodoc "${S}"/contrib/gitview/gitview.txt
 	fi
 
 	#dobin contrib/fast-import/git-p4 # Moved upstream
 	#dodoc contrib/fast-import/git-p4.txt # Moved upstream
 	newbin contrib/fast-import/import-tars.perl import-tars
-	newbin contrib/git-resurrect.sh git-resurrect
+	exeinto /usr/libexec/git-core/
+	newexe contrib/git-resurrect.sh git-resurrect
 
 	# git-subtree
 	cd "${S}"/contrib/subtree
@@ -395,7 +399,8 @@
 	newdoc contrib/diff-highlight/README README.diff-highlight
 
 	# git-jump
-	dobin contrib/git-jump/git-jump
+	exeinto /usr/libexec/git-core/
+	doexe contrib/git-jump/git-jump
 	newdoc contrib/git-jump/README git-jump.txt
 
 	if use gnome-keyring ; then
@@ -411,6 +416,13 @@
 		cd "${S}"
 	fi
 
+	# remote-helpers
+	if use python ; then
+		python_scriptinto /usr/libexec/git-core/
+		python_doscript "${S}"/contrib/remote-helpers/git-remote-{bzr,hg}
+		python_optimize
+	fi
+
 	dodir /usr/share/${PN}/contrib
 	# The following are excluded:
 	# completion - installed above
@@ -483,13 +495,18 @@
 	local tests_cvs="t9200-git-cvsexportcommit.sh \
 					t9400-git-cvsserver-server.sh \
 					t9401-git-cvsserver-crlf.sh \
+					t9402-git-cvsserver-refs.sh \
 					t9600-cvsimport.sh \
 					t9601-cvsimport-vendor-branch.sh \
 					t9602-cvsimport-branches-tags.sh \
-					t9603-cvsimport-patchsets.sh"
-	local tests_perl="t5502-quickfetch.sh \
+					t9603-cvsimport-patchsets.sh \
+					t9604-cvsimport-timestamps.sh"
+	local tests_perl="t3701-add-interactive.sh \
+					t5502-quickfetch.sh \
 					t5512-ls-remote.sh \
-					t5520-pull.sh"
+					t5520-pull.sh \
+					t7106-reset-unborn-branch.sh \
+					t7501-commit.sh"
 	# Bug #225601 - t0004 is not suitable for root perm
 	# Bug #219839 - t1004 is not suitable for root perm
 	# t0001-init.sh - check for init notices EPERM*  fails
@@ -523,7 +540,7 @@
 			has_version dev-vcs/cvs && \
 			let cvs=$cvs+1
 		[[ $cvs -gt 1 ]] && \
-			built_with_use dev-vcs/cvs server && \
+			has_version "dev-vcs/cvs[server]" && \
 			let cvs=$cvs+1
 		if [[ $cvs -lt 3 ]]; then
 			einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
@@ -581,7 +598,6 @@
 
 pkg_postinst() {
 	use emacs && elisp-site-regen
-	use python && python_mod_optimize git_remote_helpers
 	einfo "Please read /usr/share/bash-completion/git for Git bash command completion"
 	einfo "Please read /usr/share/bash-completion/git-prompt for Git bash prompt"
 	einfo "Note that the prompt bash code is now in the seperate script"
@@ -595,5 +611,4 @@
 
 pkg_postrm() {
 	use emacs && elisp-site-regen
-	use python && python_mod_cleanup git_remote_helpers
 }
diff --git a/dev-vcs/git/metadata.xml b/dev-vcs/git/metadata.xml
index a37ea0b..8eca331 100644
--- a/dev-vcs/git/metadata.xml
+++ b/dev-vcs/git/metadata.xml
@@ -6,9 +6,6 @@
     <name>Robin H. Johnson</name>
   </maintainer>
   <maintainer>
-    <email>prometheanfire@gentoo.org</email>
-  </maintainer>
-  <maintainer>
     <email>polynomial-c@gentoo.org</email>
     <name>Lars Wendler</name>
   </maintainer>
@@ -33,7 +30,7 @@
     <flag name="gpg">Pull in gnupg for signing -- without gnupg, attempts at signing will fail at runtime!</flag>
     <flag name="gtk">Include the gitview contrib tool</flag>
     <flag name="highlight">GitWeb support for app-text/highlight</flag>
-    <flag name="mozsha1">Makes git use an optimized SHA1 routine from Mozilla that should be fast on non-x86 machines</flag>
+    <flag name="mediawiki">Support pulling and pushing from MediaWiki</flag>
     <flag name="ppcsha1">Make use of a bundled routine that is optimized for the PPC arch</flag>
     <flag name="subversion">Include git-svn for <pkg>dev-vcs/subversion</pkg> support</flag>
     <flag name="webdav">Adds support for push'ing to HTTP/HTTPS repositories via DAV</flag>
diff --git a/metadata/md5-cache/dev-vcs/git-1.8.1.5-r1 b/metadata/md5-cache/dev-vcs/git-1.8.1.5-r1
deleted file mode 100644
index 0e8b53c..0000000
--- a/metadata/md5-cache/dev-vcs/git-1.8.1.5-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare setup test unpack
-DEPEND=dev-libs/openssl sys-libs/zlib pcre? ( dev-libs/libpcre ) perl? ( dev-lang/perl[-build] ) tk? ( dev-lang/tk ) curl? ( net-misc/curl webdav? ( dev-libs/expat ) ) emacs? ( virtual/emacs ) gnome-keyring? ( gnome-base/gnome-keyring ) app-arch/cpio doc? ( app-text/asciidoc app-text/docbook2X sys-apps/texinfo app-text/xmlto ) test? ( app-crypt/gnupg ) python? ( =dev-lang/python-2* ) virtual/pkgconfig
-DESCRIPTION=GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team
-EAPI=4
-HOMEPAGE=http://www.git-scm.com/
-IUSE=+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test
-KEYWORDS=alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris
-LICENSE=GPL-2
-RDEPEND=dev-libs/openssl sys-libs/zlib pcre? ( dev-libs/libpcre ) perl? ( dev-lang/perl[-build] ) tk? ( dev-lang/tk ) curl? ( net-misc/curl webdav? ( dev-libs/expat ) ) emacs? ( virtual/emacs ) gnome-keyring? ( gnome-base/gnome-keyring ) gpg? ( app-crypt/gnupg ) perl? ( dev-perl/Error dev-perl/Net-SMTP-SSL dev-perl/Authen-SASL cgi? ( virtual/perl-CGI highlight? ( app-text/highlight ) ) cvs? ( >=dev-vcs/cvsps-2.1 dev-perl/DBI dev-perl/DBD-SQLite ) subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey ) ) python? ( gtk? ( >=dev-python/pygtk-2.8 dev-python/pygtksourceview:2 ) ) python? ( =dev-lang/python-2* )
-REQUIRED_USE=cgi? ( perl ) cvs? ( perl ) subversion? ( perl ) webdav? ( curl )
-SLOT=0
-SRC_URI=http://git-core.googlecode.com/files/git-1.8.1.5.tar.gz mirror://kernel/software/scm/git/git-1.8.1.5.tar.gz http://git-core.googlecode.com/files/git-manpages-1.8.1.5.tar.gz mirror://kernel/software/scm/git/git-manpages-1.8.1.5.tar.gz doc? ( mirror://kernel/software/scm/git/git-htmldocs-1.8.1.5.tar.gz http://git-core.googlecode.com/files/git-htmldocs-1.8.1.5.tar.gz )
-_eclasses_=base	fc89786f3f7e7bcf03334359bd5b639b	bash-completion-r1	d339dd40b2014cf1edba8592580eef42	elisp-common	3322f14f031ddc95feccd9089c9adc59	eutils	a108f00cccac414097bcbbbb5de01762	multilib	fac675dcccf94392371a6abee62d909f	multiprocessing	1512bdfe7004902b8cd2c466fc3df772	perl-module	d93571ca1c77e98760e5aa406388b02d	python	305197b0aa1194fa3ef67ca21f6faa7e	systemd	9f063b2cc19c5e8030911372aa246c4e	toolchain-funcs	48b38a216afb92db6314d6c3187abea3
-_md5_=8993f5d4980c7cabbff7bfe128b5be28
diff --git a/metadata/md5-cache/dev-vcs/git-1.8.3.2-r1 b/metadata/md5-cache/dev-vcs/git-1.8.3.2-r1
new file mode 100644
index 0000000..f66aeff
--- /dev/null
+++ b/metadata/md5-cache/dev-vcs/git-1.8.3.2-r1
@@ -0,0 +1,14 @@
+DEFINED_PHASES=compile configure install postinst postrm prepare setup test unpack
+DEPEND=dev-libs/openssl sys-libs/zlib pcre? ( dev-libs/libpcre ) perl? ( dev-lang/perl[-build(-)] ) tk? ( dev-lang/tk ) curl? ( net-misc/curl webdav? ( dev-libs/expat ) ) emacs? ( virtual/emacs ) gnome-keyring? ( gnome-base/gnome-keyring ) app-arch/cpio doc? ( app-text/asciidoc app-text/docbook2X sys-apps/texinfo app-text/xmlto ) test? ( app-crypt/gnupg ) virtual/pkgconfig
+DESCRIPTION=GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team
+EAPI=5
+HOMEPAGE=http://www.git-scm.com/
+IUSE=+blksha1 +curl cgi doc emacs gnome-keyring +gpg gtk highlight +iconv +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test python_targets_python2_6 python_targets_python2_7 python_single_target_python2_6 python_single_target_python2_7
+KEYWORDS=*
+LICENSE=GPL-2
+RDEPEND=dev-libs/openssl sys-libs/zlib pcre? ( dev-libs/libpcre ) perl? ( dev-lang/perl[-build(-)] ) tk? ( dev-lang/tk ) curl? ( net-misc/curl webdav? ( dev-libs/expat ) ) emacs? ( virtual/emacs ) gnome-keyring? ( gnome-base/gnome-keyring ) gpg? ( app-crypt/gnupg ) perl? ( dev-perl/Error dev-perl/Net-SMTP-SSL dev-perl/Authen-SASL cgi? ( virtual/perl-CGI highlight? ( app-text/highlight ) ) cvs? ( >=dev-vcs/cvsps-2.1 dev-perl/DBI dev-perl/DBD-SQLite ) subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey ) ) python? ( gtk? ( >=dev-python/pygtk-2.8[python_targets_python2_6(-)?,python_targets_python2_7(-)?,python_single_target_python2_6(+)?,python_single_target_python2_7(+)?] >=dev-python/pygtksourceview-2.10.1-r1:2[python_targets_python2_6(-)?,python_targets_python2_7(-)?,python_single_target_python2_6(+)?,python_single_target_python2_7(+)?] ) python_single_target_python2_6? ( >=dev-lang/python-2.6.8-r3:2.6 ) python_single_target_python2_7? ( >=dev-lang/python-2.7.3-r2:2.7 ) dev-lang/python-exec:=[python_targets_python2_6(-)?,python_targets_python2_7(-)?,python_single_target_python2_6(+)?,python_single_target_python2_7(+)?] )
+REQUIRED_USE=cgi? ( perl ) cvs? ( perl ) subversion? ( perl ) webdav? ( curl ) gtk? ( python ) python? ( python_single_target_python2_6? ( python_targets_python2_6 ) python_single_target_python2_7? ( python_targets_python2_7 ) ^^ ( python_single_target_python2_6 python_single_target_python2_7 ) )
+SLOT=0
+SRC_URI=http://git-core.googlecode.com/files/git-1.8.3.2.tar.gz mirror://kernel/software/scm/git/git-1.8.3.2.tar.gz http://git-core.googlecode.com/files/git-manpages-1.8.3.2.tar.gz mirror://kernel/software/scm/git/git-manpages-1.8.3.2.tar.gz doc? ( mirror://kernel/software/scm/git/git-htmldocs-1.8.3.2.tar.gz http://git-core.googlecode.com/files/git-htmldocs-1.8.3.2.tar.gz )
+_eclasses_=base	fc89786f3f7e7bcf03334359bd5b639b	bash-completion-r1	d339dd40b2014cf1edba8592580eef42	elisp-common	3322f14f031ddc95feccd9089c9adc59	eutils	a108f00cccac414097bcbbbb5de01762	multilib	fac675dcccf94392371a6abee62d909f	multiprocessing	1512bdfe7004902b8cd2c466fc3df772	perl-module	d93571ca1c77e98760e5aa406388b02d	python-single-r1	82a55861314bbcedaf1e08ed4dd651b3	python-utils-r1	4fc11614abf37ede29a4eb8aaae8a22a	systemd	9f063b2cc19c5e8030911372aa246c4e	toolchain-funcs	48b38a216afb92db6314d6c3187abea3
+_md5_=7d9df2df5ff61aa6dc1fc9ac41158b4b