##// END OF EJS Templates
Add "null" pseudo-tag pointing to nullid
Brendan Cully -
r3801:bd701124 default
parent child Browse files
Show More
@@ -2189,7 +2189,7 b' def tag(ui, repo, name, rev_=None, **opt'
2189 necessary. The file '.hg/localtags' is used for local tags (not
2189 necessary. The file '.hg/localtags' is used for local tags (not
2190 shared among repositories).
2190 shared among repositories).
2191 """
2191 """
2192 if name in ['tip', '.']:
2192 if name in ['tip', '.', 'null']:
2193 raise util.Abort(_("the name '%s' is reserved") % name)
2193 raise util.Abort(_("the name '%s' is reserved") % name)
2194 if rev_ is not None:
2194 if rev_ is not None:
2195 ui.warn(_("use of 'hg tag NAME [REV]' is deprecated, "
2195 ui.warn(_("use of 'hg tag NAME [REV]' is deprecated, "
@@ -376,6 +376,8 b' class localrepository(repo.repository):'
376 key = self.dirstate.parents()[0]
376 key = self.dirstate.parents()[0]
377 if key == nullid:
377 if key == nullid:
378 raise repo.RepoError(_("no revision checked out"))
378 raise repo.RepoError(_("no revision checked out"))
379 elif key == 'null':
380 return nullid
379 n = self.changelog._match(key)
381 n = self.changelog._match(key)
380 if n:
382 if n:
381 return n
383 return n
General Comments 0
You need to be logged in to leave comments. Login now