"""Operations on trees with nested Mercurial repositories.
This extension provides commands that apply to a composite tree called
a forest. Some commands simply wrap standard Mercurial commands, such
as 'clone' or 'status', and others involve a snapshot file.
A snapshot file represents the state of a forest at a given time. It
has the format of a ConfigParser file and lists the trees in a forest,
each tree with the following attributes:
root path relative to the top-level tree
revision the revision the working directory is based on
paths a list of (alias, location) pairs
The 'fsnap' command generates or updates such a file based on a forest
in the file system. Other commands use this information to populate a
forest or to pull/push changes.
This extension recognizes the following item in the forest
walkhg = (0|no|false|1|yes|true)
Whether repositories directly under a .hg directory should be
skipped (0|no|false) or not (1|yes|true). The default value is true.
Some commands accept the --walkhg command-line option to override
the behavior selected by this item.
partial = (0|no|false|1|yes|true)
Whether fpull should default to partial. The default value is 0.
from mercurial import cmdutil, commands, error, hg, hgweb, node, util
from mercurial import localrepo, sshrepo, sshserver, httprepo, statichttprepo
from mercurial.i18n import gettext as _
def findcmd(ui, cmd, table, strict=True):
"""Find and execute mercurial.*.findcmd([ui,] cmd[, table, strict])."""
return findcmd.findcmd(cmd=cmd, table=table, strict=strict)
return findcmd.findcmd(ui=ui, cmd=cmd, table=table)
return findcmd.findcmd(ui, cmd)
findcmd.findcmd = cmdutil.findcmd
findcmd.__doc__ = cmdutil.findcmd.__doc__
findcmd.findcmd = commands.findcmd
findcmd.__doc__ = commands.findcmd.__doc__
for m in (error, cmdutil, commands):
if hasattr(m, "UnknownCommand"):
UnknownCommand = m.UnknownCommand
RepoError = mercurial.repo.RepoError
ParseError = mercurial.dispatch.ParseError
RepoError = mercurial.error.RepoError