# HG changeset patch # User Brendan Cully # Date 1165354902 28800 # Node ID bd7011246fabeaffd6e331a774ab3a9a29db1cd4 # Parent 630caaf2981584d01eda969d97d8431f44545f4f Add "null" pseudo-tag pointing to nullid diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2189,7 +2189,7 @@ def tag(ui, repo, name, rev_=None, **opt necessary. The file '.hg/localtags' is used for local tags (not shared among repositories). """ - if name in ['tip', '.']: + if name in ['tip', '.', 'null']: raise util.Abort(_("the name '%s' is reserved") % name) if rev_ is not None: ui.warn(_("use of 'hg tag NAME [REV]' is deprecated, " diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -376,6 +376,8 @@ class localrepository(repo.repository): key = self.dirstate.parents()[0] if key == nullid: raise repo.RepoError(_("no revision checked out")) + elif key == 'null': + return nullid n = self.changelog._match(key) if n: return n