/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: Robert Collins
  • Date: 2006-03-29 17:40:50 UTC
  • mto: (36.1.1 bzrk.jaq)
  • mto: This revision was merged to the branch mainline in revision 38.
  • Revision ID: robertc@robertcollins.net-20060329174050-46d95d48c9f61743
Make revision sorting and linking use merge_sorted from latest bzr.dev. This
gives a much nicer layout with features such as 'fully merged branches' not
being inappropriately shown as active - rather then point the branch is 
resurrected has its merge from mainline linked. This leads to a narrow,
more understandable view, and much less cross-hatch cases - perhaps none in 
fact.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
    The --robust option enables removal of redundant parents. It is sometimes
35
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.
39
36
    """
40
37
    takes_options = [
41
38
        "revision",
42
39
        Option('robust', "ignore redundant parents"),
43
 
        Option('accurate', "sort revisions more carefully"),
44
40
        Option('maxnum', "maximum number of revisions to display", int, 'count')]
45
41
    takes_args = [ "location?" ]
46
42
    aliases = [ "visualize", "vis", "viz" ]
47
43
 
48
 
    def run(self, location=".", revision=None, robust=False, accurate=False,
 
44
    def run(self, location=".", revision=None, robust=False,
49
45
            maxnum=None):
50
46
        (branch, path) = Branch.open_containing(location)
51
47
        branch.lock_read()
61
57
            from bzrkapp import BzrkApp
62
58
                
63
59
            app = BzrkApp()
64
 
            app.show(branch, revid, robust, accurate, maxnum)
 
60
            app.show(branch, revid, robust, maxnum)
65
61
        finally:
66
62
            branch.repository.unlock()
67
63
            branch.unlock()