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

[PATCH] Multiple WC copies/moves without intervening ci

From: Paul Burba <paulb_at_softlanding.com>
Date: 2006-07-17 22:53:26 CEST

This patch allows multiple moves/copies of a file/directory in the WC with
no intervening commit. It is based on a patch originally developed by
Ivan Zhakov and was most recently discussed in these threads:


Paul Burba <paulb@softlanding.com> wrote on 07/13/2006 08:30:54 AM:

> "Ivan Zhakov" <chemodax@gmail.com> wrote on 07/12/2006 04:17:49 PM:
> > On 7/12/06, Paul Burba <paulb@softlanding.com> wrote:
> > > I'm more than happy to jump back in, but want to check with Ivan
> first. No
> > > need to duplicate our efforts.
> > >
> > Paul,
> > Please take it in your hands, because I've changed my job and
> > unfortunately cannot spend to much time to Subversion now :( Sorry.
> > I've reviewed your and rooneg patch -- it looks good, one thing that
> > code for detecting copyfrom_url should be factored out in separated
> > function.

I factored out the copyfrom* functionality in the latest patch below.
I also added two more tests: move_file_back_and_forth and
move_dir_back_and_forth. These two tests move a file(dir) to a new
location, moves it back to the original location, then commits it. The
patch as it stands now permits this for files, treating the double move as
a replacement. It doesn't allow it for directories as the current code in
svn_wc_copy2() prohibits this and returns a SVN_ERR_WC_INVALID_SCHEDULE
error ("Cannot copy to dir as it is scheduled for deletion"). What do
folks think should happen in these cases?

Any other thoughts, comments, criticisms, rants, lavish praise, diatribes,
etc. appreciated.

Paul B.

Support copy/move of files/dirs that are already copied/moved but not

Patch by: zhakov
* subversion/libsvn_wc/copy.c:
  (get_copyfrom_url_rev_via_parent): New helper function for
  copy_file_administratively and copy_dir_administratively.
  (copy_file_administratively, copy_dir_administratively): Use
  source's copyfrom-url and copyfrom-rev instead of url and rev
  when copying or moving already copied/moved files or directories.
  If source does not have copyfrom info, call then the new helper
  function to climb up source's parent directory and build the
  copyfrom info.
  (Rabbinic Commentary): Removed.

* subversion/tests/cmdline/copy_tests.py
  (copy_copied_file_and_dir, move_copied_file_and_dir,
   move_moved_file_and_dir, move_file_within_moved_dir,
   move_file_out_of_moved_dir, move_dir_within_moved_dir,
   move_dir_out_of_moved_dir, move_file_back_and_forth,
   move_dir_back_and_forth): New tests.
  (test_list): Run new tests.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Mon Jul 17 22:54: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.