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

Re: replacing "svn copy"'ed dirs

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2003-10-01 16:02:20 CEST

SLOGEN <jensen@slog.dk> writes:

> The merge solution does a worse job than the "del; copy" solution. I
> really just want to assign somelib a new value, and that's what "del;
> copy" does (albeit not in an atomic step).

Ahh, I understand. If you want the history preserved using today's
code, 'del; copy' is definitely better. And you should absolutely be
able to do that as a single commit. It's called 'replacement'.

And yes, it looks like you found a real bug! The working copy is
supposed to understand 'replacement' already. For example, it works
fine for files:

  $ svn rm iota
  D iota

  $ svn cp file:///home/sussman/scratch/repos/A/B/E/alpha iota

  $ svn st
  R + iota

  $ svn ci -m "replacing iota with new file by same name"
  Replacing iota
  Committed revision 3.

But it fails for directory replacement:

  $ svn rm A/D/G
  D A/D/G/pi
  D A/D/G/rho
  D A/D/G/tau
  D A/D/G

  $ svn cp file:///home/sussman/scratch/repos/A/B/E A/D/G
  A A/D/G/E/alpha
  A A/D/G/E/beta
  Checked out revision 3.
  subversion/libsvn_wc/adm_ops.c:959: (apr_err=155013)
  svn: Unmergeable scheduling requested on an entry
  svn: Can not add 'A/D/G/E' to a parent directory scheduled for deletion

Notice that 'svn cp' syntax is biting us here. Because A/D/G still
exists, it's trying to create A/D/G/E.

But if I run

  $ rm -rf A/D/G

Then I get the behavior I want:

  $ svn cp file:///home/sussman/scratch/repos/A/B/E A/D/G
  A A/D/G/alpha
  A A/D/G/beta
  Checked out revision 3.
  A A/D/G

  $ svn st
  A + A/D/G

Unfortunately, our commit-driver seems to have a bug here. It tries
to add the new directory before deleting the old one!

$ svn ci -m "A/D/G is now a copy of A/B/E"
Adding A/D/G
subversion/libsvn_client/commit.c:727: (apr_err=160028)
svn: Transaction is out of date
svn: Commit failed (details follow):
subversion/libsvn_repos/commit.c:114: (apr_err=160028)
svn: out of date: '/A/D/G' in txn 'b'

Maybe we should file this bug. (Bugs?)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Oct 1 16:04:04 2003

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

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