[Pkg-bazaar-commits] ./bzr-gtk/unstable r627: Fix building of credits.pickle when not present.
Jelmer Vernooij
jelmer at samba.org
Fri Apr 10 07:44:25 UTC 2009
------------------------------------------------------------
revno: 627
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: experimental
timestamp: Fri 2008-11-07 17:22:57 +0100
message:
Fix building of credits.pickle when not present.
modified:
.bzr-builddeb/default.conf
setup.py
------------------------------------------------------------
revno: 621.1.1
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: setup.py-url
timestamp: Fri 2008-11-07 17:17:37 +0100
message:
Allow --url option to ./setup.py build_credits
modified:
setup.py
-------------- next part --------------
=== modified file '.bzr-builddeb/default.conf'
--- a/.bzr-builddeb/default.conf 2008-11-07 15:36:00 +0000
+++ b/.bzr-builddeb/default.conf 2008-11-07 16:22:57 +0000
@@ -1,3 +1,6 @@
[BUILDDEB]
export-upstream = lp:bzr-gtk
export-upstream-revision = tag:bzr-gtk-$UPSTREAM_VERSION
+
+[HOOKS]
+pre-build = test -f credits.pickle || ./setup.py build_credits --url=lp:bzr-gtk
=== modified file 'setup.py'
--- a/setup.py 2008-10-14 18:50:26 +0000
+++ b/setup.py 2008-11-07 16:17:37 +0000
@@ -39,24 +39,25 @@
class CreateCredits(Command):
description = "Create credits file"
- user_options = []
+ user_options = [("url=", None, "URL of branch")]
def initialize_options(self):
- pass
+ self.url = "."
def finalize_options(self):
pass
def get_command_name(self):
- return 'test'
+ return 'build_credits'
def run(self):
+ from bzrlib.plugin import load_plugins; load_plugins()
from bzrlib.branch import Branch
from bzrlib.plugins.stats import find_credits
import pickle
- branch = Branch.open(".")
+ branch = Branch.open(self.url)
credits = find_credits(branch.repository, branch.last_revision())
pickle.dump(credits, file("credits.pickle", 'w'))
More information about the Pkg-bazaar-commits
mailing list