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

Re: Newbie question - version-specific folders

From: Ron W <ronw.mrmx_at_gmail.com>
Date: Mon, 7 Aug 2017 16:35:59 -0400

On Mon, Aug 7, 2017 at 3:06 AM, David King <kingd.mail_at_usa.net> wrote:
> 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 version control purposes (any VCS, not just SVN), C:\Foo\Bar\V1 and
C:\Foo\Bar\V2 would be 2 working copies of the same project.

To get both of these into a SVN repository, I suggest:

1. Create a new, empty, SVN repository.
2. Import the files from V1 to the new repository
3. Tag the SVN revision (created by the import) as "V1"
4. Create a new working copy (separate from V1 and V2)
5. Use WinMerge (for example) to compare V2 to the new working copy:
    A. Delete any files that are not present in V2 (don't worry, they are
already in the repository)
    B. Copy all files from V2, overwriting the files already in the working
6. Add the new files to SVN (TortoiseSVN->Add will show you the new,
unversioned files.)
7. Commit (TortoiseSVN->Commit will warn you about the missing files.
Tell TortoiseSVN
to delete them)
8. Tag this, just created, SVN revision as "V2"

I know that telling Tortoise SVN to delete file sounds wrong, but you are
really just telling Tortoise SVN to stop tracking those files. They will
still be in V1 in the repository.

If you don't tell Tortoise SVN to delete those files, they will be
automatically put back into your working copy. This could cause problems
when you try to build V2 in a working copy made from the repository.

NOTE: SVN (and, therefore, Tortoise SVN) doesn't save the name of the
folder a working copy resides in. So, to satisfy your IDE's requirements,
when you check out a copy of V1, you need to make sure the folder you check
out into is named V1. Likewise for V2.

Moving forward, I suggest you configure your IDE so that working copy
folder names are no longer tied to the version you are building.

(Not saying that having multiple working copies from the same repository is
bad, just that, with a proper version control system in place, your IDE
need not "worry" about versions any more. And you will only need one IDE
configuration no matter what version of your project you are working on.)


To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2017-08-07 22:36:11 CEST

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