356
356
raise NotImplementedError(self.smart_add)
358
def rename_one(self, from_rel, to_rel, after=False):
361
This can change the directory or the filename or both.
363
rename_one has several 'modes' to work. First, it can rename a physical
364
file and change the file_id. That is the normal mode. Second, it can
365
only change the file_id without touching any physical file.
367
rename_one uses the second mode if 'after == True' and 'to_rel' is
368
either not versioned or newly added, and present in the working tree.
370
rename_one uses the second mode if 'after == False' and 'from_rel' is
371
versioned but no longer in the working tree, and 'to_rel' is not
372
versioned but present in the working tree.
374
rename_one uses the first mode if 'after == False' and 'from_rel' is
375
versioned and present in the working tree, and 'to_rel' is not
376
versioned and not present in the working tree.
378
Everything else results in an error.
380
raise NotImplementedError(self.rename_one)
382
def copy_one(self, from_rel, to_rel):
383
"""Copy one file or directory.
385
This can change the directory or the filename or both.
388
raise NotImplementedError(self.copy_one)
359
391
class MutableTreeHooks(hooks.Hooks):
360
392
"""A dictionary mapping a hook name to a list of callables for mutabletree