Show More
@@ -212,6 +212,25 b' class mercurial_sink(converter_sink):' | |||||
212 | newlines = sorted([("%s %s\n" % (tags[tag], tag)) for tag in tags]) |
|
212 | newlines = sorted([("%s %s\n" % (tags[tag], tag)) for tag in tags]) | |
213 | if newlines == oldlines: |
|
213 | if newlines == oldlines: | |
214 | return None, None |
|
214 | return None, None | |
|
215 | ||||
|
216 | # if the old and new tags match, then there is nothing to update | |||
|
217 | oldtags = set() | |||
|
218 | newtags = set() | |||
|
219 | for line in oldlines: | |||
|
220 | s = line.strip().split(' ', 1) | |||
|
221 | if len(s) != 2: | |||
|
222 | continue | |||
|
223 | oldtags.add(s[1]) | |||
|
224 | for line in newlines: | |||
|
225 | s = line.strip().split(' ', 1) | |||
|
226 | if len(s) != 2: | |||
|
227 | continue | |||
|
228 | if s[1] not in oldtags: | |||
|
229 | newtags.add(s[1].strip()) | |||
|
230 | ||||
|
231 | if not newtags: | |||
|
232 | return None, None | |||
|
233 | ||||
215 | data = "".join(newlines) |
|
234 | data = "".join(newlines) | |
216 | def getfilectx(repo, memctx, f): |
|
235 | def getfilectx(repo, memctx, f): | |
217 | return context.memfilectx(f, data, False, False, None) |
|
236 | return context.memfilectx(f, data, False, False, None) |
General Comments 0
You need to be logged in to leave comments.
Login now