Show More
@@ -1,47 +1,47 | |||||
1 | #!/usr/bin/env python |
|
1 | #!/usr/bin/env python | |
2 |
|
2 | |||
3 | from mercurial import demandimport |
|
3 | from mercurial import demandimport | |
4 | demandimport.enable() |
|
4 | demandimport.enable() | |
5 |
|
5 | |||
6 | import re |
|
6 | import re | |
7 |
|
7 | |||
8 | rsub = re.sub |
|
8 | rsub = re.sub | |
9 | def f(obj): |
|
9 | def f(obj): | |
10 | l = repr(obj) |
|
10 | l = repr(obj) | |
11 | l = rsub("0x[0-9a-f]+", "0x?", l) |
|
11 | l = rsub("0x[0-9a-fA-F]+", "0x?", l) | |
12 | l = rsub("from '.*'", "from '?'", l) |
|
12 | l = rsub("from '.*'", "from '?'", l) | |
13 | return l |
|
13 | return l | |
14 |
|
14 | |||
15 | import os |
|
15 | import os | |
16 |
|
16 | |||
17 | print "os =", f(os) |
|
17 | print "os =", f(os) | |
18 | print "os.system =", f(os.system) |
|
18 | print "os.system =", f(os.system) | |
19 | print "os =", f(os) |
|
19 | print "os =", f(os) | |
20 |
|
20 | |||
21 | import mercurial.version |
|
21 | import mercurial.version | |
22 |
|
22 | |||
23 | print "mercurial.version =", f(mercurial.version) |
|
23 | print "mercurial.version =", f(mercurial.version) | |
24 | print "mercurial.version.get_version =", f(mercurial.version.get_version) |
|
24 | print "mercurial.version.get_version =", f(mercurial.version.get_version) | |
25 | print "mercurial.version =", f(mercurial.version) |
|
25 | print "mercurial.version =", f(mercurial.version) | |
26 | print "mercurial =", f(mercurial) |
|
26 | print "mercurial =", f(mercurial) | |
27 |
|
27 | |||
28 | from mercurial import util |
|
28 | from mercurial import util | |
29 |
|
29 | |||
30 | print "util =", f(util) |
|
30 | print "util =", f(util) | |
31 | print "util.system =", f(util.system) |
|
31 | print "util.system =", f(util.system) | |
32 | print "util =", f(util) |
|
32 | print "util =", f(util) | |
33 | print "util.system =", f(util.system) |
|
33 | print "util.system =", f(util.system) | |
34 |
|
34 | |||
35 | import re as fred |
|
35 | import re as fred | |
36 | print "fred =", f(fred) |
|
36 | print "fred =", f(fred) | |
37 |
|
37 | |||
38 | import sys as re |
|
38 | import sys as re | |
39 | print "re =", f(re) |
|
39 | print "re =", f(re) | |
40 |
|
40 | |||
41 | print "fred =", f(fred) |
|
41 | print "fred =", f(fred) | |
42 | print "fred.sub =", f(fred.sub) |
|
42 | print "fred.sub =", f(fred.sub) | |
43 | print "fred =", f(fred) |
|
43 | print "fred =", f(fred) | |
44 |
|
44 | |||
45 | print "re =", f(re) |
|
45 | print "re =", f(re) | |
46 | print "re.stdout =", f(re.stdout) |
|
46 | print "re.stdout =", f(re.stdout) | |
47 | print "re =", f(re) |
|
47 | print "re =", f(re) |
General Comments 0
You need to be logged in to leave comments.
Login now