##// END OF EJS Templates
convert: backout b75a04502ced and 9616b03113ce - tagmap...
Mads Kiilerich -
r21076:5236c7a7 default
parent child Browse files
Show More
@@ -146,10 +146,6 b' def convert(ui, src, dest=None, revmapfi'
146 146 you want to close a branch. Each entry contains a revision or hash
147 147 separated by white space.
148 148
149 The tagmap is a file that exactly analogous to the branchmap. This will
150 rename tags on the fly and prevent the 'update tags' commit usually found
151 at the end of a convert process.
152
153 149 Mercurial Source
154 150 ################
155 151
@@ -330,8 +326,6 b' cmdtable = {'
330 326 _('change branch names while converting'), _('FILE')),
331 327 ('', 'closemap', '',
332 328 _('closes given revs'), _('FILE')),
333 ('', 'tagmap', '',
334 _('change tag names while converting'), _('FILE')),
335 329 ('', 'branchsort', None, _('try to sort changesets by branches')),
336 330 ('', 'datesort', None, _('try to sort changesets by date')),
337 331 ('', 'sourcesort', None, _('preserve source changesets order')),
@@ -204,8 +204,7 b' class converter_sink(object):'
204 204 mapping equivalent authors identifiers for each system."""
205 205 return None
206 206
207 def putcommit(self, files, copies, parents, commit, source,
208 revmap, tagmap):
207 def putcommit(self, files, copies, parents, commit, source, revmap):
209 208 """Create a revision with all changed files listed in 'files'
210 209 and having listed parents. 'commit' is a commit object
211 210 containing at a minimum the author, date, and message for this
@@ -121,7 +121,6 b' class converter(object):'
121 121 self.splicemap = self.parsesplicemap(opts.get('splicemap'))
122 122 self.branchmap = mapfile(ui, opts.get('branchmap'))
123 123 self.closemap = self.parseclosemap(opts.get('closemap'))
124 self.tagmap = mapfile(ui, opts.get('tagmap'))
125 124
126 125 def parseclosemap(self, path):
127 126 """ check and validate the closemap format and
@@ -449,7 +448,7 b' class converter(object):'
449 448 commit.extra['close'] = 1
450 449
451 450 newnode = self.dest.putcommit(files, copies, parents, commit,
452 source, self.map, self.tagmap)
451 source, self.map)
453 452 source.close()
454 453 self.source.converted(rev, newnode)
455 454 self.map[rev] = newnode
@@ -485,9 +484,6 b' class converter(object):'
485 484 self.ui.progress(_('converting'), None)
486 485
487 486 tags = self.source.gettags()
488 tags = dict((self.tagmap.get(k, k), v)
489 for k, v in tags.iteritems())
490
491 487 ctags = {}
492 488 for k in tags:
493 489 v = tags[k]
@@ -116,7 +116,7 b' class mercurial_sink(converter_sink):'
116 116 self.repo.pull(prepo, [prepo.lookup(h) for h in heads])
117 117 self.before()
118 118
119 def _rewritetags(self, source, revmap, tagmap, data):
119 def _rewritetags(self, source, revmap, data):
120 120 fp = cStringIO.StringIO()
121 121 for line in data.splitlines():
122 122 s = line.split(' ', 1)
@@ -125,18 +125,17 b' class mercurial_sink(converter_sink):'
125 125 revid = revmap.get(source.lookuprev(s[0]))
126 126 if not revid:
127 127 continue
128 fp.write('%s %s\n' % (revid, tagmap.get(s[1], s[1])))
128 fp.write('%s %s\n' % (revid, s[1]))
129 129 return fp.getvalue()
130 130
131 def putcommit(self, files, copies, parents, commit, source,
132 revmap, tagmap):
131 def putcommit(self, files, copies, parents, commit, source, revmap):
133 132
134 133 files = dict(files)
135 134 def getfilectx(repo, memctx, f):
136 135 v = files[f]
137 136 data, mode = source.getfile(f, v)
138 137 if f == '.hgtags':
139 data = self._rewritetags(source, revmap, tagmap, data)
138 data = self._rewritetags(source, revmap, data)
140 139 return context.memfilectx(f, data, 'l' in mode, 'x' in mode,
141 140 copies.get(f))
142 141
@@ -1227,8 +1227,7 b' class svn_sink(converter_sink, commandli'
1227 1227 def revid(self, rev):
1228 1228 return u"svn:%s@%s" % (self.uuid, rev)
1229 1229
1230 def putcommit(self, files, copies, parents, commit, source,
1231 revmap, tagmap):
1230 def putcommit(self, files, copies, parents, commit, source, revmap):
1232 1231 for parent in parents:
1233 1232 try:
1234 1233 return self.revid(self.childmap[parent])
@@ -126,10 +126,6 b''
126 126 you want to close a branch. Each entry contains a revision or hash
127 127 separated by white space.
128 128
129 The tagmap is a file that exactly analogous to the branchmap. This will
130 rename tags on the fly and prevent the 'update tags' commit usually found
131 at the end of a convert process.
132
133 129 Mercurial Source
134 130 ################
135 131
@@ -276,7 +272,6 b''
276 272 --splicemap FILE splice synthesized history into place
277 273 --branchmap FILE change branch names while converting
278 274 --closemap FILE closes given revs
279 --tagmap FILE change tag names while converting
280 275 --branchsort try to sort changesets by branches
281 276 --datesort try to sort changesets by date
282 277 --sourcesort preserve source changesets order
General Comments 0
You need to be logged in to leave comments. Login now