~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/push.py

Merge bzr.dev and tree-file-ids-as-tuples.

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
                revision_id=revision_id, stacked_on=stacked_on,
93
93
                create_prefix=create_prefix, use_existing_dir=use_existing_dir,
94
94
                no_tree=no_tree)
 
95
        except errors.AlreadyControlDirError, err:
 
96
            raise errors.BzrCommandError(gettext(
 
97
                "Target directory %s already contains a .bzr directory, "
 
98
                "but it is not valid.") % (location,))
95
99
        except errors.FileExists, err:
96
 
            if err.path.endswith('/.bzr'):
97
 
                raise errors.BzrCommandError(gettext(
98
 
                    "Target directory %s already contains a .bzr directory, "
99
 
                    "but it is not valid.") % (location,))
100
100
            if not use_existing_dir:
101
101
                raise errors.BzrCommandError(gettext("Target directory %s"
102
102
                     " already exists, but does not have a .bzr"