/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: Aaron Bentley
  • Date: 2006-06-19 14:18:52 UTC
  • mto: This revision was merged to the branch mainline in revision 62.
  • Revision ID: abentley@panoramicfeedback.com-20060619141852-5eea80a5485cf394
Gannotate takes a line number

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
    Browse changes to FILENAME line by line in a GTK+ window.
130
130
    """
131
131
 
132
 
    takes_args = ["filename"]
 
132
    takes_args = ["filename", "line?"]
133
133
    takes_options = [
134
134
        Option("all", help="show annotations on all lines"),
135
135
        Option("plain", help="don't highlight annotation lines"),
138
138
    ]
139
139
    aliases = ["gblame", "gpraise"]
140
140
    
141
 
    def run(self, filename, all=False, plain=False, line=1):
 
141
    def run(self, filename, all=False, plain=False, line='1'):
142
142
        import pygtk
143
143
        pygtk.require("2.0")
144
144
 
148
148
            if str(e) == "could not open display":
149
149
                raise NoDisplayError
150
150
 
 
151
        try:
 
152
            line = int(line)
 
153
        except ValueError:
 
154
            raise BzrCommandError('Line argument ("%s") is not a number.' % 
 
155
                                  line)
 
156
 
151
157
        from annotate.gannotate import GAnnotateWindow
152
158
        from annotate.config import GAnnotateConfig
153
159