81 {desc}" expands to the first line of the changeset description. |
81 {desc}" expands to the first line of the changeset description. |
82 ''' |
82 ''' |
83 |
83 |
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, pathutil |
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 os, re, shutil, tempfile |
90 |
90 |
91 commands.optionalrepo += ' kwdemo' |
91 commands.optionalrepo += ' kwdemo' |
674 '''Returns true if dest is a regular file and configured for |
674 '''Returns true if dest is a regular file and configured for |
675 expansion or a symlink which points to a file configured for |
675 expansion or a symlink which points to a file configured for |
676 expansion. ''' |
676 expansion. ''' |
677 source = repo.dirstate.copied(dest) |
677 source = repo.dirstate.copied(dest) |
678 if 'l' in wctx.flags(source): |
678 if 'l' in wctx.flags(source): |
679 source = scmutil.canonpath(repo.root, cwd, |
679 source = pathutil.canonpath(repo.root, cwd, |
680 os.path.realpath(source)) |
680 os.path.realpath(source)) |
681 return kwt.match(source) |
681 return kwt.match(source) |
682 |
682 |
683 candidates = [f for f in repo.dirstate.copies() if |
683 candidates = [f for f in repo.dirstate.copies() if |
684 'l' not in wctx.flags(f) and haskwsource(f)] |
684 'l' not in wctx.flags(f) and haskwsource(f)] |