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

Re: Merge/Add/Commit problem

From: Ryan Schmidt <subversion-2006c_at_ryandesign.com>
Date: 2006-07-31 13:04:47 CEST

On Jul 31, 2006, at 12:05, Andreas Schweigstill wrote:

> The behaviour of
>
> svn co svn://myserever/myproject
>
> and
>
> svn co -r123 svn://myserever/myproject
> svn merge -r123:HEAD
>
> should be the same. But when there were some files added between
> R123 and HEAD there is given an error message on the following
> svn commit.

Those aren't the same operations at all, and the errors you're
getting are expected because the operations do not make sense...

Presumably HEAD is greater than 123. Let's say it's 500. "svn co
$URL" therefore means "check out revision 500 of $URL". You can now
happily make changes to the working copy and check them in if you like.

"svn co -r123 $URL" means "check out revision 123 of $URL". "svn
merge -r123:HEAD $URL" (note that you need to tell svn merge what
path to merge from -- $URL here) means "now perform local
modifications equal to the modifications that occurred on $URL
between revisions 123 and 500". After the merge, Subversion forgets
that the local modifications occurred due to a merge; to Subversion,
the modifications look like any other local modification, for example
like those you would make by hand. Now you cannot commit your working
copy for two reasons: a) it is not up-to-date, and b) the
modifications that have not yet been committed are modifications
which already exist in the repository, therefore to not make sense to
commit again.

However: the following two commands are equivalent to the original
checkout; perhaps that's what you're looking for:

svn co -r123 $URL
svn up -rHEAD (the same as just "svn up")

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Jul 31 13:06:11 2006

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.