/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 breezy/shelf_ui.py

  • Committer: Jelmer Vernooij
  • Date: 2020-04-05 19:11:34 UTC
  • mto: (7490.7.16 work)
  • mto: This revision was merged to the branch mainline in revision 7501.
  • Revision ID: jelmer@jelmer.uk-20200405191134-0aebh8ikiwygxma5
Populate the .gitignore file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
import contextlib
 
17
from __future__ import absolute_import
 
18
 
18
19
import patiencediff
19
20
import shutil
20
21
import sys
24
25
 
25
26
from . import (
26
27
    builtins,
 
28
    cleanup,
27
29
    delta,
28
30
    diff,
29
31
    errors,
401
403
            else:
402
404
                shelf_id = manager.last_shelf()
403
405
                if shelf_id is None:
404
 
                    raise errors.CommandError(
 
406
                    raise errors.BzrCommandError(
405
407
                        gettext('No changes are shelved.'))
406
408
            apply_changes = True
407
409
            delete_shelf = True
456
458
 
457
459
    def run(self):
458
460
        """Perform the unshelving operation."""
459
 
        with contextlib.ExitStack() as exit_stack:
 
461
        with cleanup.ExitStack() as exit_stack:
460
462
            exit_stack.enter_context(self.tree.lock_tree_write())
461
463
            if self.read_shelf:
462
464
                trace.note(gettext('Using changes with id "%d".') %