/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: Ian Clatworthy
  • Date: 2008-06-10 05:11:40 UTC
  • mto: (3221.21.2 info.shallow)
  • mto: This revision was merged to the branch mainline in revision 3537.
  • Revision ID: ian.clatworthy@canonical.com-20080610051140-sjok0zjkywipt8yh
shallow -> stacked

Show diffs side-by-side

added added

removed removed

Lines of Context:
806
806
    takes_args = ['from_location', 'to_location?']
807
807
    takes_options = ['revision', Option('hardlink',
808
808
        help='Hard-link working tree files where possible.'),
809
 
        Option('shallow',
810
 
            help='Create a shallow branch referring to the source branch. '
 
809
        Option('stacked',
 
810
            help='Create a stacked branch referring to the source branch. '
811
811
                'The new branch will depend on the availability of the source '
812
812
                'branch for all operations.'),
813
813
        ]
814
814
    aliases = ['get', 'clone']
815
815
 
816
816
    def run(self, from_location, to_location=None, revision=None,
817
 
            hardlink=False, shallow=False):
 
817
            hardlink=False, stacked=False):
818
818
        from bzrlib.tag import _merge_tags_if_possible
819
819
        if revision is None:
820
820
            revision = [None]
849
849
                dir = br_from.bzrdir.sprout(to_transport.base, revision_id,
850
850
                                            possible_transports=[to_transport],
851
851
                                            accelerator_tree=accelerator_tree,
852
 
                                            hardlink=hardlink, shallow=shallow)
 
852
                                            hardlink=hardlink, stacked=stacked)
853
853
                branch = dir.open_branch()
854
854
            except errors.NoSuchRevision:
855
855
                to_transport.delete_tree('.')
857
857
                    revision[0])
858
858
                raise errors.BzrCommandError(msg)
859
859
            _merge_tags_if_possible(br_from, branch)
860
 
            # If the source branch is shallow, the new branch may
861
 
            # be shallow whether we asked for that explicitly or not.
862
 
            # We therefore need a try/except here and not just 'if shallow:'
 
860
            # If the source branch is stacked, the new branch may
 
861
            # be stacked whether we asked for that explicitly or not.
 
862
            # We therefore need a try/except here and not just 'if stacked:'
863
863
            try:
864
 
                note('Created new shallow branch referring to %s.' %
 
864
                note('Created new stacked branch referring to %s.' %
865
865
                    branch.get_stacked_on())
866
866
            except (errors.NotStacked, errors.UnstackableBranchFormat,
867
867
                errors.UnstackableRepositoryFormat), e: