- 'top' on some Unix platforms, e.g. Linux, now shows node processes as
'tahoe' instead of 'python'. (#174)
- Improve HTML formatting of the WUI. (#1219)
+ - The 'tahoe create-alias' and 'tahoe add-alias' commands now accept a
+ trailing colon on the alias. (#1305)
** Removals
Command Syntax Summary
----------------------
-``tahoe add-alias ALIAS DIRCAP``
+``tahoe add-alias ALIAS[:] DIRCAP``
-``tahoe create-alias ALIAS``
+``tahoe create-alias ALIAS[:]``
``tahoe list-aliases``
Command Examples
----------------
-``tahoe add-alias ALIAS DIRCAP``
+``tahoe add-alias ALIAS[:] DIRCAP``
An example would be::
directory. Use "``tahoe add-alias tahoe DIRCAP``" to set the contents of the
default ``tahoe:`` alias.
+ Since Tahoe-LAFS v1.8.2, the alias name can be given with or without the
+ trailing colon.
+
``tahoe create-alias fun``
This combines "``tahoe mkdir``" and "``tahoe add-alias``" into a single step.
class AddAliasOptions(VDriveOptions):
def parseArgs(self, alias, cap):
self.alias = argv_to_unicode(alias)
+ if self.alias.endswith(u':'):
+ self.alias = self.alias[:-1]
self.cap = cap
def getSynopsis(self):
- return "%s add-alias ALIAS DIRCAP" % (os.path.basename(sys.argv[0]),)
+ return "%s add-alias ALIAS[:] DIRCAP" % (os.path.basename(sys.argv[0]),)
longdesc = """Add a new alias for an existing directory."""
class CreateAliasOptions(VDriveOptions):
def parseArgs(self, alias):
self.alias = argv_to_unicode(alias)
+ if self.alias.endswith(u':'):
+ self.alias = self.alias[:-1]
def getSynopsis(self):
- return "%s create-alias ALIAS" % (os.path.basename(sys.argv[0]),)
+ return "%s create-alias ALIAS[:]" % (os.path.basename(sys.argv[0]),)
longdesc = """Create a new directory and add an alias for it."""
cap = options.cap
stdout = options.stdout
stderr = options.stderr
- assert ":" not in alias
- assert " " not in alias
+ if u":" in alias:
+ # a single trailing colon will already have been stripped if present
+ print >>stderr, "Alias names cannot contain colons."
+ return 1
+ if u" " in alias:
+ print >>stderr, "Alias names cannot contain spaces."
+ return 1
old_aliases = get_aliases(nodedir)
if alias in old_aliases:
alias = options.alias
stdout = options.stdout
stderr = options.stderr
- assert ":" not in alias
- assert " " not in alias
+ if u":" in alias:
+ # a single trailing colon will already have been stripped if present
+ print >>stderr, "Alias names cannot contain colons."
+ return 1
+ if u" " in alias:
+ print >>stderr, "Alias names cannot contain spaces."
+ return 1
old_aliases = get_aliases(nodedir)
if alias in old_aliases: