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

Re: default of tag operation is HEAD revision of repository ?

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Thu, 19 Jun 2008 12:58:42 +0200

Simon Large wrote:

> First to clear up some confusion, copy-from-WC is not the same as
> copy-from-WC-rev.
>
> When you use the 'create branch from WC' the branch contains your
> exact WC state, local mods and all. It's not a pure server-side copy.
> Mostly you don't want to do that.
>
> When you 'create branch from HEAD' the branch is created from what the
> server knows as HEAD, which may be different from what you can see in
> your WC if someone else committed after you last looked. That is also
> potentially incorrect.
>
> What you normally want is to create a branch from the revision your WC
> is updated to, so you know exactly which rev it is based on before you
> commit, and that's what Stefan's thread is doing.
>
> As far as the worry about race conditions and the TSVN changing things
> while you are not paying attention, I like Todd's suggestion. Start
> out with none of the radio buttons checked. When the crawler thread
> completes it can fill out the specific revision box, assuming the user
> has not focussed on that box, fill in the rev and select that radio
> button. If the user sets focus on the rev box or selects any radio
> button then stop the thread.

The radio button is on HEAD when the dialog starts.
if the user *really* doesn't change one single thing in that dialog and
clicks "ok" to tag, the only race condition would be if the thread
changes the options from HEAD to revision-where-WC-was-last-updated-to.

If nobody did a commit in the meantime, that's not really a race
condition because it will be the very same.

If however someone else made a commit in between, the changed option
from HEAD to revision-where-WC-was-last-updated-to will even benefit the
user.

> If that is still too much magic, then a separate button to check the
> WC revision and fill in the rev box would be another solution.
>
> BTW, what happens if the thread detects a mixed rev WC on its crawl,
> or local modifications? Should there be a warning about that? Maybe if
> the crawl is initiated by button there could be a warning dialog, or
> just a yellow triangle like there is for externals in the commit
> dialog.

Define "mixed rev WC" please. Almost every file has a different revision
(the 'last committed rev'), unless you've changed every single file in
your working copy for the last commit.

For local modifications, a warning is shown if the radio button is still
on HEAD when the thread finishes.

Stefan

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

Received on 2008-06-19 12:59:01 CEST

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.