Announcement

Collapse
No announcement yet.

Newbie question

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Newbie question

    Hi,

    I'm new to SVN. We're using Tortoise SVN.
    I've got a V1 and V2 of my software, ready to place into SVN.
    Presently, they are sitting in C:\Foo\Bar\V1\ and C:\Foo\Bar\V2\

    The IDE we use, hardcodes those paths, into settings files.
    So V1, as stands at least, will only build properly, when residing in C:\Foo\Bar\V1\
    And V2, as stands at least, will only build properly, when residing in C:\Foo\Bar\V2\

    I like to have both present on my PC, as I can compare, with eg 'WinMerge',
    when I need to see the changes, between V1 and V2

    OK, so that's the situation, as stands

    Question is, can Tortoise SVN, or SVN generally, cope ?

    For example, if I check-in all the files under C:\Foo\Bar\V1\,
    and then want to check-out later, does SVN record the path C:\Foo\Bar\V1\,
    and know to check-out to there (it won't build, otherwise) ?

    Also, when I subsequently check-in the files under C:\Foo\Bar\V2\,
    how can SVN know, or be made to know, that these are a new version of the
    files I checked-in from C:\Foo\Bar\V1\, and not something totally different and unrelated ?

    I read the SVN quick start / documentation guides. But it didn't explain how I might deal with the described situation.

    If the above, is all too tricky, then I guess I'll have to take a different tack, as below, I presume ?

    Create folder C:\Foo\Bar\Current\, and copy C:\Foo\Bar\V1\ files to C:\Foo\Bar\Current\.
    Then, in the IDE, alter the mentioned hardcoded paths, from C:\Foo\Bar\V1\, to C:\Foo\Bar\Current\.
    Check the software builds. Then check-in the files under C:\Foo\Bar\Current\, tagging as V1.

    Next, delete the files under C:\Foo\Bar\Current\, then copy in the files from C:\Foo\Bar\V2\.
    In the IDE, alter the mentioned hardcoded paths, from C:\Foo\Bar\V2\, to C:\Foo\Bar\Current\.
    Check the software builds. Then check-in the files under C:\Foo\Bar\Current\, tagging as V2.

    Excuse me, btw, for use of the terms check-in/out, and tag. I'm not sure I've got the right terminology, for SVN.
    But I imagine you know what I mean..

    Many thanks,

    David

  • #2
    Such poor IDE choices are simply sad.

    SVN has no memory of where your working copy is kept. So you're going to need a README.txt or "IDE_NOTES.txt" file in the root of your tree spelling out the restrictive nature of where the working copy must reside.

    Your proposal for checking in your current versions V1 and V2 is fine. You could even create a branch for V1 so that it could be bugfixed independently from V2 going forward. You can do that at any time simply by copying the tag you created in your proposal to, say, "/branches/V1". Same for V1.

    Comment


    • #3
      Hi, DougR,

      Thanks for your reply. Sad indeed, I weep regularly into my keyboard, but unfortunately the choice of CPU ties us to that particular IDE, mentioning no names ;-). It's not all bad though, the IDE is OK in other respects :-\

      So if I understand correctly, SVN has no memory of the path C:\Foo\Bar\V1\, C:\Foo\Bar\V2\, C:\Foo\Bar\Current, or whatever. And only has memory of the files and subfolders underneath. And in that way, knows for example, that C:\Foo\Bar\V1\main.c and C:\Foo\Bar\V2\main.c are the same thing, with the latter just being a later version. And thus can delta them, etc..

      Best regards,

      David

      Comment


      • #4
        David: If you check your software in properly then, yes, that's exactly it. The only stuff that SVN manages starts at the root of the working copy (otherwise known as the root of the repository). Where you put various different working copies (and what revision each working copy is based on) is up to you. Cheers.

        Comment

        Working...
        X