*.tmp
/build
*.swp
+nbproject
if opt.remote:
+ if opt.remote and opt.remote.find(":") == -1:
+ o.fatal("--remote argument must contain a colon")
git.init_repo() # local repo
git.check_repo_or_die()
- cli = client.Client(opt.remote, create=True)
+ try:
+ cli = client.Client(opt.remote, create=True)
+ except client.ClientError:
+ o.fatal("server exited unexpectedly; see errors above")
cli.close()
else:
git.init_repo()
ret = 0
if opt.remote:
- cli = client.Client(opt.remote)
+ if opt.remote and opt.remote.find(":") == -1:
+ o.fatal("--remote argument must contain a colon")
+ try:
+ cli = client.Client(opt.remote)
+ except client.ClientError:
+ o.fatal("server exited unexpectedly; see errors above")
cat = cli.cat
else:
cp = git.CatPipe()
optspec = """
bup save [-tc] [-n name] <filenames...>
--
-r,remote= remote repository path
+r,remote= hostname:/path/to/repo of remote repository
t,tree output a tree id
c,commit output a commit id
n,name= name of backup set to update (if any)
refname = opt.name and 'refs/heads/%s' % opt.name or None
if opt.remote or is_reverse:
- cli = client.Client(opt.remote)
+ if opt.remote and opt.remote.find(":") == -1:
+ o.fatal("--remote argument must contain a colon")
+ try:
+ cli = client.Client(opt.remote)
+ except client.ClientError:
+ o.fatal("server exited unexpectedly; see errors above")
oldref = refname and cli.read_ref(refname) or None
w = cli.new_packwriter()
else:
if opt.noop or opt.copy:
cli = pack_writer = oldref = None
elif opt.remote or is_reverse:
- cli = client.Client(opt.remote)
+ if opt.remote and opt.remote.find(":") == -1:
+ o.fatal("--remote argument must contain a colon")
+ try:
+ cli = client.Client(opt.remote)
+ except client.ClientError:
+ o.fatal("server exited unexpectedly; see errors above")
oldref = refname and cli.read_ref(refname) or None
pack_writer = cli.new_packwriter()
else:
WVPASSEQ "$(bup index -s / | grep ^D)" ""
tree3=$(bup save -t /)
WVPASSEQ "$tree1" "$tree3"
+WVFAIL bup save -r localhost -n r-test $D
+WVPASS bup save -r :$BUP_DIR -n r-test $D
+WVFAIL bup save -r :$BUP_DIR/fake/path -n r-test $D
+WVFAIL bup save -r :$BUP_DIR -n r-test $D/fake/path
WVSTART "split"
WVPASS bup split --bench -b <t/testfile1 >tags1.tmp
WVPASS bup margin
WVPASS bup split -t t/testfile2 >tags2t.tmp
WVPASS bup split -t t/testfile2 --fanout 3 >tags2tf.tmp
-WVPASS bup split -r "$BUP_DIR" -c t/testfile2 >tags2c.tmp
+WVFAIL bup split -r $BUP_DIR -c t/testfile2 >tags2c.tmp
+WVPASS bup split -r :$BUP_DIR -c t/testfile2 >tags2c.tmp
WVPASS ls -lR \
- | WVPASS bup split -r "$BUP_DIR" -c --fanout 3 --max-pack-objects 3 -n lslr
+ | WVPASS bup split -r :$BUP_DIR -c --fanout 3 --max-pack-objects 3 -n lslr
WVPASS bup ls
WVFAIL bup ls /does-not-exist
WVPASS bup ls /lslr
WVPASS bup join $(cat tags1.tmp) >out1.tmp
WVPASS bup join <tags2.tmp >out2.tmp
WVPASS bup join <tags2t.tmp >out2t.tmp
-WVPASS bup join -r "$BUP_DIR" <tags2c.tmp >out2c.tmp
+WVFAIL bup join -r "$BUP_DIR" <tags2c.tmp >out2c.tmp
+WVPASS bup join -r ":$BUP_DIR" <tags2c.tmp >out2c.tmp
WVPASS diff -u t/testfile1 out1.tmp
WVPASS diff -u t/testfile2 out2.tmp
WVPASS diff -u t/testfile2 out2t.tmp