Richard Shea wrote:
> Hi - For some time now we've been producing directories of source
> which reflect our application at different stages ('3.1','3.2','3.3'
> etc - a sort of 'poor mans source control system').
>
> We've now setup svn and as a starting point would like to bring each
> of these version under source control so that we can look back through
> those version as well as all subsquent changes we make.
>
> This is more difficult than I had thought it would be. I can 'import'
> the first directory in the new repo but the next directory cannot be
> imported (by TortoiseSVN anyway) because there's already stuff in the
> repo. I then went through a process of : importing 3.1, checking out
> 3.1, deleting all files in working copy other than .svn's, copy 3.2
> into working copy area and checking in (and so on for 3.3,3,4 etc).
> However this process seems to have missed out the new files.
>
> I think I know what I did wrong but is there a better way ?
>
> thanks
>
> Richard.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
Thanks for all for the replies and the sample code. The server in
question doesn't have Perl installed (it's W2003 - so no csh either) but
I was able take your ideas and cobble together something in Python. I've
attached the source to this email although it required me to do some
fiddling with the output in Vim I still thought it might be a useful
starting place for someone else in the same situation who was Python
inclined. Thanks again for your help.
import os
from os.path import join, getsize
from sets import Set as set
import pprint
def produceContentsList(strTarget):
lstOut = []
for root, dirs, files in os.walk(strTarget):
for objF in files:
strWork = "%s\%s" % ( root,objF)
strWork = strWork[(len(strTarget) + 1):]
lstOut.append(strWork)
return lstOut
strBasePath = '''E:\\data\\src\\ASP\\'''
lstCompList = (('FOO3.0','FOO3.1'),('FOO3.1','FOO3.2'),('FOO3.2','FOO3.3'),('FOO3.3','FOO3.4'))
for lstPair in lstCompList:
lstEarlier = produceContentsList(strBasePath + lstPair[0])
lstLater = produceContentsList(strBasePath + lstPair[1])
deletions = list(set(lstEarlier) - set(lstLater))
additions = list(set(lstLater) - set(lstEarlier))
deletions.sort()
additions.sort()
pp = pprint.PrettyPrinter(indent=4)
print "%s -> %s" % (lstPair[0],lstPair[1])
print "Deletions:"
pp.pprint(deletions)
print "Additions:"
pp.pprint(additions)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Feb 5 06:23:02 2007