You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Matwey V. Kornilov" <ma...@gmail.com> on 2013/01/20 16:56:05 UTC

wc.db - sync props

Hi,

I am running svn 1.7.8, both on server and client.

My pre_commit hook at server changes specific props in some transactions. 
But, at client side in wc.db I have user (uncorrected) version of this 
props. svn update does not sync props from server with those of wc.db. At 
the same time svn checkout does well.

The question is: how to properly update working wc.db syncing with server?



Re: wc.db - sync props

Posted by Branko Čibej <br...@wandisco.com>.
On 20.01.2013 16:56, Matwey V. Kornilov wrote:
> Hi,
>
> I am running svn 1.7.8, both on server and client.
>
> My pre_commit hook at server changes specific props in some transactions. 
> But, at client side in wc.db I have user (uncorrected) version of this 
> props. svn update does not sync props from server with those of wc.db. At 
> the same time svn checkout does well.
>
> The question is: how to properly update working wc.db syncing with server?

You are modifying versioned information in a hook. You should not do
that. The Book has a big warning about that, see:

http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.reposadmin.create.hooks

    While hook scripts can do almost anything, there is one dimension in
    which hook script authors should show restraint: do /not/ modify a
    commit transaction using hook scripts. While it might be tempting to
    use hook scripts to automatically correct errors, shortcomings, or
    policy violations present in the files being committed, doing so can
    cause problems. Subversion keeps client-side caches of certain bits
    of repository data, and if you change a commit transaction in this
    way, those caches become indetectably stale. This inconsistency can
    lead to surprising and unexpected behavior. Instead of modifying the
    transaction, you should simply /validate/ the transaction in
    the |pre-commit| hook and reject the commit if it does not meet the
    desired requirements. As a bonus, your users will learn the value of
    careful, compliance-minded work habits.


-- Brane

-- 
Branko Čibej
Director of Subversion | WANdisco | www.wandisco.com