Hello community,
here is the log from the commit of package mercurial
checked in at Mon Oct 6 17:47:11 CEST 2008.
--------
--- mercurial/mercurial.changes 2008-08-15 08:53:17.000000000 +0200
+++ /mounts/work_src_done/STABLE/mercurial/mercurial.changes 2008-09-30 15:34:57.000000000 +0200
@@ -1,0 +2,6 @@
+Tue Sep 30 15:34:34 CEST 2008 - tiwai@suse.de
+
+- Fix python-2.6 warnings in many commands;
+ Backported python-2.6 wrapper patch from the upstream
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
New:
----
mercurial-1.0.2-python-2.6-compat.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mercurial.spec ++++++
--- /var/tmp/diff_new_pack.mu8557/_old 2008-10-06 17:46:31.000000000 +0200
+++ /var/tmp/diff_new_pack.mu8557/_new 2008-10-06 17:46:31.000000000 +0200
@@ -22,7 +22,7 @@
BuildRequires: asciidoc fdupes python-devel sgml-skel xmlto
Summary: Scalable Distributed SCM
Version: 1.0.2
-Release: 1
+Release: 26
License: GPL v2 or later
Group: Development/Tools/Version Control
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -30,6 +30,7 @@
Source: %{name}-%{version}.tar.bz2
Source2: hgext.rc
Patch: mercurial-hgk-path-fix.diff
+Patch1: mercurial-1.0.2-python-2.6-compat.diff
# require rcs for 3-way "merge" command.
Requires: rcs
%py_requires
@@ -51,6 +52,7 @@
# sed -e s"/^version = ''$/version = '"%{version}"'/" setup.py > foo.py
# mv foo.py setup.py
%patch
+%patch1 -p1
%build
python setup.py build_ext -i
@@ -104,6 +106,9 @@
%{_datadir}/xemacs
%changelog
+* Tue Sep 30 2008 tiwai@suse.de
+- Fix python-2.6 warnings in many commands;
+ Backported python-2.6 wrapper patch from the upstream
* Fri Aug 15 2008 bwalle@suse.de
- updated to version 1.0.2:
Security:
++++++ mercurial-1.0.2-python-2.6-compat.diff ++++++
# HG changeset patch
# User Dirkjan Ochtman
# Date 1207341400 -7200
# Node ID ac0bcd951c2c95b32a1b6cc09f0de66b56b6ed1b
# Parent fb502719c75c048af6e81289dc8a70edb8fc43aa
python 2.6 compatibility: compatibility wrappers for hash functions
diff -r fb502719c75c -r ac0bcd951c2c mercurial/keepalive.py
--- a/mercurial/keepalive.py Fri Apr 04 22:41:17 2008 +0200
+++ b/mercurial/keepalive.py Fri Apr 04 22:36:40 2008 +0200
@@ -19,6 +19,8 @@
# Modified by Benoit Boissinot:
# - fix for digest auth (inspired from urllib2.py @ Python v2.4)
+# Modified by Dirkjan Ochtman:
+# - import md5 function from a local util module
"""An HTTP handler for urllib2 that supports HTTP 1.1 and keepalive.
@@ -450,7 +452,7 @@
keepalive_handler.close_all()
def continuity(url):
- import md5
+ from util import md5
format = '%25s: %s'
# first fetch the file with the normal http handler
diff -r fb502719c75c -r ac0bcd951c2c mercurial/mdiff.py
--- a/mercurial/mdiff.py Fri Apr 04 22:41:17 2008 +0200
+++ b/mercurial/mdiff.py Fri Apr 04 22:36:40 2008 +0200
@@ -6,7 +6,7 @@
# of the GNU General Public License, incorporated herein by reference.
from i18n import _
-import bdiff, mpatch, re, struct, util, md5
+import bdiff, mpatch, re, struct, util
def splitnewlines(text):
'''like str.splitlines, but only split on newlines.'''
@@ -80,7 +80,7 @@
if not opts.text and (util.binary(a) or util.binary(b)):
def h(v):
# md5 is used instead of sha1 because md5 is supposedly faster
- return md5.new(v).digest()
+ return util.md5(v).digest()
if a and b and len(a) == len(b) and h(a) == h(b):
return ""
l = ['Binary file %s has changed\n' % fn1]
diff -r fb502719c75c -r ac0bcd951c2c mercurial/patch.py
--- a/mercurial/patch.py Fri Apr 04 22:41:17 2008 +0200
+++ b/mercurial/patch.py Fri Apr 04 22:36:40 2008 +0200
@@ -9,7 +9,7 @@
from i18n import _
from node import hex, nullid, short
import base85, cmdutil, mdiff, util, context, revlog, diffhelpers, copies
-import cStringIO, email.Parser, os, popen2, re, sha, errno
+import cStringIO, email.Parser, os, popen2, re, errno
import sys, tempfile, zlib
class PatchError(Exception):
@@ -1120,7 +1120,7 @@
if not text:
return '0' * 40
l = len(text)
- s = sha.new('blob %d\0' % l)
+ s = util.sha1('blob %d\0' % l)
s.update(text)
return s.hexdigest()
diff -r fb502719c75c -r ac0bcd951c2c mercurial/revlog.py
--- a/mercurial/revlog.py Fri Apr 04 22:41:17 2008 +0200
+++ b/mercurial/revlog.py Fri Apr 04 22:36:40 2008 +0200
@@ -13,13 +13,13 @@
from node import bin, hex, nullid, nullrev, short
from i18n import _
import changegroup, errno, ancestor, mdiff
-import sha, struct, util, zlib
+import struct, util, zlib
_pack = struct.pack
_unpack = struct.unpack
_compress = zlib.compress
_decompress = zlib.decompress
-_sha = sha.new
+_sha = util.sha1
# revlog flags
REVLOGV0 = 0
diff -r fb502719c75c -r ac0bcd951c2c mercurial/util.py
--- a/mercurial/util.py Fri Apr 04 22:41:17 2008 +0200
+++ b/mercurial/util.py Fri Apr 04 22:36:40 2008 +0200
@@ -17,11 +17,37 @@
import os, stat, threading, time, calendar, ConfigParser, locale, glob, osutil
import urlparse
+# Python compatibility
+
try:
set = set
frozenset = frozenset
except NameError:
from sets import Set as set, ImmutableSet as frozenset
+
+_md5 = None
+def md5(s):
+ global _md5
+ if _md5 is None:
+ try:
+ import hashlib
+ _md5 = hashlib.md5
+ except ImportError:
+ import md5
+ _md5 = md5.md5
+ return _md5(s)
+
+_sha1 = None
+def sha1(s):
+ global _sha1
+ if _sha1 is None:
+ try:
+ import hashlib
+ _sha1 = hashlib.sha1
+ except ImportError:
+ import sha
+ _sha1 = sha.sha
+ return _sha1(s)
try:
_encoding = os.environ.get("HGENCODING")
diff -r fb502719c75c -r ac0bcd951c2c tests/md5sum.py
--- a/tests/md5sum.py Fri Apr 04 22:41:17 2008 +0200
+++ b/tests/md5sum.py Fri Apr 04 22:36:40 2008 +0200
@@ -7,7 +7,11 @@
# GPL-compatible.
import sys
-import md5
+
+try:
+ from hashlib import md5
+except ImportError:
+ from md5 import md5
for filename in sys.argv[1:]:
try:
@@ -16,7 +20,7 @@
sys.stderr.write('%s: Can\'t open: %s\n' % (filename, msg))
sys.exit(1)
- m = md5.new()
+ m = md5()
try:
while 1:
data = fp.read(8192)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org