]>
arthur.barton.de Git - bup.git/commit
Add repo abstraction and use it in join
Operations that can be --remote currently rely on code like this:
if opt.remote:
cli = client.Client(opt.remote)
cat = cli.cat
else:
cp = git.CatPipe()
cat = cp.join
Instead, add LocalRepo and RemoteRepo classes with matching methods so
that we can say:
repo = RemoteRepo(opt.remote) if opt.remote else LocalRepo()
and then use repo methods to handle the work.
Rework "bup join" accordingly.
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>