[PATCH 1 of 5] extdata: add extdatasource reader

De Mare, Mathias (Nokia - BE) mathias.de_mare at nokia.com
Fri Oct 7 08:58:53 EDT 2016



> -----Original Message-----
> From: Mercurial-devel [mailto:mercurial-devel-bounces at mercurial-
> scm.org] On Behalf Of Matt Mackall
> Sent: donderdag 6 oktober 2016 23:36
> To: mathias.demare at gmail.com
> Cc: Mercurial-devel
> Subject: Re: [PATCH 1 of 5] extdata: add extdatasource reader
> 
> On Thu, 2016-10-06 at 07:52 +0200, Mathias De Maré wrote:
> > On Thu, Sep 22, 2016 at 8:21 PM, Matt Mackall <mpm at selenic.com>
> wrote:
> >
> > >
> > > # HG changeset patch
> > > # User Matt Mackall <mpm at selenic.com> # Date 1473794045 18000
> #
> > > Tue Sep 13 14:14:05 2016 -0500 # Node ID
> > > 19bf2776dfe39befdc479253e1e7d030b41c08f9
> > > # Parent  5271ae66615207f39cc41d78f4541bc6f8ca6ff6
> > > extdata: add extdatasource reader
> > >
> > > This adds basic support for extdata, a way to add external data
> > > sources for revsets and templates. An extdata data source is simply
> > > a list of lines of the form:
> > >
> > > <revision identifier>[<space><freeform text>]\n
> > >
> > > An extdata source is configured thusly:
> > >
> > > [extdata]
> > > name = <a url or path>
> > >
> > > urls of the form shell: are launch shell commands to generate data.
> > >
> > This looks great!
> > We've been using a small extension to load an external file with tags
> > into one of our repositories. Do you think that could fit here as
> well?
> >
> > Something like this would be nice:
> > [extdata]
> > name = <a url or path>
> > name.type = tags
> 
> Do you actually need it to be a 'tag' or is it good enough that it be a
> named identifier in the current union of namespaces?
> 
> Extdata as presently designed doesn't add new names for nodes to the
> namespaces.
> But having a way to import an arbitrary name mapping would indeed be
> handy. For instance, for having a mapping to other version control
> system identifiers.

An identifier would be fine. We currently use tags, but I guess it's not strictly required.
Our users mostly need to be able to do things like 'hg update someid' or 'hg diff -r someid -r someotherid'.

> 
> > name.checkrev = <revisions that should be present in the repository
> > before loading the tags>
> 
> Can you explain more about checkrev?

One of our repositories uses about 10000 identifiers (or tags, using our current extension). We only load these if a specific revision is present, to avoid the overhead on any other repositories.
I guess this could be a general command (which in our case would check for revision presence) to allow alternative checks.

> 
> --
> Mathematics is the supreme nostalgia of our time.
> 
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list