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

Re: Multiple folders, different versions - merge them into one

From: B C <bjc_tsvn_at_btinternet.com>
Date: Tue, 25 Jul 2017 13:16:58 +0000 (UTC)

I inherited a project where the history was a collection of folders on a server, where new folder was created for each version. Each folder was named according to the date/time the folder was created and a version label. I created a command line batch file, also using gawk, to import the folders into Subversion. This was all command line so there was no direct use of TortoiseSVN (except to use the command line Subversion tools installed by TortoiseSVN).

The specifics of the code I inherited meant it took me a little while to do. However, that was several years ago and I'm still glad I put in the effort as it continues to be helpful to review the original development sequence.

Obviously, all the work I did was on a local copy of those original folders. I didn't want to risk changing the originals, in case anything went wrong.

I had to do some preliminary work on the folders I needed to import. I knew that the development had, at times, been conducted in parallel (for different versions) and wanted to maintain this by importing the different code into different branches. I had limited information to work with so it was difficult to determine when the branches started and which version was related to which. If your folders are for a linear development - effectively a single trunk development - then you won't need to do this. I also reviewed the folders to remove any files and folders that I didn't want to include in the history. For example, I only wanted to include the source code and so all the output files were removed. [N.B. I actually scripted all these changes too, so that I could easily start-over if I did something wrong.]

I created a new Subversion user (auto_import) to use for this process. This ensured that there was a clear seperation between the code that was imported and the code that I later added. This has been very helpful when reviewing the history. However, this is an extra step that isn't required.

I then created a new repository with the standard layout.

I next created a text file that defined each step of the import process. This include a line for each step. Each line included the folder name, the version label, the Subversion path (e.g. trunk or branch), and a Subversion tag. This file was used when calling the import batch file.

The core of the process was as follows:
  - Checkout the Subversion path (e.g. trunk)
  - Copy the contents of the folder to import to the local checkout folder
  - Use the svn status command to determine the files/folders to add or delete, piping the output to awk to run the relevant svn command (e.g. svn add or svn delete)
  - Use Subversion to commit the changes, adding a suitable commit comment, including the version label
  - Use Subversion to create a tag, based on the working copy, including a suitable commit comment

Unfortunately, the batch files I created for my import process are written for my particular problem and aren't especially transferrable.

Of course, there may well be better methods to achieve the same goal. This worked for me and perhaps these notes will be helpful for you.
 

    On Tuesday, 25 July 2017, 10:07, Luci Me <lucian.cozma88_at_gmail.com> wrote:
 

 down vote
favorite
At my workplace, I have managed to install and use locally Tortoise svn, to easier track the implementation of the tools. For the new projects, it's easy because I start from scratch with the version control.

Now, for the past projects, I have copied the entire folder to keep a versioning. It looks like this:

TempProject 20.07.2017
TempProject 21.07.2017
TempProject 22.07.2017
....

Is there a possibility to integrate all this changes with Tortoise? Meaning , I want to have a base, than commits, for each version

Thank you...

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3272422

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3272574

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2017-07-25 15:21:38 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.