You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.1 KiB
30 lines
1.1 KiB
14 years ago
|
import os, os.path
|
||
|
|
||
|
svnbase = "/home/jim/PyKDE/doc/classref"
|
||
|
newbase = "/home/jim/PyKDE352/doc/classref"
|
||
|
|
||
|
newfiles = os.listdir (newbase)
|
||
|
|
||
|
for file in newfiles:
|
||
|
if os.path.isdir (file):
|
||
|
newpath = os.path.join (newbase, file)
|
||
|
svnpath = os.path.join (svnbase, file)
|
||
|
if os.path.exists (svnpath):
|
||
|
newdoc = os.listdir (newpath)
|
||
|
svndoc = os.listdir (svnpath)
|
||
|
for doc in newdoc:
|
||
|
os.system ("cp %s %s" % (os.path.join (newpath, doc), svnpath))
|
||
|
if doc not in svndoc:
|
||
|
os.system ("svn add %s" % (os.path.join (svnpath, doc)))
|
||
|
print "added %s" % doc
|
||
|
else:
|
||
|
os.system ("cp -R %s %s" % (newpath, svnpath))
|
||
|
os.system ("svn add %s" % svnpath)
|
||
|
else:
|
||
|
if os.path.exists (os.path.join (svnbase, file)):
|
||
|
os.system ("cp %s %s" % (os.path.join (newbase, file), svnbase))
|
||
|
else:
|
||
|
os.system ("cp %s %s" % (os.path.join (newbase, file), svnbase))
|
||
|
os.system ("svn add %s" % (os.path.join (svnbase, file)))
|
||
|
|
||
|
|