/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-10-31 22:08:48 UTC
  • mfrom: (2104.3.2 dsilvers_export_url)
  • Revision ID: pqm@pqm.ubuntu.com-20061031220848-2fa8b1f97a4643af
Add NEWS entry about export changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1660
1660
    Root may be the top directory for tar, tgz and tbz2 formats. If none
1661
1661
    is given, the top directory will be the root name of the file.
1662
1662
 
 
1663
    If branch is omitted then the branch containing the CWD will be used.
 
1664
 
1663
1665
    Note: export of tree with non-ascii filenames to zip is not supported.
1664
1666
 
1665
1667
     Supported formats       Autodetected by extension
1670
1672
         tgz                      .tar.gz, .tgz
1671
1673
         zip                          .zip
1672
1674
    """
1673
 
    takes_args = ['dest']
 
1675
    takes_args = ['dest', 'branch?']
1674
1676
    takes_options = ['revision', 'format', 'root']
1675
 
    def run(self, dest, revision=None, format=None, root=None):
 
1677
    def run(self, dest, branch=None, revision=None, format=None, root=None):
1676
1678
        from bzrlib.export import export
1677
 
        tree = WorkingTree.open_containing(u'.')[0]
1678
 
        b = tree.branch
 
1679
 
 
1680
        if branch is None:
 
1681
            tree = WorkingTree.open_containing(u'.')[0]
 
1682
            b = tree.branch
 
1683
        else:
 
1684
            b = Branch.open(branch)
 
1685
            
1679
1686
        if revision is None:
1680
1687
            # should be tree.last_revision  FIXME
1681
1688
            rev_id = b.last_revision()