~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/push.py

  • Committer: Jelmer Vernooij
  • Date: 2009-12-25 13:47:23 UTC
  • mto: This revision was merged to the branch mainline in revision 4929.
  • Revision ID: jelmer@samba.org-20091225134723-j1hhom9o72asamhu
Print a proper error when attempting to push to a foreign VCS for which 
roundtripping is not yet supported.

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
            raise errors.BzrCommandError('These branches have diverged.'
138
138
                                    '  See "bzr help diverged-branches"'
139
139
                                    ' for more information.')
 
140
        except errors.NoRoundtrippingSupport, e:
 
141
            raise errors.BzrCommandError("It is not possible to losslessly "
 
142
                "push to %s. You may want to use dpush instead." % 
 
143
                    e.target_branch.mapping.vcs.abbreviation)
140
144
        except errors.NoRepositoryPresent:
141
145
            # we have a bzrdir but no branch or repository
142
146
            # XXX: Figure out what to do other than complain.