extdiff: use absolute paths for any temporary files
authorjfh <jason@jasonfharris.com>
Mon, 21 Mar 2011 17:03:16 +0100
changeset 13758 5c0e1222e7c0
parent 13757 043238abda94
child 13759 49b818fd26d8
extdiff: use absolute paths for any temporary files This allows the use of p4merge amongst possible other external tools.
hgext/extdiff.py
--- a/hgext/extdiff.py	Fri Mar 25 01:38:47 2011 +0100
+++ b/hgext/extdiff.py	Mon Mar 21 17:03:16 2011 +0100
@@ -187,14 +187,14 @@
         # Handle bogus modifies correctly by checking if the files exist
         if len(common) == 1:
             common_file = util.localpath(common.pop())
-            dir1a = os.path.join(dir1a, common_file)
+            dir1a = os.path.join(tmproot, dir1a, common_file)
             label1a = common_file + rev1a
-            if not os.path.isfile(os.path.join(tmproot, dir1a)):
+            if not os.path.isfile(dir1a):
                 dir1a = os.devnull
             if do3way:
-                dir1b = os.path.join(dir1b, common_file)
+                dir1b = os.path.join(tmproot, dir1b, common_file)
                 label1b = common_file + rev1b
-                if not os.path.isfile(os.path.join(tmproot, dir1b)):
+                if not os.path.isfile(dir1b):
                     dir1b = os.devnull
             dir2 = os.path.join(dir2root, dir2, common_file)
             label2 = common_file + rev2