/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/workingtree.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:
27
27
WorkingTree.open(dir).
28
28
"""
29
29
 
30
 
import contextlib
 
30
from __future__ import absolute_import
 
31
 
31
32
import errno
32
33
import os
33
34
import sys
40
41
import stat
41
42
 
42
43
from breezy import (
 
44
    cleanup,
43
45
    conflicts as _mod_conflicts,
44
46
    filters as _mod_filters,
45
47
    merge,
1000
1002
    def revert(self, filenames=None, old_tree=None, backups=True,
1001
1003
               pb=None, report_changes=False):
1002
1004
        from .conflicts import resolve
1003
 
        with contextlib.ExitStack() as exit_stack:
 
1005
        with cleanup.ExitStack() as exit_stack:
1004
1006
            exit_stack.enter_context(self.lock_tree_write())
1005
1007
            if old_tree is None:
1006
1008
                basis_tree = self.basis_tree()
1049
1051
            if file_id is None:
1050
1052
                raise ValueError(
1051
1053
                    'WorkingTree.set_root_id with fileid=None')
 
1054
            file_id = osutils.safe_file_id(file_id)
1052
1055
            self._set_root_id(file_id)
1053
1056
 
1054
1057
    def _set_root_id(self, file_id):