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

how to predict copy behavior?!

From: A.T.Hofkamp <a.t.hofkamp_at_tue.nl>
Date: 2005-09-05 15:43:48 CEST

Hai all,

Under the assumption that svn is just a versioned file system, can someone
explain why a cp at the file system and a copy in svn do different things below?

File system (linux):
====================
% mkdir -p vendors/asc-support/current
% mkdir -p trunk/asc-support
% touch vendors/asc-support/current/foo-file
% mkdir vendors/asc-support/current/foo-dir
% touch vendors/asc-support/current/foo-dir/more-foo-file

here, I have vendors/asc-support/current/{foo-file,foo-dir/more-foo-file} and
trunk/asc-support

% cp -r vendors/asc-support/current/. trunk/asc-support

copy recursively, the contents of current/. to trunk/asc-support

% ls -l trunk/asc-support
total 4
drwxrwx--x 2 hat hat 4096 Sep 5 15:12 foo-dir/
-rw-rw---- 1 hat hat 0 Sep 5 15:12 foo-file

qed :-)

Svn (file:///local/asfsdf/svn_repo):
====================================
/vendors/asc-support/current/{Makefile, etc etc} exists
/trunk/asc-support exists (and is empty)

% svn copy \
   file:///local/asfsdf/svn_repo/vendors/asc-support/current/. \
   file:///local/asfsdf/svn_repo/trunk/asc-support

% svn ls file:///local/asfsdf/svn_repo/trunk/asc-support
current/

qeh?
[obviously, svn cp != cp ]

This kind of things happens often with me, for some reason copying and moving
files/dirs at the file system is easy (I almost never make mistakes there),
while with svn I often end up with a result I don't intended/wanted.

While these things can be fixed by a few more moves, it would be nice if I
could better predict what svn would do.

How do you remember/predict what svn will do?

Albert

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Sep 5 15:45:36 2005

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.