/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 __init__.py

  • Committer: David Allouche
  • Date: 2005-12-03 04:03:24 UTC
  • Revision ID: david.allouche@canonical.com-20051203040324-c8e214d22f6ca708
make expensive sorting and parent filtering optional

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import bzrlib
20
20
import bzrlib.commands
21
 
 
 
21
from bzrlib.option import Option
22
22
from bzrlib.branch import Branch
23
23
 
24
24
 
30
30
 
31
31
    The default starting point is latest revision on the branch, you can
32
32
    specify a starting point with -r revision.
 
33
 
 
34
    The --robust option enables removal of redundant parents. It is sometimes
 
35
    useful on branches that contain corrupt revisions.
 
36
 
 
37
    The --accurate option enables a more expensive sorting algorithm to keep
 
38
    revisions on the same branch close.
33
39
    """
34
 
    takes_options = [ "revision" ]
 
40
    takes_options = [
 
41
        "revision",
 
42
        Option('robust', "ignore redundant parents"),
 
43
        Option('accurate', "sort revisions more carefully")]
35
44
    takes_args = [ "location?" ]
36
45
    aliases = [ "visualize", "vis", "viz" ]
37
46
 
38
 
    def run(self, location=".", revision=None):
 
47
    def run(self, location=".", revision=None, robust=False, accurate=False):
39
48
        (branch, path) = Branch.open_containing(location)
40
49
        if revision is None:
41
50
            revid = branch.last_revision()
47
56
        from bzrkapp import BzrkApp
48
57
 
49
58
        app = BzrkApp()
50
 
        app.show(branch, revid)
 
59
        app.show(branch, revid, robust, accurate)
51
60
        app.main()
52
61
 
53
62