~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Ian Clatworthy
  • Date: 2008-07-23 13:29:55 UTC
  • mto: (4171.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 4173.
  • Revision ID: ian.clatworthy@canonical.com-20080723132955-kzxal29bslx51u36
add --filters to export command

Show diffs side-by-side

added added

removed removed

Lines of Context:
2002
2002
               help="Type of file to export to.",
2003
2003
               type=unicode),
2004
2004
        'revision',
 
2005
        Option('filters', help='Apply content filters.'),
2005
2006
        Option('root',
2006
2007
               type=str,
2007
2008
               help="Name of the root directory inside the exported file."),
2008
2009
        ]
2009
 
    def run(self, dest, branch=None, revision=None, format=None, root=None):
 
2010
    def run(self, dest, branch=None, revision=None, format=None, root=None,
 
2011
        filters=False):
2010
2012
        from bzrlib.export import export
2011
2013
 
2012
2014
        if branch is None:
2024
2026
            rev_id = revision[0].as_revision_id(b)
2025
2027
        t = b.repository.revision_tree(rev_id)
2026
2028
        try:
2027
 
            export(t, dest, format, root)
 
2029
            export(t, dest, format, root, filtered=filters)
2028
2030
        except errors.NoSuchExportFormat, e:
2029
2031
            raise errors.BzrCommandError('Unsupported export format: %s' % e.format)
2030
2032