Commits

Ronny Pfannschmidt committed d0a0849

a bunch of python2.5 fixes

Comments (0)

Files changed (9)

     changed_files = commit.get_changed_files()
 
     return ''.join(
-            itertools.chain.from_iterable(
-                diff_for_file(commit, file)
+                item
                 for file in changed_files
-            ))
+                for item in diff_for_file(commit, file)
+            )

anyvc/mercurial/workdir.py

 from anyvc.common.workdir import WorkDir, StatedPath
 from ..exc import NotFoundError
 
-from mercurial.__version__ import version as hgversion
-# no support for hg <= 1.0.2
-if hgversion < '1.2':
-    raise ImportError('HG version too old, please update to a release >= 1.2')
+try:
+    from mercurial.__version__ import version as hgversion
+except ImportError:
+    pass  #omg, cant figure
+else:
+    # no support for hg <= 1.0.2
+    if hgversion < '1.2':
+        raise ImportError('HG version too old, please update to a release >= 1.2')
 
 from mercurial import ui as hgui, hg, commands, util, cmdutil
 from mercurial.match import match, always

anyvc/subversion/workdir.py

+from __future__ import with_statement
 import os
 
 from anyvc.common.workdir import CommandBased, relative_to, WorkDirWithParser

tests/repository/test_history.py

+from __future__ import with_statement
 import py
 from datetime import datetime
 

tests/repository/test_history_diff.py

+from __future__ import with_statement
 
 
 def test_diff_create_simple(repo):

tests/repository/test_renames.py

+from __future__ import with_statement
 import py
 
 def test_rename_simple(repo):

tests/repository/test_repopath.py

+from __future__ import with_statement
 
 def test_write_direct(repo):
     with repo.transaction(author='test', message='test') as root:

tests/repository/test_simple_renames.py

 
+from __future__ import with_statement
 import py
 
 @py.test.mark.xfail
         --junitxml={envlogdir}/junit-{envname}.xml \
         --vc={envname} []
 
+
+[testenv:py25]
+basepython=python2.5
+commands=py.test
+deps=
+    execnet
+    mercurial
+    dulwich
+    bzr
+    subvertpy
+
 [testenv:hg-12]
 deps=
     execnet