Skip to content
Snippets Groups Projects
Commit a346b164 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

topic: allow '.' in topic names

This is also commonly used.
parent af998193
No related branches found
Tags 8.0.0
No related merge requests found
......@@ -18,6 +18,8 @@
* fixed issue 5833 and 5832
* topic: restring name to letter, '-', '_' and '.'
7.3.0 -- 2018-03-21
---------------------
......
......@@ -594,6 +594,6 @@
# Have some restrictions on the topic name just like bookmark name
scmutil.checknewlabel(repo, topic, 'topic')
rmatch = re.match(br'[\w\-]+', topic)
rmatch = re.match(br'[-_.\w]+', topic)
if not rmatch or rmatch.group(0) != topic:
helptxt = _("topic names can only consist of alphanumeric, '-'"
......@@ -598,6 +598,6 @@
if not rmatch or rmatch.group(0) != topic:
helptxt = _("topic names can only consist of alphanumeric, '-'"
" and '_' characters")
" '_' and '.' characters")
raise error.Abort(_("invalid topic name: '%s'") % topic, hint=helptxt)
compat.startpager(ui, 'topics')
......
......@@ -117,8 +117,8 @@
$ hg topic 'a12#45'
abort: invalid topic name: 'a12#45'
(topic names can only consist of alphanumeric, '-' and '_' characters)
(topic names can only consist of alphanumeric, '-' '_' and '.' characters)
[255]
$ hg topic 'foo bar'
abort: invalid topic name: 'foo bar'
......@@ -121,8 +121,8 @@
[255]
$ hg topic 'foo bar'
abort: invalid topic name: 'foo bar'
(topic names can only consist of alphanumeric, '-' and '_' characters)
(topic names can only consist of alphanumeric, '-' '_' and '.' characters)
[255]
this is trying to list topic names
......@@ -130,7 +130,7 @@
$ hg topic '*12 B23'
abort: invalid topic name: '*12 B23'
(topic names can only consist of alphanumeric, '-' and '_' characters)
(topic names can only consist of alphanumeric, '-' '_' and '.' characters)
[255]
Test commit flag and help text
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment