/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/git/workingtree.py

  • Committer: Jelmer Vernooij
  • Date: 2019-06-29 15:50:22 UTC
  • mto: This revision was merged to the branch mainline in revision 7374.
  • Revision ID: jelmer@jelmer.uk-20190629155022-jagfuax2bl39bjin
Drop file id roundtripping support in Git.

Stashing bzr-specific metadata in Git is fraught with problems. Instead, we'll
be opportunistic when trying to match files from bzr and git.

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
    MutableGitIndexTree,
80
80
    )
81
81
from .mapping import (
82
 
    GitFileIdMap,
83
82
    mode_kind,
84
83
    )
85
84
 
603
602
        return False
604
603
 
605
604
    def had_id(self, file_id):
606
 
        path = self._basis_fileid_map.lookup_path(file_id)
 
605
        try:
 
606
            path = self.mapping.parse_file_id(file_id)
 
607
        except ValueError:
 
608
            return False
607
609
        try:
608
610
            head = self.repository._git.head()
609
611
        except KeyError:
682
684
            raise errors.GhostRevisionUnusableHere(revid)
683
685
 
684
686
    def _reset_data(self):
685
 
        try:
686
 
            head = self.repository._git.head()
687
 
        except KeyError:
688
 
            self._basis_fileid_map = GitFileIdMap({}, self.mapping)
689
 
        else:
690
 
            self._basis_fileid_map = self.mapping.get_fileid_map(
691
 
                self.store.__getitem__, self.store[head].tree)
692
 
        self._fileid_map = self._basis_fileid_map.copy()
 
687
        pass
693
688
 
694
689
    def get_file_verifier(self, path, stat_value=None):
695
690
        with self.lock_read():