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

Multilple moves and copy

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: 2006-10-02 20:59:54 CEST

[Note: Because of the close relationship of move and copy, I'm going to
forgo explicitly mentioning copy below, except where needed. Suffice it
to say that the same general concepts apply for the copy command.]

Okay, so I'm finally sitting down and starting to work on supporting
multiple moves and copies. The basic gist is that this feature would
allow the `svn mv' and `svn cp' commands to operate on multiple source
files, behaving essentially like the unix cp and mv commands do. Users
could move or copy several files into a common directory in one shot,
instead of needing to run the client multiple times. Of course, both
move modes and all four copy modes will be supported.

First, I would like to note that there is a semantic difference between
a rename, and a move. In a rename, the object in question is being
assigned a different identifier, whereas in the second case, the object
is changing location (and possibly identifiers as well.)

Currently, svn_client_move4 handles both meanings of move. The svn
client differentiates between the two by trying to run svn_client_move4
as a rename, and, for certain error modes, retrying as a move. If the
target object exists, the client simply attaches the basename of the
source to the destination path and retries the move with the new
destination.

This works for the single move case, where the complete paths of the
source are destination are given. However, in a multiple move case,
where all the source objects are being moved into a common directory, it
becomes more cumbersome, because a list of sources, as well as
corresponding destinations would need to be passed.

In this vein, I propose splitting the svn_client_move API into two
separate functions, based on their semantic usage: svn_client_rename
and svn_client_move_into. The former would handle the case where a
single source is being renamed as a single destination, whereas the
later would allow multiple sources to be moved into a single directory.
 I don't particular care about the specific names, but I think that this
split would better divide the dual nature of the current svn_client_move
family of functions.

Thoughts?

-Hyrum

Received on Mon Oct 2 21:00:15 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.