diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2012-08-22 04:44:08 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2012-08-22 04:44:08 +0000 |
commit | a5d73cb88a1bcd72fe6736050da79d3572784ca8 (patch) | |
tree | 6ce59f7cf579d94f75eb30314d16039cbf3962d8 /dev-vcs | |
parent | Fix OpenCL issue for amd64 multilib profiles related to previous patch. bug #... (diff) | |
download | historical-a5d73cb88a1bcd72fe6736050da79d3572784ca8.tar.gz historical-a5d73cb88a1bcd72fe6736050da79d3572784ca8.tar.bz2 historical-a5d73cb88a1bcd72fe6736050da79d3572784ca8.zip |
Finally, a Git that works with SVN 1.7, per bug #418431! 1.7.12-r1 contains backported ms/git-svn-1.7 branch that will be merged into Git 1.7.13. 1.7.12-r0 excludes that backport but is otherwise identical. Thanks to Michael Schwern for the development work!
Package-Manager: portage-2.2.0_alpha121/cvs/Linux x86_64
Diffstat (limited to 'dev-vcs')
-rw-r--r-- | dev-vcs/git/ChangeLog | 14 | ||||
-rw-r--r-- | dev-vcs/git/Manifest | 19 | ||||
-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.7.12-optional-cvs.patch | 368 | ||||
-rw-r--r-- | dev-vcs/git/git-1.7.12-r1.ebuild | 511 | ||||
-rw-r--r-- | dev-vcs/git/git-1.7.12.ebuild | 511 |
6 files changed, 2699 insertions, 12 deletions
diff --git a/dev-vcs/git/ChangeLog b/dev-vcs/git/ChangeLog index 9425898eb078..0aea9bfdee41 100644 --- a/dev-vcs/git/ChangeLog +++ b/dev-vcs/git/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for dev-vcs/git # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v 1.147 2012/08/19 16:58:25 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/ChangeLog,v 1.148 2012/08/22 04:44:08 robbat2 Exp $ + +*git-1.7.12-r1 (22 Aug 2012) +*git-1.7.12 (22 Aug 2012) + + 22 Aug 2012; Robin H. Johnson <robbat2@gentoo.org> + +files/git-1.7.12-git-svn-backport.patch, + +files/git-1.7.12-optional-cvs.patch, +git-1.7.12-r1.ebuild, + +git-1.7.12.ebuild: + Finally, a Git that works with SVN 1.7, per bug #418431! 1.7.12-r1 contains + backported ms/git-svn-1.7 branch that will be merged into Git 1.7.13. + 1.7.12-r0 excludes that backport but is otherwise identical. Thanks to Michael + Schwern for the development work! 19 Aug 2012; Raúl Porcel <armin76@gentoo.org> git-1.7.8.6.ebuild: alpha/s390/sh/sparc stable wrt #418381 diff --git a/dev-vcs/git/Manifest b/dev-vcs/git/Manifest index 65cb44597b98..3cf741f26280 100644 --- a/dev-vcs/git/Manifest +++ b/dev-vcs/git/Manifest @@ -1,12 +1,11 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX 50git-gentoo.el 472 SHA256 7cd37e8db7eaeee8d822d38851eb69771b0f09c79883a8e51309a9add85fdbe2 SHA512 0435d7d67f2b64460a62c6a95c65a722c0f8d5d50d064a81e690de84a761ba518d32db545ee70c0fa3ad7803d77d5dab100689888bc92c9d82f2d6d5073623b3 WHIRLPOOL 887682f79182f6728af3c0fd2ee0e81319d49761a987559684be5e4acae4af579a5b8d1197ddba31452cec179de3c8f5784cc85ad61f78b400e42c204c93f642 AUX git-1.6.6.1-interix6.patch 457 SHA256 a8b788b8ef41ce7fd1018f13795694a908fbb1884de195c89a58fe87f3968849 SHA512 58e63d78d665f9122214ec1b7a8d730f7c9d8938283db98580334e293f46a984b86c8d72fbe48f891eda6d48fc76982857539761c6dcf881b1bb5817c275d263 WHIRLPOOL 803ec2121a7abe018c591c249c2b835aadd114a65b0cf6be4fd6440c77f9282d13b4225e1d63a5b22bb46f058bcd073dc97e801476278a91ff9f82634104f3d8 AUX git-1.7.1-interix.patch 2192 SHA256 b560fcc41ea93df429290ec645f3e37368ceec1101f7124574fa6d9bab00a495 SHA512 bd02d6c2b83827eb3d286ef37b358c2eb25d453655bebf1d2d074b47e7aab1c3b3f07da21eca33f01ac457d2878b674b2c857f9915ac71438a02bca112c89c41 WHIRLPOOL 7a314149acaa54199a258c1ebd9ee34356fa0393d3d49c994b25a66a593d4214391495d5dd67db01e6b1e396cb6c96b0ddcb7c3d78316bec7fb10af0e7e38af4 AUX git-1.7.10.2-optional-cvs.patch 11951 SHA256 ce5d3a85c2314177320f57a3e31f69a3df19c090b8c06bcd8ac4999cb3348b4c SHA512 4c9cb155e1c689f604712159336a53c2bea4d6e36cdc372aa77b509a462fd9dfa09275ed9f4dabde3e717feb0baddf1d2e6b54507a457e42943d2bcc01dbd31d WHIRLPOOL a47bb4914637902df5de35f721ceb1c8298357a869c76ecff093ae120b98b504e0e61b97ab5622609c2fe45b4aa0b4f2dd99cedc56403073456275b852d4e80b AUX git-1.7.11-optional-cvs.patch 12028 SHA256 252e92a9f7fed3149f5474de7f52eabcb8f297e3f4e8d8abcb249fbbaccb7ed9 SHA512 c228e9e33e1f2e9a48a9503e425372c59b4f8602bf5b425d6d70335c21f09b0c7cea244e6b6417154d95501027e6cec3911888d6feac47854d784986215b7142 WHIRLPOOL f650435fd06e5c95dd0644918a889a4c7b1ef5f12fd52552f59a58c2f1fd53faac7e6311af0b70578a1ed1f5428510a4fcc19dfc114a86754d0572d3b1ba0be6 AUX git-1.7.11.1-optional-cvs.patch 11987 SHA256 78ecfd9b81069a36d810118344211d8f2a1d9f9f116c7f843464943f5d7b0e7d SHA512 811505de403f1f70fb474e8c2748fca370f82b5442b6a3e4178cbd91db9279af6a584a6043930837879d0bea237ea5307ace5d66278416455fe2ff66ab5d573c WHIRLPOOL 0c16c72de6b3f24061e19adbed9880585f49ab6d3ae70538bdaaa2445e37856ce260d429447c466412a3c2c812a027488af7263b87e204a0e8c1f750a3d705cc +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.7.2-always-install-js.patch 1167 SHA256 2988513c5a81f446818b850414b4bf7dc8a3177eb1dc32f29e530a80479baa9e SHA512 5607a5a4e6d4f23548cad4198badcae04774cf7a6f658b6ba53a48a4d3fad56525ced55280d037544f406e8233b2c556c670769d0d9fbc63671b7f48fe8a8c75 WHIRLPOOL 396765c75dd83c159af97709dfdc1cdb64fb39b726ff6360a0c2083aa51fda5c123a77942d4713c015a0c5272264225602c99e5269a5aa63072d7a118187dfbe AUX git-1.7.3.2-interix.patch 2283 SHA256 13dc741c481fcba6db060bbc8b54d0e19350c9c2270e113afe5ac3962d78e8b6 SHA512 6eb59bfaaef08725dec4405ecfd27549be4d116d48f8757d913b8c4514adea99ac98c2e33f620fc7d19d7f03a2a6a8c2de9a08b765fd6a7b7ce3f27daa703832 WHIRLPOOL a30523cd3e21821f00b865c051bda4e537833d1d8f50125720d2e2e643dd1f4d02235ca652b5d4be52f8bc1daa61bfd701af8679c79250eccdd3529ba2f6506b AUX git-1.7.3.4-avoid-shell-issues.patch 1165 SHA256 7dd0eef0b93ed52e1c744d2d1888387c0aafecbdaf2d889c8ad48f45ed68d5d5 SHA512 4f594688c8af3b31d323e33531ddfbb171a98fa6b6b42a9b6587dff510ba0c12b46b49b6272f296850467a5ce813853bf4596719230cb9ad0828ffd32353f466 WHIRLPOOL 7d61a65c2304f7c21c90ec266c1990dccf5670f9ada26087b6ea5f8cef0f3db07b1ee897705ffd60815ab47e31a2c93fd0cc6536f522c3bfe7d5136dcb8e1c67 @@ -22,6 +21,7 @@ DIST git-1.6.4.5.tar.bz2 2176867 SHA256 5e570a62d443a32ef013561817b87b4e8968407e DIST git-1.7.10.2.tar.gz 3809702 SHA256 335e978814659f328e377715b13a33336859275ae6f215bf28bbbb2ae711bb43 SHA512 52ba7168d50128cf9abc2052400050f14f073c5398c8075d1e3e7695f2d701b107f74e24ca1b2b671a03411010eee86f46c0500de487d5b54d496f1e8d093403 WHIRLPOOL 3913dee3d07acc1a91a4bf553bec9c4fe41321a81d67d10cdbfab5ba81da9a1b010c3be4307616960749840fa85137c237eaf027bdfca6800e95e262752d203f DIST git-1.7.10.tar.gz 3753777 SHA256 d2a88d1564ebe468bb6a58a4edb57f5e06bda9846300cdbedbef8f7bccaf4ea6 SHA512 01c622c284a4a661c67facfe6776a86163b68612d7233a887be06cc49e2ba7c7eab36ac5033ee6eec6a56b36ceed1fc85d45f6118d9038fdea82f2bb2b9fd2a7 WHIRLPOOL 7f4f10b60cd2c9ce2e508815d8774424307bcd7272e0500dfe12b84042b998173a187511bbe5d52bde3f387dbb7aef06cf3b8e4e76ee0c6aa442868e5d6551a1 DIST git-1.7.11.1.tar.gz 4000383 SHA256 b0d90066f3e929b84787d10270461d0d81314898b8f335884e257f4b3091e89e SHA512 23df9e81db3e5df6e6d5fd8a0156b4e645cfcf6ea4c1c03503d9bd780b51b3127a20c6e72a2b41d24c29ab9ef85264b95071ad7074abab6b09074f0de5b0ac4f WHIRLPOOL 4ff6ef2ee0dfa86af4f79a78383c30b963899ed4410f7981f2ca4dce80d80a4d95b252b793b6e8b6e86fa2a885ab3d8fe1812a3232a7f1b371c62a5a801dede9 +DIST git-1.7.12.tar.gz 4092043 SHA256 3b8661782dc280d3d4be5193bcb8a1895c1ba272cf02efb70857bbcc4415f505 SHA512 1353eca72d664bcceb900bbe90003ceb2b8f73db8e3a402e8f2c142f3e933fc19f95c4c5118a1c57221d6513dba3e1912f40169cf36ff8abea97dbf2f8e84502 WHIRLPOOL 11ede1f8383136d0ace13c99e7345c738e911f8038e09cad0aaf8e7cbba789d753b5c337f053b3a145d6a35d29285558571b893fa9f3bc6ac76ec8e25c4fc4f8 DIST git-1.7.2.5.tar.bz2 2561345 SHA256 d84e6d76fe9d30af5515ea8177b0d8bfe774ee0836d21ed450cb4d52f5aa6311 SHA512 b78e59ea0b110c24121116abbbc191910ba8feae9ca2c89d661abc456cadfa21e42bdc72c961a94a46b47b20f64cd8bf23d0ed600ae40afb8572eb3455ea3ea4 WHIRLPOOL 36dc12f00c84f339502f9b3104a183e855e2b7eb5e11ef46c162804df0613dada52a237f1854177909ddd7d29bf9f317e3dfb6fe223f3e18db4518e7c35a6a1c DIST git-1.7.3.4.tar.bz2 2635522 SHA256 3e5e2b6547ee4aae82b4c5f589ff084996e9e6e0e2b52c92365e6baa1e4a0171 SHA512 93cb7a86020488bcb1e367442978c1f2c57be0c623f2f8d7d5cf385fcf2e43fff03354b18985e1560ef807f05d251ea1041440b09216408863cbc1ab7510a09a WHIRLPOOL bbe4f3c71d5322749203eec852aba838f591d24abcdc09949d0727155fa9ecdad9cc127de998173fc3e35459440d173317fda456822645f73c52c28fa37bcfd8 DIST git-1.7.8.6.tar.gz 3546112 SHA256 45be602d0ca64eb44282cec7a5a7286487f7e9ed0c8112735456a22fdf1f6db9 SHA512 84b0341d040a0f99a40d2d316498a964cf386818673ccf04aacb3b2a7e3c09b275f819a7cd9746dec67e1d0300e13fe5706a57c94ae2d26fd1b82e9b93f405ae WHIRLPOOL 804e70176a229123e09348b6585a461bc162edf9786d617926f42fdab6e615ffba9a9b2b6654562d9757e96bdb3603aaa2ee78ac8c0f124d413409b0fcc7cfa8 @@ -36,6 +36,7 @@ DIST git-htmldocs-1.6.4.5.tar.bz2 772113 SHA256 12c13ead869918d8470d68c7331675c5 DIST git-htmldocs-1.7.10.2.tar.gz 1764063 SHA256 4cb17519eb621060d657c71ba8b10d755a6ea71123642ed6cc73d24ce8f0b734 SHA512 bb2d0b1e5914aaa10e0c13e2c31e45fdc62d413b06eaff3766279c39cc89a81fddcb902b3f3ba2b77118a94b52fc3b32f48c4a0131c8144966efa5349d6ef54e WHIRLPOOL 46043e51bfbb0279b9cde5ac2ac836416ebc77005cf4ee43696196fdf80eb33fe4933b8ece206ab5308be61230750e5262e785af8c944718f0c347d03dc09ab7 DIST git-htmldocs-1.7.10.tar.gz 1759866 SHA256 049fb01aaaeb9b3dd7bb93e5d601fce33164ad4127519d797e950e0e02f54137 SHA512 2d201f29f1beb0ba7db4ed61fab75b50afc0da3fd6d60337830f178da064bb0c01061ea1bcf6ec3afbdec87d16f54ce8dee82fb8c03c630a62b27f1841049823 WHIRLPOOL 7c1ca7b3ab93e6567b7e483959be106c2abbed0ff5c62fe347abb1a622aa546f6f74ba0163379652d61aae46642d65e3f455df08501aeb47d7a54299b4843c25 DIST git-htmldocs-1.7.11.1.tar.gz 1775348 SHA256 24cf2400deba4b07a8723e59e033848dd56f3539a5196b5f35aa0782dd682ecb SHA512 0ac99da600ecbc368ba987a387115bf01fe612b2e5675a0f8d95bfa6d039eaa148e7a5ba0bc270352de4aeb14de29962239dc3e799d31986869080afb5c78439 WHIRLPOOL 25cc47ff335c377e95a1dc1cdb557af758f60bf1bde8aeafdcb626bf964a70f40d61f23b6d5ffab93465c513ebb8ba0f0abe277a4d11719024387de7c84371c0 +DIST git-htmldocs-1.7.12.tar.gz 1787511 SHA256 7f58468a20ca7f7d225698d0747902c34f891c88df6beff270b739d6adf4d271 SHA512 6f76f5a2b1bccaddf2ff48a0454c8710c74a197d1ff60bd081fbd67c8c0b3baf21ee2d6c6c27b9cfdc975ce14550be3482241540da6cafa0761c291fd40cc46d WHIRLPOOL 1bd554a612afc58486fc1db4e7fc5cb8d110eb4a6d3eaffc757031248a17421796015f086fe3509b183e64bd84a656623ca8e3fa83ae72078dfdce8159121473 DIST git-htmldocs-1.7.2.5.tar.bz2 919247 SHA256 6b6291ffad4eae80d2739acdffffdd6293b9e50366cfa53ffb0c3a1427700337 SHA512 e8b2bc14b1a687f76256dfcfae893252b091c6d60dcd0fc53da50ceaee1434d5c976f1d09d45f8cc5a2991a9051ee8d0482a281fe7559225b6c750fe241b713c WHIRLPOOL d1ea7a272ba728e01523439ac897e1ecbc22917aceaa8871ade522d18db37df0d305fd3dd1782ef20dc1c935ec3965ebbe86d4cc29419a9e82aee831002eabed DIST git-htmldocs-1.7.3.4.tar.bz2 929858 SHA256 24f03bcd6b5c3745c2395cf49260cdbf7fe80292883b0b4da3e1ac636aee6fba SHA512 3cda317a0608ef1ee18752fd9f0cba8bc91c3f5d66e0e1d8ee4beb63b7e50dd562721fe53bde3244528a915ad463fc60d13896f3344a7679256c11c79fdb33e4 WHIRLPOOL b83941afd6aaafa5354711fdeefa5cbce7e2b255c0ccab411f94dee48d97838fd7224d098c085eec5e1dfd3eb0599b1a39c8cddeeb1b727a15a2398d4c4b6d11 DIST git-htmldocs-1.7.8.6.tar.gz 1688622 SHA256 7c7447fe136349b1807caba1c00fe6a46866c9b54cba068f322967c0f8b2c0bf SHA512 31a88363aad7a20a5633530a080258807ef52c1a4074dd308d00540f1dc2b6e1c68d1bb43fa55b14b0fff5e3c24034a15debc9236ad3a2eafa8440982a5462cd WHIRLPOOL a8bc612b3d3a453eb46cc7a79fd929b2ac1c9858a52b3687c59fd113c582c4330f44e1dd64f5c4b755ab49aefc03295a19c440af12001f2f42e5ab1836775f7f @@ -50,6 +51,7 @@ DIST git-manpages-1.6.4.5.tar.bz2 254368 SHA256 f73ae98b0cea0ef6d8f7c8b599d6cad0 DIST git-manpages-1.7.10.2.tar.gz 511363 SHA256 bc57810ec8d87f7a10f320e31ceeb1f9eaf254e62e0f6414af67f17d0cf7d522 SHA512 f62c5996675273f4180de7515782025075ff6c0256b3d41b13916fd0fae1902a61cc554e24aa565b7bee61efb900ff072119332215d55a2819a02eed476f2245 WHIRLPOOL 5496599e839d17e0ce4194598c1e46aba80cd3c2a6352a7168a975a768d3ce71fdca413fe957cd9b2ab2af35adbf401497984ad66858a333f11ea7c8889d6841 DIST git-manpages-1.7.10.tar.gz 510752 SHA256 19f2b47b436166a6d5958142d8517f057a9532d58249344c482462dbf204d703 SHA512 e6481a3d768ec2ad1f6e22e6e1630c934cb4dd719c86d2b6a5ac46d0f22d213c6602508ef44a584557bec123aa076e60087843e5ad0548dbe5a9de0f419e9e27 WHIRLPOOL f66e2eff2efd5b22db19e2d4d39b84fd1339cd2819cfb370391c2b8788651071a71c49120df22c0e750d07be45eb936122785b4e797ada5b50011bd78e0866b9 DIST git-manpages-1.7.11.1.tar.gz 514150 SHA256 aaf8593c85400406ccd1a87af21401ed967fa9d4ff6f0cf04a1e121af1b47e77 SHA512 6b1580600c74b32131cbb07923494581a97c7690283c416c5cc18ceb3ceefd9593e3710c3f3da44b0c0bf82921d1ba91f206497860ea0e07641482cb76052d3e WHIRLPOOL cae734b0db0caa72501753b12b0e547438106dcac8d4b358defc00e96a392f6d3e926ae53dd02e5016e19a553c5328d196dbd657c1f7fe9bd174d76636812d2d +DIST git-manpages-1.7.12.tar.gz 517802 SHA256 146a4e0899a028fd4256654e472ecfe3bef995fb029ea71c35ff9618f14dc127 SHA512 bc407311884e343a550f3280fd48efc8acf63d7682ad9b787c79f64de6268da3183ad9fb09d8354b3c1b8b76539e28d40aee595a5a49cfe9f6c1c147e52ba1be WHIRLPOOL 3fef3a1187574abcfc583a1fddd160fa0512f3466d58420442ca11afc15acc6c0343dd08a05f265fd44b51eb0c1fc5728a2b8cc7b647fcbd3fb3e8529dd47e5a DIST git-manpages-1.7.2.5.tar.bz2 289543 SHA256 a42a977a1ecfd3cea62e1f02fc89f57029a94f163ff7205f6a56ab4b67d6bd6e SHA512 b4065ef9ed7beb84d56fdfeadf9608c0b6bd36a06460b68ba575583062612f469e7db1d08c232f3a9253ca0b957bacc508fd4ec702070eb4c84d174af1828ab9 WHIRLPOOL d22249c22ad9da862cb842e37463cff3a7967de70441a851640641d78d185da916db9f3d3fec328bc10e48bc318b2b4fa085fae81c2576a758dededf153cc78b DIST git-manpages-1.7.3.4.tar.bz2 294381 SHA256 2ff98641bc655b29a7fb72bced46da09c99b6fad3b651722b7b8057df4a9ce75 SHA512 d73e3d11a0b551d35cfb3fbc214ecec34ea7cb79e11e9453be5dd7c649f7fd93b7ab286590cb6101d5f011b35ee0469443325cd9636520717dc15057f34c413d WHIRLPOOL b17d6e9fefdb02faf4a33ad7ca4707432274e0a929e274d5347fb9917250e76295f2d28da930dff16d9cee4a5fc6fdfbf5b9b700a6d8fdcc218df6ded5088c1a DIST git-manpages-1.7.8.6.tar.gz 501678 SHA256 559b7a6ba8eaad655d725765b75aff9c6a5aaed2cc77abcdd2f88c773a0b3a6d SHA512 925c1775e0d57ee832c0794a8adaa5ebe332556358dbe75cedf9298d1f2e39b31e43693d8873667fdd1795e9e7dd71be83880d78d6ff6454959f325fc518bd88 WHIRLPOOL 2ef274e721013070440f8addbc4fd5cfb886db3b78f3a961bf7add2864e9ae609340ca26de88e3edcbd7513ebab1f46ef8d25d3e06bfe760233afdb1d7ccba4a @@ -64,6 +66,8 @@ EBUILD git-1.6.4.5.ebuild 10406 SHA256 186e72aa90b3c98448a64b7ae718772675a601c80 EBUILD git-1.7.10.2.ebuild 16480 SHA256 251dee03c550c64a91fd0a0f01f6a4dc5829bc88c64e1b761d1d5d4f98ed7d93 SHA512 9b5e31c796c77680e894b0282138ca633690d4fd6236ebea588369dfcc061b4d9cdbd7028331259f63ab7574ff38ecee87148e8ee2d9ae8b584802fd325dae4a WHIRLPOOL 6bcdc20a2a1ef7252483a8afdbc0abee548962c29501f742345d656341aa042dc31b3115dfe46126bf5a2729a03d104bcd291af1eae550416a3064111fa83611 EBUILD git-1.7.10.ebuild 16477 SHA256 01123e296ddf96a8a949e224e18d783edabd64f6b95275827bca37bdc3dba3e7 SHA512 bd6307fe23fc952669e5f4010b77f6422008b3ab55b7be1c2159afc920b84f1dfeab3d917f67805fbd035bc8c7c10453541bf794acde2222d1bb764ab1d25c05 WHIRLPOOL 4212e9b5e0c89d3e5810578006d9b7961ebf0ec5067fe28a1ebe6ea871597d224e8b4a1abd66626df281c770e77c1852a4a13b77b337d74fc22f3f3763bfa9d6 EBUILD git-1.7.11.1.ebuild 16499 SHA256 de0a1dd0e716d69e6b86e0d49a1c8d9f02ffc0a8c4d58aaf1612b1aa489d31b9 SHA512 e24476b2a6d6a4b637ec432793af557a76760a2c98585e7521aab4ba522cf4d0c71a5167ae20247a489f75a62c5444ae7ad67f0ad398e8e3a6392f70ffca5b88 WHIRLPOOL 0e0f5f38a4e1932ece197b6c7fa6f592316bd4adc7dcb818ac372a8341a700178f4df5494e3c2d8b435da88a408aefe5614de2e9d468c5f67899620a4d74d239 +EBUILD git-1.7.12-r1.ebuild 14793 SHA256 5aa06143749bbab953b4dfe537a29de5113c23ec3028e3b1be3ed2316ec02fce SHA512 eab3086fe5dd12fd88e5e9c537997a19b1b0d2954e955d825b9eccf7f14da4d3acb9db4bea4b5c46238471c0f51f918c076c096d2381e2f3e97105aa0699f7fa WHIRLPOOL 42692fe010d2b63b955a084e44ced90b5f6b9b20968fa12bcad7aed0f88901be3a9daabfd068f725c82eb5e06b14bf8858313445fc1fe1e61d2ab5af6489894f +EBUILD git-1.7.12.ebuild 14791 SHA256 ee36594a4cc13667bc2b46ec8e72cf6729f5a996bfb3fbb2549c7bcfe637c575 SHA512 d157710099d711f12a4ca6037d64d7483708e69ede96856f351ba07587d475ad0f822b885274418ba3f4a6ee84fa439b5c565ec11bb0c1c4cfe8cc067647a5ab WHIRLPOOL 72edcec2b0100ddf4187f95334f79e7fea9a4608023f244c3e8653b2bdb075387f5f17bad1d6a1f44240e602fff2297c8160f52e4bb0ada0932adf29426b1800 EBUILD git-1.7.2.5.ebuild 13520 SHA256 666e01293c6884d6ac11578b45f1fdcdf298cdb6d194c249f8e993d6c1b27343 SHA512 4784305ad792b86459e3641a5b86092512b85a149f3a222e55a3d26cd0c3cc63360555741812a8eae9a65a6b2bcb2962a40b220dd909f7f4866c047a38a6b9b1 WHIRLPOOL c08205a6b74fc22be4862544f44376fe8e3c651435a9f4e5d6bf63e677371ff356792a54af07006bb519372d9d8b62628f3f1f7039c1ae97b1c9bf72d6cd47d1 EBUILD git-1.7.3.4-r1.ebuild 14029 SHA256 9d0c67c61774f8f1f644b182c551d53bdf305dffaad390d0f0aa3cc048c4f662 SHA512 7ec9d3a609d5de63bee9f2d74ab87013dad12b033e15a9a9daa730754a7b5fe9f16f5f96fb2d237b97887c88908435983004ffbce865af9881e5a9a9d63a7e83 WHIRLPOOL 1ab4ab72833d11853226171d481ed88db85473766033bcc6200a12958e07a8581fd81e7d460e0f91f697de000b3d99214742d6428f889567277795bb73a5754a EBUILD git-1.7.8.6.ebuild 14683 SHA256 38f21df5f6abefb90ce93129adacf4b307decd48417d6830eced6ec0b595cbd0 SHA512 7ef0bc6125d06100636bfc15fef7d0cacef08f2c9a75beaa7331f1e5c5e06a7cd96f84b0ec975be8fd290efccaf0b9e40edb524063a2a9bfe69870bd2b2c9185 WHIRLPOOL 06ed98a81369963955aafa2186b30fa64ec544f8f1b268c7bb228d83c0e371e70223a69f7ed69da7df47ddc1a10459c40f36e3b2659d9c85c57e0dc036870d9c @@ -75,12 +79,5 @@ EBUILD git-1.7.9.7.ebuild 16390 SHA256 aa860adfdb9e2633615e7889140405f95b98339d4 EBUILD git-1.7.9.ebuild 16476 SHA256 7f80b6058d151746d295595df3a2193f37e10f5930c817144107eae535aa9f92 SHA512 a66f968e946d169d0ca8c93a965f36025366d928fbdc94135aaa13b3296a700afab1106d72bb7e09592c445975d0573ad93e248318026fdd4912c0f611199422 WHIRLPOOL 6a965cb166c6f98783529b517fa6f152ce7059b3168ea59b72f89d70008f2af247bca0ffeba6384ef384f00a85114c426a1e44e6a513369a80f5bacd7ac6f9c7 EBUILD git-1.7.9_rc2.ebuild 16036 SHA256 0eb93296b4353374da0f7254a04f2cdf0b8d08210ef9d08f9ed11ded9baa401a SHA512 f70d16f4d3de459c034b8d237483e689a46ad199be7c6cddd2bb7ce67358b5bb1ed0f8d17493db0df3601277927290ae1b543101637e1865299565ff560a2954 WHIRLPOOL 1964b24328615fcefd5c42cf2f7c55e87cd3b53c7bf00ce0c5dba8514f34249c9e2fe79e770457e6751f32bb8f7dbe9550a515c5d4bb4ce0ad7f68a21f4b0fad EBUILD git-9999.ebuild 16033 SHA256 ae6378530c481d867808ff2d999262a91be6757c0941658ec5e04c947d2cef3b SHA512 11d55847e18092006f001165a623088e5587b72db0ff4d953a695f17bc4a72496684db011c89701f68d15b52551a368e08fa5c26231174bcd10d2405b2adf14d WHIRLPOOL e87a5da2805ddd947cb877a9644eaba8f39fe62eada5e81d26183aa3a84377cd9bba9e5f7323b8d7996a8314f0312ed299fea5772c6befe5602750d371996ce4 -MISC ChangeLog 90465 SHA256 5ab5541269fed79ba5dce80705e6ee444fad172cd53434c93e0df222c90f949d SHA512 693c30d0fafbbba244442d1a7f5aa2b5cad2d3a26a7d017c070092be3f25fc0e129c3c5aeb6a7e75763afa3918a9b2e356afd44935bd6cb920bc19e5df95d841 WHIRLPOOL b40346849a258078e8b5c87a12fa799d578409fefeb50928a6d85f86a077b320aac535e542ad471eb3e14d9de63c63cca2746da0e6ddbc1401b1c89c4bab8f82 +MISC ChangeLog 90971 SHA256 3d0c4f2f0344e5425d1534c7cba48cae0db118e5536b5c6ac5875efe64921023 SHA512 56176260f31cf8e8757d23b1517aef7c8ab747055a7bbdbc0d3209b7ba1f63b22e2a87637ea48dcca69627ff3781cf9382aa204c34bea057c62e276d4834a2cc WHIRLPOOL 75851a1d2421fc03bc2a6add6a677a8b6f5c73111a1351546d658973f27400d354effeaf4d161845de4611409f457c6e3b9e10dd08187935fcec6fecafefd6db MISC metadata.xml 1633 SHA256 d755feb6f78130bdad7592120067448f46e760430599a39c734a5340ef0d7ae8 SHA512 71aba84643f81abf3c9ad845803bb15b5dbddf1192fe98101998826311090726167ee638b6bd352d8b9c36193e44c3f8702333ddde38967d376c685eb8361934 WHIRLPOOL 38f0469034aa82eebddd78986c10d2783478e98dd6cd11d7281ddad953ab18706ffc61f5faae9902286093bba6cd99f4db4edec0c8c5f7c1453a7426be7e1f0f ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.17 (GNU/Linux) - -iEYEARECAAYFAlAxGzcACgkQuQc30/atMkDjkACgnz3FuhkZW6rhjGmd6jCRpl4m -DiwAn3WflLx4rbaaWM+6ftq6xefrUAME -=ZXt6 ------END PGP SIGNATURE----- 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 new file mode 100644 index 000000000000..0a254ece8704 --- /dev/null +++ b/dev-vcs/git/files/git-1.7.12-git-svn-backport.patch @@ -0,0 +1,1288 @@ +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.7.12-optional-cvs.patch new file mode 100644 index 000000000000..bd8413df5a5b --- /dev/null +++ b/dev-vcs/git/files/git-1.7.12-optional-cvs.patch @@ -0,0 +1,368 @@ +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.10.2 to current git.git v1.7.12 tag PLUS fix-svn branch. + +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 @@ + # + # 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'. +@@ -405,6 +407,7 @@ + PROGRAM_OBJS = + PROGRAMS = + SCRIPT_PERL = ++SCRIPT_PERL_CVS = + SCRIPT_PYTHON = + SCRIPT_SH = + SCRIPT_LIB = +@@ -445,18 +448,19 @@ + 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-remote-testgit.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 + +@@ -2088,8 +2092,18 @@ + $(QUIET_GEN)$(cmd_munge_script) && \ + mv $@+ $@ + ++_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 + +@@ -2101,7 +2115,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) + +-$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl GIT-VERSION-FILE ++$(patsubst %.perl,%,$(_SCRIPT_PERL_BUILD)): % : %.perl GIT-VERSION-FILE + $(QUIET_GEN)$(RM) $@ $@+ && \ + INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \ + sed -e '1{' \ +@@ -2126,14 +2140,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 + $(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 +@@ -12,6 +12,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 --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 +@@ -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 --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 + } + +-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_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 +@@ -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 --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 +@@ -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 --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 +@@ -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 --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 +@@ -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 --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 @@ + 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/git-1.7.12-r1.ebuild b/dev-vcs/git/git-1.7.12-r1.ebuild new file mode 100644 index 000000000000..ff1a3bfc20ee --- /dev/null +++ b/dev-vcs/git/git-1.7.12-r1.ebuild @@ -0,0 +1,511 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-1.7.12-r1.ebuild,v 1.1 2012/08/22 04:44:08 robbat2 Exp $ + +EAPI=4 + +GENTOO_DEPEND_ON_PERL=no + +# bug #329479: git-remote-testgit is not multiple-version aware +PYTHON_DEPEND="python? 2" +[[ ${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 ${SCM} + +MY_PV="${PV/_rc/.rc}" +MY_P="${PN}-${MY_PV}" + +DOC_VER=${MY_PV} + +DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team" +HOMEPAGE="http://www.git-scm.com/" +if [[ ${PV} != *9999 ]]; then + SRC_URI_SUFFIX="gz" + SRC_URI_GOOG="http://git-core.googlecode.com/files" + SRC_URI_KORG="mirror://kernel/software/scm/git" + SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX} + ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX} + ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} + ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} + doc? ( + ${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 ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +else + SRC_URI="" + KEYWORDS="" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="+blksha1 +curl cgi doc emacs +gpg gtk +iconv +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test" + +# Common to both DEPEND and RDEPEND +CDEPEND=" + !blksha1? ( 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 )" + +RDEPEND="${CDEPEND} + gpg? ( app-crypt/gnupg ) + perl? ( dev-perl/Error + dev-perl/Net-SMTP-SSL + dev-perl/Authen-SASL + cgi? ( virtual/perl-CGI 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 + ) )" + +# This is how info docs are created with Git: +# .txt/asciidoc --(asciidoc)---------> .xml/docbook +# .xml/docbook --(docbook2texi.pl)--> .texi +# .texi --(makeinfo)---------> .info +DEPEND="${CDEPEND} + app-arch/cpio + doc? ( + app-text/asciidoc + app-text/docbook2X + sys-apps/texinfo + ) + test? ( + app-crypt/gnupg + )" + +# Live ebuild builds man pages and HTML docs, additionally +if [[ ${PV} == *9999 ]]; then + DEPEND="${DEPEND} + app-text/asciidoc + app-text/xmlto" +fi + +SITEFILE=50${PN}-gentoo.el +S="${WORKDIR}/${MY_P}" + +REQUIRED_USE=" + cgi? ( perl ) + cvs? ( perl ) + subversion? ( perl ) + webdav? ( curl ) +" + +pkg_setup() { + if use subversion && has_version dev-vcs/subversion && built_with_use --missing false 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 + fi +} + +# This is needed because for some obscure reasons future calls to make don't +# pick up these exports if we export them in src_unpack() +exportmakeopts() { + local myopts + + if use blksha1 ; then + myopts="${myopts} BLK_SHA1=YesPlease" + elif use ppcsha1 ; then + myopts="${myopts} PPC_SHA1=YesPlease" + fi + + if use curl ; then + use webdav || myopts="${myopts} NO_EXPAT=YesPlease" + else + myopts="${myopts} NO_CURL=YesPlease" + fi + + # broken assumptions, because of broken build system ... + myopts="${myopts} NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease" + myopts="${myopts} INSTALL=install TAR=tar" + myopts="${myopts} SHELL_PATH=${EPREFIX}/bin/sh" + myopts="${myopts} SANE_TOOL_PATH=" + myopts="${myopts} OLD_ICONV=" + myopts="${myopts} NO_EXTERNAL_GREP=" + + # can't define this to null, since the entire makefile depends on it + sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile + + use iconv \ + || myopts="${myopts} NO_ICONV=YesPlease" + use nls \ + || myopts="${myopts} NO_GETTEXT=YesPlease" + use tk \ + || myopts="${myopts} NO_TCLTK=YesPlease" + use pcre \ + && myopts="${myopts} USE_LIBPCRE=yes" + use perl \ + && myopts="${myopts} INSTALLDIRS=vendor" \ + || myopts="${myopts} NO_PERL=YesPlease" + use python \ + || myopts="${myopts} NO_PYTHON=YesPlease" + use subversion \ + || myopts="${myopts} NO_SVN_TESTS=YesPlease" + use threads \ + && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease" + use cvs \ + || myopts="${myopts} NO_CVS=YesPlease" +# Disabled until ~m68k-mint can be keyworded again +# if [[ ${CHOST} == *-mint* ]] ; then +# myopts="${myopts} NO_MMAP=YesPlease" +# myopts="${myopts} NO_IPV6=YesPlease" +# myopts="${myopts} NO_STRLCPY=YesPlease" +# myopts="${myopts} NO_MEMMEM=YesPlease" +# myopts="${myopts} NO_MKDTEMP=YesPlease" +# myopts="${myopts} NO_MKSTEMPS=YesPlease" +# fi + if [[ ${CHOST} == ia64-*-hpux* ]]; then + myopts="${myopts} NO_NSEC=YesPlease" + fi + if [[ ${CHOST} == *-*-aix* ]]; then + myopts="${myopts} NO_FNMATCH_CASEFOLD=YesPlease" + fi + + has_version '>=app-text/asciidoc-8.0' \ + && myopts="${myopts} ASCIIDOC8=YesPlease" + myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease" + + # Bug 290465: + # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim' + [[ "${CHOST}" == *-uclibc* ]] && \ + myopts="${myopts} NO_NSEC=YesPlease" + + export MY_MAKEOPTS="${myopts}" +} + +src_unpack() { + if [[ ${PV} != *9999 ]]; then + unpack ${MY_P}.tar.${SRC_URI_SUFFIX} + cd "${S}" + unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} + use doc && \ + cd "${S}"/Documentation && \ + unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} + cd "${S}" + else + git-2_src_unpack + cd "${S}" + #cp "${FILESDIR}"/GIT-VERSION-GEN . + fi + +} + +src_prepare() { + # bug #418431 - stated for upstream 1.7.13. Developed by Michael Schwern, + # funded as a bounty by the Gentoo Foundation. + 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 + + sed -i \ + -e 's:^\(CFLAGS =\).*$:\1 $(OPTCFLAGS) -Wall:' \ + -e 's:^\(LDFLAGS =\).*$:\1 $(OPTLDFLAGS):' \ + -e 's:^\(CC = \).*$:\1$(OPTCC):' \ + -e 's:^\(AR = \).*$:\1$(OPTAR):' \ + -e "s:\(PYTHON_PATH = \)\(.*\)$:\1${EPREFIX}\2:" \ + -e "s:\(PERL_PATH = \)\(.*\)$:\1${EPREFIX}\2:" \ + Makefile || die "sed failed" + + # Never install the private copy of Error.pm (bug #296310) + sed -i \ + -e '/private-Error.pm/s,^,#,' \ + perl/Makefile.PL + + # Fix docbook2texi command + sed -i 's/DOCBOOK2X_TEXI=docbook2x-texi/DOCBOOK2X_TEXI=docbook2texi.pl/' \ + Documentation/Makefile || die "sed failed" +} + +git_emake() { + # bug #326625: PERL_PATH, PERL_MM_OPT + # bug #320647: PYTHON_PATH + PYTHON_PATH="" + use python && PYTHON_PATH="$(PYTHON -a)" + emake ${MY_MAKEOPTS} \ + DESTDIR="${D}" \ + OPTCFLAGS="${CFLAGS}" \ + OPTLDFLAGS="${LDFLAGS}" \ + OPTCC="$(tc-getCC)" \ + OPTAR="$(tc-getAR)" \ + prefix="${EPREFIX}"/usr \ + htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \ + sysconfdir="${EPREFIX}"/etc \ + PYTHON_PATH="${PYTHON_PATH}" \ + PERL_MM_OPT="" \ + GIT_TEST_OPTS="--no-color" \ + "$@" + # This is the fix for bug #326625, but it also causes breakage, see bug + # #352693. + # PERL_PATH="${EPREFIX}/usr/bin/env perl" \ +} + +src_configure() { + exportmakeopts +} + +src_compile() { + git_emake perl/PM.stamp || die "emake perl/PM.stamp failed" + git_emake perl/perl.mak || die "emake perl/perl.mak failed" + git_emake || die "emake failed" + + if use emacs ; then + elisp-compile contrib/emacs/git{,-blame}.el \ + || die "emacs modules failed" + fi + + if use perl && use cgi ; then + git_emake \ + gitweb/gitweb.cgi \ + || die "emake gitweb/gitweb.cgi failed" + fi + + cd "${S}"/Documentation + if [[ ${PV} == *9999 ]] ; then + git_emake man \ + || die "emake man failed" + if use doc ; then + git_emake info html \ + || die "emake info html failed" + fi + else + if use doc ; then + git_emake info \ + || die "emake info html failed" + fi + fi +} + +src_install() { + git_emake \ + install || \ + die "make install failed" + + # Depending on the tarball and manual rebuild of the documentation, the + # manpages may exist in either OR both of these directories. + find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157] + find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157] + + dodoc README Documentation/{SubmittingPatches,CodingGuidelines} + use doc && dodir /usr/share/doc/${PF}/html + for d in / /howto/ /technical/ ; do + docinto ${d} + dodoc Documentation${d}*.txt + use doc && dohtml -p ${d} Documentation${d}*.html + done + docinto / + # Upstream does not ship this pre-built :-( + use doc && doinfo Documentation/{git,gitman}.info + + newbashcomp contrib/completion/git-completion.bash ${PN} + + 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 + # 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 + fi + + if use python && use gtk ; then + dobin "${S}"/contrib/gitview/gitview + python_convert_shebangs ${PYTHON_ABI} "${ED}"/usr/bin/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 + + dodir /usr/share/${PN}/contrib + # The following are excluded: + # completion - installed above + # emacs - installed above + # examples - these are stuff that is not used in Git anymore actually + # gitview - installed above + # p4import - excluded because fast-import has a better one + # patches - stuff the Git guys made to go upstream to other places + # svnimport - use git-svn + # thunderbird-patch-inline - fixes thunderbird + for i in \ + blameview buildsystems ciabot continuous convert-objects fast-import \ + hg-to-git hooks remotes2config.sh remotes2config.sh rerere-train.sh \ + stats svn-fe vim workdir \ + ; do + cp -rf \ + "${S}"/contrib/${i} \ + "${ED}"/usr/share/${PN}/contrib \ + || die "Failed contrib ${i}" + done + + if use perl && use cgi ; then + # We used to install in /usr/share/${PN}/gitweb + # but upstream installs in /usr/share/gitweb + # so we will install a symlink and use their location for compat with other + # distros + dosym /usr/share/gitweb /usr/share/${PN}/gitweb + + # INSTALL discusses configuration issues, not just installation + docinto / + newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb + newdoc "${S}"/gitweb/README README.gitweb + + find "${ED}"/usr/lib64/perl5/ \ + -name .packlist \ + -exec rm \{\} \; + else + rm -rf "${ED}"/usr/share/gitweb + fi + + if ! use subversion ; then + rm -f "${ED}"/usr/libexec/git-core/git-svn \ + "${ED}"/usr/share/man/man1/git-svn.1* + fi + + if use xinetd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}"/git-daemon.xinetd git-daemon + fi + + newinitd "${FILESDIR}"/git-daemon.initd git-daemon + newconfd "${FILESDIR}"/git-daemon.confd git-daemon + + fixlocalpod +} + +src_test() { + local disabled="" + local tests_cvs="t9200-git-cvsexportcommit.sh \ + t9400-git-cvsserver-server.sh \ + t9401-git-cvsserver-crlf.sh \ + t9600-cvsimport.sh \ + t9601-cvsimport-vendor-branch.sh \ + t9602-cvsimport-branches-tags.sh \ + t9603-cvsimport-patchsets.sh" + local tests_perl="t5502-quickfetch.sh \ + t5512-ls-remote.sh \ + t5520-pull.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 + local tests_nonroot="t0001-init.sh \ + t0004-unwritable.sh \ + t0070-fundamental.sh \ + t1004-read-tree-m-u-wf.sh \ + t3700-add.sh \ + t7300-clean.sh" + # t9100 still fails with symlinks in SVN 1.7 + local test_svn="t9100-git-svn-basic.sh" + + # Unzip is used only for the testcase code, not by any normal parts of Git. + if ! has_version app-arch/unzip ; then + einfo "Disabling tar-tree tests" + disabled="${disabled} t5000-tar-tree.sh" + fi + + cvs=0 + use cvs && let cvs=$cvs+1 + if [[ ${EUID} -eq 0 ]]; then + if [[ $cvs -eq 1 ]]; then + ewarn "Skipping CVS tests because CVS does not work as root!" + ewarn "You should retest with FEATURES=userpriv!" + disabled="${disabled} ${tests_cvs}" + fi + einfo "Skipping other tests that require being non-root" + disabled="${disabled} ${tests_nonroot}" + else + [[ $cvs -gt 0 ]] && \ + has_version dev-vcs/cvs && \ + let cvs=$cvs+1 + [[ $cvs -gt 1 ]] && \ + built_with_use dev-vcs/cvs server && \ + let cvs=$cvs+1 + if [[ $cvs -lt 3 ]]; then + einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])" + disabled="${disabled} ${tests_cvs}" + fi + fi + + if ! use perl ; then + einfo "Disabling tests that need Perl" + disabled="${disabled} ${tests_perl}" + fi + + einfo "Disabling tests that fail with SVN 1.7" + disabled="${disabled} ${test_svn}" + + # Reset all previously disabled tests + cd "${S}/t" + for i in *.sh.DISABLED ; do + [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}" + done + einfo "Disabled tests:" + for i in ${disabled} ; do + [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i" + done + + # Avoid the test system removing the results because we want them ourselves + sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \ + -i "${S}"/t/Makefile + + # Clean old results first, must always run + cd "${S}/t" + nonfatal git_emake clean + + # Now run the tests, keep going if we hit an error, and don't terminate on + # failure + cd "${S}" + einfo "Start test run" + #MAKEOPTS=-j1 + nonfatal git_emake --keep-going test + rc=$? + + # Display nice results, now print the results + cd "${S}/t" + nonfatal git_emake aggregate-results + + # And bail if there was a problem + [ $rc -eq 0 ] || die "tests failed. Please file a bug." +} + +showpkgdeps() { + local pkg=$1 + shift + elog " $(printf "%-17s:" ${pkg}) ${@}" +} + +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 completion" + elog "These additional scripts need some dependencies:" + echo + showpkgdeps git-quiltimport "dev-util/quilt" + showpkgdeps git-instaweb \ + "|| ( www-servers/lighttpd www-servers/apache )" + echo +} + +pkg_postrm() { + use emacs && elisp-site-regen + use python && python_mod_cleanup git_remote_helpers +} diff --git a/dev-vcs/git/git-1.7.12.ebuild b/dev-vcs/git/git-1.7.12.ebuild new file mode 100644 index 000000000000..550200f0c155 --- /dev/null +++ b/dev-vcs/git/git-1.7.12.ebuild @@ -0,0 +1,511 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-1.7.12.ebuild,v 1.1 2012/08/22 04:44:08 robbat2 Exp $ + +EAPI=4 + +GENTOO_DEPEND_ON_PERL=no + +# bug #329479: git-remote-testgit is not multiple-version aware +PYTHON_DEPEND="python? 2" +[[ ${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 ${SCM} + +MY_PV="${PV/_rc/.rc}" +MY_P="${PN}-${MY_PV}" + +DOC_VER=${MY_PV} + +DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team" +HOMEPAGE="http://www.git-scm.com/" +if [[ ${PV} != *9999 ]]; then + SRC_URI_SUFFIX="gz" + SRC_URI_GOOG="http://git-core.googlecode.com/files" + SRC_URI_KORG="mirror://kernel/software/scm/git" + SRC_URI="${SRC_URI_GOOG}/${MY_P}.tar.${SRC_URI_SUFFIX} + ${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX} + ${SRC_URI_GOOG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} + ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} + doc? ( + ${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 ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +else + SRC_URI="" + KEYWORDS="" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="+blksha1 +curl cgi doc emacs +gpg gtk +iconv +nls +pcre +perl +python ppcsha1 tk +threads +webdav xinetd cvs subversion test" + +# Common to both DEPEND and RDEPEND +CDEPEND=" + !blksha1? ( 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 )" + +RDEPEND="${CDEPEND} + gpg? ( app-crypt/gnupg ) + perl? ( dev-perl/Error + dev-perl/Net-SMTP-SSL + dev-perl/Authen-SASL + cgi? ( virtual/perl-CGI 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 + ) )" + +# This is how info docs are created with Git: +# .txt/asciidoc --(asciidoc)---------> .xml/docbook +# .xml/docbook --(docbook2texi.pl)--> .texi +# .texi --(makeinfo)---------> .info +DEPEND="${CDEPEND} + app-arch/cpio + doc? ( + app-text/asciidoc + app-text/docbook2X + sys-apps/texinfo + ) + test? ( + app-crypt/gnupg + )" + +# Live ebuild builds man pages and HTML docs, additionally +if [[ ${PV} == *9999 ]]; then + DEPEND="${DEPEND} + app-text/asciidoc + app-text/xmlto" +fi + +SITEFILE=50${PN}-gentoo.el +S="${WORKDIR}/${MY_P}" + +REQUIRED_USE=" + cgi? ( perl ) + cvs? ( perl ) + subversion? ( perl ) + webdav? ( curl ) +" + +pkg_setup() { + if use subversion && has_version dev-vcs/subversion && built_with_use --missing false 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 + fi +} + +# This is needed because for some obscure reasons future calls to make don't +# pick up these exports if we export them in src_unpack() +exportmakeopts() { + local myopts + + if use blksha1 ; then + myopts="${myopts} BLK_SHA1=YesPlease" + elif use ppcsha1 ; then + myopts="${myopts} PPC_SHA1=YesPlease" + fi + + if use curl ; then + use webdav || myopts="${myopts} NO_EXPAT=YesPlease" + else + myopts="${myopts} NO_CURL=YesPlease" + fi + + # broken assumptions, because of broken build system ... + myopts="${myopts} NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease" + myopts="${myopts} INSTALL=install TAR=tar" + myopts="${myopts} SHELL_PATH=${EPREFIX}/bin/sh" + myopts="${myopts} SANE_TOOL_PATH=" + myopts="${myopts} OLD_ICONV=" + myopts="${myopts} NO_EXTERNAL_GREP=" + + # can't define this to null, since the entire makefile depends on it + sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile + + use iconv \ + || myopts="${myopts} NO_ICONV=YesPlease" + use nls \ + || myopts="${myopts} NO_GETTEXT=YesPlease" + use tk \ + || myopts="${myopts} NO_TCLTK=YesPlease" + use pcre \ + && myopts="${myopts} USE_LIBPCRE=yes" + use perl \ + && myopts="${myopts} INSTALLDIRS=vendor" \ + || myopts="${myopts} NO_PERL=YesPlease" + use python \ + || myopts="${myopts} NO_PYTHON=YesPlease" + use subversion \ + || myopts="${myopts} NO_SVN_TESTS=YesPlease" + use threads \ + && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease" + use cvs \ + || myopts="${myopts} NO_CVS=YesPlease" +# Disabled until ~m68k-mint can be keyworded again +# if [[ ${CHOST} == *-mint* ]] ; then +# myopts="${myopts} NO_MMAP=YesPlease" +# myopts="${myopts} NO_IPV6=YesPlease" +# myopts="${myopts} NO_STRLCPY=YesPlease" +# myopts="${myopts} NO_MEMMEM=YesPlease" +# myopts="${myopts} NO_MKDTEMP=YesPlease" +# myopts="${myopts} NO_MKSTEMPS=YesPlease" +# fi + if [[ ${CHOST} == ia64-*-hpux* ]]; then + myopts="${myopts} NO_NSEC=YesPlease" + fi + if [[ ${CHOST} == *-*-aix* ]]; then + myopts="${myopts} NO_FNMATCH_CASEFOLD=YesPlease" + fi + + has_version '>=app-text/asciidoc-8.0' \ + && myopts="${myopts} ASCIIDOC8=YesPlease" + myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease" + + # Bug 290465: + # builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim' + [[ "${CHOST}" == *-uclibc* ]] && \ + myopts="${myopts} NO_NSEC=YesPlease" + + export MY_MAKEOPTS="${myopts}" +} + +src_unpack() { + if [[ ${PV} != *9999 ]]; then + unpack ${MY_P}.tar.${SRC_URI_SUFFIX} + cd "${S}" + unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} + use doc && \ + cd "${S}"/Documentation && \ + unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} + cd "${S}" + else + git-2_src_unpack + cd "${S}" + #cp "${FILESDIR}"/GIT-VERSION-GEN . + fi + +} + +src_prepare() { + # bug #418431 - stated for upstream 1.7.13. Developed by Michael Schwern, + # funded as a bounty by the Gentoo Foundation. + #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 + + sed -i \ + -e 's:^\(CFLAGS =\).*$:\1 $(OPTCFLAGS) -Wall:' \ + -e 's:^\(LDFLAGS =\).*$:\1 $(OPTLDFLAGS):' \ + -e 's:^\(CC = \).*$:\1$(OPTCC):' \ + -e 's:^\(AR = \).*$:\1$(OPTAR):' \ + -e "s:\(PYTHON_PATH = \)\(.*\)$:\1${EPREFIX}\2:" \ + -e "s:\(PERL_PATH = \)\(.*\)$:\1${EPREFIX}\2:" \ + Makefile || die "sed failed" + + # Never install the private copy of Error.pm (bug #296310) + sed -i \ + -e '/private-Error.pm/s,^,#,' \ + perl/Makefile.PL + + # Fix docbook2texi command + sed -i 's/DOCBOOK2X_TEXI=docbook2x-texi/DOCBOOK2X_TEXI=docbook2texi.pl/' \ + Documentation/Makefile || die "sed failed" +} + +git_emake() { + # bug #326625: PERL_PATH, PERL_MM_OPT + # bug #320647: PYTHON_PATH + PYTHON_PATH="" + use python && PYTHON_PATH="$(PYTHON -a)" + emake ${MY_MAKEOPTS} \ + DESTDIR="${D}" \ + OPTCFLAGS="${CFLAGS}" \ + OPTLDFLAGS="${LDFLAGS}" \ + OPTCC="$(tc-getCC)" \ + OPTAR="$(tc-getAR)" \ + prefix="${EPREFIX}"/usr \ + htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \ + sysconfdir="${EPREFIX}"/etc \ + PYTHON_PATH="${PYTHON_PATH}" \ + PERL_MM_OPT="" \ + GIT_TEST_OPTS="--no-color" \ + "$@" + # This is the fix for bug #326625, but it also causes breakage, see bug + # #352693. + # PERL_PATH="${EPREFIX}/usr/bin/env perl" \ +} + +src_configure() { + exportmakeopts +} + +src_compile() { + git_emake perl/PM.stamp || die "emake perl/PM.stamp failed" + git_emake perl/perl.mak || die "emake perl/perl.mak failed" + git_emake || die "emake failed" + + if use emacs ; then + elisp-compile contrib/emacs/git{,-blame}.el \ + || die "emacs modules failed" + fi + + if use perl && use cgi ; then + git_emake \ + gitweb/gitweb.cgi \ + || die "emake gitweb/gitweb.cgi failed" + fi + + cd "${S}"/Documentation + if [[ ${PV} == *9999 ]] ; then + git_emake man \ + || die "emake man failed" + if use doc ; then + git_emake info html \ + || die "emake info html failed" + fi + else + if use doc ; then + git_emake info \ + || die "emake info html failed" + fi + fi +} + +src_install() { + git_emake \ + install || \ + die "make install failed" + + # Depending on the tarball and manual rebuild of the documentation, the + # manpages may exist in either OR both of these directories. + find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157] + find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157] + + dodoc README Documentation/{SubmittingPatches,CodingGuidelines} + use doc && dodir /usr/share/doc/${PF}/html + for d in / /howto/ /technical/ ; do + docinto ${d} + dodoc Documentation${d}*.txt + use doc && dohtml -p ${d} Documentation${d}*.html + done + docinto / + # Upstream does not ship this pre-built :-( + use doc && doinfo Documentation/{git,gitman}.info + + newbashcomp contrib/completion/git-completion.bash ${PN} + + 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 + # 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 + fi + + if use python && use gtk ; then + dobin "${S}"/contrib/gitview/gitview + python_convert_shebangs ${PYTHON_ABI} "${ED}"/usr/bin/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 + + dodir /usr/share/${PN}/contrib + # The following are excluded: + # completion - installed above + # emacs - installed above + # examples - these are stuff that is not used in Git anymore actually + # gitview - installed above + # p4import - excluded because fast-import has a better one + # patches - stuff the Git guys made to go upstream to other places + # svnimport - use git-svn + # thunderbird-patch-inline - fixes thunderbird + for i in \ + blameview buildsystems ciabot continuous convert-objects fast-import \ + hg-to-git hooks remotes2config.sh remotes2config.sh rerere-train.sh \ + stats svn-fe vim workdir \ + ; do + cp -rf \ + "${S}"/contrib/${i} \ + "${ED}"/usr/share/${PN}/contrib \ + || die "Failed contrib ${i}" + done + + if use perl && use cgi ; then + # We used to install in /usr/share/${PN}/gitweb + # but upstream installs in /usr/share/gitweb + # so we will install a symlink and use their location for compat with other + # distros + dosym /usr/share/gitweb /usr/share/${PN}/gitweb + + # INSTALL discusses configuration issues, not just installation + docinto / + newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb + newdoc "${S}"/gitweb/README README.gitweb + + find "${ED}"/usr/lib64/perl5/ \ + -name .packlist \ + -exec rm \{\} \; + else + rm -rf "${ED}"/usr/share/gitweb + fi + + if ! use subversion ; then + rm -f "${ED}"/usr/libexec/git-core/git-svn \ + "${ED}"/usr/share/man/man1/git-svn.1* + fi + + if use xinetd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}"/git-daemon.xinetd git-daemon + fi + + newinitd "${FILESDIR}"/git-daemon.initd git-daemon + newconfd "${FILESDIR}"/git-daemon.confd git-daemon + + fixlocalpod +} + +src_test() { + local disabled="" + local tests_cvs="t9200-git-cvsexportcommit.sh \ + t9400-git-cvsserver-server.sh \ + t9401-git-cvsserver-crlf.sh \ + t9600-cvsimport.sh \ + t9601-cvsimport-vendor-branch.sh \ + t9602-cvsimport-branches-tags.sh \ + t9603-cvsimport-patchsets.sh" + local tests_perl="t5502-quickfetch.sh \ + t5512-ls-remote.sh \ + t5520-pull.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 + local tests_nonroot="t0001-init.sh \ + t0004-unwritable.sh \ + t0070-fundamental.sh \ + t1004-read-tree-m-u-wf.sh \ + t3700-add.sh \ + t7300-clean.sh" + # t9100 still fails with symlinks in SVN 1.7 + local test_svn="t9100-git-svn-basic.sh" + + # Unzip is used only for the testcase code, not by any normal parts of Git. + if ! has_version app-arch/unzip ; then + einfo "Disabling tar-tree tests" + disabled="${disabled} t5000-tar-tree.sh" + fi + + cvs=0 + use cvs && let cvs=$cvs+1 + if [[ ${EUID} -eq 0 ]]; then + if [[ $cvs -eq 1 ]]; then + ewarn "Skipping CVS tests because CVS does not work as root!" + ewarn "You should retest with FEATURES=userpriv!" + disabled="${disabled} ${tests_cvs}" + fi + einfo "Skipping other tests that require being non-root" + disabled="${disabled} ${tests_nonroot}" + else + [[ $cvs -gt 0 ]] && \ + has_version dev-vcs/cvs && \ + let cvs=$cvs+1 + [[ $cvs -gt 1 ]] && \ + built_with_use dev-vcs/cvs server && \ + let cvs=$cvs+1 + if [[ $cvs -lt 3 ]]; then + einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])" + disabled="${disabled} ${tests_cvs}" + fi + fi + + if ! use perl ; then + einfo "Disabling tests that need Perl" + disabled="${disabled} ${tests_perl}" + fi + + einfo "Disabling tests that fail with SVN 1.7" + disabled="${disabled} ${test_svn}" + + # Reset all previously disabled tests + cd "${S}/t" + for i in *.sh.DISABLED ; do + [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}" + done + einfo "Disabled tests:" + for i in ${disabled} ; do + [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i" + done + + # Avoid the test system removing the results because we want them ourselves + sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' \ + -i "${S}"/t/Makefile + + # Clean old results first, must always run + cd "${S}/t" + nonfatal git_emake clean + + # Now run the tests, keep going if we hit an error, and don't terminate on + # failure + cd "${S}" + einfo "Start test run" + #MAKEOPTS=-j1 + nonfatal git_emake --keep-going test + rc=$? + + # Display nice results, now print the results + cd "${S}/t" + nonfatal git_emake aggregate-results + + # And bail if there was a problem + [ $rc -eq 0 ] || die "tests failed. Please file a bug." +} + +showpkgdeps() { + local pkg=$1 + shift + elog " $(printf "%-17s:" ${pkg}) ${@}" +} + +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 completion" + elog "These additional scripts need some dependencies:" + echo + showpkgdeps git-quiltimport "dev-util/quilt" + showpkgdeps git-instaweb \ + "|| ( www-servers/lighttpd www-servers/apache )" + echo +} + +pkg_postrm() { + use emacs && elisp-site-regen + use python && python_mod_cleanup git_remote_helpers +} |