Mercurial > hg
annotate tests/readlink.py @ 25190:22438cfd11b5
phases: add set per phase in C phase computation
To speed up the computation of draft(), secret(), divergent(), obsolete() and
unstable() we need to have a fast way of getting the list of revisions that
are in draft(), secret() or the union of both: not public().
This patch extends the work on phase computation in C and make the phase
computation code also return a list of set for each non public phase.
Using these sets we can quickly obtain all the revisions of a given phase.
We do not return a set for the public phase as we expect it to be roughly the
size of the repo. Also, it can be computed easily by substracting the entries in the
non public phases from all the revs in the repo.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Wed, 01 Apr 2015 11:17:17 -0700 |
parents | 08a0f04b56bd |
children | 328739ea70c3 |
rev | line source |
---|---|
5683
396c7010b0cd
Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
1 #!/usr/bin/env python |
396c7010b0cd
Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
2 |
396c7010b0cd
Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
3 import errno, os, sys |
396c7010b0cd
Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
4 |
396c7010b0cd
Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
5 for f in sys.argv[1:]: |
396c7010b0cd
Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
6 try: |
396c7010b0cd
Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
7 print f, '->', os.readlink(f) |
396c7010b0cd
Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
8 except OSError, err: |
10282
08a0f04b56bd
many, many trivial check-code fixups
Matt Mackall <mpm@selenic.com>
parents:
5683
diff
changeset
|
9 if err.errno != errno.EINVAL: |
08a0f04b56bd
many, many trivial check-code fixups
Matt Mackall <mpm@selenic.com>
parents:
5683
diff
changeset
|
10 raise |
5683
396c7010b0cd
Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
11 print f, 'not a symlink' |
396c7010b0cd
Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
12 |
396c7010b0cd
Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
13 sys.exit(0) |