]> arthur.barton.de Git - bup.git/commit
Verify permissions in check_repo_or_die()
authorGabriel Filion <lelutin@gmail.com>
Thu, 10 Mar 2011 20:41:54 +0000 (12:41 -0800)
committerAvery Pennarun <apenwarr@gmail.com>
Thu, 10 Mar 2011 20:57:17 +0000 (12:57 -0800)
commitde9a8dd49c11f53bd7c690fbb9993db22fbb234c
tree87ddfb805c2dc5e78d2842d84bf3b84439447644
parentf3e3307ebee6b88b118a447b0f999232eb948696
Verify permissions in check_repo_or_die()

Currently, if one doesn't have read or access permission up to
repo('objects/pack'), bup exits with the following error:

error: repo() is not a bup/git repository

(with repo() replaced with the actual path).

This is misleading, since there is possibly really a repository there
but the user can't access it.

Make git.check_repo_or_die() verify that the current user has the
permission to access repo('objects/pack'), and if not, output a
meaningful error message.

As a bonus, we get an error if the bup_dir path is not a directory.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
Makefile
lib/bup/git.py
lib/bup/t/tgit.py