diff options
author | Gregory M. Tuner <gmt@be-evil.net> | 2014-02-13 20:30:48 -0800 |
---|---|---|
committer | Gregory M. Tuner <gmt@be-evil.net> | 2014-02-13 20:43:12 -0800 |
commit | 17a6ad594301a5b1293e370f41909f47c0b1c5f1 (patch) | |
tree | d879941fe3e4d72cf00a2c2d0834021f99162379 /dev-vcs | |
parent | dev-python/gittle: add dev-python/gittle-gmt blocker (diff) | |
download | gmt-17a6ad594301a5b1293e370f41909f47c0b1c5f1.tar.gz gmt-17a6ad594301a5b1293e370f41909f47c0b1c5f1.tar.bz2 gmt-17a6ad594301a5b1293e370f41909f47c0b1c5f1.zip |
dev-vcs/git-1.8.5.4: clone upstream
Signed-off-by: Gregory M. Tuner <gmt@be-evil.net>
Diffstat (limited to 'dev-vcs')
-rw-r--r-- | dev-vcs/git/Manifest | 11 | ||||
-rw-r--r-- | dev-vcs/git/files/git-1.7.12-git-svn-backport.patch | 1288 | ||||
-rw-r--r-- | dev-vcs/git/files/git-1.9.0_rc3-optional-cvs.patch | 372 | ||||
-rw-r--r-- | dev-vcs/git/files/git-daemon-r1.initd | 13 | ||||
-rw-r--r-- | dev-vcs/git/git-1.8.5.4-r1.ebuild (renamed from dev-vcs/git/git-1.8.5.3-r1.ebuild) | 18 |
5 files changed, 401 insertions, 1301 deletions
diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest index 2ef9115..dcdece8 100644 --- a/dev-vcs/git/Manifest +++ b/dev-vcs/git/Manifest @@ -1,5 +1,4 @@ AUX 50git-gentoo.el 472 SHA256 7cd37e8db7eaeee8d822d38851eb69771b0f09c79883a8e51309a9add85fdbe2 SHA512 0435d7d67f2b64460a62c6a95c65a722c0f8d5d50d064a81e690de84a761ba518d32db545ee70c0fa3ad7803d77d5dab100689888bc92c9d82f2d6d5073623b3 WHIRLPOOL 887682f79182f6728af3c0fd2ee0e81319d49761a987559684be5e4acae4af579a5b8d1197ddba31452cec179de3c8f5784cc85ad61f78b400e42c204c93f642 -AUX git-1.7.12-git-svn-backport.patch 37717 SHA256 5379c97de060617ca6cef65bcc4f78a986943bdc587517af27c8ae80bb7bfafd SHA512 ad716ed9c449961d7b0bfe29f3450e0a4d4fe2c7c8069916bb0a69a6ee47bab5f7c4b68496b31cd67e6472aa05723ef8f32d8d7f56cdd2f4a40190058e324a8b WHIRLPOOL 30ecbf8cd97903d7a9b5b710f53b3ef6ea3092c224ebc82682a1840d93a28e6680c318d0e69af252b4901255f8f12a992b8a18eb46a9a015fc383a7c70312e89 AUX git-1.7.12-optional-cvs.patch 11683 SHA256 4ffbbef802c60315740820491c25eaa57e1bba2c74cb5b2f7115b9c28b31d1bf SHA512 9f0af51636d95f78e6708dd2612aeaa8e439308a0537035019ae85a53ee124d73c74380e48706ef718666041e37d721d5ad1c224f902e3e0f88bf16214f6cfed WHIRLPOOL abebd47297245d8da9a28bd5454b6e54c5d16fb0757d099704f6fd7abeac67d2837bc6893bc7bc06145adf9ebc967871a4eec1a86924671b4b04c0b0d72742ed AUX git-1.8.2-optional-cvs.patch 11737 SHA256 37e092ca2dfa3ec216df568c1439acb3bdcc7366b75feb092f39642fc5894ce4 SHA512 7f914f16efee2f81a6f42a0e7ff1d72094bf032e98fa1a22f4b1e848eebf3a056ccdea1c84b24310cff4f19737b336d79a4f9c098a0ac4b0556e1a74708ef870 WHIRLPOOL d5e66fbfe0a6ae6c956ffb886d66c7a7906a3d60eac43b87d1e40206197f58d9aed54ee57cf5bb592147b7b9ac50fe50996f3b7e94161e5e308567c3a108cf43 AUX git-1.8.2-texinfo.patch 515 SHA256 86d60eeae9a21fa64047401b80a5e082b0f306a68efab139979bc979fb31830f SHA512 9a9920f6b2d170f3ca71ae4c35cb001252e5f43e087f5b49f9aa617606fb3b7173aea5ef91c5d195b36bf1a1964e936d777797e03642a0da55a596e68c13a29c WHIRLPOOL 9e66c94c5eac4fe22f7cdd400c68893368a21550a5aadd467c53591e62bcf146d6a08db1e7a3cb8b32a45d5568c0b7a7462a0c6f8709ea35a284845a2c5e5820 @@ -7,15 +6,17 @@ AUX git-1.8.4-optional-cvs.patch 11737 SHA256 7f8f1bd8f2953044433d90edea2bae7334 AUX git-1.8.5-mw-destdir.patch 1138 SHA256 4f9684b14b93ceae0426cf0ba9a3970c15f63fef8bb0f7179bbee81e7a41aa52 SHA512 dd782f6b408111fc10342973dc6afeb305a27cf7cdce85694bd6e73da55a6164076c7d08679cb148d9850769456f23e9f166c4c1686152ec276f9125a59f829a WHIRLPOOL aa84f8834c6867a33b1406b96ccdd8b4749af14ea7b615b7010dfc28d2b2e50e3846c249ec0675c3c829cd1117dd2e99659fa5d06a823519375ea07e5efddda1 AUX git-1.8.5-mw-vendor.patch 1160 SHA256 e613f8874beec8d11644ad8d12c43cccb6585f96e99485d7d8ead6618321e8c0 SHA512 6513104f28eff36c18840f90e56fb21e8e04055e4e9a304ef15e5d7e1c13c8b45c4be0380b7781e776ce3b8ee9f7371ed2200e01174cc257125a613aef43ac9b WHIRLPOOL 6a5dcb28dc40590cf4e4b1369b0d770b40f1060bf933366f252edafbb9781f39d7f46dc218c16d429f507c7d5a9479bafce2df7309178071bcb782095809ed69 AUX git-1.8.5-optional-cvs.patch 10088 SHA256 a35732c6d3bfbe62b298a730652a85f7deac6bdd59bd842b4dddedaa6ad0f1fb SHA512 f78f82af4e51002553157e61a16fb9855743acaa9cd9b9914e047eb3ff7f7fc4aa2d89e9c7f86fb6bf9d3f5854e44519c72669c6436132c728b28a4599d184f1 WHIRLPOOL f8080b56bff0c1add20d9c3c3e2b842e351029cae02e147307260a6504de4300d01262176c03203259037e6f98ffb043e1e1b4a914b1110d666b30383ead2e24 +AUX git-1.9.0_rc3-optional-cvs.patch 11798 SHA256 3ebd298202ef9877114abbfdfccba20b28a8ab01958828079e0b2adf77525aa3 SHA512 308fd4d00803b30e2307d8665f5a5d0a6f2e2022ba462876afea35eb2ebb246ef8d82671467e2ad1744c981d523a156d5825deceaca28f17e43604695edecc60 WHIRLPOOL c4413f0233fcf41463a2ee73567a0743c436c17d14186f1c04fd78eafb38eaba95f685db2824867b6c0e900b4657cf847de5f46fa8136b40f0a0fcdad23122af +AUX git-daemon-r1.initd 452 SHA256 fe51fee8e56a5bd2c1821454f5743e16c74283a6d1e0914b6198e82be2a637cf SHA512 23473a6b64e0483d62e65e2ea8d5dd341700199d8a843fd64db88115cb1120b1159a14ae5a5bafe5c482bb9aadd8eae073ee40b0e3a761d4e1d67df2eeb53991 WHIRLPOOL 3de8980015aa29e6495655651fa71e4e88f0536a4caa789f1d54be82043fd9f7ef285cb6e48314ebcd1b1dc9acf58ced644ba9d393dd3505f3faf7836eb22597 AUX git-daemon.confd 712 SHA256 9bf02170dcf73e930a992adf44326ed7c27159d41a503ca4d9371861ee5030c9 SHA512 bf715ce0d3cd6a5be405d7739bc06252b95f93f9874716dadf666d33063be6ab3e37ae1ee253ed291bfb4f66df268b44d9653672851e1bb40112c0aae08fc4ea WHIRLPOOL 13643f53cd2f9675867ff194d680cd8ffe91bccbd0b15ae41b45471ec7310c09af8335619ff2a1562a835d8449eb44f9a9e9453c3ba15005763497c668d59181 AUX git-daemon.initd 738 SHA256 48e7e1228c9811079dce8fecc560000cf645de5b4bb697f8f8ad3f906906330b SHA512 2b1cff1e1bf85db1674bd130639a7557fd4bb1ee2e9b2e7d1e2dc28274b6fa6c6c150acf37d0e652173980c640cb0f7ac36332012182955ecc4d21c6258bfd4d WHIRLPOOL c47dd7d0f3b183e14f3ca4e499b1ceef0b88f11675c7f6dee225516f062f556bfd41aa7f87d6cdf490411101ae541ab5fe173069dbfab6b1473a2b3d951ce901 AUX git-daemon.socket 116 SHA256 66a064b67e441306bf765d3d3115ac55bafa2098400af134f852d4aecf8608d7 SHA512 e383d358999ea0c7201c1709015a9b7c4dd9dd71287605640aca837fac1e2ee33a5a1684e1c3414c08742605f185b722f4864afd5be8b79a9f0d8f7ae0f9b701 WHIRLPOOL 1098e46b6d2be3c8d758a087408aed91e0c01625542dfc90fbff80ed8b40d2a54ea4ab45b4d003ef0b0b8ed1411e1146a58076b68096389412a61fe2d09214dd AUX git-daemon.xinetd 260 SHA256 5025efbceed83835378cada3728448cbf445a1584e7cbd7736f568f4b6b52a67 SHA512 5e0c85004e7e2b89fd191350022b9970a6ca03129b4c913e159570b99b5797ab924f667cd3dc5693a9d4916b7b5cf36814eda015dbdf46a1354eb50d1c081f9c WHIRLPOOL 155bfca2c071d5368de09412d1d937cefd3b5cd28a991b99845551738440b92791c33a67ef41be711dbf06fc4faf4a299cbaf1f410b119fe5deb5a4cd741803d AUX git-daemon_at.service 395 SHA256 c427e37d3e859c13f9441b20c7cb6aba7bca048cb70809ee1253726e733fac7d SHA512 4931954564ae7d2e21e49c8f251bae7c6be8a420f75e68e23214c85993dceb81b719e5fee11366b82b28ef5fa27a9ae2b2faa5c79c16d367c6d50fb03bbd0cff WHIRLPOOL a18f8fe6755c85e8d332d989637105d7842e8fc107a263dd0252e34e30dca21aaff593041bca3f0a728b995f19310d3cab8c43e2a7524ee9e612cca03c7ffccf -DIST git-1.8.5.3.tar.gz 4757199 SHA256 c8e5843043185b2ca38fcfaa43a13a65ed71a99933c5631ba214b98f36a3e4a9 SHA512 ce6288d9a78c0de1a8a50c1c622345adf0dd982438761f3f54ff12886de68694142b91fa90c456fc25a75c6ea80b0873727005360a3f81703e823db7b8ca8869 WHIRLPOOL 06eb0f472b3e84da1c6f7d994dcbe57d1e50b886ff7976ec54c6b41bb1dc3d1d2721487c23bbda38987688f04a32bd4bee79840e3ebc8ca573f6621c146fd4e0 -DIST git-htmldocs-1.8.5.3.tar.gz 2227176 SHA256 ceab92ed34f198f51e775800ef7cf2186941b48a910d0462b40c73edcfc37c39 SHA512 576ab058725a5f2b9a32a687b431695830a835a6f6319a5e41ec947795c6a460f200dd0092676fb50059a476fa6c6b5156f4582c1b8e7fc5a29b298c2070d660 WHIRLPOOL 12d070bbd8e6845b0a7dcdaaf3d82d0962ba6a4f0b186c092cb34bc5a5c1eaeb82a8453aecbf060d4ec1a791f05b50eba8b8cbb8c1718a89f4732ba68dbc35cd -DIST git-manpages-1.8.5.3.tar.gz 569620 SHA256 3e9d63bad149c9cf795710815db85efda579b262680c24c5ac6e2b7444e12f53 SHA512 5376b3e77bb5e8d4f7bc44c3aa3bdc1510ea39da4d69f658de0faade2522079a0af7d55afc4ebfc10bc6c6ef5769a158e841aad54b91b23f8422f7bf5c69f166 WHIRLPOOL 3b39844be5ead048cbd2ba7911bee728bb21fdb48e0b4c55a49f5175efbfa0dc8104a85cf3e3d6827cf5f486002d90fb44adb08baa6c0f5ec9fa00c7d1e4cf2d -EBUILD git-1.8.5.3-r1.ebuild 18293 SHA256 ce218f273c2ed784605b853c4854921a966da373ef8f48578dc27b25b1ed50fa SHA512 5d4c7c3dec2f05169c547a49536f5f547d624010f191bc16b38d766e9dd3b8569c23daf1f6c0c1c6278ad26e16b6631608af0c02f9c357b9f17286cdd1c3ba9b WHIRLPOOL be5dea5e13054398a8b5ea14f7ea66d2d26d5d0b8b9654612ab1d6f227af3da783032d9b41d80522b66f312ba2e281d1e0f1f75d2249ddf02f346952b16c247e +DIST git-1.8.5.4.tar.gz 4760594 SHA256 ba8551268286530c7b7caa04f9b8fabeb5fb39eb260ca541e36b32596f26fdab SHA512 18178837efdb1e62b790d4810e71fc52d2215b94441f4f912d7699dc197cd4717af3bf8fa500063c755ce4ae60afb4d4d0baecdc1c569a359be68a41b48473ab WHIRLPOOL d640efcf07015a7c650828b3864f5793962a2b9d80764f0e94461b49ca692debcf613b63321e96cbf2febf3d5be769dc9a26ef165684619a6c44a0ce5cc64554 +DIST git-htmldocs-1.8.5.4.tar.gz 2227268 SHA256 e21484ea84f97daafd4c0d65f368c68b6bdf7615d5247e0718a2077bf80c8702 SHA512 714b60c4851797e00880e661fb3e96e38f44bd2b2e79c5a92620bf6d8d0fcf62d2bda08636a055b24643e3c53af884827a957f1df7f8130e43ef5ab2144693f1 WHIRLPOOL 4b004e6f2a8291a25cff05600ef740b6a888482d2148f5cc1d4cc804218a9847267f77d3c355cc3d7be6210f7591385b607430db66f5e4303d77cdfe68213cdd +DIST git-manpages-1.8.5.4.tar.gz 568942 SHA256 bc4e733e9b4833e5bae36f35ea4d0de1005f138f2bc15542179f58b59af0827c SHA512 5f9b8326e5180219dddf00149fc2b59e35b0524c564b760eccf8c8ef2c4fcb527010e132013c5c7043ccd8c84a29fbd43bf9aca7cf5d7b87271cd3ef05a3fb4c WHIRLPOOL 5dcc39b427267b2a1298dcbccefca7a068826bac6f37013dd7a28644cf092520277535f1e6cb43ff7085d0eb168742560989ff78a3eaf4f9d5c97d6e597969c1 +EBUILD git-1.8.5.4-r1.ebuild 18103 SHA256 b7fc661958503d8c54280b51e68ecb9dab74bca1c5a55e1d20777f2f0eec6ba2 SHA512 bedd2c54339659cfe54275a4c04512e57523d43b2fb1085198b0a0b9f9eafecb84682566640b9a2410222853f79709b407350188966164c551a7e95b34e38bc0 WHIRLPOOL 8881883c99ca1aac8727db100a28e87d15b5477a8a9884bf5a8c70f4daebaa2dfe794d8290424ecfb6b54617acfb1cc61a7560ce0c6a17d19480478fbd347278 MISC ChangeLog 11470 SHA256 b2632719d4881f9e588e8fcb02d59337b38baa4ccb0c9553e8e9d79e8986e0ab SHA512 17ff383d5b1058f8d57b5b64261226e317bbd8a4ad107e100bb2a4f20be8b06e067c5ca73d01acbb5daa3d7efbc10f4cbd8292b2bcfa5ab5c513bbca3cb377a4 WHIRLPOOL ce9317faa7297629d7c1cd010467b4bc2547b71d25c4b0b44556f8fb34deca09eed5d0299f4a08946f3f75201c5e88c211c6cd36d32e85e437610a3d6fdb18f9 MISC ChangeLog-2012 94624 SHA256 7c8c313ea4800194191f7255023cabd205e56bb9761e8877dfab3770024b158c SHA512 f19cae0a29e8598e3bb68f1295baa56ff0edf06b2e3a95081ea2f95c4555d63dd6a0bff5a82345b274a1936104a75a69fe7862d7738a7fa2539ec9a7afd6b28f WHIRLPOOL 059ab6c542757c4524cb20cebb3cfa4bfbbe16d3a66da0805fb972d32f91f2a49bee97d1d73acf74d8e2cf3cc7a552371cf66db0580506d4b1a9e05ee52bdea4 MISC metadata.xml 1877 SHA256 74e93a953d9484c1f5806efc9c80bfa729b4d53415a00168e5ffec255750f7bd SHA512 3ef0d74206f67c27b82cefa40602cd33e432cc0f06ce900766d32f1ebd0a71d6cfa750ae77660531fc61a1117f7959d7df6ec10f439cfa2ee372d54d7ac87c5c WHIRLPOOL b9d97eb6b92a1894d965a5e9fbfbfd0d64625b31318fab2eb11b4dcb331133dbf678f62a7216c12b53a2546fa5d6a07c6240bddfa7784a925eafed602a7ffa75 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.9.0_rc3-optional-cvs.patch b/dev-vcs/git/files/git-1.9.0_rc3-optional-cvs.patch new file mode 100644 index 0000000..1f07960 --- /dev/null +++ b/dev-vcs/git/files/git-1.9.0_rc3-optional-cvs.patch @@ -0,0 +1,372 @@ +From eadb20b065c33d46b49c8c95d8cde0c9fe7c62a4 Mon Sep 17 00:00:00 2001 +From: Robin Johnson <robbat2@gentoo.org> +Date: Wed, 22 Aug 2012 04:25:06 +0000 +Subject: [PATCH] Makefile: Add NO_CVS define to disable all CVS interface + utilities + +Forward-ported from 1.7.12 to current git.git v1.8.4 +Forward-ported from v1.8.4 to v1.8.5.1 +Forward-ported from v1.8.5.3 to v1.9.0_rc3 + +diff -Nuar git-1.9.0.rc3.orig/Makefile git-1.9.0.rc3/Makefile +--- git-1.9.0.rc3.orig/Makefile 2014-02-07 12:45:45.000000000 -0800 ++++ git-1.9.0.rc3/Makefile 2014-02-08 11:50:21.219488765 -0800 +@@ -263,6 +263,8 @@ + # + # Define NO_TCLTK if you do not want Tcl/Tk GUI. + # ++# Define NO_CVS if you do not want any CVS interface utilities. ++# + # 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'. +@@ -437,6 +439,7 @@ + PROGRAM_OBJS = + PROGRAMS = + SCRIPT_PERL = ++SCRIPT_PERL_CVS = + SCRIPT_PYTHON = + SCRIPT_SH = + SCRIPT_LIB = +@@ -476,20 +479,21 @@ + SCRIPT_PERL += git-add--interactive.perl + SCRIPT_PERL += git-difftool.perl + SCRIPT_PERL += git-archimport.perl +-SCRIPT_PERL += git-cvsexportcommit.perl +-SCRIPT_PERL += git-cvsimport.perl +-SCRIPT_PERL += git-cvsserver.perl + SCRIPT_PERL += git-relink.perl + SCRIPT_PERL += git-send-email.perl + SCRIPT_PERL += git-svn.perl + ++SCRIPT_PERL_CVS += git-cvsexportcommit.perl ++SCRIPT_PERL_CVS += git-cvsimport.perl ++SCRIPT_PERL_CVS += git-cvsserver.perl ++ + SCRIPT_PYTHON += git-p4.py + + NO_INSTALL += git-remote-testgit + + # 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)) + + SCRIPT_SH_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_SH_GEN)) +@@ -1776,8 +1780,18 @@ + $(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \ + -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@ + ++_SCRIPT_PERL_BUILD = ++_SCRIPT_PERL_NOBUILD = ++ + ifndef NO_PERL +-$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak ++ ++_SCRIPT_PERL_BUILD += $(SCRIPT_PERL) ++ ++ifndef NO_CVS ++_SCRIPT_PERL_BUILD += $(SCRIPT_PERL_CVS) ++else # NO_CVS ++_SCRIPT_PERL_NOBUILD += $(SCRIPT_PERL_CVS) ++endif # NO_CVS + + perl/perl.mak: perl/PM.stamp + +@@ -1790,7 +1804,7 @@ + $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F) + + PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ) +-$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE ++$(patsubst %.perl,%,$(_SCRIPT_PERL_BUILD)): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE + $(QUIET_GEN)$(RM) $@ $@+ && \ + INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \ + INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)' && \ +@@ -1824,14 +1838,17 @@ + chmod +x $@+ && \ + mv $@+ $@ + else # NO_PERL +-$(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh ++_SCRIPT_PERL_NOBUILD += $(SCRIPT_PERL) $(SCRIPT_PERL_CVS) git-instaweb ++endif # NO_PERL ++ ++# This is any perl scripts that were disabled it might be empty... ++$(patsubst %.perl,%,$(_SCRIPT_PERL_NOBUILD)): % : unimplemented.sh + $(QUIET_GEN)$(RM) $@ $@+ && \ + sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ + -e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \ + unimplemented.sh >$@+ && \ + chmod +x $@+ && \ + mv $@+ $@ +-endif # NO_PERL + + ifndef NO_PYTHON + $(SCRIPT_PYTHON_GEN): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS +diff -Nuar git-1.9.0.rc3.orig/t/t9200-git-cvsexportcommit.sh git-1.9.0.rc3/t/t9200-git-cvsexportcommit.sh +--- git-1.9.0.rc3.orig/t/t9200-git-cvsexportcommit.sh 2014-02-07 12:45:45.000000000 -0800 ++++ git-1.9.0.rc3/t/t9200-git-cvsexportcommit.sh 2014-02-08 11:49:12.243179483 -0800 +@@ -11,6 +11,11 @@ + test_done + fi + ++if ! test_have_prereq CVS; then ++ skip_all='skipping git cvsexportcommit tests, cvs not available' ++ test_done ++fi ++ + cvs >/dev/null 2>&1 + if test $? -ne 1 + then +diff -Nuar git-1.9.0.rc3.orig/t/t9400-git-cvsserver-server.sh git-1.9.0.rc3/t/t9400-git-cvsserver-server.sh +--- git-1.9.0.rc3.orig/t/t9400-git-cvsserver-server.sh 2014-02-07 12:45:45.000000000 -0800 ++++ git-1.9.0.rc3/t/t9400-git-cvsserver-server.sh 2014-02-08 11:49:12.244179502 -0800 +@@ -11,9 +11,15 @@ + . ./test-lib.sh + + if ! test_have_prereq PERL; then +- skip_all='skipping git cvsserver tests, perl not available' ++ skip_all='skipping git-cvsserver tests, perl not available' + test_done + fi ++ ++if ! test_have_prereq CVS; then ++ skip_all='skipping git-cvsserver tests, cvs not available' ++ test_done ++fi ++ + cvs >/dev/null 2>&1 + if test $? -ne 1 + then +diff -Nuar git-1.9.0.rc3.orig/t/t9401-git-cvsserver-crlf.sh git-1.9.0.rc3/t/t9401-git-cvsserver-crlf.sh +--- git-1.9.0.rc3.orig/t/t9401-git-cvsserver-crlf.sh 2014-02-07 12:45:45.000000000 -0800 ++++ git-1.9.0.rc3/t/t9401-git-cvsserver-crlf.sh 2014-02-08 11:49:12.244179502 -0800 +@@ -57,15 +57,20 @@ + return $stat + } + +-cvs >/dev/null 2>&1 +-if test $? -ne 1 ++if ! test_have_prereq PERL + then +- skip_all='skipping git-cvsserver tests, cvs not found' ++ skip_all='skipping git-cvsserver tests, perl not available' + test_done + fi +-if ! test_have_prereq PERL ++if ! test_have_prereq CVS + then +- skip_all='skipping git-cvsserver tests, perl not available' ++ skip_all='skipping git-cvsserver tests, cvs not available' ++ test_done ++fi ++cvs >/dev/null 2>&1 ++if test $? -ne 1 ++then ++ skip_all='skipping git-cvsserver tests, cvs not found' + test_done + fi + perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || { +diff -Nuar git-1.9.0.rc3.orig/t/t9600-cvsimport.sh git-1.9.0.rc3/t/t9600-cvsimport.sh +--- git-1.9.0.rc3.orig/t/t9600-cvsimport.sh 2014-02-07 12:45:45.000000000 -0800 ++++ git-1.9.0.rc3/t/t9600-cvsimport.sh 2014-02-08 11:49:12.244179502 -0800 +@@ -3,14 +3,25 @@ + test_description='git cvsimport basic tests' + . ./lib-cvs.sh + +-test_expect_success PERL 'setup cvsroot environment' ' ++if ! test_have_prereq PERL ++then ++ skip_all='skipping git cvsimport tests, perl not available' ++ test_done ++fi ++if ! test_have_prereq CVS ++then ++ skip_all='skipping git cvsimport tests, cvs not available' ++ test_done ++fi ++ ++test_expect_success 'setup cvsroot environment' ' + CVSROOT=$(pwd)/cvsroot && + export CVSROOT + ' + +-test_expect_success PERL 'setup cvsroot' '$CVS init' ++test_expect_success 'setup cvsroot' '$CVS init' + +-test_expect_success PERL 'setup a cvs module' ' ++test_expect_success 'setup a cvs module' ' + + mkdir "$CVSROOT/module" && + $CVS co -d module-cvs module && +@@ -42,23 +53,23 @@ + ) + ' + +-test_expect_success PERL 'import a trivial module' ' ++test_expect_success 'import a trivial module' ' + + git cvsimport -a -R -z 0 -C module-git module && + test_cmp module-cvs/o_fortuna module-git/o_fortuna + + ' + +-test_expect_success PERL 'pack refs' '(cd module-git && git gc)' ++test_expect_success 'pack refs' '(cd module-git && git gc)' + +-test_expect_success PERL 'initial import has correct .git/cvs-revisions' ' ++test_expect_success 'initial import has correct .git/cvs-revisions' ' + + (cd module-git && + git log --format="o_fortuna 1.1 %H" -1) > expected && + test_cmp expected module-git/.git/cvs-revisions + ' + +-test_expect_success PERL 'update cvs module' ' ++test_expect_success 'update cvs module' ' + (cd module-cvs && + cat <<EOF >o_fortuna && + O Fortune, +@@ -86,7 +97,7 @@ + ) + ' + +-test_expect_success PERL 'update git module' ' ++test_expect_success 'update git module' ' + + (cd module-git && + git config cvsimport.trackRevisions true && +@@ -97,7 +108,7 @@ + + ' + +-test_expect_success PERL 'update has correct .git/cvs-revisions' ' ++test_expect_success 'update has correct .git/cvs-revisions' ' + + (cd module-git && + git log --format="o_fortuna 1.1 %H" -1 HEAD^ && +@@ -105,7 +116,7 @@ + test_cmp expected module-git/.git/cvs-revisions + ' + +-test_expect_success PERL 'update cvs module' ' ++test_expect_success 'update cvs module' ' + + (cd module-cvs && + echo 1 >tick && +@@ -114,7 +125,7 @@ + ) + ' + +-test_expect_success PERL 'cvsimport.module config works' ' ++test_expect_success 'cvsimport.module config works' ' + + (cd module-git && + git config cvsimport.module module && +@@ -126,7 +137,7 @@ + + ' + +-test_expect_success PERL 'second update has correct .git/cvs-revisions' ' ++test_expect_success 'second update has correct .git/cvs-revisions' ' + + (cd module-git && + git log --format="o_fortuna 1.1 %H" -1 HEAD^^ && +@@ -135,7 +146,7 @@ + test_cmp expected module-git/.git/cvs-revisions + ' + +-test_expect_success PERL 'import from a CVS working tree' ' ++test_expect_success 'import from a CVS working tree' ' + + $CVS co -d import-from-wt module && + (cd import-from-wt && +@@ -148,12 +159,12 @@ + + ' + +-test_expect_success PERL 'no .git/cvs-revisions created by default' ' ++test_expect_success 'no .git/cvs-revisions created by default' ' + + ! test -e import-from-wt/.git/cvs-revisions + + ' + +-test_expect_success PERL 'test entire HEAD' 'test_cmp_branch_tree master' ++test_expect_success 'test entire HEAD' 'test_cmp_branch_tree master' + + test_done +diff -Nuar git-1.9.0.rc3.orig/t/t9601-cvsimport-vendor-branch.sh git-1.9.0.rc3/t/t9601-cvsimport-vendor-branch.sh +--- git-1.9.0.rc3.orig/t/t9601-cvsimport-vendor-branch.sh 2014-02-07 12:45:45.000000000 -0800 ++++ git-1.9.0.rc3/t/t9601-cvsimport-vendor-branch.sh 2014-02-08 11:49:12.244179502 -0800 +@@ -34,6 +34,17 @@ + test_description='git cvsimport handling of vendor branches' + . ./lib-cvs.sh + ++if ! test_have_prereq PERL ++then ++ skip_all='skipping git cvsimport tests, perl not available' ++ test_done ++fi ++if ! test_have_prereq CVS ++then ++ skip_all='skipping git cvsimport tests, cvs not available' ++ test_done ++fi ++ + setup_cvs_test_repository t9601 + + test_expect_success PERL 'import a module with a vendor branch' ' +diff -Nuar git-1.9.0.rc3.orig/t/t9602-cvsimport-branches-tags.sh git-1.9.0.rc3/t/t9602-cvsimport-branches-tags.sh +--- git-1.9.0.rc3.orig/t/t9602-cvsimport-branches-tags.sh 2014-02-07 12:45:45.000000000 -0800 ++++ git-1.9.0.rc3/t/t9602-cvsimport-branches-tags.sh 2014-02-08 11:49:12.244179502 -0800 +@@ -6,6 +6,17 @@ + test_description='git cvsimport handling of branches and tags' + . ./lib-cvs.sh + ++if ! test_have_prereq PERL ++then ++ skip_all='skipping git cvsimport tests, perl not available' ++ test_done ++fi ++if ! test_have_prereq CVS ++then ++ skip_all='skipping git cvsimport tests, cvs not available' ++ test_done ++fi ++ + setup_cvs_test_repository t9602 + + test_expect_success PERL 'import module' ' +diff -Nuar git-1.9.0.rc3.orig/t/t9603-cvsimport-patchsets.sh git-1.9.0.rc3/t/t9603-cvsimport-patchsets.sh +--- git-1.9.0.rc3.orig/t/t9603-cvsimport-patchsets.sh 2014-02-07 12:45:45.000000000 -0800 ++++ git-1.9.0.rc3/t/t9603-cvsimport-patchsets.sh 2014-02-08 11:49:12.244179502 -0800 +@@ -14,6 +14,17 @@ + test_description='git cvsimport testing for correct patchset estimation' + . ./lib-cvs.sh + ++if ! test_have_prereq PERL ++then ++ skip_all='skipping git cvsimport tests, perl not available' ++ test_done ++fi ++if ! test_have_prereq CVS ++then ++ skip_all='skipping git cvsimport tests, cvs not available' ++ test_done ++fi ++ + setup_cvs_test_repository t9603 + + test_expect_failure 'import with criss cross times on revisions' ' +diff -Nuar git-1.9.0.rc3.orig/t/test-lib.sh git-1.9.0.rc3/t/test-lib.sh +--- git-1.9.0.rc3.orig/t/test-lib.sh 2014-02-07 12:45:45.000000000 -0800 ++++ git-1.9.0.rc3/t/test-lib.sh 2014-02-08 11:49:12.244179502 -0800 +@@ -772,6 +772,7 @@ + esac + + ( COLUMNS=1 && test $COLUMNS = 1 ) && test_set_prereq COLUMNS_CAN_BE_1 ++test -z "$NO_CVS" && test_set_prereq CVS + test -z "$NO_PERL" && test_set_prereq PERL + test -z "$NO_PYTHON" && test_set_prereq PYTHON + test -n "$USE_LIBPCRE" && test_set_prereq LIBPCRE diff --git a/dev-vcs/git/files/git-daemon-r1.initd b/dev-vcs/git/files/git-daemon-r1.initd new file mode 100644 index 0000000..339b623 --- /dev/null +++ b/dev-vcs/git/files/git-daemon-r1.initd @@ -0,0 +1,13 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/files/git-daemon-r1.initd,v 1.2 2014/02/07 07:59:03 polynomial-c Exp $ + +pidfile="/run/git-daemon.pid" +command="/usr/bin/git" +command_args="daemon ${GITDAEMON_OPTS}" +start_stop_daemon_args="-b -m -p ${pidfile} -u ${GIT_USER:-nobody}:${GIT_GROUP:-nobody}" + +depend() { + use logger +} diff --git a/dev-vcs/git/git-1.8.5.3-r1.ebuild b/dev-vcs/git/git-1.8.5.4-r1.ebuild index 16f3613..c16d66b 100644 --- a/dev-vcs/git/git-1.8.5.3-r1.ebuild +++ b/dev-vcs/git/git-1.8.5.4-r1.ebuild @@ -12,7 +12,7 @@ PYTHON_NO_MAGIC_HEADER_CFLAGS=nope [[ ${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-single-r1 systemd ${SCM} +inherit toolchain-funcs eutils flag-o-matic elisp-common perl-module bash-completion-r1 python-single-r1 systemd ${SCM} MY_PV="${PV/_rc/.rc}" MY_P="${PN}-${MY_PV}" @@ -33,7 +33,7 @@ if [[ ${PV} != *9999 ]]; then ${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="~amd64" else SRC_URI="" KEYWORDS="" @@ -89,9 +89,8 @@ DEPEND="${CDEPEND} sys-apps/texinfo app-text/xmlto ) - test? ( - app-crypt/gnupg - )" + nls? ( sys-devel/gettext ) + test? ( app-crypt/gnupg )" # Live ebuild builds man pages and HTML docs, additionally if [[ ${PV} == *9999 ]]; then @@ -235,6 +234,8 @@ src_prepare() { # hack, needs better upstream solution epatch "${FILESDIR}"/git-1.8.5-mw-vendor.patch + epatch_user + sed -i \ -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \ -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \ @@ -375,7 +376,8 @@ src_install() { use doc && doinfo Documentation/{git,gitman}.info newbashcomp contrib/completion/git-completion.bash ${PN} - newbashcomp contrib/completion/git-prompt.sh ${PN}-prompt + # Not really a bash-completion file (bug #477920) + dodoc contrib/completion/git-prompt.sh if use emacs ; then elisp-install ${PN} contrib/emacs/git.{el,elc} @@ -510,7 +512,7 @@ src_install() { fi if use !prefix ; then - newinitd "${FILESDIR}"/git-daemon.initd git-daemon + newinitd "${FILESDIR}"/git-daemon-r1.initd git-daemon newconfd "${FILESDIR}"/git-daemon.confd git-daemon systemd_newunit "${FILESDIR}/git-daemon_at.service" "git-daemon@.service" systemd_dounit "${FILESDIR}/git-daemon.socket" @@ -634,7 +636,7 @@ pkg_postinst() { echo showpkgdeps git-quiltimport "dev-util/quilt" showpkgdeps git-instaweb \ - "|| ( www-servers/lighttpd www-servers/apache )" + "|| ( www-servers/lighttpd www-servers/apache www-servers/nginx )" echo } |