/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/push.py

  • Committer: Jelmer Vernooij
  • Date: 2012-01-23 19:08:05 UTC
  • mfrom: (6437.3.20 2.5)
  • mto: This revision was merged to the branch mainline in revision 6450.
  • Revision ID: jelmer@samba.org-20120123190805-hlcuihkt2dep44cw
merge bzr 2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""UI helper for the push command."""
18
18
 
 
19
from __future__ import absolute_import
 
20
 
19
21
from bzrlib import (
20
22
    controldir,
21
23
    errors,
90
92
                revision_id=revision_id, stacked_on=stacked_on,
91
93
                create_prefix=create_prefix, use_existing_dir=use_existing_dir,
92
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,))
93
99
        except errors.FileExists, err:
94
 
            if err.path.endswith('/.bzr'):
95
 
                raise errors.BzrCommandError(gettext(
96
 
                    "Target directory %s already contains a .bzr directory, "
97
 
                    "but it is not valid.") % (location,))
98
100
            if not use_existing_dir:
99
101
                raise errors.BzrCommandError(gettext("Target directory %s"
100
102
                     " already exists, but does not have a .bzr"