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

Revision history for this message
Vincent Ladeuil (vila) wrote :

> Well, we can't rename files into bzr-orphans if the name already exists,
> either. But you could rename it somedir.~2~ or whatever.

You mean creating bzr-orphans.~1~, bzr-orphans.~2~ ?

> This would make
> restoring precious files *much* easier than a flat directory of *.~?~ files.

This is not exactly a flat structure... directories can be orphaned too.

> 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.

The counter-argument was that if you re-create all the directories leading to the orphan,
it becomes harder to inspect bzr-orphans as you have to drill down so see which files
have been orphaned.

>
> 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.

Yup, I thought about that, but as you said below, out-of-scope.

> (Even cooler might be if
> 'bzr revert' could use that file?

That would certainly lead to very complex code: the orphans are not versioned, the user
didn't ask bzr to version them, so we know little about them and we are not prepared
to deal with them (ditto for shelves...)

> 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