[Bug 87548] Re: bzr add and revert on symlink deletes symlink
Martin Pool
mbp at sourcefrog.net
Mon Jul 16 23:44:22 BST 2007
n 7/17/07, Kent Gibson <warthog618 at gmail.com> wrote:
> >> From the point of view of the versioned trees, the file was absent.
> > But from the user's point of view it might have been present and
> > unknown, in which case the right thing would be to unversion it and
> > leave it in the tree.
> >
> My preference would certainly be that files manually added since the
> last commit be unversioned but not removed. If you just remove them
> then you may be deleting data which cannot be recovered, be they
> normal files, symlinks, directories, whatever.
>
> I can live with such behaviour from remove since it looks destructive
> and has a --keep option if you dislike the heavy handed approach.
> Revert has no such option.
I guess it just shows that different users have different
expectations, and we should try to bear them all in mind without
becoming inconsistent by trying to accommodate everyone.
People coming from svn will likely think of revert as a destructive
and potentially very dangerous operation. remove will warn you if you
have otherwise-unsaved changes, but revert will just destroy them, and
it defaults to reverting your whole tree. Revert is "throw away my
workingtree changes."
> Hence the bug report.
> Where do you suggest we go from here?
What I suggest is we
1- fix revert so that newly added files are deleted (with a backup kept)
2- make it clear that to undo add, you do remove --keep
3- maybe add a revert --keep-added option. (not so sure - maybe you
should just use remove.)
--
Martin
More information about the bazaar
mailing list