|
|
@ -385,9 +385,6 @@ class CustomTree(): |
|
|
|
def __init__(self, repo, revid, parents, files): |
|
|
|
def __init__(self, repo, revid, parents, files): |
|
|
|
global files_cache |
|
|
|
global files_cache |
|
|
|
|
|
|
|
|
|
|
|
self.repo = repo |
|
|
|
|
|
|
|
self.revid = revid |
|
|
|
|
|
|
|
self.parents = parents |
|
|
|
|
|
|
|
self.updates = {} |
|
|
|
self.updates = {} |
|
|
|
|
|
|
|
|
|
|
|
def copy_tree(revid): |
|
|
|
def copy_tree(revid): |
|
|
@ -435,7 +432,7 @@ class CustomTree(): |
|
|
|
if basename == '': |
|
|
|
if basename == '': |
|
|
|
return None |
|
|
|
return None |
|
|
|
fid = bzrlib.generate_ids.gen_file_id(path) |
|
|
|
fid = bzrlib.generate_ids.gen_file_id(path) |
|
|
|
d = add_entry(fid, dirname, 'directory') |
|
|
|
add_entry(fid, dirname, 'directory') |
|
|
|
return fid |
|
|
|
return fid |
|
|
|
|
|
|
|
|
|
|
|
def add_entry(fid, path, kind, mode = None): |
|
|
|
def add_entry(fid, path, kind, mode = None): |
|
|
@ -458,7 +455,6 @@ class CustomTree(): |
|
|
|
(None, executable)) |
|
|
|
(None, executable)) |
|
|
|
self.files[path] = change[0] |
|
|
|
self.files[path] = change[0] |
|
|
|
changes.append(change) |
|
|
|
changes.append(change) |
|
|
|
return change |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def update_entry(fid, path, kind, mode = None): |
|
|
|
def update_entry(fid, path, kind, mode = None): |
|
|
|
dirname, basename = os.path.split(path) |
|
|
|
dirname, basename = os.path.split(path) |
|
|
@ -480,7 +476,6 @@ class CustomTree(): |
|
|
|
(None, executable)) |
|
|
|
(None, executable)) |
|
|
|
self.files[path] = change[0] |
|
|
|
self.files[path] = change[0] |
|
|
|
changes.append(change) |
|
|
|
changes.append(change) |
|
|
|
return change |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def remove_entry(fid, path, kind): |
|
|
|
def remove_entry(fid, path, kind): |
|
|
|
dirname, basename = os.path.split(path) |
|
|
|
dirname, basename = os.path.split(path) |
|
|
@ -495,7 +490,6 @@ class CustomTree(): |
|
|
|
(None, None)) |
|
|
|
(None, None)) |
|
|
|
del self.files[path] |
|
|
|
del self.files[path] |
|
|
|
changes.append(change) |
|
|
|
changes.append(change) |
|
|
|
return change |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for fid, f in self.updates.iteritems(): |
|
|
|
for fid, f in self.updates.iteritems(): |
|
|
|
path = f['path'] |
|
|
|
path = f['path'] |
|
|
|