This reverts (most of) commit
c135a5834a9bf9cd9c3382d6489f93e3fdabeafd.
Requiring a colon seems to be too fascist; it makes people think that you
can't use local repositories anymore, which wasn't true: you could just
refer to them as ":/path/to/repo". But that's just too weird and
non-obvious. It already resulted in a query on the mailing list, the
avoidance of which is why we added this patch in the first place. So let's
take it back out.
I kept some minor clarifications and unit test improvements, however.
Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
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()
- try:
- cli = client.Client(opt.remote, create=True)
- except client.ClientError:
- o.fatal("server exited unexpectedly; see errors above")
+ cli = client.Client(opt.remote, create=True)
cli.close()
else:
git.init_repo()
ret = 0
if 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")
+ cli = client.Client(opt.remote)
cat = cli.cat
else:
cp = git.CatPipe()
refname = opt.name and 'refs/heads/%s' % opt.name or None
if opt.remote or is_reverse:
- 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")
+ cli = client.Client(opt.remote)
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:
- 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")
+ cli = client.Client(opt.remote)
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
WVPASS bup margin
WVPASS bup split -t t/testfile2 >tags2t.tmp
WVPASS bup split -t t/testfile2 --fanout 3 >tags2tf.tmp
-WVFAIL bup split -r $BUP_DIR -c t/testfile2 >tags2c.tmp
+WVPASS 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 join $(cat tags1.tmp) >out1.tmp
WVPASS bup join <tags2.tmp >out2.tmp
WVPASS bup join <tags2t.tmp >out2t.tmp
-WVFAIL bup join -r "$BUP_DIR" <tags2c.tmp >out2c.tmp
+WVPASS 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