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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-07-20 02:17:05 UTC
  • mfrom: (7518.1.2 merge-3.1)
  • Revision ID: breezy.the.bot@gmail.com-20200720021705-5f11tmo1hdqjxm6x
Merge lp:brz/3.1.

Merged from https://code.launchpad.net/~jelmer/brz/merge-3.1/+merge/387628

Show diffs side-by-side

added added

removed removed

Lines of Context:
361
361
        # Stanza is purely a Unicode api.
362
362
        if isinstance(file_id, str):
363
363
            file_id = cache_utf8.encode(file_id)
364
 
        self.file_id = osutils.safe_file_id(file_id)
 
364
        self.file_id = file_id
365
365
 
366
366
    def as_stanza(self):
367
367
        s = rio.Stanza(type=self.typestring, path=self.path)
456
456
        raise NotImplementedError(self.action_take_other)
457
457
 
458
458
    def _resolve_with_cleanups(self, tree, *args, **kwargs):
459
 
        with tree.get_transform() as tt:
 
459
        with tree.transform() as tt:
460
460
            self._resolve(tt, *args, **kwargs)
461
461
 
462
462
 
515
515
            tree = self._revision_tree(tt._tree, revid)
516
516
            transform.create_from_tree(
517
517
                tt, tid, tree, tree.id2path(file_id))
518
 
            tt.version_file(file_id, tid)
 
518
            tt.version_file(tid, file_id=file_id)
519
519
        else:
520
520
            tid = tt.trans_id_file_id(file_id)
521
521
        # Adjust the path for the retained file id
669
669
                       item_parent_tid, item_tid)
670
670
        # Associate the file_id to the right content
671
671
        tt.unversion_file(item_tid)
672
 
        tt.version_file(self.file_id, winner_tid)
 
672
        tt.version_file(winner_tid, file_id=self.file_id)
673
673
        tt.apply()
674
674
 
675
675
    def action_auto(self, tree):
735
735
        # so they can be unicode.
736
736
        if isinstance(conflict_file_id, str):
737
737
            conflict_file_id = cache_utf8.encode(conflict_file_id)
738
 
        self.conflict_file_id = osutils.safe_file_id(conflict_file_id)
 
738
        self.conflict_file_id = conflict_file_id
739
739
 
740
740
    def _cmp_list(self):
741
741
        return HandledConflict._cmp_list(self) + [self.conflict_path,
793
793
        pass
794
794
 
795
795
    def action_take_other(self, tree):
796
 
        with tree.get_transform() as tt:
 
796
        with tree.transform() as tt:
797
797
            p_tid = tt.trans_id_file_id(self.file_id)
798
798
            parent_tid = tt.get_tree_parent(p_tid)
799
799
            cp_tid = tt.trans_id_file_id(self.conflict_file_id)