comparison hgext/convert/common.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 d7e78e6d97bd
children 23b24d6a70c8
comparison
equal deleted inserted replaced
21075:438803e4bd97 21076:5236c7a72a2d
202 """Path to a file that will contain lines 202 """Path to a file that will contain lines
203 srcauthor=dstauthor 203 srcauthor=dstauthor
204 mapping equivalent authors identifiers for each system.""" 204 mapping equivalent authors identifiers for each system."""
205 return None 205 return None
206 206
207 def putcommit(self, files, copies, parents, commit, source, 207 def putcommit(self, files, copies, parents, commit, source, revmap):
208 revmap, tagmap):
209 """Create a revision with all changed files listed in 'files' 208 """Create a revision with all changed files listed in 'files'
210 and having listed parents. 'commit' is a commit object 209 and having listed parents. 'commit' is a commit object
211 containing at a minimum the author, date, and message for this 210 containing at a minimum the author, date, and message for this
212 changeset. 'files' is a list of (path, version) tuples, 211 changeset. 'files' is a list of (path, version) tuples,
213 'copies' is a dictionary mapping destinations to sources, 212 'copies' is a dictionary mapping destinations to sources,