~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: Martin Pool
  • Date: 2011-06-19 02:24:39 UTC
  • mfrom: (5985 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6001.
  • Revision ID: mbp@canonical.com-20110619022439-u68683yb2bw302x0
resolve conflicts against trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
868
868
                    executable3, file_status, resolver=resolver)
869
869
        finally:
870
870
            child_pb.finished()
871
 
        self.fix_root()
 
871
        self.tt.fixup_new_roots()
872
872
        self._finish_computing_transform()
873
873
 
874
874
    def _finish_computing_transform(self):
1093
1093
                          ))
1094
1094
        return result
1095
1095
 
 
1096
    @deprecated_method(deprecated_in((2, 4, 0)))
1096
1097
    def fix_root(self):
1097
1098
        if self.tt.final_kind(self.tt.root) is None:
1098
1099
            self.tt.cancel_deletion(self.tt.root)
1317
1318
            self._raw_conflicts.append(('path conflict', trans_id, file_id,
1318
1319
                                        this_parent, this_name,
1319
1320
                                        other_parent, other_name))
1320
 
        if other_name is None:
 
1321
        if not self.other_tree.has_id(file_id):
1321
1322
            # it doesn't matter whether the result was 'other' or
1322
 
            # 'conflict'-- if there's no 'other', we leave it alone.
 
1323
            # 'conflict'-- if it has no file id, we leave it alone.
1323
1324
            return
1324
1325
        parent_id = parents[self.winner_idx[parent_id_winner]]
1325
 
        if parent_id is not None:
 
1326
        name = names[self.winner_idx[name_winner]]
 
1327
        if parent_id is not None or name is not None:
1326
1328
            # if we get here, name_winner and parent_winner are set to safe
1327
1329
            # values.
1328
 
            self.tt.adjust_path(names[self.winner_idx[name_winner]],
1329
 
                                self.tt.trans_id_file_id(parent_id),
 
1330
            if parent_id is None and name is not None:
 
1331
                # if parent_id is None and name is non-None, current file is
 
1332
                # the tree root.
 
1333
                if names[self.winner_idx[parent_id_winner]] != '':
 
1334
                    raise AssertionError(
 
1335
                        'File looks like a root, but named %s' %
 
1336
                        names[self.winner_idx[parent_id_winner]])
 
1337
                parent_trans_id = transform.ROOT_PARENT
 
1338
            else:
 
1339
                parent_trans_id = self.tt.trans_id_file_id(parent_id)
 
1340
            self.tt.adjust_path(name, parent_trans_id,
1330
1341
                                self.tt.trans_id_file_id(file_id))
1331
1342
 
1332
1343
    def _do_merge_contents(self, file_id):