equal
deleted
inserted
replaced
1 #!/usr/bin/env python |
|
2 |
|
3 from mercurial import demandimport |
|
4 demandimport.enable() |
|
5 |
|
6 import re |
|
7 |
|
8 rsub = re.sub |
|
9 def f(obj): |
|
10 l = repr(obj) |
|
11 l = rsub("0x[0-9a-fA-F]+", "0x?", l) |
|
12 l = rsub("from '.*'", "from '?'", l) |
|
13 return l |
|
14 |
|
15 import os |
|
16 |
|
17 print "os =", f(os) |
|
18 print "os.system =", f(os.system) |
|
19 print "os =", f(os) |
|
20 |
|
21 from mercurial import util |
|
22 |
|
23 print "util =", f(util) |
|
24 print "util.system =", f(util.system) |
|
25 print "util =", f(util) |
|
26 print "util.system =", f(util.system) |
|
27 |
|
28 import re as fred |
|
29 print "fred =", f(fred) |
|
30 |
|
31 import sys as re |
|
32 print "re =", f(re) |
|
33 |
|
34 print "fred =", f(fred) |
|
35 print "fred.sub =", f(fred.sub) |
|
36 print "fred =", f(fred) |
|
37 |
|
38 print "re =", f(re) |
|
39 print "re.stdout =", f(re.stdout) |
|
40 print "re =", f(re) |
|