chiark / gitweb /
Try the built-in version string before git-describe
authorKarl Hasselström <kha@treskal.com>
Tue, 20 May 2008 21:33:12 +0000 (23:33 +0200)
committerKarl Hasselström <kha@treskal.com>
Tue, 20 May 2008 21:33:12 +0000 (23:33 +0200)
commit5c5234dbdfab2cd1a7d90ab2b3635fe536e39bbc
tree93d4cf6fa9d2f223ec520ab9507f6c75470423af
parent9564af74822b276d435319fc271eda591e5125a6
Try the built-in version string before git-describe

Try to get the built-in version string first, and fall back to git
describe if there is no built-in string, instead of the other way
around. This makes computing the version string much cheaper in the
common case (whenever StGit is not run directly from a git-controlled
tree).

In order for this to work when StGit _is_ run directly from a
git-controlled tree, setup.py has to delete the builtin version file
once the installation process is over. (Otherwise, the StGit version
in a git-controlled tree would be frozen at whatever value it happened
to have when setup.py was last run.)

Signed-off-by: Karl Hasselström <kha@treskal.com>
setup.py
stgit/.gitignore
stgit/version.py