You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Martin, John M. (Number Six Software)" <Jo...@va.gov> on 2006/03/02 16:20:07 UTC

Force copy

Is there a way to overwrite an existing file when copying from one place
to another?  It sure would be nice to do something like

svn cp -force myfile
http://server/project/branches/my_favorite_branche/myfile

and not get the file already exists.  

Same with merge.  Sometimes I want to take the contents of one branch
and replace the contents of another branch (especially with binaries).

-->John

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


Re: Force copy

Posted by Lieven Govaerts <lg...@mobsol.be>.
Quoting "Martin, John M. \\(Number Six Software\\)" <Jo...@va.gov>:

> Is there a way to overwrite an existing file when copying from one place
> to another?  It sure would be nice to do something like
>
> svn cp -force myfile
> http://server/project/branches/my_favorite_branche/myfile
>
> and not get the file already exists.

I have no idea.

> Same with merge.  Sometimes I want to take the contents of one branch
> and replace the contents of another branch (especially with binaries).
>
> -->John

To replace the contents of one branch by another, you can use the copy-merge
action.

Suppose you want the content of branchA to branchB, overwriting everything in
branchB. With a copy-merge, you compare the two branches branchA & branchB, and
merge the differences between them to branchB:

svn merge http://.../branchB http://.../branchA /wc/of/branchB

This type of merging is used to release code, and is described in that part of
the subversion book:
http://svnbook.red-bean.com/nightly/en/svn.branchmerge.commonuses.html#svn.branchmerge.commonuses.patterns.feature

Lieven.


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


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