~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/cmd_version_info.py

  • Committer: Patch Queue Manager
  • Date: 2011-10-06 08:34:03 UTC
  • mfrom: (6191.2.1 843900-url-nameerror)
  • Revision ID: pqm@pqm.ubuntu.com-20111006083403-jnsw0exlirg01aed
(mbp) error message without traceback on invalid ubuntu/debian url (bug
 843900) (Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
                     Option('include-file-revisions',
84
84
                            help='Include the last revision for each file.'),
85
85
                     Option('template', type=str, help='Template for the output.'),
86
 
                     'revision',
87
86
                     ]
88
87
    takes_args = ['location?']
89
88
 
91
90
 
92
91
    def run(self, location=None, format=None,
93
92
            all=False, check_clean=False, include_history=False,
94
 
            include_file_revisions=False, template=None,
95
 
            revision=None):
96
 
 
97
 
        if revision and len(revision) > 1:
98
 
            raise errors.BzrCommandError(
99
 
                gettext('bzr version-info --revision takes exactly'
100
 
                        ' one revision specifier'))
 
93
            include_file_revisions=False, template=None):
101
94
 
102
95
        if location is None:
103
96
            location = '.'
116
109
        if all or template:
117
110
            include_history = True
118
111
            check_clean = True
119
 
            include_file_revisions = True
120
 
 
121
 
        if revision is not None:
122
 
            revision_id = revision[0].as_revision_id(b)
123
 
        else:
124
 
            revision_id = None
 
112
            include_file_revisions=True
125
113
 
126
114
        builder = format(b, working_tree=wt,
127
115
                check_for_clean=check_clean,
128
116
                include_revision_history=include_history,
129
117
                include_file_revisions=include_file_revisions,
130
 
                template=template, revision_id=revision_id)
 
118
                template=template)
131
119
        builder.generate(self.outf)