~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/changeset.py

  • Committer: abentley
  • Date: 2005-10-14 03:50:50 UTC
  • mto: (1185.25.1)
  • mto: This revision was merged to the branch mainline in revision 1460.
  • Revision ID: abentley@lappy-20051014035050-d779472ccb599a51
semi-broke merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
944
944
                except OSError, e:
945
945
                    if e.errno != errno.ENOENT:
946
946
                        raise
947
 
                    if conflict_handler.missing_for_rename(src_path) == "skip":
 
947
                    if conflict_handler.missing_for_rename(src_path, to_name) \
 
948
                        == "skip":
948
949
                        continue
949
950
 
950
951
    return temp_name
966
967
    :type reverse: bool
967
968
    """
968
969
    for entry in target_entries:
 
970
        print entry.contents_change
969
971
        new_tree_path = entry.get_new_path(inventory, changeset, reverse)
970
972
        if new_tree_path is None:
971
973
            continue
1071
1073
 
1072
1074
 
1073
1075
class MissingForRename(Exception):
1074
 
    def __init__(self, filename):
1075
 
        msg = "Attempt to move missing path %s" % (filename)
 
1076
    def __init__(self, filename, to_path):
 
1077
        msg = "Attempt to move missing path %s to %s" % (filename, to_path)
1076
1078
        Exception.__init__(self, msg)
1077
1079
        self.filename = filename
1078
1080
 
1148
1150
    def missing_for_rm(self, filename, change):
1149
1151
        raise MissingForRm(filename)
1150
1152
 
1151
 
    def missing_for_rename(self, filename):
1152
 
        raise MissingForRename(filename)
 
1153
    def missing_for_rename(self, filename, to_path):
 
1154
        raise MissingForRename(filename, to_path)
1153
1155
 
1154
1156
    def missing_for_merge(self, file_id, other_path):
1155
1157
        raise MissingForMerge(other_path)
1427
1429
            yield self.get_entry(file_id, tree)
1428
1430
 
1429
1431
    def get_entry(self, file_id, tree):
1430
 
        if not tree.has_or_had_id(file_id):
 
1432
        if not tree.has_id(file_id, allow_root=True):
1431
1433
            return None
1432
 
        return tree.tree.inventory[file_id]
 
1434
        return tree.inventory[file_id]
1433
1435
 
1434
1436
    def get_entry_parent(self, entry):
1435
1437
        if entry is None:
1437
1439
        return entry.parent_id
1438
1440
 
1439
1441
    def get_path(self, file_id, tree):
1440
 
        if not tree.has_or_had_id(file_id):
 
1442
        if not tree.has_id(file_id, allow_root=True):
1441
1443
            return None
1442
1444
        path = tree.id2path(file_id)
1443
1445
        if path == '':