[PATCH 2 of 2 convert backouts] convert: backout 81cf597dafa9 and a3545c3104aa -closemap

Simon King simon at simonking.org.uk
Thu Apr 17 09:16:29 UTC 2014


On Wed, Apr 16, 2014 at 5:05 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
> # HG changeset patch
> # User Mads Kiilerich <madski at unity3d.com>
> # Date 1397603408 -7200
> #      Wed Apr 16 01:10:08 2014 +0200
> # Node ID c0c12f7dbe25a3b8294905b072f6f27291ad26b4
> # Parent  319a4229e58fba95bea881cba07a62a726723227
> convert: backout 81cf597dafa9 and a3545c3104aa -closemap
>
> Closemap solves a very specific use case. It would be better to have a more
> generic solution than to have to maintain this forever.
>
> Closemap has not been released yet and removing it now will not break any
> backward compatibility contract.
>
> There is no test coverage for closemap but it seems like the same can be
> achieved with a simple and much more powerful custom extension:
>
> import hgext.convert.hg
> class source(hgext.convert.hg.mercurial_source):
>     def getcommit(self, rev):
>         c = super(source, self).getcommit(rev)
>         if rev in ['''
> d643f67092ff123f6a192d52f12e7d123dae229f
> 9117c6561b0bd7792fa13b50d28239d51b78e51f
> f368a1c302d5b87506f7edb13769e591e063d7ea
> ''']:

This doesn't look quite right to me (a list containing a single
string). Shouldn't it be:

        if rev in '''
d643f67092ff123f6a192d52f12e7d123dae229f
9117c6561b0bd7792fa13b50d28239d51b78e51f
f368a1c302d5b87506f7edb13769e591e063d7ea
'''.split():

Should I make that change on the wiki?

Simon



More information about the Mercurial-devel mailing list