Bugzilla – Bug 5088
server can still create a repo when in --readonly mode
Last modified: 2009-02-13 12:08:41 UTC
You need to log in before you can comment on or make changes to this bug.
If the depot server is pointed at a bogus directory, it will create a repo there, even when started in --readonly mode. It'd be nice to simply error out and exit 1 on this case instead.
As a side-effect of my local publishing changes, this was easily fixed.
If the specified repo_dir does not exist, it will exit this way: $ ./depot.py -p 8009 -d /tmp/repo --readonly --content-root=`pwd` pkg.depotd: an error occurred while trying to initialize the depot repository directory structures: The specified repository root '/tmp/repo' does not exist. $ echo $? 1 If the specified repo_dir does exist, but doesn't contain all of the requisite repository directories and cfg_cache, it will exit this way: ./depot.py -p 8009 -d /tmp/repo --readonly --content-root=`pwd` pkg.depotd: an error occurred while trying to initialize the depot repository directory structures: The specified repository root '/tmp/repo' is not a valid repository. $ echo $? 1 There are unit tests to verify this now as well.
Fixed in changeset 873 / b95d76c53b5eeece7335982e3ccf7047770decc4.