~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: John Arbash Meinel
  • Date: 2007-05-02 14:54:20 UTC
  • mto: (2476.3.2 111702)
  • mto: This revision was merged to the branch mainline in revision 2479.
  • Revision ID: john@arbash-meinel.com-20070502145420-k2vebnl0rd45q8kk
Change calls to try/mkdir('.')/except FileExists to ensure_base()

Show diffs side-by-side

added added

removed removed

Lines of Context:
932
932
            transport = self.branch.bzrdir.root_transport
933
933
            for name in segments:
934
934
                transport = transport.clone(name)
935
 
                try:
936
 
                    transport.mkdir('.')
937
 
                except errors.FileExists:
938
 
                    pass
 
935
                transport.ensure_base()
939
936
            return transport
940
937
            
941
938
        sub_path = self.id2path(file_id)
942
939
        branch_transport = mkdirs(sub_path)
943
940
        if format is None:
944
941
            format = bzrdir.format_registry.make_bzrdir('dirstate-with-subtree')
945
 
        try:
946
 
            branch_transport.mkdir('.')
947
 
        except errors.FileExists:
948
 
            pass
 
942
        branch_transport.ensure_base()
949
943
        branch_bzrdir = format.initialize_on_transport(branch_transport)
950
944
        try:
951
945
            repo = branch_bzrdir.find_repository()