default (sqlite) database location incorrect when using prepare-dev.py

Review Request #1183 — Created Oct. 26, 2009 and discarded

Information

Review Board
master

Reviewers

http://www.reviewboard.org/docs/codebase/dev/getting-started/#gettingstarted suggests a sequence of steps that result in the sqlite database being created in the "wrong" directory. If:

$ cd reviewboard
$ python ./contrib/internal/prepare-dev.py

Is issued the database ends up in the reviewboard directory (i.e. reviewboard/reviewboard/reviewboard.db of the git working area).

When the next step in http://www.reviewboard.org/docs/codebase/dev/getting-started/#gettingstarted is ran, reviewboard starts but complains about a missing database (schema) and suggests that, "manage.py syncdb" be ran.

This change updates the template settings file to perform some directory checks I'm not sure if this is good form but it is one of the easiest ways of correcting the problem problematically without needing to update the settings file after it is created.

I added an if sqlite check to make clear the path was needed (only for sqlite).

 
chipx86
  1. Not sure I'm a fan of this change. I think I'd prefer we run syncdb in the right directory in prepare-dev.py instead, or change things so we instead run everything from the top-level reviewboard directory instead.
    1. I'm actually not to bothered what is done so long as it works (or is documented) :-). This problem caused me some hassle whilst following the Getting Started guide (I just wanted a test system so I could sanity check changes against). The aim of this patch/review is to bring awareness of the problem, I'm not committed to any specific solution.
      
  2. 
      
chipx86
  1. Ended up fixing this another way. It's committed as r3e16618.
  2.