Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 7016:58dcf10eea2b
Backed out changeset 3d54cf97598d (see issue916 for details)
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Wed, 10 Sep 2008 08:48:23 +0200 |
parents | 3d54cf97598d |
children | 582dac23ebac |
comparison
equal
deleted
inserted
replaced
7009:3d54cf97598d | 7016:58dcf10eea2b |
---|---|
219 for x in self.status()[:5]: | 219 for x in self.status()[:5]: |
220 if '.hgtags' in x: | 220 if '.hgtags' in x: |
221 raise util.Abort(_('working copy of .hgtags is changed ' | 221 raise util.Abort(_('working copy of .hgtags is changed ' |
222 '(please commit .hgtags manually)')) | 222 '(please commit .hgtags manually)')) |
223 | 223 |
224 parents = self[None].parents() | 224 self._tag(names, node, message, local, user, date) |
225 parent = None | |
226 # use tip instead of the parent rev if there's no working copy | |
227 # (avoid creating a new head) | |
228 if len(parents) == 1 and parents[0].node() == nullid: | |
229 parent = self['tip'].node() | |
230 self._tag(names, node, message, local, user, date, parent=parent) | |
231 | 225 |
232 def tags(self): | 226 def tags(self): |
233 '''return a mapping of tag to node''' | 227 '''return a mapping of tag to node''' |
234 if self.tagscache: | 228 if self.tagscache: |
235 return self.tagscache | 229 return self.tagscache |