--- a/README Tue May 05 14:09:09 2015 -0700
+++ b/README Mon May 11 14:31:17 2015 -0700
@@ -57,6 +57,8 @@
- support -i option for `hg amend` if commit supports it (3.4)
- fix the `debugrecordpruneparents` utility
- fix some possible crash during command abort (release non-existant transaction)
+- fix simple4server bug tracker URL
+- compatibility with bookmark API change in future Mercurial 3.5
5.1.4 -- 2015-04-23
--- a/hgext/evolve.py Tue May 05 14:09:09 2015 -0700
+++ b/hgext/evolve.py Mon May 11 14:31:17 2015 -0700
@@ -856,10 +856,9 @@
try:
if repo['.'].rev() != dest.rev():
merge.update(repo, dest, False, True, False)
- if repo._bookmarkcurrent:
- repo.ui.status(_("(leaving bookmark %s)\n") %
- repo._bookmarkcurrent)
- bookmarks.unsetcurrent(repo)
+ if bmactive(repo):
+ repo.ui.status(_("(leaving bookmark %s)\n") % bmactive(repo))
+ bmdeactivate(repo)
if keepbranch:
repo.dirstate.setbranch(orig.branch())
r = merge.graft(repo, orig, orig.p1(), ['local', 'graft'])
@@ -914,7 +913,7 @@
"""Return a callable update(newid) updating the current bookmark
and bookmarks bound to oldid to newid.
"""
- bm = bookmarks.readcurrent(repo)
+ bm = bmactive(repo)
def updatebookmarks(newid):
dirty = False
if bm:
@@ -929,6 +928,19 @@
repo._bookmarks.write()
return updatebookmarks
+### bookmarks api compatibility layer ###
+def bmdeactivate(repo):
+ try:
+ return bookmarks.deactivate(repo)
+ except AttributeError:
+ return bookmarks.unsetcurrent(repo)
+
+def bmactive(repo):
+ try:
+ return repo._activebookmark
+ except AttributeError:
+ return repo._bookmarkcurrent
+
### new command
#############################
metadataopts = [
@@ -1666,7 +1678,7 @@
@command('^previous',
[('B', 'move-bookmark', False,
- _('Move current active bookmark after update'))],
+ _('Move active bookmark after update'))],
'[-B]')
def cmdprevious(ui, repo, **opts):
"""update to parent and display summary lines"""
@@ -1679,7 +1691,7 @@
displayer = cmdutil.show_changeset(ui, repo, {'template': shorttemplate})
if len(parents) == 1:
p = parents[0]
- bm = bookmarks.readcurrent(repo)
+ bm = bmactive(repo)
shouldmove = opts.get('move_bookmark') and bm is not None
ret = hg.update(repo, p.rev())
if not ret:
@@ -1687,7 +1699,7 @@
repo._bookmarks[bm] = p.node()
repo._bookmarks.write()
else:
- bookmarks.unsetcurrent(repo)
+ bmdeactivate(repo)
displayer.show(p)
return 0
else:
@@ -1698,7 +1710,7 @@
@command('^next',
[('B', 'move-bookmark', False,
- _('Move current active bookmark after update'))],
+ _('Move active bookmark after update'))],
'[-B]')
def cmdnext(ui, repo, **opts):
"""update to child and display summary lines"""
@@ -1714,7 +1726,7 @@
return 1
if len(children) == 1:
c = children[0]
- bm = bookmarks.readcurrent(repo)
+ bm = bmactive(repo)
shouldmove = opts.get('move_bookmark') and bm is not None
ret = hg.update(repo, c.rev())
if not ret:
@@ -1722,7 +1734,7 @@
repo._bookmarks[bm] = c.node()
repo._bookmarks.write()
else:
- bookmarks.unsetcurrent(repo)
+ bmdeactivate(repo)
displayer.show(c)
return 0
else:
--- a/hgext/simple4server.py Tue May 05 14:09:09 2015 -0700
+++ b/hgext/simple4server.py Mon May 11 14:31:17 2015 -0700
@@ -9,7 +9,7 @@
improved user interface.'''
testedwith = '3.3.3 3.4-rc'
-buglink = 'https://bitbucket.org/marmoute/mutable-history/issues'
+buglink = 'http://bz.selenic.com/'
import mercurial.obsolete
@@ -283,7 +283,6 @@
wireproto.commands['evoext_pushobsmarkers_0'] = (srv_pushobsmarkers, '')
wireproto.commands['evoext_pullobsmarkers_0'] = (srv_pullobsmarkers, '*')
# wrap module content
- extensions.wrapfunction(exchange, '_pullbundle2extraprepare', _getbundleobsmarkerpart)
origfunc = exchange.getbundle2partsmapping['obsmarkers']
def newfunc(*args, **kwargs):
return _getbundleobsmarkerpart(origfunc, *args, **kwargs)
--- a/tests/test-evolve.t Tue May 05 14:09:09 2015 -0700
+++ b/tests/test-evolve.t Mon May 11 14:31:17 2015 -0700
@@ -879,7 +879,7 @@
$ hg bookmark testbookmark
$ ls .hg/bookmarks*
.hg/bookmarks
- .hg/bookmarks.current
+ .hg/bookmarks.* (glob)
$ hg evolve
move:[8] a2
atop:[10] a1__