DBRTools - did some fixes to the nasty path appending I'd done for patches. This fixes some of the problems with doing 'diffenv' on patched databases with UNC paths.
--- a/dbrtools/dbr/dbrenv.py Wed Mar 24 12:10:26 2010 +0000
+++ b/dbrtools/dbr/dbrenv.py Wed Mar 24 16:19:52 2010 +0000
@@ -188,7 +188,7 @@
#load up patches...
if(len(self.db) > 0):
self.baseline = self.db
- self.patches = dbrpatch.loadpatches(os.path.join(self.location,dbrutils.patchpath()))
+ self.patches = dbrpatch.loadpatches(os.path.join(self.location,dbrutils.patch_path_internal()))
self.db = dbrpatch.createpatchedbaseline(self.baseline,self.patches)
def save(self):
--- a/dbrtools/dbr/dbrpatch.py Wed Mar 24 12:10:26 2010 +0000
+++ b/dbrtools/dbr/dbrpatch.py Wed Mar 24 16:19:52 2010 +0000
@@ -222,15 +222,14 @@
return db
def listpatches():
- path = dbrutils.patchpath()
- patchfiles = glob.glob('%spatch*.txt' % path)
+ patchfiles = glob.glob(os.path.join(dbrutils.patchpath(),'patch*.txt'))
print 'Installed patches'
for file in patchfiles:
print '\t%s' % re.sub('.txt','',os.path.basename(file))
def removepatch(patch):
path = dbrutils.patchpath()
- file = '%s%s%s' %(path,patch,'.txt')
+ file = os.path.join(path,'%s.txt' % patch)
files = set()
files.add(file)
dbrutils.deletefiles(files)
@@ -238,7 +237,7 @@
def loadpatches(path):
patches = dict()
- patchfiles = glob.glob('%spatch*.txt' % path)
+ patchfiles = glob.glob(os.path.join(path,'patch*.txt'))
for file in patchfiles:
print 'Loading patch: %s' % re.sub('.txt','',os.path.basename(file))