author | MattD <mattd@symbian.org> |
Mon, 22 Mar 2010 11:35:04 +0000 | |
changeset 208 | 01c2b1268053 |
parent 203 | e274d29c8bc9 |
child 242 | 9fd4819bf104 |
permissions | -rw-r--r-- |
203
e274d29c8bc9
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).
MattD <mattd@symbian.org>
parents:
179
diff
changeset
|
1 |
# Copyright (c) 2010 Symbian Foundation Ltd |
179
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
2 |
# This component and the accompanying materials are made available |
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
3 |
# under the terms of the License "Eclipse Public License v1.0" |
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
4 |
# which accompanies this distribution, and is available |
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
5 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
6 |
# |
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
7 |
# Initial Contributors: |
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
8 |
# Symbian Foundation Ltd - initial contribution. |
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
9 |
# |
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
10 |
# Contributors: |
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
11 |
# mattd <mattd@symbian.org> |
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
12 |
# |
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
13 |
# Description: |
203
e274d29c8bc9
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).
MattD <mattd@symbian.org>
parents:
179
diff
changeset
|
14 |
# new diffenv - uses OO interface and can have |
179
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
15 |
|
203
e274d29c8bc9
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).
MattD <mattd@symbian.org>
parents:
179
diff
changeset
|
16 |
import dbrenv |
179
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
17 |
|
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
18 |
def run(args): |
203
e274d29c8bc9
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).
MattD <mattd@symbian.org>
parents:
179
diff
changeset
|
19 |
if(len(args)): |
208
01c2b1268053
Embryonic support for filtering. Can now use a file list with diffenv to filter the results.
MattD <mattd@symbian.org>
parents:
203
diff
changeset
|
20 |
filtertype = '' |
203
e274d29c8bc9
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).
MattD <mattd@symbian.org>
parents:
179
diff
changeset
|
21 |
if(len(args) == 1): |
e274d29c8bc9
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).
MattD <mattd@symbian.org>
parents:
179
diff
changeset
|
22 |
first = '/' |
e274d29c8bc9
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).
MattD <mattd@symbian.org>
parents:
179
diff
changeset
|
23 |
second = args[0] |
e274d29c8bc9
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).
MattD <mattd@symbian.org>
parents:
179
diff
changeset
|
24 |
else: |
e274d29c8bc9
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).
MattD <mattd@symbian.org>
parents:
179
diff
changeset
|
25 |
first = args[0] |
208
01c2b1268053
Embryonic support for filtering. Can now use a file list with diffenv to filter the results.
MattD <mattd@symbian.org>
parents:
203
diff
changeset
|
26 |
second = args[1] |
01c2b1268053
Embryonic support for filtering. Can now use a file list with diffenv to filter the results.
MattD <mattd@symbian.org>
parents:
203
diff
changeset
|
27 |
if(len(args) == 3): |
01c2b1268053
Embryonic support for filtering. Can now use a file list with diffenv to filter the results.
MattD <mattd@symbian.org>
parents:
203
diff
changeset
|
28 |
filtertype = args[2] |
203
e274d29c8bc9
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).
MattD <mattd@symbian.org>
parents:
179
diff
changeset
|
29 |
db1=dbrenv.CreateDB(first) |
e274d29c8bc9
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).
MattD <mattd@symbian.org>
parents:
179
diff
changeset
|
30 |
db2=dbrenv.CreateDB(second) |
e274d29c8bc9
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).
MattD <mattd@symbian.org>
parents:
179
diff
changeset
|
31 |
results = db1.compare(db2) |
208
01c2b1268053
Embryonic support for filtering. Can now use a file list with diffenv to filter the results.
MattD <mattd@symbian.org>
parents:
203
diff
changeset
|
32 |
filter = dbrenv.CreateFilter(filtertype) |
01c2b1268053
Embryonic support for filtering. Can now use a file list with diffenv to filter the results.
MattD <mattd@symbian.org>
parents:
203
diff
changeset
|
33 |
filteredresults = filter.filter(results) |
01c2b1268053
Embryonic support for filtering. Can now use a file list with diffenv to filter the results.
MattD <mattd@symbian.org>
parents:
203
diff
changeset
|
34 |
filteredresults.printdetail() |
01c2b1268053
Embryonic support for filtering. Can now use a file list with diffenv to filter the results.
MattD <mattd@symbian.org>
parents:
203
diff
changeset
|
35 |
filteredresults.printsummary() |
179
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
36 |
else: |
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
37 |
help() |
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
38 |
|
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
39 |
def help(): |
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
40 |
print "Compares two environments" |
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
41 |
print "Usage:" |
203
e274d29c8bc9
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).
MattD <mattd@symbian.org>
parents:
179
diff
changeset
|
42 |
print "\tdbr diffenv <drive1> (<drive2>)" |
179
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
43 |
|
203
e274d29c8bc9
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).
MattD <mattd@symbian.org>
parents:
179
diff
changeset
|
44 |
|
179
eab8a264a833
Pulled the DBRTools from their own repo and popped them into this one. Still very much a 'work in progress'.
MattD <mattd@symbian.org>
parents:
diff
changeset
|
45 |