]> arthur.barton.de Git - bup.git/commitdiff
Re-allow backup set names containing "/"
authorRob Browning <rlb@defaultvalue.org>
Wed, 14 May 2014 15:24:00 +0000 (10:24 -0500)
committerRob Browning <rlb@defaultvalue.org>
Wed, 14 May 2014 15:24:39 +0000 (10:24 -0500)
Revert the prohibition because all releases up to now have allowed
"/", and so that's nothing new.  Disabling "/" in 0.26 would be a
regression, and one we're not ready to commit to -- in fact, we may
eventually do the opposite, and add comprehensive support for "/".

This reverts commit 52a98179490c6ccb990e221bbdeb511f1de59de4.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
cmd/save-cmd.py

index 042a607c0fe87590f6d4b7056546a628b0f9571d..327d36677db12526ae115986e71941e3772ac62a 100755 (executable)
@@ -68,11 +68,8 @@ is_reverse = os.environ.get('BUP_SERVER_REVERSE')
 if is_reverse and opt.remote:
     o.fatal("don't use -r in reverse mode; it's automatic")
 
-if opt.name:
-    if opt.name.startswith('.'):
-        o.fatal('backup set names cannot start with "."')
-    if '/' in opt.name:
-        o.fatal('backup set names cannot contain "/"')
+if opt.name and opt.name.startswith('.'):
+    o.fatal("'%s' is not a valid branch name" % opt.name)
 refname = opt.name and 'refs/heads/%s' % opt.name or None
 if opt.remote or is_reverse:
     cli = client.Client(opt.remote)