[PATCH 8 of 9] tag: disallow '\0' in tag names

Kevin Bullock kbullock+mercurial at ringworld.org
Wed Oct 17 22:31:48 CDT 2012


# HG changeset patch
# User Kevin Bullock <kbullock at ringworld.org>
# Date 1350527947 18000
# Node ID 5b18705d6e80c044c3a46a7a3bf728d58b2b276a
# Parent  96514c9a8a077f411b28e0bc86521281ebfb99d1
tag: disallow '\0' in tag names

This brings the list of disallowed characters in line with bookmarks.

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -385,7 +385,7 @@ class localrepository(object):
     def hook(self, name, throw=False, **args):
         return hook.hook(self.ui, self, name, throw, **args)
 
-    tag_disallowed = ':\r\n'
+    tag_disallowed = ':\0\r\n'
 
     def _tag(self, names, node, message, local, user, date, extra={}):
         if isinstance(names, str):


More information about the Mercurial-devel mailing list