You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Thomas Anderson <ze...@gmail.com> on 2010/06/10 15:46:26 UTC

replacing all code with latest SVN regardless of conflicts or uncommitted changes or whatever

Say I've added a bunch of debug code to files in a particular
directory and that I want to now remove all the debug code.  I could
search through the file and manually remove it all or I could just re
checkout the directory from SVN and replace the debug directory with
the latest SVN code.  Problem is, typing in "svn checkout" requires
you know the URL of the repository / directory you're checking out.

If you could do something like "svn refresh" and have it just look at
the .svn/entries file to get the URL that'd be a lot easier.  I mean,
ease of use is why "svn update" exists.  You could just recheck out a
repository every time you wanted to update your code to the latest
version and manually do diffs comparing the newly checked out against
your own and merging where conflicts exist as appropriate but "svn
update" makes it a lot easier.  Similarly, although technically maybe
unnecessary, I think an "svn refresh" command would be nice.

Re: replacing all code with latest SVN regardless of conflicts or uncommitted changes or whatever

Posted by Tyler Roscoe <ty...@cryptio.net>.
On Thu, Jun 10, 2010 at 10:46:26AM -0500, Thomas Anderson wrote:
> Say I've added a bunch of debug code to files in a particular
> directory and that I want to now remove all the debug code.  I could
> search through the file and manually remove it all or I could just re
> checkout the directory from SVN and replace the debug directory with
> the latest SVN code.  Problem is, typing in "svn checkout" requires
> you know the URL of the repository / directory you're checking out.

rm -rf bad_directory
svn update bad_directory

should do the trick.

tyler

Re: replacing all code with latest SVN regardless of conflicts or uncommitted changes or whatever

Posted by Les Mikesell <le...@gmail.com>.
Thomas Anderson wrote:
> Say I've added a bunch of debug code to files in a particular
> directory and that I want to now remove all the debug code.  I could
> search through the file and manually remove it all or I could just re
> checkout the directory from SVN and replace the debug directory with
> the latest SVN code.  Problem is, typing in "svn checkout" requires
> you know the URL of the repository / directory you're checking out.
> 
> If you could do something like "svn refresh" and have it just look at
> the .svn/entries file to get the URL that'd be a lot easier.  I mean,
> ease of use is why "svn update" exists.  You could just recheck out a
> repository every time you wanted to update your code to the latest
> version and manually do diffs comparing the newly checked out against
> your own and merging where conflicts exist as appropriate but "svn
> update" makes it a lot easier.  Similarly, although technically maybe
> unnecessary, I think an "svn refresh" command would be nice.

How about 'revert' followed by an 'update'?

-- 
   Les Mikesell
    lesmikesell@gmail.com