Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/util.py @ 515:03f27b1381f9
Whitespace cleanups
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Whitespace cleanups
manifest hash: ac954bc3a4f034c12638a259ecd65841f5b63c5c
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCwuubywK+sNU5EO8RAluIAJ98XQpNdZUpSmYKgDmrMRlbL76ZzQCfes0t
rknNUN/PhtyA4bzL646dOz4=
=UyCE
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Wed, 29 Jun 2005 10:42:35 -0800 |
parents | 42a660abaf75 |
children | 0fb8ade0f756 |
comparison
equal
deleted
inserted
replaced
514:874e577e332e | 515:03f27b1381f9 |
---|---|
19 return "killed by signal %d" % val, val | 19 return "killed by signal %d" % val, val |
20 elif os.WIFSTOPPED(code): | 20 elif os.WIFSTOPPED(code): |
21 val = os.STOPSIG(code) | 21 val = os.STOPSIG(code) |
22 return "stopped by signal %d" % val, val | 22 return "stopped by signal %d" % val, val |
23 raise ValueError("invalid exit code") | 23 raise ValueError("invalid exit code") |
24 | 24 |
25 def system(cmd, errprefix = "abort"): | 25 def system(cmd, errprefix = "abort"): |
26 """execute a shell command that must succeed""" | 26 """execute a shell command that must succeed""" |
27 rc = os.system(cmd) | 27 rc = os.system(cmd) |
28 if rc: | 28 if rc: |
29 errmsg = "%s: %s %s" % (errprefix, os.path.basename(cmd.split(None, 1)[0]), | 29 errmsg = "%s: %s %s" % (errprefix, os.path.basename(cmd.split(None, 1)[0]), |
44 def is_exec(f, last): | 44 def is_exec(f, last): |
45 return last | 45 return last |
46 | 46 |
47 def set_exec(f, mode): | 47 def set_exec(f, mode): |
48 pass | 48 pass |
49 | 49 |
50 def pconvert(path): | 50 def pconvert(path): |
51 return path.replace("\\", "/") | 51 return path.replace("\\", "/") |
52 | 52 |
53 def makelock(info, pathname): | 53 def makelock(info, pathname): |
54 ld = os.open(pathname, os.O_CREAT | os.O_WRONLY | os.O_EXCL) | 54 ld = os.open(pathname, os.O_CREAT | os.O_WRONLY | os.O_EXCL) |