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

aborting a merge leaves WC corrupted

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Mon, 13 Jun 2011 09:59:33 +0200

Hi,

A TSVN user found a way to get a working copy corrupted beyond repair
(i.e., 'cleanup' doesn't help).

* create a repository with the attached dump
* check out a working copy from trunk, named "rcwc"

$ svn merge -r7:4 rcwc\main.c
works ok. But now the second merge:

$ svn merge -r7:2 rcwc\main.c

svn asks now what to do with the conflict. To get the working copy
corrupted now, you have to return 'postpone' from the callback (do not
return SVN_ERR_CANCELLED yet!), but on the next call to ctx->cancel_func
return an SVN_ERR_CANCELLED.

It's not a big deal since returning SVN_ERR_CANCELLED from the merge
conflict callback works ok. Only if that error is returned in the very
next cancel callback, then the working copy gets corrupted beyond
repair. So in most situations this corruption won't happen, but it can
happen - just imagine a really fast user hitting 'cancel' right after
aborting the merge.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net

Received on 2011-06-13 10:00:13 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.