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

Re: How to recover from a failed update/merge?

From: Nathan Hartman <hartman.nathan_at_gmail.com>
Date: Mon, 10 Aug 2020 09:52:51 -0400

On Mon, Aug 10, 2020 at 2:30 AM Bo Berglund <bo.berglund_at_gmail.com> wrote:

> I have this multi-platform app in SVN thet I started in Windows but
> lately have worked on in Linux.
> The correct latest version is from Linux and I wanted to verify it on
> Windows.
>
> Everything is committed from Linux and the revision there is the
> current one.
>
> Now I made a mistake in Windows and don't know how to get out of it...
> I had started the IDE and when checking the code I realized it was not
> current, but the fact that I checked modified local files.
>
> Next mistake, I went to the command line and did an svn up to get the
> latest versions forgetting the IDE was still running, so it now
> intervened and tried to be clever about the changing files.
>
> Meanwhile svn started to offer some merge suggestions which I had
> never done before and after a while I had this mess....
>
>
> So now I need to get a clean slate on the source dir in Windows, i.e I
> want to get the *repository revision* of all files in the source dir
> and not bother with bogus changes made in the messup.
>
> How should I proceed to get the wc in a state like after the last
> successful update so it can now be updated to the repository head
> revision?

So, if I understand correctly, you want to throw away *all* modifications
in your working copy. In a situation like this, I would shut down the IDE
so that it won't interfere, and from the topmost directory of the working
copy, do:

$ svn revert -R .

That will recursively revert *all* local changes to versioned files and
directories, including any changes you might want to keep, so always think
very carefully before you use it!!

After reverting all changes, "svn status" should show no versioned files
modified. You might still have unversioned local files. You'll need to
decide whether to keep them or not.

Now, you should be able to "svn update" to get the latest repository
revision.

Again, since a revert cannot be undone, always be careful with "svn revert"
especially with "-R" (recursive)!!

Nathan
Received on 2020-08-10 15:53:07 CEST

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.