Code review comment for lp:~vila/bzr/323111-orphan-non-versioned-files

Revision history for this message
Andrew Bennetts (spiv) wrote :

I agree a configuration option would be good to add. As discussed on IRC this would mean both that users that prefer the old behaviour can keep it, and also would be a good sign that the code is modular enough that we could allow plugins to define new policies without needing to significantly rework it.

From John's review:

> > Could we just rename the directory into bzr-orphans?
>
> Not if it already exists obviously.

Well, we can't rename files into bzr-orphans if the name already exists, either. But you could rename it somedir.~2~ or whatever. This would make restoring precious files *much* easier than a flat directory of *.~?~ files. I'd suspect that preserving the directory structure as much as possible will greatly reduce the number of users that will prefer the old behaviour.

Also, it would be nice to write out a file into bzr-orphans describing the original paths and the new name in bzr-orphans, to make it possible to automatically put the tree back exactly as it was. (Even cooler might be if 'bzr revert' could use that file? That's clearly way out of scope for this patch though...)

I'll follow-up separately with thoughts on the code itself.

« Back to merge proposal