[PATCH] convert: .hgtags files contain SKIP lines (issue3736)

John Peacock john.peacock at messagesystems.com
Wed Dec 26 12:14:13 CST 2012


# HG changeset patch
# User John Peacock <john.peacock at messagesystems.com>
# Date 1356542038 18000
# Branch bugfix/3736
# Node ID 0198939c241c0ed4f6ba40196e24f36eb85aea56
# Parent  730b769fb6347d8da3c9e0674e7133bdf61d7a36
convert: .hgtags files contain SKIP lines (issue3736)

convert is writing SKIP lines into the various .hgtags files when a
tag corresponds to a revision marked to be skipped in the conversion
(e.g. with filemap).  These lines should only be maintained in the
shamap file, not in the .hgtags (where they emit unhelpful warnings).
Minimal patch to ignore SKIP lines when updating the .hgtags files.

diff --git a/hgext/convert/hg.py b/hgext/convert/hg.py
--- a/hgext/convert/hg.py
+++ b/hgext/convert/hg.py
@@ -23,7 +23,7 @@
 from mercurial.node import bin, hex, nullid
 from mercurial import hg, util, context, bookmarks, error
 
-from common import NoRepo, commit, converter_source, converter_sink
+from common import SKIPREV, NoRepo, commit, converter_source, converter_sink
 
 class mercurial_sink(converter_sink):
     def __init__(self, ui, path):
@@ -126,6 +126,8 @@
             revid = revmap.get(source.lookuprev(s[0]))
             if not revid:
                 continue
+            if revid == SKIPREV:
+                continue
             fp.write('%s %s\n' % (revid, s[1]))
         return fp.getvalue()
 


More information about the Mercurial-devel mailing list