hgext/keyword.py
branchstable
changeset 15387 87248de09135
parent 15354 42630f54e513
child 15871 07893690c435
equal deleted inserted replaced
15386:6051d8e7e133 15387:87248de09135
    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 re, shutil, tempfile
    89 import os, 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                                            util.realpath(source))
   650                                            os.path.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)