You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Fraser Campbell <fr...@georgetown.wehave.net> on 2004/10/17 20:24:15 UTC

Partial update possible?

Hi,

I have a new file in the repository that I'd like to add into my existing 
working copy but without doing a wholesale update.

There is a problem with this:

  svn up x.c
  svn: 'x.c' is not under version control

Giving the full path to the repository doesn't help either:

  svn up http://localhost:8888/svn/blah/x.c
  svn: 'http://localhost:8888/svn/blah/x.c' is not a working copy

When the file already exists in the repository then I have no problem updating 
the individual file.

What can I do?  Perhaps it sounds like an odd request but due to non-ideal 
situation (WC is a live system) I have to not grab all updates until I have 
the time to review them (i.e. I anticipate breakage if a full update is 
done).

-- 
Fraser Campbell <fr...@wehave.net>                 http://www.wehave.net/
Georgetown, Ontario, Canada                               Debian GNU/Linux

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

Re: Partial update possible?

Posted by Fraser Campbell <fr...@georgetown.wehave.net>.
On Tuesday 19 October 2004 04:18, J Robert Ray wrote:

> It sounds like you might want to create a branch from your wc, and then
> 'switch' your wc to that branch.  Then, you can add the x.c file to the
> branch, and update the whole wc to get that one change.
>
> e.g.:
> svn copy . http://localhost:8888/svn/blah_branch
> svn switch http://localhost:8888/svn/blah_branch
> svn copy http://localhost:8888/svn/blah/x.c
> http://localhost:8888/svn/blah_branch/x.c
> svn update

Cool.  I'd hoped there'd be a simple way since it seems (to me) like a pretty 
trivial operation but sounds fine.

> There may be a more straightforward way.  Having a branch may be good
> anyway since it sounds like you don't want to blindly follow the trunk.

Agreed, I took the opportunity over the last few days to fully update to the 
trunk, it was a better solution to my problem. What happened was significant 
new code was being developed in a branch and that branch was aborted.  Some 
code was copied from the branch back to the trunk, but the live WC was never 
fully updated due to my paranoia ... this is a website and I don't have any 
good way to test at the moment (besides actually publishing to the site).

Getting myself in this bind though did lead me to re-read the svn book and I 
discovered that I could do "svn status --show-updates --verbose|grep \*", 
this allowed me to easily see what was going to be updated so that I could 
quickly study those changes before doing a full "svn up".

Of course cancelling an "svn status --show-updates --verbose" midstream 
resulted in a corrupted, unrecoverable repository ... fortunately svndump was 
able to recover all revisions for me and I rebuilt the repository without 
data loss.  Still annoying and *very* time-consuming.

-- 
Fraser Campbell <fr...@wehave.net>                 http://www.wehave.net/
Georgetown, Ontario, Canada                               Debian GNU/Linux

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

Re: Partial update possible?

Posted by J Robert Ray <jr...@imageworks.com>.
Fraser Campbell wrote:

> Hi,
> 
> I have a new file in the repository that I'd like to add into my existing 
> working copy but without doing a wholesale update.
> 
> There is a problem with this:
> 
>   svn up x.c
>   svn: 'x.c' is not under version control
> 
> Giving the full path to the repository doesn't help either:
> 
>   svn up http://localhost:8888/svn/blah/x.c
>   svn: 'http://localhost:8888/svn/blah/x.c' is not a working copy
> 
> When the file already exists in the repository then I have no problem updating 
> the individual file.
> 
> What can I do?  Perhaps it sounds like an odd request but due to non-ideal 
> situation (WC is a live system) I have to not grab all updates until I have 
> the time to review them (i.e. I anticipate breakage if a full update is 
> done).
> 

It sounds like you might want to create a branch from your wc, and then 
'switch' your wc to that branch.  Then, you can add the x.c file to the 
branch, and update the whole wc to get that one change.

e.g.:
svn copy . http://localhost:8888/svn/blah_branch
svn switch http://localhost:8888/svn/blah_branch
svn copy http://localhost:8888/svn/blah/x.c 
http://localhost:8888/svn/blah_branch/x.c
svn update

There may be a more straightforward way.  Having a branch may be good 
anyway since it sounds like you don't want to blindly follow the trunk.

- Robert

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