Module Expr Str ImportFrom alias Import alias Import alias Import alias Import alias ImportFrom alias alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Str orelse Assign NameStore Str FunctionDef arguments args defaults body Expr Str Return Call SubscriptLoad NameLoad Index Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Dict Str Str Str Str NameLoad NameLoad Str Dict If UnaryOpNot NameLoad body Return Call NameLoad NameLoad Str Assign NameStore BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr NameLoad If NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad orelse If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Return NameLoad orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad If SubscriptLoad NameLoad Index Str body Return Call NameLoad NameLoad Call AttributeLoad Str attr NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad keyword Str If UnaryOpNot NameLoad body Return Call NameLoad NameLoad Call AttributeLoad Str attr NameLoad If SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Return Call NameLoad NameLoad NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If NameLoad body Expr Call SubscriptLoad NameLoad Index Str NameLoad NameLoad keyword NameLoad keyword NameLoad orelse Expr Call SubscriptLoad NameLoad Index Str NameLoad Str keyword NameLoad keyword NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str keyword NameLoad keyword NameLoad keyword Str If CompareNotEq NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index Str Index Str NameLoad orelse If CompareIn Str NameLoad body Return Call NameLoad NameLoad Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse Return Call NameLoad NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Return Call NameLoad NameLoad NameLoad If NameLoad body Expr Call SubscriptLoad NameLoad Index Str NameLoad NameLoad keyword NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index Str Index Str NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index Str Index Str NameLoad Return NameLoad decorator_list
N/A N/A 
Interaction with Mercurial repositories
=======================================

Before using hg over ssh, make sure the remote host fingerprint already exists
in ~/.ssh/known_hosts, and the remote host has this host's public key.

.. code-block:: yaml

    https://bitbucket.org/example_user/example_repo:
        hg.latest:
          - rev: tip
          - target: /tmp/example_repo
 __future__ absolute_import N/A logging N/A os N/A shutil N/A salt.utils salt.states.git _fail _neutral_test N/A log N/A N/A logging getLogger __name__ N/A N/A N/A N/A salt utils is_windows N/A N/A HG_BINARY hg.exe N/A N/A HG_BINARY hg __virtual__ N/A N/A N/A N/A N/A 
    Only load if hg is available
     N/A N/A N/A __salt__ N/A cmd.has_exec HG_BINARY N/A latest N/A N/A name rev target clean user identity force opts N/A None None False None None False False N/A N/A 
    Make sure the repository is cloned to the given directory and is up to date

    name
        Address of the remote repository as passed to "hg clone"

    rev
        The remote branch, tag, or revision hash to clone/pull

    target
        Target destination directory path on minion to clone into

    clean
        Force a clean update with -C (Default: False)

    user
        Name of the user performing repository management operations

        .. versionadded:: 0.17.0

    identity
        Private SSH key on the minion server for authentication (ssh://)

        .. versionadded:: 2015.5.0

    force
        Force hg to clone into pre-existing directories (deletes contents)

    opts
        Include additional arguments and options to the hg command line
     N/A ret N/A name result comment changes name True N/A N/A N/A target N/A N/A N/A _fail ret "target option is required N/A is_repository N/A N/A N/A N/A os path isdir target N/A N/A N/A os path isdir N/A N/A {0}/.hg format target N/A is_repository N/A N/A ret N/A _update_repo ret name target clean user identity rev opts N/A N/A N/A N/A N/A os path isdir target N/A N/A fail N/A _handle_existing ret target force N/A N/A fail None N/A N/A fail N/A N/A N/A N/A log debug N/A N/A target {0} is not found, "hg clone" is required format target N/A N/A __opts__ N/A test N/A N/A N/A _neutral_test ret N/A N/A Repository {0} is about to be cloned to {1} format name target N/A N/A _clone_repo ret target name user identity rev opts N/A ret N/A _update_repo N/A N/A ret name target clean user identity rev opts N/A N/A N/A 
    Update the repo to a given revision. Using clean passes -C to the hg up
     N/A N/A N/A log debug N/A N/A target {0} is found, "hg pull && hg up is probably required" format target N/A current_rev N/A N/A __salt__ N/A hg.revision target user user rev . N/A N/A current_rev N/A N/A N/A _fail ret N/A N/A Seems that {0} is not a valid hg repo format target N/A N/A __opts__ N/A test N/A N/A test_result N/A N/A Repository {0} update is probably required (current revision is {1}) format target current_rev N/A N/A _neutral_test ret test_result N/A pull_out N/A N/A __salt__ N/A hg.pull target user user identity identity opts opts repository name N/A rev N/A N/A N/A N/A __salt__ N/A hg.update target rev force clean user user N/A N/A N/A N/A __salt__ N/A hg.update target tip force clean user user N/A new_rev N/A N/A __salt__ N/A hg.revision cwd target user user rev . N/A N/A current_rev new_rev N/A N/A revision_text N/A N/A {0} => {1} format current_rev new_rev N/A N/A N/A log info N/A N/A Repository {0} updated: {1} format target revision_text N/A N/A ret N/A comment N/A N/A Repository {0} updated. format target N/A N/A N/A ret N/A changes N/A revision revision_text N/A N/A N/A error: pull_out N/A N/A N/A _fail ret N/A N/A An error was thrown by hg:
{0} format pull_out N/A ret N/A _handle_existing N/A N/A ret target force N/A N/A N/A not_empty N/A N/A os listdir target N/A N/A not_empty N/A N/A N/A N/A log debug N/A N/A target {0} found, but directory is empty, automatically deleting format target N/A N/A N/A shutil rmtree target N/A N/A force N/A N/A N/A N/A log debug N/A N/A target {0} found and is not empty. Since force option is in use, deleting anyway. format target N/A N/A N/A shutil rmtree target N/A N/A N/A _fail ret Directory exists, and is not empty N/A _clone_repo N/A N/A ret target name user identity rev opts N/A N/A N/A result N/A N/A __salt__ N/A hg.clone target name user user identity identity opts opts N/A N/A N/A N/A N/A os path isdir target N/A N/A N/A _fail ret result N/A rev N/A N/A N/A N/A __salt__ N/A hg.update target rev user user N/A new_rev N/A N/A __salt__ N/A hg.revision cwd target user user N/A message N/A N/A Repository {0} cloned to {1} format name target N/A N/A N/A log info message N/A N/A ret N/A comment message N/A N/A N/A ret N/A changes N/A new name N/A N/A N/A ret N/A changes N/A revision new_rev N/A ret N/A