~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: Aaron Bentley
  • Date: 2006-02-21 01:27:09 UTC
  • mto: (2027.1.2 revert-subpath-56549)
  • mto: This revision was merged to the branch mainline in revision 1558.
  • Revision ID: aaron.bentley@utoronto.ca-20060221012709-c46aaa71a00010e8
Renamed a bunch of functions

Show diffs side-by-side

added added

removed removed

Lines of Context:
426
426
        if name_winner == "this" and parent_id_winner == "this":
427
427
            return
428
428
        if name_winner == "conflict":
429
 
            trans_id = self.tt.get_trans_id(file_id)
 
429
            trans_id = self.tt.trans_id_file_id(file_id)
430
430
            self._raw_conflicts.append(('name conflict', trans_id, 
431
431
                                        self.name(this_entry, file_id), 
432
432
                                        self.name(other_entry, file_id)))
433
433
        if parent_id_winner == "conflict":
434
 
            trans_id = self.tt.get_trans_id(file_id)
 
434
            trans_id = self.tt.trans_id_file_id(file_id)
435
435
            self._raw_conflicts.append(('parent conflict', trans_id, 
436
436
                                        self.parent(this_entry, file_id), 
437
437
                                        self.parent(other_entry, file_id)))
442
442
        # if we get here, name_winner and parent_winner are set to safe values.
443
443
        winner_entry = {"this": this_entry, "other": other_entry, 
444
444
                        "conflict": other_entry}
445
 
        trans_id = self.tt.get_trans_id(file_id)
 
445
        trans_id = self.tt.trans_id_file_id(file_id)
446
446
        parent_id = winner_entry[parent_id_winner].parent_id
447
 
        parent_trans_id = self.tt.get_trans_id(parent_id)
 
447
        parent_trans_id = self.tt.trans_id_file_id(parent_id)
448
448
        self.tt.adjust_path(winner_entry[name_winner].name, parent_trans_id,
449
449
                            trans_id)
450
450
 
476
476
            # THIS and OTHER introduced the same changes
477
477
            return "unmodified"
478
478
        else:
479
 
            trans_id = self.tt.get_trans_id(file_id)
 
479
            trans_id = self.tt.trans_id_file_id(file_id)
480
480
            if this_pair == base_pair:
481
481
                # only OTHER introduced changes
482
482
                if file_id in self.this_tree:
510
510
                return "modified"
511
511
            else:
512
512
                # Scalar conflict, can't text merge.  Dump conflicts
513
 
                trans_id = self.tt.get_trans_id(file_id)
 
513
                trans_id = self.tt.trans_id_file_id(file_id)
514
514
                name = self.tt.final_name(trans_id)
515
515
                parent_id = self.tt.final_parent(trans_id)
516
516
                if file_id in self.this_tree.inventory:
607
607
        """Perform a merge on the execute bit."""
608
608
        if file_status == "deleted":
609
609
            return
610
 
        trans_id = self.tt.get_trans_id(file_id)
 
610
        trans_id = self.tt.trans_id_file_id(file_id)
611
611
        try:
612
612
            if self.tt.final_kind(trans_id) != "file":
613
613
                return
627
627
            if file_status == "modified":
628
628
                executability = self.this_tree.is_executable(file_id)
629
629
                if executability is not None:
630
 
                    trans_id = self.tt.get_trans_id(file_id)
 
630
                    trans_id = self.tt.trans_id_file_id(file_id)
631
631
                    self.tt.set_executability(executability, trans_id)
632
632
        else:
633
633
            assert winner == "other"
638
638
            elif file_id in self.base_tree:
639
639
                executability = self.base_tree.is_executable(file_id)
640
640
            if executability is not None:
641
 
                trans_id = self.tt.get_trans_id(file_id)
 
641
                trans_id = self.tt.trans_id_file_id(file_id)
642
642
                self.tt.set_executability(executability, trans_id)
643
643
 
644
644
    def cook_conflicts(self, fs_conflicts):
687
687
            other_path = fp.get_path(trans_id)
688
688
            if this_parent is not None:
689
689
                this_parent_path = \
690
 
                    fp.get_path(self.tt.get_trans_id(this_parent))
 
690
                    fp.get_path(self.tt.trans_id_file_id(this_parent))
691
691
                this_path = pathjoin(this_parent_path, this_name)
692
692
            else:
693
693
                this_path = "<deleted>"