hgkw/keyword.py
changeset 997 5c25b505ffc1
parent 995 b78cce2b1430
child 998 cc54b798aca4
equal deleted inserted replaced
993:e50f10baa81a 997:5c25b505ffc1
    84 from mercurial import commands, context, cmdutil, dispatch, filelog, extensions
    84 from mercurial import commands, context, cmdutil, dispatch, filelog, extensions
    85 from mercurial import localrepo, match, patch, templatefilters, templater, util
    85 from mercurial import localrepo, match, patch, templatefilters, templater, util
    86 from mercurial import scmutil
    86 from mercurial import scmutil
    87 from mercurial.hgweb import webcommands
    87 from mercurial.hgweb import webcommands
    88 from mercurial.i18n import _
    88 from mercurial.i18n import _
    89 import os, re, shutil, tempfile
    89 import re, shutil, tempfile
    90 
    90 
    91 commands.optionalrepo += ' kwdemo'
    91 commands.optionalrepo += ' kwdemo'
    92 
    92 
    93 cmdtable = {}
    93 cmdtable = {}
    94 command = cmdutil.command(cmdtable)
    94 command = cmdutil.command(cmdtable)
   645             expansion or a symlink which points to a file configured for
   645             expansion or a symlink which points to a file configured for
   646             expansion. '''
   646             expansion. '''
   647             source = repo.dirstate.copied(dest)
   647             source = repo.dirstate.copied(dest)
   648             if 'l' in wctx.flags(source):
   648             if 'l' in wctx.flags(source):
   649                 source = scmutil.canonpath(repo.root, cwd,
   649                 source = scmutil.canonpath(repo.root, cwd,
   650                                            os.path.realpath(source))
   650                                            util.realpath(source))
   651             return kwt.match(source)
   651             return kwt.match(source)
   652 
   652 
   653         candidates = [f for f in repo.dirstate.copies() if
   653         candidates = [f for f in repo.dirstate.copies() if
   654                       not 'l' in wctx.flags(f) and haskwsource(f)]
   654                       not 'l' in wctx.flags(f) and haskwsource(f)]
   655         kwt.overwrite(wctx, candidates, False, False)
   655         kwt.overwrite(wctx, candidates, False, False)