diff mercurial/patch.py @ 6740:b148e9099133

use repo.changectx(None) to get a workingctx
author Matt Mackall <mpm@selenic.com>
date Thu, 26 Jun 2008 13:46:29 -0500
parents 336fda65759a
children 86e8187b721a
line wrap: on
line diff
--- a/mercurial/patch.py	Wed Jun 25 17:35:20 2008 -0500
+++ b/mercurial/patch.py	Thu Jun 26 13:46:29 2008 -0500
@@ -1192,12 +1192,11 @@
     if not modified and not added and not removed:
         return
 
+    ctx2 = repo.changectx(node2)
     if node2:
-        ctx2 = repo.changectx(node2)
         execf2 = ctx2.manifest().execf
         linkf2 = ctx2.manifest().linkf
     else:
-        ctx2 = repo.workingctx()
         execf2 = util.execfunc(repo.root, None)
         linkf2 = util.linkfunc(repo.root, None)
         if execf2 is None: