dbrtools/dbr/diffenv.py
author MattD <mattd@symbian.org>
Wed, 17 Mar 2010 12:27:45 +0000
changeset 203 e274d29c8bc9
parent 179 eab8a264a833
child 208 01c2b1268053
permissions -rw-r--r--
Initial version of code cleanup. Now have classes for the environments. checkenv and diffenv updated to use it (although there are minor changes to the paths).

# 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
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
# Initial Contributors:
# Symbian Foundation Ltd - initial contribution.
#
# Contributors:
# mattd <mattd@symbian.org>
#
# Description:
# new diffenv - uses OO interface and can have 

import dbrenv

def run(args):
    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>)"