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

RE: Re: Atomic updates

From: Thompson, Graeme (AELE) <Graeme.Thompson_at_smiths-aerospace.com>
Date: 2005-11-22 15:47:49 CET

You could easily write a script to give you atomic updates:

Copy your current working directory.
Run svn update on your working directory
If (successful)
   delete your copy
   delete your working directory
   move the copy back to your working directory
This could easily be done on any of the operating systems that svn supports

Just run this script to update you working directory and you will have what you want.


-----Original Message-----
From: Ph. Marek [mailto:philipp.marek@bmlv.gv.at]
Sent: 22 November 2005 14:26
To: users@subversion.tigris.org
Subject: Re: Atomic updates

On Tuesday 22 November 2005 15:07, Erik Huelsmann wrote:
> On 11/22/05, Sergey Proskurnya <alaley@gmail.com> wrote:
> > Alex R. Mosteo ڧ֧:
> > > Clio Cidral Junior wrote:
> > >> 2005/11/21, Leon Zandman <lzandman@lode.nl>:
> > >>> I would also like atomic updates. It happened to me once that an
> > >>> update failed and I had to manually restore many files.
> > >>
> > >> At least I'm not alone :)
> > >
> > > I'm for it, but optional. I have done some massive updates of
> > > multimedia files from slow connections that would be hell if they
> > > were atomic.
> >
> > Agree with you.
> > BTW, is there such enhancement request in SVN Issue Tracker?
> No, because it's impossible: atomic means that everything changes, or
> nothing *in 1 operation*.
> There is no operating system which lets us rename more than 1 file per
> rename operation, so, it's impossible.
Well, that's right.

But you can try to achieve the illusion of being atomic to the user-space processes (at least with enough rights).

That's what I'm planning for fsvs: using unionfs
(http://www.fsl.cs.sunysb.edu/project-unionfs.html) or something similar (I remember having read about at least one other, but I can't find that ATM).

It should work like this: checkout all changed files in the same directory structure into a separate (temporary) directory. When that has finished, mount that as overlay over your wc.
Voila! One atomic operation, and all or nothing is visible.

Then it's only a question of your uninterruptible power supply if you manage to move the files into the underlying filesystem (where they belong). When this is done, unmount the directory and you can work again.

Granted, this is not fully thought through; but it'll be a time until I get to these parts anyway. Much time to think about cornercases and possible problems.

> I'd rather have you report bugs (with reproduction recipies!) which
> show us how to create working copies in an unrepairable state: that's
> something we *can* work on.
That's surely the best way to go forward now.



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

The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege. If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager. Please do not copy it for any purpose, or disclose its contents to any other person. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. The recipient should check this e-mail and any attachments for the presence of viruses. The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Nov 22 15:52:40 2005

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.