dbrtools/dbr/diffenv.py
author MattD <mattd@symbian.org>
Sun, 13 Jun 2010 20:39:03 +0100
branchDBRToolsDev
changeset 285 6a928cf9e181
parent 283 398d483e91bb
permissions -rw-r--r--
diffenv - Added some basic support for diffing with zipped builds over http (such as the internal foundation builds). for example: dbr diffenv 'http://builds.symbian.org/SF_builds/symbian3/builds/FCL/symbian3_FCL.single.555/'

# 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
import dbrfilter

def run(args):
    if(len(args)):
      if(len(args) == 1):
        first = '/'
        second = args.pop(0)        
      else:
        first = args.pop(0)
        second = args.pop(0)
      filter = dbrfilter.CreateFilter(args)
      db1=dbrenv.CreateDB(first)
      db2=dbrenv.CreateDB(second)
      results = db1.compare(db2)
#      results.printdetail()
      filteredresults = filter.filter(results)
      filteredresults.printdetail()
      filteredresults.printsummary()
    else:
      help()
      
def help():
  print "Compares two environments"
  print "Locations can be local environments or zipped environments available via UNC or http paths."
  print "Usage:"
  print "\tdbr diffenv <location1> (<location2>)"
  
    
  
def summary():
  return "Compares two baselines"