Patchwork [evolve-ext] bookmarks: update to use new readactive api

login
register
mail settings
Submitter Ryan McElroy
Date May 7, 2015, 8:21 p.m.
Message ID <f46022cc0652894e6ae8.1431030100@devbig105.prn2.facebook.com>
Download mbox | patch
Permalink /patch/8949/
State Changes Requested
Headers show

Comments

Ryan McElroy - May 7, 2015, 8:21 p.m.
# HG changeset patch
# User Ryan McElroy <rmcelroy@fb.com>
# Date 1431030011 25200
#      Thu May 07 13:20:11 2015 -0700
# Branch stable
# Node ID f46022cc0652894e6ae8808f1207a76d88abf6cc
# Parent  1218ad94a351b8294a4627a0ec9a27b68206c5b9
bookmarks: update to use new readactive api
Pierre-Yves David - May 7, 2015, 8:49 p.m.
On 05/07/2015 01:21 PM, Ryan McElroy wrote:
> # HG changeset patch
> # User Ryan McElroy <rmcelroy@fb.com>
> # Date 1431030011 25200
> #      Thu May 07 13:20:11 2015 -0700
> # Branch stable
> # Node ID f46022cc0652894e6ae8808f1207a76d88abf6cc
> # Parent  1218ad94a351b8294a4627a0ec9a27b68206c5b9
> bookmarks: update to use new readactive api

Can you make a small compatibility layer so that we do not have to bump 
the version of Mercurial required?
Matt Mackall - May 7, 2015, 9:03 p.m.
On Thu, 2015-05-07 at 13:49 -0700, Pierre-Yves David wrote:
> 
> On 05/07/2015 01:21 PM, Ryan McElroy wrote:
> > # HG changeset patch
> > # User Ryan McElroy <rmcelroy@fb.com>
> > # Date 1431030011 25200
> > #      Thu May 07 13:20:11 2015 -0700
> > # Branch stable
> > # Node ID f46022cc0652894e6ae8808f1207a76d88abf6cc
> > # Parent  1218ad94a351b8294a4627a0ec9a27b68206c5b9
> > bookmarks: update to use new readactive api
> 
> Can you make a small compatibility layer so that we do not have to bump 
> the version of Mercurial required?

..in evolve.
Augie Fackler - May 7, 2015, 9:32 p.m.
On Thu, May 7, 2015 at 4:49 PM, Pierre-Yves David
<pierre-yves.david@ens-lyon.org> wrote:
> Can you make a small compatibility layer so that we do not have to bump the
> version of Mercurial required?


I explicitly asked the changes in hg to not have compat paths because
it's better for extensions to break violently than to emit warnings
that will only annoy users and never be seen by extension authors.

Patch

diff --git a/hgext/evolve.py b/hgext/evolve.py
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -864,7 +864,7 @@  def _bookmarksupdater(repo, oldid):
     """Return a callable update(newid) updating the current bookmark
     and bookmarks bound to oldid to newid.
     """
-    bm = bookmarks.readcurrent(repo)
+    bm = bookmarks.readactive(repo)
     def updatebookmarks(newid):
         dirty = False
         if bm:
@@ -1606,7 +1606,7 @@  def cmdprevious(ui, repo, **opts):
     displayer = cmdutil.show_changeset(ui, repo, {'template': shorttemplate})
     if len(parents) == 1:
         p = parents[0]
-        bm = bookmarks.readcurrent(repo)
+        bm = bookmarks.readactive(repo)
         shouldmove = opts.get('move_bookmark') and bm is not None
         ret = hg.update(repo, p.rev())
         if not ret:
@@ -1641,7 +1641,7 @@  def cmdnext(ui, repo, **opts):
         return 1
     if len(children) == 1:
         c = children[0]
-        bm = bookmarks.readcurrent(repo)
+        bm = bookmarks.readactive(repo)
         shouldmove = opts.get('move_bookmark') and bm is not None
         ret = hg.update(repo, c.rev())
         if not ret: