/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/shelf.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import errno
20
20
import re
21
21
 
22
 
from bzrlib.lazy_import import lazy_import
 
22
from .lazy_import import lazy_import
23
23
lazy_import(globals(), """
24
 
from bzrlib import (
 
24
from breezy import (
25
25
    bencode,
26
26
    errors,
27
27
    merge,
404
404
        filename = self.get_shelf_filename(shelf_id)
405
405
        try:
406
406
            return open(self.transport.local_abspath(filename), 'rb')
407
 
        except IOError, e:
 
407
        except IOError as e:
408
408
            if e.errno != errno.ENOENT:
409
409
                raise
410
 
            from bzrlib import errors
 
410
            from . import errors
411
411
            raise errors.NoSuchShelfId(shelf_id)
412
412
 
413
413
    def get_unshelver(self, shelf_id):
440
440
 
441
441
    def active_shelves(self):
442
442
        """Return a list of shelved changes."""
443
 
        active = self.get_shelf_ids(self.transport.list_dir('.'))
444
 
        active.sort()
 
443
        active = sorted(self.get_shelf_ids(self.transport.list_dir('.')))
445
444
        return active
446
445
 
447
446
    def last_shelf(self):