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

Re: Source code lines transposed on checkout

From: Ulrich Eckhardt <ulrich.eckhardt_at_dominolaser.com>
Date: Tue, 26 Jul 2011 09:43:33 +0200

On Monday 25 July 2011, Jeff Abbott wrote:
> I have on two occasions had two lines of code transposed on an SVN Tortoise
> checkout.

I have never ever heard of any such thing, and I'm very surprised by it. Just
to make sure, did you try a different editor? I could imagine crappy tools
getting confused by inconsistent line endings or such things.

> In both cases the code was VB6. In each case an Exit command
> was transposed with an End If line. The code below provides an example.
>
> ' Case 1: End if Swapped with Exit For
> For ...
> If ... Then
> ...
> Exit For
> End If
> Next
>
> ' Case 2: End if Swapped with Exit Property
> If ... Then
> ...
> End If
> Exit Property
>
> On checkout to one computer the code was transposed as:
>
> ' Case 1: End if Swapped with Exit For
> For ...
> If ... Then
> ...
> End If
> Exit For
> Next
>
> ' Case 2: End if Swapped with Exit Property
> If ... Then
> ...
> Exit Property
> End If

Strange. Is that effect repeatable?

> Additional detail:
> In each case I checked the same baseline out on a second computer and the
> lines were not swapped. I reversed the lines to correct for the error, and
> did a DIFF, which showed the line order correct.

The diff showed the changes you made or the diff showed that the order was
already correct? What does the diff show if you don't change anything, i.e. is
the working copy already modified on checkout? What access method was used on
checkout (file, http, https, svn, svn+ssh)? Could it be that some network
proxy/filter/censorship/firewall application modifies the network traffic?

> I checked in and did a DIFF between the current code and the original
> revision, no differences were found.

How exactly? SVN doesn't allow you to check in without changes. What does 'svn
log' on the repository tell you about the created revision?

> We have not been able to repeat this problem.

Wait: You have only had this issue a single time? Can you rule out that some
user or machine accidentally modified the checked out files?

> But since the issue involves End If with Exit commands, different
> baselines, different users, and different SVN repositories, I'm at a
> loss on where to look next.

BTW: What is a "baseline"? SVN doesn't use this term, so what exactly do you
mean with it? Also, just to make sure since you have multiple repositories,
you didn't fall for the trap that you created one with svnadmin and the others
by copying? That would give all repositories the same UUID, which messes with
SVN's internals.

BTW2: You're sending HTML mail, please try to turn that off for mailinglists.

Good luck!

Uli

**************************************************************************************
Domino Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
Visit our website at http://www.dominolaser.com
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Domino Laser GmbH ist für diese Folgen nicht verantwortlich.
**************************************************************************************
Received on 2011-07-26 09:37:36 CEST

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