changeset 11296:0054a328b98f

keyword: use context to detect uncommitted merge
author Christian Ebert <blacktrash@gmx.net>
date Thu, 03 Jun 2010 10:37:31 +0100
parents 07e425d63dbd
children d320e70442a5
files hgext/keyword.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/keyword.py	Thu Jun 03 13:58:00 2010 +0200
+++ b/hgext/keyword.py	Thu Jun 03 10:37:31 2010 +0100
@@ -81,7 +81,6 @@
 from mercurial import commands, cmdutil, dispatch, filelog, revlog, extensions
 from mercurial import patch, localrepo, templater, templatefilters, util, match
 from mercurial.hgweb import webcommands
-from mercurial.node import nullid
 from mercurial.i18n import _
 import re, shutil, tempfile
 
@@ -287,7 +286,7 @@
 
 def _kwfwrite(ui, repo, expand, *pats, **opts):
     '''Selects files and passes them to kwtemplater.overwrite.'''
-    if repo.dirstate.parents()[1] != nullid:
+    if len(repo[None].parents()) > 1:
         raise util.Abort(_('outstanding uncommitted merge'))
     kwt = kwtools['templater']
     wlock = repo.wlock()