192
192
self.actual = actual
194
194
def open_directory(self, path, base_revnum):
195
"""See `DirectoryEditor`."""
195
"""See ``DirectoryEditor``."""
196
196
if path.strip("/") == self.editor.prefix:
197
197
t = self.editor.actual.open_root(base_revnum)
198
198
elif self.actual is not None:
203
203
return PathStrippingDirectoryEditor(self.editor, path, t)
205
205
def add_directory(self, path, copyfrom_path=None, copyfrom_rev=-1):
206
"""See `DirectoryEditor`."""
206
"""See ``DirectoryEditor``."""
207
207
if path.strip("/") == self.editor.prefix:
208
208
t = self.editor.actual.open_root(copyfrom_rev)
209
209
elif self.actual is not None:
214
214
return PathStrippingDirectoryEditor(self.editor, path, t)
217
"""See `DirectoryEditor`."""
217
"""See ``DirectoryEditor``."""
218
218
if self.actual is not None:
219
219
self.actual.close()
221
221
def change_prop(self, name, value):
222
"""See `DirectoryEditor`."""
222
"""See ``DirectoryEditor``."""
223
223
if self.actual is not None:
224
224
self.actual.change_prop(name, value)
226
226
def delete_entry(self, path, revnum):
227
"""See `DirectoryEditor`."""
227
"""See ``DirectoryEditor``."""
228
228
if self.actual is not None:
229
229
self.actual.delete_entry(self.editor.strip_prefix(path), revnum)
231
231
raise AssertionError("delete_entry should not be called")
233
233
def add_file(self, path, copyfrom_path=None, copyfrom_rev=-1):
234
"""See `DirectoryEditor`."""
234
"""See ``DirectoryEditor``."""
235
235
if self.actual is not None:
236
236
return self.actual.add_file(self.editor.strip_prefix(path),
237
237
self.editor.strip_copy_prefix(copyfrom_path), copyfrom_rev)
238
238
raise AssertionError("add_file should not be called")
240
240
def open_file(self, path, base_revnum):
241
"""See `DirectoryEditor`."""
241
"""See ``DirectoryEditor``."""
242
242
if self.actual is not None:
243
243
return self.actual.open_file(self.editor.strip_prefix(path),