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

  • Committer: Jelmer Vernooij
  • Date: 2017-05-22 00:56:52 UTC
  • mfrom: (6621.2.26 py3_pokes)
  • Revision ID: jelmer@jelmer.uk-20170522005652-yjahcr9hwmjkno7n
Merge Python3 porting work ('py3 pokes')

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
# TODO: Change the parameter 'rev_id' to 'revision_id' to be consistent with
51
51
# the rest of the code; add a deprecation of the old name.
52
52
 
53
 
from breezy import (
 
53
from . import (
54
54
    debug,
55
55
    errors,
56
56
    trace,
57
57
    tree,
58
58
    ui,
59
59
    )
60
 
from breezy.branch import Branch
61
 
from breezy.cleanup import OperationWithCleanups
 
60
from .branch import Branch
 
61
from .cleanup import OperationWithCleanups
62
62
import breezy.config
63
 
from breezy.errors import (BzrError, PointlessCommit,
64
 
                           ConflictsInTree,
65
 
                           StrictCommitFailed
66
 
                           )
67
 
from breezy.osutils import (get_user_encoding,
68
 
                            is_inside_any,
69
 
                            minimum_path_selection,
70
 
                            splitpath,
71
 
                            )
72
 
from breezy.trace import mutter, note, is_quiet
73
 
from breezy.inventory import Inventory, InventoryEntry, make_entry
74
 
from breezy import symbol_versioning
75
 
from breezy.urlutils import unescape_for_display
76
 
from breezy.i18n import gettext
 
63
from .errors import (BzrError, PointlessCommit,
 
64
                     ConflictsInTree,
 
65
                     StrictCommitFailed
 
66
                     )
 
67
from .osutils import (get_user_encoding,
 
68
                      is_inside_any,
 
69
                      minimum_path_selection,
 
70
                      splitpath,
 
71
                      )
 
72
from .trace import mutter, note, is_quiet
 
73
from .inventory import Inventory, InventoryEntry, make_entry
 
74
from . import symbol_versioning
 
75
from .urlutils import unescape_for_display
 
76
from .i18n import gettext
 
77
 
77
78
 
78
79
class NullCommitReporter(object):
79
80
    """I report on progress of a commit."""
446
447
            # Add revision data to the local branch
447
448
            self.rev_id = self.builder.commit(self.message)
448
449
 
449
 
        except Exception, e:
 
450
        except Exception as e:
450
451
            mutter("aborting commit write group because of exception:")
451
452
            trace.log_exception_quietly()
452
453
            self.builder.abort()
792
793
            deleted_ids = set(self.basis_inv) - set(self.builder.new_inventory)
793
794
        if deleted_ids:
794
795
            self.any_entries_deleted = True
795
 
            deleted = [(self.basis_tree.id2path(file_id), file_id)
796
 
                for file_id in deleted_ids]
797
 
            deleted.sort()
 
796
            deleted = sorted([(self.basis_tree.id2path(file_id), file_id)
 
797
                for file_id in deleted_ids])
798
798
            # XXX: this is not quite directory-order sorting
799
799
            for path, file_id in deleted:
800
800
                self.builder.record_delete(path, file_id)