[PATCH evolve-ext] debugobsconvert: make sure obsstore is loaded before version comparison
Yuya Nishihara
yuya at tcha.org
Thu Sep 24 08:38:06 CDT 2015
On Thu, 24 Sep 2015 06:07:28 -0700, Pierre-Yves David wrote:
> On 09/24/2015 06:03 AM, Yuya Nishihara wrote:
> > # HG changeset patch
> > # User Yuya Nishihara <yuya at tcha.org>
> > # Date 1442842244 -32400
> > # Mon Sep 21 22:30:44 2015 +0900
> > # Node ID ee150fed6f615512c89bcd5ce9f95b9e05da73ac
> > # Parent a55c691f4cc0b960a02bc94b3296403524c8db84
> > debugobsconvert: make sure obsstore is loaded before version comparison
> >
> > hg 44918682093f delays loading obsstore, so we have to access _all to get
> > the correct store version.
> >
> > diff --git a/hgext/evolve.py b/hgext/evolve.py
> > --- a/hgext/evolve.py
> > +++ b/hgext/evolve.py
> > @@ -3496,11 +3496,11 @@ def _checkinvalidmarkers(orig, markers):
> > [('', 'new-format', _bestformat, _('Destination format for markers.'))],
> > '')
> > def debugobsconvert(ui, repo, new_format):
> > + origmarkers = repo.obsstore._all # settle version
>
> I'm not super enthusiastic at accessing a private attribute to trigger a
> suble behavior from an extension. do you have idea for something less
> fragile? (like _version making sure the obsstore is loaded?)
We could, but _version is also private so obsstore has no responsibility
to fix up the value.
Should I add public obsstore.version() ?
More information about the Mercurial-devel
mailing list