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

Re: Checkout and update atomicity

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: 2005-10-17 19:36:12 CEST

Matthias Wächter wrote:

> Why "no" for subversion?

Not really no, but also not really yes either ;)

>> TSVN contacts the repository to find the HEAD revision, then it
>> updates to that specific revision, so the update is effectively atomic.
>
> What happens if I select a couple of files/directories in the explorer
> and then apply "SVN Update..." - the dialog shows some consecutive
> updates each finishing with "Completed At revision: xxxxx". I'm not
> sure whether "xxxxx" is the same for each of these entries, but for me
> it looks like these are sequential update operations each requesting the
> HEAD revision.

That's exactly the case Simon mentioned. If you do that with the CL
client, it updates all items to HEAD individually. Which means that the
first item updated may have a lower revision than the last item updated
if there was a commit from someone else in between.
TSVN on the other hand first checks if all entries are from the same
repository. And if they are (I guess that will be the case in 99%) then
TSVN first asks the repository what revision number HEAD currently is
at, then updates to that revision number, not HEAD. Because as
mentioned, HEAD can change in between the consecutive updates.

> Is a "selective update" like this an atomic operation? I haven't had the
> time to play with this and try to commit and selectively update at the
> same time (nor to look at the code). With the CLI only one "At revision"
> is shown after a selective update, none in between, so it looks as if
> the CLI only performs one update operation on the repository.

Updates are never atomic in the real sense. Atomic would mean if an
update gets interrupted, that already updated files would get reverted
to the stage they were before, but that doesn't happen.

> If I'm right and it's not an atomic operation, TSVN should change ASAP :-)

With such comments you won't make much friends, neither here nor on the
Subversion mailing list.

> If I'm wrong and a selective update is in fact atomic the interface
> should not write out multiple "At revision" lines or at least document
> this behavior (the different output compared to the CLI).

AFAIK we have this documented under the "update" section.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org
--
Received on Mon Oct 17 18:39:56 2005

This is an archived mail posted to the TortoiseSVN Users mailing list.

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