Mercurial > hg
diff hgext/convert/__init__.py @ 21076:5236c7a72a2d
convert: backout b75a04502ced and 9616b03113ce - tagmap
Tagmap solves a very specific use case. It would be better to have a more
generic solution than to have to maintain this forever.
Tagmap has not been released yet and removing it now will not break any
backward compatibility contract.
There is no test coverage for tagmap but it seems like the same can be achieved
with a (relatively) simple and much more powerful custom extension:
import hgext.convert.hg
def f(tag):
return tag.replace('some', 'other')
class source(hgext.convert.hg.mercurial_source):
def gettags(self):
return dict((f(tag), node)
for tag, node in in super(source, self).gettags().items())
def getfile(self, name, rev):
data, flags = super(source, self).getfile(name, rev)
if name == '.hgtags':
data = ''.join(l[:41] + f(l[41:]) + '\n' for l in data.splitlines())
return data, flags
hgext.convert.hg.mercurial_source = source
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 16 Apr 2014 01:09:49 +0200 |
parents | 7731a2281cf0 |
children | 78b15ad2f968 |
line wrap: on
line diff
--- a/hgext/convert/__init__.py Tue Apr 15 11:53:10 2014 -0400 +++ b/hgext/convert/__init__.py Wed Apr 16 01:09:49 2014 +0200 @@ -146,10 +146,6 @@ you want to close a branch. Each entry contains a revision or hash separated by white space. - The tagmap is a file that exactly analogous to the branchmap. This will - rename tags on the fly and prevent the 'update tags' commit usually found - at the end of a convert process. - Mercurial Source ################ @@ -330,8 +326,6 @@ _('change branch names while converting'), _('FILE')), ('', 'closemap', '', _('closes given revs'), _('FILE')), - ('', 'tagmap', '', - _('change tag names while converting'), _('FILE')), ('', 'branchsort', None, _('try to sort changesets by branches')), ('', 'datesort', None, _('try to sort changesets by date')), ('', 'sourcesort', None, _('preserve source changesets order')),