Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/localrepo.py @ 4864:fc389dcc33f5
Export extra in _tag so convert can set the branch of a tag
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Wed, 11 Jul 2007 00:04:15 -0700 |
parents | 8e503fa54d2d |
children | 76d4d031cc50 |
comparison
equal
deleted
inserted
replaced
4863:6dc0094c0827 | 4864:fc389dcc33f5 |
---|---|
107 def hook(self, name, throw=False, **args): | 107 def hook(self, name, throw=False, **args): |
108 return hook.hook(self.ui, self, name, throw, **args) | 108 return hook.hook(self.ui, self, name, throw, **args) |
109 | 109 |
110 tag_disallowed = ':\r\n' | 110 tag_disallowed = ':\r\n' |
111 | 111 |
112 def _tag(self, name, node, message, local, user, date, parent=None): | 112 def _tag(self, name, node, message, local, user, date, parent=None, |
113 extra={}): | |
113 use_dirstate = parent is None | 114 use_dirstate = parent is None |
114 | 115 |
115 for c in self.tag_disallowed: | 116 for c in self.tag_disallowed: |
116 if c in name: | 117 if c in name: |
117 raise util.Abort(_('%r cannot be used in a tag name') % c) | 118 raise util.Abort(_('%r cannot be used in a tag name') % c) |
132 ntags = self.filectx('.hgtags', parent).data() | 133 ntags = self.filectx('.hgtags', parent).data() |
133 self.wfile('.hgtags', 'ab').write(ntags + line) | 134 self.wfile('.hgtags', 'ab').write(ntags + line) |
134 if use_dirstate and self.dirstate.state('.hgtags') == '?': | 135 if use_dirstate and self.dirstate.state('.hgtags') == '?': |
135 self.add(['.hgtags']) | 136 self.add(['.hgtags']) |
136 | 137 |
137 tagnode = self.commit(['.hgtags'], message, user, date, p1=parent) | 138 tagnode = self.commit(['.hgtags'], message, user, date, p1=parent, |
139 extra=extra) | |
138 | 140 |
139 self.hook('tag', node=hex(node), tag=name, local=local) | 141 self.hook('tag', node=hex(node), tag=name, local=local) |
140 | 142 |
141 return tagnode | 143 return tagnode |
142 | 144 |