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

Re: How to bring different version of files in subversion

From: Eric Wilhelm <ewilhelm_at_sbcglobal.net>
Date: 2004-07-07 18:53:27 CEST

# The following was supposedly scribed by
# Metrri Jain
# on Wednesday 07 July 2004 11:39 am:

>> In your local working directory...
>> Add File A to the repository.
>> Overwrite File A with File B,  Commit.
>> Overwrite File B with File C,  Commit.
>> Overwrite File C with File D,  Commit.
>>
>> Marc
>
> Thanks for the reply ,but how do I Overwrite a file
>with another file?

You just smash it. Either copy the next version on top of it, or move it.
Subversion will see the change exactly as it would if you were to open the
file, change it and save it.

Again, if you have a lot of these, you should look at this script:
http://ericwilhelm.homeip.net/svn/Module-Subversion-Juggle/trunk/data/scripts/versioner_to_subversion

It assumes that you have files named like so:
/path/to/file/filename
/path/to/file/.filename.000
/path/to/file/.filename.001
/path/to/file/.filename.002
/path/to/file/.filename.003

Where "filename" is what we want to end up with as the HEAD revision, and 000,
001, etc will be added and committed in numerical order before the current
file ("filename".) These equate to Marc's A,B,C,D... as follows:

E: /path/to/file/filename
A: /path/to/file/.filename.000
B: /path/to/file/.filename.001
C: /path/to/file/.filename.002
D: /path/to/file/.filename.003

It also assumes that the first line of the backup files contains the version
info (which must match /^original file last modified on /). If this is true,
the line is removed and used as the commit message, but if not, it just
generates a less-helpful commit message.

--Eric

-- 
"It is a mistake to allow any mechanical object to realize that you are in a 
hurry."
                                        --Ralph's Observation
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jul 7 18:51:59 2004

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.