# HG changeset patch # User MattD # Date 1269447592 0 # Node ID 1eec8c29548aa8039279c220ae6e43513bee2190 # Parent dd2b0824de90c36032e749f41559dd2b30bf07ec 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. diff -r dd2b0824de90 -r 1eec8c29548a dbrtools/dbr/dbrenv.py --- 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): diff -r dd2b0824de90 -r 1eec8c29548a dbrtools/dbr/dbrpatch.py --- 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))