]> arthur.barton.de Git - bup.git/commit - t/test.sh
--remote parameter requires a colon
authorDavid Roda <davidcroda@gmail.com>
Wed, 8 Sep 2010 12:58:09 +0000 (08:58 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Wed, 8 Sep 2010 18:50:24 +0000 (11:50 -0700)
commitc135a5834a9bf9cd9c3382d6489f93e3fdabeafd
tree0970b317e15d0027ec20b6aa74ebe5f2c4f270b4
parentbab7b16b760ba1fd686f6f5b274fc8ba2ad360e2
--remote parameter requires a colon

This patch checks for the presence of a colon if the --remote option
is used in bup save, bup split, bup join, and bup init.  Even though
specifying *only* a pathname without a hostname: is perfectly valid,
it's confusing to allow users to do so, because if they specify
"-r hostname" it will be treated as a path and thus give them a
confusing error message. Requiring a colon will avoid this.

It adds a few test cases to demonstrate that the code
works properly.

It also wraps the remote connection in a try except to prevent
a traceback if there is an error (so far I have only seen this
happen with an invalid bup dir parameter)

And I added the netbeans project folder to gitignore

Signed-off-by: David Roda <davidcroda@gmail.com>
.gitignore
cmd/init-cmd.py
cmd/join-cmd.py
cmd/save-cmd.py
cmd/split-cmd.py
t/test.sh