Show More
@@ -223,14 +223,21 b' def _readtags(ui, repo, lines, fn, recod' | |||||
223 | newtags[tag] = (taghist[-1], taghist[:-1]) |
|
223 | newtags[tag] = (taghist[-1], taghist[:-1]) | |
224 | return newtags |
|
224 | return newtags | |
225 |
|
225 | |||
226 | def _updatetags(filetags, alltags, tagtype, tagtypes): |
|
226 | def _updatetags(filetags, alltags, tagtype=None, tagtypes=None): | |
227 |
|
|
227 | """Incorporate the tag info read from one file into dictionnaries | |
228 | dictionaries, alltags and tagtypes, that contain all tag |
|
228 | ||
229 | info (global across all heads plus local).''' |
|
229 | The first one, 'alltags', is a "tagmaps" (see 'findglobaltags' for details). | |
|
230 | ||||
|
231 | The second one, 'tagtypes', is optional and will be updated to track the | |||
|
232 | "tagtype" of entries in the tagmaps. When set, the 'tagtype' argument also | |||
|
233 | needs to be set.""" | |||
|
234 | if tagtype is None: | |||
|
235 | assert tagtypes is None | |||
230 |
|
236 | |||
231 | for name, nodehist in filetags.iteritems(): |
|
237 | for name, nodehist in filetags.iteritems(): | |
232 | if name not in alltags: |
|
238 | if name not in alltags: | |
233 | alltags[name] = nodehist |
|
239 | alltags[name] = nodehist | |
|
240 | if tagtype is not None: | |||
234 | tagtypes[name] = tagtype |
|
241 | tagtypes[name] = tagtype | |
235 | continue |
|
242 | continue | |
236 |
|
243 | |||
@@ -243,7 +250,7 b' def _updatetags(filetags, alltags, tagty' | |||||
243 | if (bnode != anode and anode in bhist and |
|
250 | if (bnode != anode and anode in bhist and | |
244 | (bnode not in ahist or len(bhist) > len(ahist))): |
|
251 | (bnode not in ahist or len(bhist) > len(ahist))): | |
245 | anode = bnode |
|
252 | anode = bnode | |
246 | else: |
|
253 | elif tagtype is not None: | |
247 | tagtypes[name] = tagtype |
|
254 | tagtypes[name] = tagtype | |
248 | ahist.extend([n for n in bhist if n not in ahist]) |
|
255 | ahist.extend([n for n in bhist if n not in ahist]) | |
249 | alltags[name] = anode, ahist |
|
256 | alltags[name] = anode, ahist |
General Comments 0
You need to be logged in to leave comments.
Login now