~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Andrew Bennetts
  • Date: 2009-11-23 07:10:47 UTC
  • mto: (4634.101.4 2.0)
  • mto: This revision was merged to the branch mainline in revision 4857.
  • Revision ID: andrew.bennetts@canonical.com-20091123071047-j7dsqlla7ruved30
Fix traceback when doing 'bzr push --use-existing-dir' into a dir with an invalid .bzr directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1284
1284
        # clone call. Or something. 20090224 RBC/spiv.
1285
1285
        if revision_id is None:
1286
1286
            revision_id = self.last_revision()
1287
 
        try:
1288
 
            dir_to = self.bzrdir.clone_on_transport(to_transport,
1289
 
                revision_id=revision_id, stacked_on=stacked_on,
1290
 
                create_prefix=create_prefix, use_existing_dir=use_existing_dir)
1291
 
        except errors.FileExists:
1292
 
            if not use_existing_dir:
1293
 
                raise
1294
 
        except errors.NoSuchFile:
1295
 
            if not create_prefix:
1296
 
                raise
 
1287
        dir_to = self.bzrdir.clone_on_transport(to_transport,
 
1288
            revision_id=revision_id, stacked_on=stacked_on,
 
1289
            create_prefix=create_prefix, use_existing_dir=use_existing_dir)
1297
1290
        return dir_to.open_branch()
1298
1291
 
1299
1292
    def create_checkout(self, to_location, revision_id=None,