equal
deleted
inserted
replaced
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.hgweb import webcommands |
87 from mercurial.hgweb import webcommands |
87 from mercurial.i18n import _ |
88 from mercurial.i18n import _ |
88 import os, re, shutil, tempfile |
89 import os, re, shutil, tempfile |
89 |
90 |
90 commands.optionalrepo += ' kwdemo' |
91 commands.optionalrepo += ' kwdemo' |
617 '''Returns true if dest is a regular file and configured for |
618 '''Returns true if dest is a regular file and configured for |
618 expansion or a symlink which points to a file configured for |
619 expansion or a symlink which points to a file configured for |
619 expansion. ''' |
620 expansion. ''' |
620 source = repo.dirstate.copied(dest) |
621 source = repo.dirstate.copied(dest) |
621 if 'l' in wctx.flags(source): |
622 if 'l' in wctx.flags(source): |
622 source = util.canonpath(repo.root, cwd, |
623 source = scmutil.canonpath(repo.root, cwd, |
623 os.path.realpath(source)) |
624 os.path.realpath(source)) |
624 return kwt.match(source) |
625 return kwt.match(source) |
625 |
626 |
626 candidates = [f for f in repo.dirstate.copies() if |
627 candidates = [f for f in repo.dirstate.copies() if |
627 not 'l' in wctx.flags(f) and haskwsource(f)] |
628 not 'l' in wctx.flags(f) and haskwsource(f)] |
628 kwt.overwrite(wctx, candidates, False, False) |
629 kwt.overwrite(wctx, candidates, False, False) |