merge with Denis improvement
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Tue, 27 Nov 2012 14:28:41 +0100
changeset 622 8cbada2b0c43
parent 618 c39afce52e31 (diff)
parent 621 e50a5d9a6cbf (current diff)
child 624 ce46d1624d4a
merge with Denis improvement
hgext/evolve.py
--- a/debian/control	Tue Nov 27 14:27:50 2012 +0100
+++ b/debian/control	Tue Nov 27 14:28:41 2012 +0100
@@ -7,10 +7,8 @@
  Pierre-Yves David <pierre-yves.david@logilab.fr>,
 Standards-Version: 3.9.3
 Build-Depends:
- mercurial (>=2.4~),
- mercurial (<<2.5),
- mercurial-common (>=2.4~),
- mercurial-common (<<2.5),
+ mercurial (>=2.5~),
+ mercurial-common (>=2.5~),
  python,
  debhelper (>= 8),
  python-sphinx (>= 1.0.8),
@@ -24,8 +22,7 @@
 Depends:
  ${python:Depends},
  ${misc:Depends},
- mercurial (>= 2.4),
- mercurial (<<2.5),
+ mercurial (>= 2.5),
 Description: evolve extension for Mercurial
  This package provides the experimental "evolve" extension for the Mercurial
  DVCS.
--- a/hgext/evolve.py	Tue Nov 27 14:27:50 2012 +0100
+++ b/hgext/evolve.py	Tue Nov 27 14:28:41 2012 +0100
@@ -19,7 +19,7 @@
     - improves some aspect of the early implementation in 2.3
 '''
 
-testedwith = '2.4'
+testedwith = ''
 buglink = 'https://bitbucket.org/marmoute/mutable-history/issues'
 
 
@@ -29,17 +29,13 @@
 
 try:
     from mercurial import obsolete
-    getattr(obsolete, 'getrevs') # 2.4 specific
     if not obsolete._enabled:
         obsolete._enabled = True
-except (ImportError, AttributeError):
-    raise util.Abort('Evolve extension requires Mercurial 2.4.x')
-try:
     from mercurial import bookmarks
     bookmarks.bmstore
-    raise util.Abort('This version of Evolve is too old for you mercurial version')
-except AttributeError:
-    pass
+except (ImportError, AttributeError):
+    raise util.Abort('This version of Evolve is too old for you mercurial version',
+                     hint='requires version >> 2.4.x')
 
 
 
@@ -1038,7 +1034,7 @@
         for book in destbookmarks: # restore bookmark that rebase move
             repo._bookmarks[book] = dest.node()
         if oldbookmarks or destbookmarks:
-            bookmarks.write(repo)
+            repo._bookmarks.write()
         return nodenew
     except util.Abort:
         # Invalidate the previous setparents
@@ -1061,7 +1057,7 @@
                 repo._bookmarks[b] = newid
             dirty = True
         if dirty:
-            bookmarks.write(repo)
+            repo._bookmarks.write()
     return updatebookmarks
 
 ### new command
@@ -1764,7 +1760,7 @@
             for book in oldbookmarks:
                 repo._bookmarks[book] = new.node()
             if oldbookmarks:
-                bookmarks.write(repo)
+                repo._bookmarks.write()
         return result
     finally:
         if lock is not None:
--- a/setup.py	Tue Nov 27 14:27:50 2012 +0100
+++ b/setup.py	Tue Nov 27 14:28:41 2012 +0100
@@ -5,7 +5,7 @@
 
 setup(
     name='hg-evolve',
-    version='1.1.0',
+    version='2.0.0',
     author='Pierre-Yves David',
     maintainer='Pierre-Yves David',
     maintainer_email='pierre-yves.david@logilab.fr',