tests/readlink.py
author Adrian Buehlmann <adrian@cadifra.com>
Fri, 21 Mar 2008 14:52:24 +0100
changeset 6338 0750f11152fe
parent 5683 396c7010b0cd
child 10282 08a0f04b56bd
permissions -rwxr-xr-x
clone: print "updating working directory" status message With this change, "hg clone" looks like this: % hg clone http://example.com/repo/big big requesting all changes adding changesets adding manifests adding file changes added XXX changesets with XXX changes to XXX files updating working directory XXX files updated, XXX files merged, XXX files removed, XXX files unresolved So the user sees % hg clone http://example.com/repo/big big requesting all changes adding changesets adding manifests adding file changes added XXX changesets with XXX changes to XXX files updating working directory while Mercurial is writing to disk to populate the working directory With this change, "hg clone" looks like this: % hg clone big big-work updating working directory XXX files updated, XXX files merged, XXX files removed, XXX files unresolved
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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:
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
     9
        if err.errno != errno.EINVAL: raise
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    10
        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
    11
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    12
sys.exit(0)