/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: Andrew Bennetts
  • Date: 2010-09-06 06:13:52 UTC
  • mto: (4634.158.5 2.0)
  • mto: This revision was merged to the branch mainline in revision 5419.
  • Revision ID: andrew.bennetts@canonical.com-20100906061352-ef2rw40pa5wte5oj
Add LockCorrupt error, and use it to provide nicer handling of unparseable lock/held/info files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2008, 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2008 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
17
17
"""UI helper for the push command."""
18
18
 
19
19
from bzrlib import (
 
20
    builtins,
 
21
    branch,
20
22
    bzrdir,
21
23
    errors,
22
24
    revision as _mod_revision,
141
143
            raise errors.BzrCommandError('These branches have diverged.'
142
144
                                    '  See "bzr help diverged-branches"'
143
145
                                    ' for more information.')
144
 
        except errors.NoRoundtrippingSupport, e:
145
 
            raise errors.BzrCommandError("It is not possible to losslessly "
146
 
                "push to %s. You may want to use dpush instead." % 
147
 
                    e.target_branch.mapping.vcs.abbreviation)
148
146
        except errors.NoRepositoryPresent:
149
147
            # we have a bzrdir but no branch or repository
150
148
            # XXX: Figure out what to do other than complain.