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

RE: RE: Managing duplicate and near duplicate files

From: Keith Moore <Keith.Moore_at_securency.com.au>
Date: Mon, 12 May 2008 16:49:49 +1000

Is it possible to move the common 'code' to a central batch file and have the specific batch files call the central one? It seems like the issue you have is with the file layout and the lack of a sensible code structure. I'm sure you will be able to get subversion to work the way you want, with scripts etc. but maybe it would be better to fix the underlying problem rather than the symptoms. If it is not feasible to change the batch script layout for other reasons then I guess you're stuck with whatever solution you can come up with.

It's a bit off topic for this mailing list but if you have windows batch files then you should be able to partition them into function-like groupings.

Example:

CommonSetup.bat

@ECHO OFF

SETLOCAL ENABLEEXTENSIONS

:BatchMain

      CALL %~1

GOTO :EOF

:setupSomething

      REM Do common setup in here

GOTO :EOF

:setupSomethingElse

      REM Do common setup in here

GOTO :EOF

ENDLOCAL

SpecificSetup.bat

@ECHO OFF

SETLOCAL ENABLEEXTENSIONS

:mainSetup

      REM Do specific setup here

      REM Call the common batch script to do common stuff

      CALL CommonSetup.bat :setupSomething

GOTO :EOF

ENDLOCAL

It's not very elegant but it might be a lot easier than trying to do all those merges.

_________________________________________________________________

Keith Moore

-----Original Message-----
From: Richard Yale [mailto:Richard.Yale_at_uk.linedata.com]
Sent: Friday, 9 May 2008 22:16
To: Keith Moore; users_at_subversion.tigris.org
Subject: RE: RE: Managing duplicate and near duplicate files

Hi Keith

The files are text batch scripts to set up and run tests on regression test environments.

Typically I would have a test pack with 10 sections which need to be arranged as 10 subdirectories. Of the subdirectories 6, say, will contain duplicate setup scripts plus various test scripts, 3 will contain near duplicate setup scripts with a few extra lines or modified lines to effect a slightly different setup and one might be quite different. This is a legacy file set I've inherited the management of and I find typically the setup files all have different names, e.g. setup_future.txt, setup_option.txt despite being the same, but unifying their names would be a big job.

Typically, e.g. to get the setup to work on the latest release of our software, I might need to add a new section or modify a couple of existing lines to the setup. I'd like to do this once then tell Subversion to merge that with the related files. I don't want to need to know which those related files are and I'd prefer not to maintain a script that knows which files are related. If I add test section 11 I'd need to maintain the script too.

I've told Subversion that the files are copies and modified copies so I'm hoping I can tell Subversion to apply my change to each copy without re-telling it which files are copies. If it makes things easier I could create a master directory with the originals and then SVN copy them out to their desired places and make my future changes to the master copy.

Thanks and regards,

Rich

Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851 VAT Reg No 778499447

  _____

From: Keith Moore [mailto:Keith.Moore_at_securency.com.au]
Sent: 08 May 2008 23:52
To: 'users_at_subversion.tigris.org'
Subject: RE: Managing duplicate and near duplicate files

Hi Rich, what type of files are they? Can you give us some examples of names and contents?

_________________________________________________________________

Keith Moore

-----Original Message-----
From: Richard Yale [mailto:Richard.Yale_at_uk.linedata.com]
Sent: Friday, 9 May 2008 1:23
To: users_at_subversion.tigris.org
Subject: Managing duplicate and near duplicate files

Hi I'm quite new to subversion so sorry for bad terminology, or a silly question. I couldn't find my answer in the archive.

We've recently moved a file set over to subversion to manage changes to and growth of this set. The set includes many duplicate and near duplicate files (often with different names) across many directories which I've identified and created SVN scripts to delete (near)duplicates and SVN copy them back then restore the true file so that subversion will know they were born from one original file and that they were modified.

A change to one of these files usually needs to go into each of them so my question is this: Is there a manageable way for me and other contributors to change one of these files then roll out the change across each duplicate and near duplicate file, if needed, without needing to know which other files should take the change? I guess I could write a script that will merge a change to a list of a file's relations but that would be a lot of work to make reliable and would need manual updating when a new duplicate file was made.

The file names and locations can't be changed for legacy reasons but I could create a new directory with a "master" copy of these files if that gets a simpler solution. The files are used from windows machines by the way so I think that rules out any kind of symbolic link solution for the exact duplicates.

Regards,

Rich

  _____

#####################################################################################
Attention:
The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited. If you received this in error, please contact the sender and
delete the material from any system and destroy any copies.
#####################################################################################
Received on 2008-05-12 08:50:54 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.