[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

mv != (cp && rm)

From: Mattias Rönnblom <hofors_at_lysator.liu.se>
Date: 2001-11-27 23:06:54 CET


currently, svn mv is implemented by adding a new node and and
removing the old. This means that a file that is moved get
a new id, and there is now way of know wheter it is a actual
copy of the node in question, or if the user only wanted to
change the name of the node.

Why is this a problem, you might ask? Currently, it probably isn't
really a problem (as far as I see).

But, we are losing information bye not make a difference between
move and copy && rm. In most cases, you probably don't care if
it a copy or the original (just as most users of commercial
software). But if you want to build some way of sharing node
(having two directories include the _same_ file (with the
same node id), for example) that information is useful.

And why do you need such a feature? Well, it is probably not *that*
important. But a use case migh be:

The project has three modules written in Java. The developers would
like to keep them self-contained, but they would also like to
share some util classes between the modules. A change in the util
classes in the module-a should automaticilly propagate to the
other modules. No symbolic links; the files in the wc should be
regular files.

This could be solved by having all the module directories contain
a reference to the same (node id-wise) util-directory. If
the user "svn mv"-ed that directory, he would probably like it to
be the same directory. Changes to the util directory should
show up in all modules, even though it has got a new name.

Someone could solve this by adding rename functionality to the
editor interface. This would slightly improve the design
(and use the currently un-used svn_fs_rename()) and making
sure that that someone could implement sharing nodes between
directories in the future.

Thanks to Ben for the help on #svn.

Kind regards,

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:49 2006

This is an archived mail posted to the Subversion Dev mailing list.