You are not logged in.
Pages: 1
Hello all,
I have another problem with rsync. So here is what I'm trying to do: I have tree B, which is under svn. I then have tree A which I want to sync to B so that when I'm done A and B will be identical, except for the .svn directories as A is not under svn. The tree is over 2G in size.
Here is my command:
rsync --progress -av --exclude=.svn --delete
It works most of the time but sometime, some files would be deleted from B but present in A.
Is there something wrong with my magical command?
tx
Offline
Which (type of) files remain under A when this happens?
ᶘ ᵒᴥᵒᶅ
Offline
Now I understand a bit more. It's not (entirely) rsync's fault:
So in B there used to be a directory foo, under which there's a bunch of files. In tree A foo is changed to a symbolic link to someother directory in the tree. So when rsync tries to do its job, it cannot do it and said: rmdir "foo" failed: Directory not empty.
My script actually then tries to do 'svn rm foo' after rsync which result in the diff.
How do I handle this? Shouldn't rsync do 'rm -rf' instead of 'rmdir'?
Offline
So if i understand correctly, you (manually) remove directory foo under A and replace it with a symlink to another directory, then rsync A to B again? What are you actually trying to accomplish, do you want to work/fork on a project that you get through svn?
ᶘ ᵒᴥᵒᶅ
Offline
hmmm. Basically I'm just trying to mirror tree A to tree B without touching the svn stuff. There is an non-empty directory under B that's a sym link on A side and that's causing me trouble. I thought rsync should be able to handle this situation since it's used for mirroring all the time.
Offline
If you only want a working copy of B, then ideally you shouldn't touch anything in A. Why is that non-empty directory in B a symlink in A, instead of a full copy?
ᶘ ᵒᴥᵒᶅ
Offline
I'm not doing anything to A as it should just be a read only source. Basically I have a tree that's under svn but it out-of-date. Somebody send me an updated tree with changes in them and I'd like to merge them. One of the changes are that a non-empty directory is changed to a link.
Thanks,
Offline
In this case, since it is a one-time process, i would just manually correct those errors.
ᶘ ᵒᴥᵒᶅ
Offline
I'm not doing anything to A as it should just be a read only source. Basically I have a tree that's under svn but it out-of-date. Somebody send me an updated tree with changes in them and I'd like to merge them. One of the changes are that a non-empty directory is changed to a link.
Why not rename/move your current tree, then "svn checkout" the updated tree?
Offline
Pages: 1