##// END OF EJS Templates
convert: new config variable hg.tagsbranch controls which branch tags are committed to
Brendan Cully -
r5260:be4835ad default
parent child Browse files
Show More
@@ -20,6 +20,7 b' class mercurial_sink(converter_sink):'
20 20 self.ui = ui
21 21 self.branchnames = ui.configbool('convert', 'hg.usebranchnames', True)
22 22 self.clonebranches = ui.configbool('convert', 'hg.clonebranches', False)
23 self.tagsbranch = ui.config('convert', 'hg.tagsbranch', 'default')
23 24 self.lastbranch = None
24 25 try:
25 26 self.repo = hg.repository(self.ui, path)
@@ -139,8 +140,15 b' class mercurial_sink(converter_sink):'
139 140 f.close()
140 141 if not oldlines: self.repo.add([".hgtags"])
141 142 date = "%s 0" % int(time.mktime(time.gmtime()))
143 extra = {}
144 if self.tagsbranch != 'default':
145 extra['branch'] = self.tagsbranch
146 try:
147 tagparent = self.repo.changectx(self.tagsbranch).node()
148 except hg.RepoError, inst:
149 tagparent = nullid
142 150 self.repo.rawcommit([".hgtags"], "update tags", "convert-repo",
143 date, self.repo.changelog.tip(), nullid)
151 date, tagparent, nullid)
144 152 return hex(self.repo.changelog.tip())
145 153
146 154 class mercurial_source(converter_source):
General Comments 0
You need to be logged in to leave comments. Login now