hgkw/keyword.py
changeset 240 fb234089cc4c
parent 237 0a0049700af5
child 242 71056c5042de
--- a/hgkw/keyword.py	Mon Sep 03 06:11:07 2007 +0200
+++ b/hgkw/keyword.py	Fri Sep 14 22:34:47 2007 +0100
@@ -83,7 +83,7 @@
 from mercurial import commands, cmdutil, context, fancyopts, filelog
 from mercurial import localrepo, templater, util, hg
 from mercurial.i18n import gettext as _
-import getopt, re, shutil, sys, tempfile, time
+import getopt, os, re, shutil, sys, tempfile, time
 
 # backwards compatibility hacks
 
@@ -334,6 +334,9 @@
             ui.warn(_('no files configured for keyword expansion\n'))
             return
         man = ctx.manifest()
+        if files:
+            cwd = os.getcwd()
+            files = [util.canonpath(repo.root, cwd, f) for f in files]
         files = _weedcandidates(man, kwfmatcher, files)
         if not files:
             ui.warn(_('files not configured for expansion or untracked\n'))