Commit fbd56833 authored by Eric S. Raymond's avatar Eric S. Raymond

With no selection set and no name, make assign list all assignments.

parent ef94d82d
......@@ -19,7 +19,7 @@
<arg choice="opt">-i</a>
<arg choice="opt">-i</arg>
<arg choice="opt">-p <replaceable>passwordfile</replaceable></arg>
<arg choice="opt">-u <replaceable>updatefile</replaceable></arg>
<arg choice="opt">-h <replaceable>host</replaceable></arg>
......@@ -8031,7 +8031,12 @@ def do_assign(self, line):
complain(b"no repo has been chosen.")
if self.selection is None:
if line:
raise Recoverable(b"No selection")
for n, v in repo.assignments.items():
announce("%s = %s" % (n, v))
name = line.strip()
if name in repo.assignments:
raise Recoverable(b"%s has already been set" % name)
......@@ -2348,6 +2348,8 @@ any existing branch name. Assignments may be cleared by sequence
mutations (though not ordinary deletions); you will see a warning
when this occurs.</para>
<para>With no selection set and no name, list all assignments.</para>
<para>Use this to optimize out location and selection computations
that would otherwise be performed repeatedly, e.g. in macro calls.</para>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment