mercurial/dispatch.py
changeset 5997 637d4c089834
parent 5995 b913d3aacddc
child 6105 6480af8fd53c
--- a/mercurial/dispatch.py	Fri Feb 01 13:11:03 2008 -0800
+++ b/mercurial/dispatch.py	Fri Feb 01 13:31:46 2008 -0800
@@ -379,7 +379,8 @@
     def profile_fp():
         outfile = ui.config('profile', 'output', untrusted=True)
         if outfile:
-            return open(outfile, 'w')
+            pid = str(os.getpid())
+            return open(outfile.replace('%p', pid), 'w')
         else:
             return sys.stderr