dbrtools/dbr/diffenv.py
changeset 203 e274d29c8bc9
parent 179 eab8a264a833
child 208 01c2b1268053
--- a/dbrtools/dbr/diffenv.py	Tue Mar 16 12:28:04 2010 +0000
+++ b/dbrtools/dbr/diffenv.py	Wed Mar 17 12:27:45 2010 +0000
@@ -1,4 +1,4 @@
-# Copyright (c) 2009 Symbian Foundation Ltd
+# Copyright (c) 2010 Symbian Foundation Ltd
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
 # which accompanies this distribution, and is available
@@ -11,23 +11,30 @@
 # mattd <mattd@symbian.org>
 #
 # Description:
-# DBR diffenv - compares two environments
+# new diffenv - uses OO interface and can have 
 
-import sys
-import dbrpatch
+import dbrenv
 
 def run(args):
-    if(len(args) == 2):
-      first = args[0]
-      second = args[1]      
-      dbrpatch.newcomparepatcheddbs(first, second)
+    if(len(args)):
+      if(len(args) == 1):
+        first = '/'
+        second = args[0]
+      else:
+        first = args[0]
+        second = args[1]    
+      db1=dbrenv.CreateDB(first)
+      db2=dbrenv.CreateDB(second)
+      results = db1.compare(db2)
+      results.printdetail()
+      results.printsummary()
     else:
       help()
       
 def help():
   print "Compares two environments"
   print "Usage:"
-  print "\tdbr diffenv <drive1> <drive2>"
+  print "\tdbr diffenv <drive1> (<drive2>)"
     
+  
 
-