summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Pawlik <nelchael@gentoo.org>2007-12-25 19:44:41 +0000
committerKrzysztof Pawlik <nelchael@gentoo.org>2007-12-25 19:44:41 +0000
commit5883c251e41ed89e5c9e4fbf2a44c5d031d44ef5 (patch)
treebf64d0522236d248e9a773db702bce420cc1c234 /dev-util
parentAdd package to emacs herd. Remove old. (diff)
downloadhistorical-5883c251e41ed89e5c9e4fbf2a44c5d031d44ef5.tar.gz
historical-5883c251e41ed89e5c9e4fbf2a44c5d031d44ef5.tar.bz2
historical-5883c251e41ed89e5c9e4fbf2a44c5d031d44ef5.zip
Add upstream patch to hide passwords with http://user:password@.../ URLs.
Package-Manager: portage-2.1.4_rc11
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/mercurial/ChangeLog9
-rw-r--r--dev-util/mercurial/Manifest37
-rw-r--r--dev-util/mercurial/files/digest-mercurial-0.9.5-r13
-rw-r--r--dev-util/mercurial/files/mercurial-0.9.5-hide-passwords.diff103
-rw-r--r--dev-util/mercurial/mercurial-0.9.5-r1.ebuild81
-rw-r--r--dev-util/mercurial/metadata.xml14
6 files changed, 233 insertions, 14 deletions
diff --git a/dev-util/mercurial/ChangeLog b/dev-util/mercurial/ChangeLog
index 52ba990b4775..d66f547e7e18 100644
--- a/dev-util/mercurial/ChangeLog
+++ b/dev-util/mercurial/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-util/mercurial
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/mercurial/ChangeLog,v 1.58 2007/11/07 10:57:51 aross Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/mercurial/ChangeLog,v 1.59 2007/12/25 19:44:41 nelchael Exp $
+
+*mercurial-0.9.5-r1 (25 Dec 2007)
+
+ 25 Dec 2007; Krzysiek Pawlik <nelchael@gentoo.org>
+ +files/mercurial-0.9.5-hide-passwords.diff, metadata.xml,
+ +mercurial-0.9.5-r1.ebuild:
+ Add upstream patch to hide passwords with http://user:password@.../ URLs.
*mercurial-0.9.5 (07 Nov 2007)
diff --git a/dev-util/mercurial/Manifest b/dev-util/mercurial/Manifest
index b88bf03bb39c..2ca12e3a7a96 100644
--- a/dev-util/mercurial/Manifest
+++ b/dev-util/mercurial/Manifest
@@ -1,7 +1,14 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
AUX 70mercurial-gentoo.el 76 RMD160 1891ab510adb464211b4cc35c5b6e4b149da79fa SHA1 72eb35d2bf86fa8f806acfbc823b88fc5188741b SHA256 c215746e4a5375569808c6aa6ddabe08e82d33d744128179be3142d9cd53a5ab
MD5 5c6cb663ce1dd8c0a06aab7f9e661268 files/70mercurial-gentoo.el 76
RMD160 1891ab510adb464211b4cc35c5b6e4b149da79fa files/70mercurial-gentoo.el 76
SHA256 c215746e4a5375569808c6aa6ddabe08e82d33d744128179be3142d9cd53a5ab files/70mercurial-gentoo.el 76
+AUX mercurial-0.9.5-hide-passwords.diff 4030 RMD160 11b1b114410a8922609c81d53fb374198372f2e7 SHA1 be5e0cd619a378a023ba79a8ac5b85b9cf7432f9 SHA256 dec336e7ef22248f69df918f30e6496fe15a04e36631aa64c6bcdc86b9411be6
+MD5 c3a6ca4d6ef6b02e2189bae79ed7630e files/mercurial-0.9.5-hide-passwords.diff 4030
+RMD160 11b1b114410a8922609c81d53fb374198372f2e7 files/mercurial-0.9.5-hide-passwords.diff 4030
+SHA256 dec336e7ef22248f69df918f30e6496fe15a04e36631aa64c6bcdc86b9411be6 files/mercurial-0.9.5-hide-passwords.diff 4030
DIST mercurial-0.9.1.tar.gz 401485 RMD160 f34db5fbfcc5b3e90b2bce7577d3446f6159b057 SHA1 a1f9ed5ee96660ee9f6cff6d65c8ad8e3495702e SHA256 60329317ed96cccf3db704ef9d2554890bcff6850c305199cc0f51cef606ebc9
DIST mercurial-0.9.3.tar.gz 530289 RMD160 9a25e508ebbe8e1827f26f6731ab085ce535f73a SHA1 a91c769ea78bffc15017a2157d05b87b9218ca40 SHA256 48485e6b16d304ef67f747c956ad257139796359ebfba9a66aede5cc0f550e86
DIST mercurial-0.9.4.tar.gz 586918 RMD160 bd70a49a98f53cd8bd553ca555fc25fd953ff538 SHA1 8dbebd76ab59611177b8385bbb97c9a40fe71683 SHA256 26996df67d508e129d2f0a264e25072764e5c2d21606e1658d77c8984e6ed64a
@@ -22,18 +29,22 @@ EBUILD mercurial-0.9.4.ebuild 1735 RMD160 68f099810cd9583530cf7166a8f2f171d8c820
MD5 5d2e88c1b9f861eddc37f1ff63963c3b mercurial-0.9.4.ebuild 1735
RMD160 68f099810cd9583530cf7166a8f2f171d8c82076 mercurial-0.9.4.ebuild 1735
SHA256 93cb34a4b3e68a4849fd49e31c74b05fa6f67ef0471e28bca92d95e43f79c19b mercurial-0.9.4.ebuild 1735
+EBUILD mercurial-0.9.5-r1.ebuild 2053 RMD160 6247dd2f56833f3f7e6077f72085450fc5223add SHA1 90730b5ea943ba1fe056f4fa6440ca4ddf43dd2f SHA256 b91b6fe3fbb749dd367e7e4af5d6ef44c26c03a205d86eb4954e1d27028e0208
+MD5 1546099362defe89d5d1d5eb50d60cda mercurial-0.9.5-r1.ebuild 2053
+RMD160 6247dd2f56833f3f7e6077f72085450fc5223add mercurial-0.9.5-r1.ebuild 2053
+SHA256 b91b6fe3fbb749dd367e7e4af5d6ef44c26c03a205d86eb4954e1d27028e0208 mercurial-0.9.5-r1.ebuild 2053
EBUILD mercurial-0.9.5.ebuild 1953 RMD160 e5259a5fa177ba7447766165562ae00d3025d959 SHA1 381edfb873fd1150c57532b1947ecc6cd6e9448e SHA256 4c107c8db46303df7b7ced5692dda0cb4af9f1db88defc0387feebb60c22a1a2
MD5 ce7d028fadb58b04e42a90ff955bc6f7 mercurial-0.9.5.ebuild 1953
RMD160 e5259a5fa177ba7447766165562ae00d3025d959 mercurial-0.9.5.ebuild 1953
SHA256 4c107c8db46303df7b7ced5692dda0cb4af9f1db88defc0387feebb60c22a1a2 mercurial-0.9.5.ebuild 1953
-MISC ChangeLog 8855 RMD160 72fb9421261fbd09265bcd1c84c3c4bab0816cca SHA1 bae1f6654e74b1feb6d8e186182a6bc8b65912f5 SHA256 a3961571b9e03e145e088949517a220cb1226c22cc4d34944b0e8221b5fdb622
-MD5 067531a29bef011457b924d066e63039 ChangeLog 8855
-RMD160 72fb9421261fbd09265bcd1c84c3c4bab0816cca ChangeLog 8855
-SHA256 a3961571b9e03e145e088949517a220cb1226c22cc4d34944b0e8221b5fdb622 ChangeLog 8855
-MISC metadata.xml 248 RMD160 88010a1603151711955a2c588e2c8c77a57a39b5 SHA1 96c30e5314aa50234d118c14b86ffd3e023f989b SHA256 7e7e813a6a219769c8118573805d36fbd61ad97c57eea1fc852cf890b8740234
-MD5 784cb428b4b23cdb7fcd9969db7d341c metadata.xml 248
-RMD160 88010a1603151711955a2c588e2c8c77a57a39b5 metadata.xml 248
-SHA256 7e7e813a6a219769c8118573805d36fbd61ad97c57eea1fc852cf890b8740234 metadata.xml 248
+MISC ChangeLog 9113 RMD160 d89dae0ad2ab70b3dee96cf78608cd530a6091a2 SHA1 cc3efa825cb667a848c5e7e40afcef4476fa67f3 SHA256 6d36cf19f456b00bfe3ed884fc07b63091b6493bd1990dc4a5c4d7fa0c25dcb9
+MD5 26d0fa8fd68e95376c1c549c19c6f5ce ChangeLog 9113
+RMD160 d89dae0ad2ab70b3dee96cf78608cd530a6091a2 ChangeLog 9113
+SHA256 6d36cf19f456b00bfe3ed884fc07b63091b6493bd1990dc4a5c4d7fa0c25dcb9 ChangeLog 9113
+MISC metadata.xml 348 RMD160 1ba72828855259eabe440dcbbc3769a0d6db4c09 SHA1 df272dd08fa83bfc29315dc78f99619af734e2fd SHA256 c283538beac10cf6a5d06262fec74775952466bd1b2a5a3d4d61c2a754cca80d
+MD5 c63d5c1793477670032426a80d73d21a metadata.xml 348
+RMD160 1ba72828855259eabe440dcbbc3769a0d6db4c09 metadata.xml 348
+SHA256 c283538beac10cf6a5d06262fec74775952466bd1b2a5a3d4d61c2a754cca80d metadata.xml 348
MD5 55d3db17a8ff385c3a6eb95eb8cbe46f files/digest-mercurial-0.9.1-r2 247
RMD160 dba7526c591d0e58c5c304c7810e43e6e26d78b1 files/digest-mercurial-0.9.1-r2 247
SHA256 754a5267b7395c21d6ea9fb484ba2af3c7d550cf377c39d4092b35c02f3e45ce files/digest-mercurial-0.9.1-r2 247
@@ -49,3 +60,13 @@ SHA256 b6e6dd55ad6526ee586916e21686b4313ba374c1013e84c42c54545ee0919f82 files/di
MD5 7683f7660ee2130767f4c4ac620d2dec files/digest-mercurial-0.9.5 247
RMD160 7ab43e7e57ec22fa6d6fc882cb958aff5eb38db4 files/digest-mercurial-0.9.5 247
SHA256 bd6ee7d4856a37c15932c0e7ba6b542bcddcdbd54fe1f6b0c46cbbc6ec19468e files/digest-mercurial-0.9.5 247
+MD5 7683f7660ee2130767f4c4ac620d2dec files/digest-mercurial-0.9.5-r1 247
+RMD160 7ab43e7e57ec22fa6d6fc882cb958aff5eb38db4 files/digest-mercurial-0.9.5-r1 247
+SHA256 bd6ee7d4856a37c15932c0e7ba6b542bcddcdbd54fe1f6b0c46cbbc6ec19468e files/digest-mercurial-0.9.5-r1 247
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.8 (GNU/Linux)
+
+iEYEARECAAYFAkdxXa4ACgkQgo/w9rxVVVELFwCeMKV1bHPHYeokgZtW0nAAVMyI
+1RwAnjUIhtIjjjRexRoqgSyB7EjlRx1Y
+=JlTy
+-----END PGP SIGNATURE-----
diff --git a/dev-util/mercurial/files/digest-mercurial-0.9.5-r1 b/dev-util/mercurial/files/digest-mercurial-0.9.5-r1
new file mode 100644
index 000000000000..9db06dca2d90
--- /dev/null
+++ b/dev-util/mercurial/files/digest-mercurial-0.9.5-r1
@@ -0,0 +1,3 @@
+MD5 a9dd54bcb87ca332315ce83293816e37 mercurial-0.9.5.tar.gz 670808
+RMD160 ea38d3142a4b1087e2777de3b70df8b4672cd237 mercurial-0.9.5.tar.gz 670808
+SHA256 cfe02baaa4e18c3af6bbaf1be4ad21c8570d4962b8cefb74dd83d9f309f564d8 mercurial-0.9.5.tar.gz 670808
diff --git a/dev-util/mercurial/files/mercurial-0.9.5-hide-passwords.diff b/dev-util/mercurial/files/mercurial-0.9.5-hide-passwords.diff
new file mode 100644
index 000000000000..1a4db2455cca
--- /dev/null
+++ b/dev-util/mercurial/files/mercurial-0.9.5-hide-passwords.diff
@@ -0,0 +1,103 @@
+
+# HG changeset patch
+# User Manuel Holtgrewe <purestorm@ggnore.net>
+# Date 1194290972 -3600
+# Node ID dcbda0c4c3eb8e26e01343d44fc5a8fb41138073
+# Parent 453acf64f71f72158d5ee7e1d99a5e10cea5b3b5
+Do not display passwords with pull/push/incoming/outgoing
+
+Passwords specified in the repository URL are now displayed as '***'
+when accessing the remote repository.
+
+--- a/mercurial/commands.py Fri Nov 09 20:21:35 2007 -0200
++++ b/mercurial/commands.py Mon Nov 05 20:29:32 2007 +0100
+@@ -1652,7 +1652,7 @@ def incoming(ui, repo, source="default",
+ cmdutil.setremoteconfig(ui, opts)
+
+ other = hg.repository(ui, source)
+- ui.status(_('comparing with %s\n') % source)
++ ui.status(_('comparing with %s\n') % util.hidepassword(source))
+ if revs:
+ revs = [other.lookup(rev) for rev in revs]
+ incoming = repo.findincoming(other, heads=revs, force=opts["force"])
+@@ -1962,7 +1962,7 @@ def outgoing(ui, repo, dest=None, **opts
+ revs = [repo.lookup(rev) for rev in revs]
+
+ other = hg.repository(ui, dest)
+- ui.status(_('comparing with %s\n') % dest)
++ ui.status(_('comparing with %s\n') % util.hidepassword(dest))
+ o = repo.findoutgoing(other, force=opts['force'])
+ if not o:
+ ui.status(_("no changes found\n"))
+@@ -2095,7 +2095,7 @@ def pull(ui, repo, source="default", **o
+ cmdutil.setremoteconfig(ui, opts)
+
+ other = hg.repository(ui, source)
+- ui.status(_('pulling from %s\n') % (source))
++ ui.status(_('pulling from %s\n') % util.hidepassword(source))
+ if revs:
+ try:
+ revs = [other.lookup(rev) for rev in revs]
+@@ -2142,7 +2142,7 @@ def push(ui, repo, dest=None, **opts):
+ cmdutil.setremoteconfig(ui, opts)
+
+ other = hg.repository(ui, dest)
+- ui.status('pushing to %s\n' % (dest))
++ ui.status('pushing to %s\n' % util.hidepassword(dest))
+ if revs:
+ revs = [repo.lookup(rev) for rev in revs]
+ r = repo.push(other, opts['force'], revs=revs)
+--- a/mercurial/util.py Fri Nov 09 20:21:35 2007 -0200
++++ b/mercurial/util.py Mon Nov 05 20:29:32 2007 +0100
+@@ -15,6 +15,7 @@ from i18n import _
+ from i18n import _
+ import cStringIO, errno, getpass, popen2, re, shutil, sys, tempfile, strutil
+ import os, stat, threading, time, calendar, ConfigParser, locale, glob, osutil
++import re, urlparse
+
+ try:
+ set = set
+@@ -1698,3 +1699,33 @@ def uirepr(s):
+ def uirepr(s):
+ # Avoid double backslash in Windows path repr()
+ return repr(s).replace('\\\\', '\\')
++
++def hidepassword(url):
++ '''replaces the password in the url string by three asterisks (***)
++
++ >>> hidepassword('http://www.example.com/some/path#fragment')
++ 'http://www.example.com/some/path#fragment'
++ >>> hidepassword('http://me@www.example.com/some/path#fragment')
++ 'http://me@www.example.com/some/path#fragment'
++ >>> hidepassword('http://me:simplepw@www.example.com/path#frag')
++ 'http://me:***@www.example.com/path#frag'
++ >>> hidepassword('http://me:complex:pw@www.example.com/path#frag')
++ 'http://me:***@www.example.com/path#frag'
++ >>> hidepassword('/path/to/repo')
++ '/path/to/repo'
++ >>> hidepassword('relative/path/to/repo')
++ 'relative/path/to/repo'
++ >>> hidepassword('c:\\\\path\\\\to\\\\repo')
++ 'c:\\\\path\\\\to\\\\repo'
++ >>> hidepassword('c:/path/to/repo')
++ 'c:/path/to/repo'
++ >>> hidepassword('bundle://path/to/bundle')
++ 'bundle://path/to/bundle'
++ '''
++ url_parts = list(urlparse.urlparse(url))
++ host_with_pw_pattern = re.compile('^([^:]*):([^@]*)@(.*)$')
++ if host_with_pw_pattern.match(url_parts[1]):
++ url_parts[1] = re.sub(host_with_pw_pattern, r'\1:***@\3',
++ url_parts[1])
++ return urlparse.urlunparse(url_parts)
++
+--- a/tests/test-doctest.py Fri Nov 09 20:21:35 2007 -0200
++++ b/tests/test-doctest.py Mon Nov 05 20:29:32 2007 +0100
+@@ -7,3 +7,6 @@ doctest.testmod(mercurial.changelog)
+
+ import mercurial.httprepo
+ doctest.testmod(mercurial.httprepo)
++
++import mercurial.util
++doctest.testmod(mercurial.util)
+
diff --git a/dev-util/mercurial/mercurial-0.9.5-r1.ebuild b/dev-util/mercurial/mercurial-0.9.5-r1.ebuild
new file mode 100644
index 000000000000..7b5e6f52415f
--- /dev/null
+++ b/dev-util/mercurial/mercurial-0.9.5-r1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/mercurial/mercurial-0.9.5-r1.ebuild,v 1.1 2007/12/25 19:44:41 nelchael Exp $
+
+inherit bash-completion distutils elisp-common flag-o-matic eutils
+
+DESCRIPTION="Scalable distributed SCM"
+HOMEPAGE="http://www.selenic.com/mercurial/"
+SRC_URI="http://www.selenic.com/mercurial/release/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="bugzilla cvs darcs emacs git gpg subversion test zsh-completion"
+
+CDEPEND=">=dev-lang/python-2.3"
+RDEPEND="${CDEPEND}
+ bugzilla? ( dev-python/mysql-python )
+ cvs? ( dev-util/cvs )
+ darcs? ( || ( dev-python/celementtree dev-python/elementtree ) )
+ git? ( dev-util/git )
+ gpg? ( app-crypt/gnupg )
+ subversion? ( dev-util/subversion )
+ zsh-completion? ( app-shells/zsh )"
+DEPEND="${CDEPEND}
+ emacs? ( virtual/emacs )
+ test? ( app-arch/unzip )"
+
+PYTHON_MODNAME="${PN} hgext"
+SITEFILE="70${PN}-gentoo.el"
+
+src_unpack() {
+ distutils_src_unpack
+ epatch "${FILESDIR}/${P}-hide-passwords.diff"
+}
+
+src_compile() {
+ filter-flags -ftracer -ftree-vectorize
+
+ distutils_src_compile
+
+ if use emacs; then
+ cd "${S}"/contrib
+ elisp-compile mercurial.el || die "elisp-compile failed!"
+ fi
+
+ rm -rf contrib/{win32,macosx}
+}
+
+src_install() {
+ distutils_src_install
+
+ dobashcompletion contrib/bash_completion ${PN}
+
+ if use zsh-completion ; then
+ insinto /usr/share/zsh/site-functions
+ newins contrib/zsh_completion _hg
+ fi
+
+ dodoc CONTRIBUTORS PKG-INFO README *.txt
+ cp hgweb*.cgi "${D}"/usr/share/doc/${PF}/
+ rm -f contrib/bash_completion
+ cp -r contrib "${D}"/usr/share/doc/${PF}/
+ doman doc/*.?
+
+ if use emacs; then
+ elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!"
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE}
+ fi
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+ use emacs && elisp-site-regen
+ bash-completion_pkg_postinst
+}
+
+pkg_postrm() {
+ distutils_pkg_postrm
+ use emacs && elisp-site-regen
+}
diff --git a/dev-util/mercurial/metadata.xml b/dev-util/mercurial/metadata.xml
index 7dcc634058a4..c8f8956e637c 100644
--- a/dev-util/mercurial/metadata.xml
+++ b/dev-util/mercurial/metadata.xml
@@ -1,9 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<herd>no-herd</herd>
-<maintainer>
- <email>aross@gentoo.org</email>
- <name>Andrew Ross</name>
-</maintainer>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>aross@gentoo.org</email>
+ <name>Andrew Ross</name>
+ </maintainer>
+ <maintainer>
+ <email>nelchael@gentoo.org</email>
+ <name>Krzysiek Pawlik</name>
+ </maintainer>
</pkgmetadata>