/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Jelmer Vernooij
  • Date: 2008-11-07 16:17:37 UTC
  • Revision ID: jelmer@samba.org-20081107161737-q29iraxmifhkzn2p
Allow --url option to ./setup.py build_credits

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
class CreateCredits(Command):
40
40
    description = "Create credits file"
41
41
 
42
 
    user_options = []
 
42
    user_options = [("url=", None, "URL of branch")]
43
43
 
44
44
    def initialize_options(self):
45
 
        pass
 
45
        self.url = "."
46
46
 
47
47
    def finalize_options(self):
48
48
        pass
49
49
 
50
50
    def get_command_name(self):
51
 
        return 'test'
 
51
        return 'build_credits'
52
52
 
53
53
    def run(self):
 
54
        from bzrlib.plugin import load_plugins; load_plugins()
54
55
        from bzrlib.branch import Branch
55
56
        from bzrlib.plugins.stats import find_credits
56
57
 
57
58
        import pickle
58
59
 
59
 
        branch = Branch.open(".")
 
60
        branch = Branch.open(self.url)
60
61
        credits = find_credits(branch.repository, branch.last_revision())
61
62
 
62
63
        pickle.dump(credits, file("credits.pickle", 'w'))