--- a/mercurial/cmdutil.py Tue Dec 01 01:08:16 2009 +0100 +++ b/mercurial/cmdutil.py Tue Dec 01 01:43:46 2009 +0100 @@ -588,7 +588,7 @@ initfn() if opts['pid_file']: - fp = open(opts['pid_file'], 'a') + fp = open(opts['pid_file'], 'w') fp.write(str(os.getpid()) + '\n') fp.close()