Module Expr Str Assign NameStore TupleLoad Num Num Num Assign NameStore Call AttributeLoad Str attr Call NameLoad NameLoad NameLoad Import alias Import alias ImportFrom alias alias alias alias alias alias alias ImportFrom alias ImportFrom alias Import alias Import alias Import alias Import alias Import alias Assign NameStore Call AttributeLoad NameLoad attr Str ClassDef bases NameLoad body Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore BoolOpOr BoolOpAnd NameLoad Str Str If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad Str Str Str BinOpMod Str NameLoad BinOpMod Str NameLoad BinOpMod Str NameLoad BinOpMod Str NameLoad For NameStore NameLoad body If Call NameLoad NameLoad body Assign NameStore ListLoad NameLoad Break orelse Raise Call NameLoad BinOpMod Str Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Num Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Assign TupleStore NameStore NameStore SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad NameLoad If UnaryOpNot NameLoad body Assign NameStore Call NameLoad BinOpMod Str NameLoad keyword Str Print Str If CompareNotEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Str Return Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore Str Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Index Str If CompareNotEq NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Index Str If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad keyword Str Print Str If CompareNotEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Str Return Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Index Str If CompareEq Call AttributeLoad NameLoad attr Str body Raise Call NameLoad Str Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str Num If BoolOpAnd UnaryOpNot NameLoad CompareNotEq NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore Call NameLoad GeneratorExp NameLoad comprehension NameStore Call AttributeLoad Call NameLoad ListLoad Str Str Str attr Str NameLoad If BoolOpAnd UnaryOpNot NameLoad CompareNotIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call NameLoad Str If Call NameLoad Str body Assign NameStore Call NameLoad Str keyword Str Print Str If CompareEq NameLoad Str body If NameLoad body Expr Call AttributeLoad NameLoad attr Str orelse Expr Call NameLoad Str orelse If Call NameLoad Str body Assign NameStore Call NameLoad Str keyword Str Print Str If CompareEq NameLoad Str body If NameLoad body Expr Call AttributeLoad NameLoad attr Str orelse Expr Call NameLoad BinOpMod Str Call NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore BinOpAdd Str SubscriptLoad SubscriptLoad NameLoad Index Num Index Str If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore SubscriptLoad NameLoad Slice Num UnaryOpUSub Call NameLoad NameLoad If CompareNotIn NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore BinOpMod Str TupleLoad SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Num Index Num NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str BinOpMod Str TupleLoad NameLoad NameLoad If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad Str Str attr Assign TupleStore NameStore NameStore SubscriptLoad NameLoad Index NameLoad If CompareEq NameLoad Str body Assign NameStore BinOpMod Str NameLoad If CompareNotIn NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpMod Str NameLoad orelse If CompareEq NameLoad Str body Assign NameStore BinOpMod Str NameLoad If CompareNotIn NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpMod Str NameLoad orelse If CompareEq NameLoad Str body Assign NameStore BinOpMod Str TupleLoad NameLoad If CompareNotIn NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore NameLoad orelse Raise Call NameLoad BinOpMod Str NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Expr Call NameLoad BinOpMod Str TupleLoad NameLoad Call AttributeLoad Str attr NameLoad Expr Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Return BinOpAdd NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam defaults body TryExcept body Return Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Return NameLoad decorator_list Return Call NameLoad GeneratorExp Call NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad SubscriptLoad NameLoad Slice AugAssignAdd SubscriptStore NameLoad Index Num Num Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore NameLoad For NameStore SubscriptLoad NameLoad Slice Num body If NameLoad body TryExcept body Expr Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad orelse Pass If NameLoad body AugAssignAdd NameStore BinOpAdd Str Call NameLoad NameLoad orelse AugAssignAdd NameStore Call NameLoad NameLoad Return NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr body If CompareIs NameLoad NameLoad body Break TryExcept body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Dict Str Str If CompareIn NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad Call NameLoad NameLoad Index Num If CompareEq NameLoad Str body Assign NameStore Str orelse If CompareEq NameLoad Str body Assign NameStore Str orelse If CompareEq NameLoad Str body Assign NameStore Str orelse If Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad For TupleStore NameStore NameStore Call AttributeLoad Dict Str Str Str Str attr body If CompareIn NameLoad NameLoad body Assign NameStore NameLoad Break orelse If CompareIn NameLoad TupleLoad Str Str body Assign NameStore Str If UnaryOpNot NameLoad body Raise Call NameLoad BinOpMod Str NameLoad If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Num orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Num orelse If CompareEq NameLoad Str body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr orelse Raise Call NameLoad BinOpMod Str NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad Str Str attr Assign NameStore Call AttributeLoad NameLoad attr Str BinOpBitOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Assign NameStore Str Raise Call NameLoad BinOpMod Str TupleLoad NameLoad Call NameLoad NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Index Num Assign NameStore Str Assign NameStore ListLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore Dict Str Str SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num If CompareEq NameLoad Num body Assign NameStore SubscriptLoad NameLoad Index Num If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore SubscriptLoad NameLoad Slice Num UnaryOpUSub Call NameLoad NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num TryExcept body Expr Call NameLoad SubscriptLoad NameLoad Index Num handlers ExceptHandler type NameLoad body Assign NameStore Str If Call AttributeLoad NameLoad attr Str body Assign NameStore BinOpMod Str NameLoad Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str If CompareEq NameLoad NameLoad body Assign NameStore Str orelse If CompareEq NameLoad Str body Assign NameStore Str orelse If CompareEq NameLoad Str body Assign NameStore Str orelse Raise Call NameLoad BinOpMod Str NameLoad While Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd NameLoad NameLoad Assign NameStore Call AttributeLoad Call NameLoad attr If BoolOpAnd CompareIsNot NameLoad NameLoad CompareEq NameLoad Str body Return NameLoad orelse If CompareIn NameLoad Call AttributeLoad NameLoad attr body Return SubscriptLoad NameLoad Index NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Import alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Return SubscriptLoad Call AttributeLoad NameLoad attr Index Num decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam defaults body Return BoolOpOr NameLoad Str decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore NameLoad If BoolOpAnd CompareEq AttributeLoad NameLoad attr Str CompareGt Call AttributeLoad NameLoad attr Str Num body Assign NameStore BinOpAdd BinOpAdd Str NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore NameLoad If NameLoad body Raise Call NameLoad NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword BinOpAdd Str NameLoad keyword NameLoad keyword Call NameLoad Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Call NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body TryExcept body Assign NameStore Call NameLoad AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Num ExceptHandler type NameLoad body Raise ExceptHandler body Import alias alias If BoolOpAnd UnaryOpNot AttributeLoad NameLoad attr UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr If Call NameLoad SubscriptLoad NameLoad Index Num Str body Assign TupleStore NameStore NameStore NameStore NameLoad If BoolOpAnd Call NameLoad NameLoad NameLoad CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Num Num body Assign NameStore NameLoad If UnaryOpNot NameLoad body Assign TupleStore NameStore NameStore NameStore SubscriptLoad SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Index Num Slice Num Expr Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Num NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num If UnaryOpNot NameLoad body If Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num orelse Expr Call AttributeLoad NameLoad attr NameLoad
N/A N/A cutarelease -- Cut a release of your project.

A script that will help cut a release for a git-based project that follows
a few conventions. It'll update your changelog (CHANGES.md), add a git
tag, push those changes, update your version to the next patch level release
and create a new changelog section for that new version.

Conventions:
- XXX
 N/A __version_info__ N/A 1 0 7 N/A __version__ N/A N/A . join N/A map str __version_info__ N/A sys N/A os os.path join dirname normpath abspath exists basename splitext glob glob pprint pprint N/A re N/A codecs N/A logging N/A optparse N/A json N/A log N/A N/A logging getLogger cutarelease Error N/A Exception N/A N/A N/A cutarelease N/A N/A project_name version_files dry_run N/A False N/A N/A Cut a release.

    @param project_name {str}
    @param version_files {list} List of paths to files holding the version
        info for this project.

        If none are given it attempts to guess the version file:
        package.json or VERSION.txt or VERSION or $project_name.py
        or lib/$project_name.py or $project_name.js or lib/$project_name.js.

        The version file can be in one of the following forms:

        - A .py file, in which case the file is expect to have a top-level
          global called "__version_info__" as follows. [1]

            __version_info__ = (0, 7, 6)

          Note that I typically follow that with the following to get a
          string version attribute on my modules:

            __version__ = '.'.join(map(str, __version_info__))

        - A .js file, in which case the file is expected to have a top-level
          global called "VERSION" as follows:

            ver VERSION = "1.2.3";

        - A "package.json" file, typical of a node.js npm-using project.
          The package.json file must have a "version" field.

        - TODO: A simple version file whose only content is a "1.2.3"-style version
          string.

    [1]: This is a convention I tend to follow in my projects.
        Granted it might not be your cup of tea. I should add support for
        just `__version__ = "1.2.3"`. I'm open to other suggestions too.
     N/A dry_run_str N/A N/A dry_run  (dry-run) N/A N/A version_files N/A N/A N/A N/A log info guessing version file N/A candidates N/A package.json VERSION.txt VERSION N/A %s.py project_name N/A lib/%s.py project_name N/A %s.js project_name N/A lib/%s.js project_name N/A candidate candidates N/A N/A N/A exists candidate N/A N/A version_files N/A candidate N/A N/A N/A N/A Error N/A could not find a version file: specify its path or add one of the following to your project: '%s' N/A N/A ', ' join candidates N/A N/A N/A log info using '%s' as version file N/A version_files N/A 0 N/A parsed_version_files N/A N/A _parse_version_file f N/A f version_files N/A N/A version_file_type version_info N/A parsed_version_files N/A 0 N/A version N/A _version_from_version_info version_info N/A N/A dry_run N/A N/A answer N/A query_yes_no N/A * * *
Are you sure you want cut a %s release?
This will involved commits and a push. version default no N/A * * * N/A N/A answer yes N/A N/A N/A N/A log info user abort N/A N/A N/A N/A log info cutting a %s release%s version dry_run_str N/A changes_path CHANGES.md N/A N/A changes_txt changes nyr N/A parse_changelog changes_path N/A top_ver N/A N/A changes N/A 0 N/A version N/A N/A top_ver version N/A N/A N/A Error N/A changelog '%s' top section says version %r, expected version %r: aborting N/A changes_path top_ver version N/A top_verline N/A N/A changes N/A 0 N/A verline N/A N/A N/A N/A top_verline endswith nyr N/A N/A answer N/A query_yes_no N/A 
* * *
The changelog '%s' top section doesn't have the expected
'%s' marker. Has this been released already? N/A changes_path nyr default yes N/A * * * N/A N/A answer no N/A N/A N/A N/A log info abort N/A N/A top_body N/A N/A changes N/A 0 N/A body N/A N/A N/A N/A top_body strip (nothing yet) N/A N/A N/A Error top section body is `(nothing yet)': it looks like nothing has been added to this release N/A changes_txt_before changes_txt N/A changes_txt N/A N/A changes_txt replace  (not yet released) 1 N/A N/A N/A dry_run N/A changes_txt changes_txt_before N/A N/A N/A N/A log info prepare `%s' for release changes_path N/A f N/A N/A codecs open changes_path w utf-8 N/A N/A N/A f write changes_txt N/A N/A N/A f close N/A N/A run N/A git commit %s -m "prepare for %s release" N/A changes_path version N/A curr_tags N/A set N/A t N/A t N/A N/A N/A _capture_stdout N/A git tag -l split t N/A N/A N/A dry_run N/A version curr_tags N/A N/A N/A N/A log info tag the release N/A N/A run N/A git tag -a "%s" -m "version %s" N/A version version N/A N/A run git push --tags N/A N/A exists package.json N/A N/A answer N/A query_yes_no 
* * *
Publish to npm? default yes N/A * * * N/A N/A answer yes N/A N/A dry_run N/A N/A N/A N/A log info skipping npm publish (dry-run) N/A N/A N/A run npm publish N/A N/A N/A exists setup.py N/A N/A answer N/A query_yes_no 
* * *
Publish to pypi? default yes N/A * * * N/A N/A answer yes N/A N/A dry_run N/A N/A N/A N/A log info skipping pypi publish (dry-run) N/A N/A N/A run N/A %spython setup.py sdist --formats zip upload N/A _setup_command_prefix N/A next_version_info N/A _get_next_version_info version_info N/A next_version N/A _version_from_version_info next_version_info N/A N/A N/A log info prepare for future dev (version %s) next_version N/A marker N/A ##  N/A N/A changes N/A 0 N/A verline N/A N/A N/A marker endswith nyr N/A N/A marker N/A marker N/A 0 N/A N/A len nyr N/A N/A marker changes_txt N/A N/A N/A Error N/A couldn't find `%s' marker in `%s' content: can't prep for subsequent dev N/A marker changes_path N/A next_verline N/A %s %s%s N/A N/A N/A N/A marker rsplit None 1 N/A 0 next_version nyr N/A changes_txt N/A N/A changes_txt replace N/A marker N/A %s

(nothing yet)


%s
 N/A next_verline marker N/A N/A dry_run N/A N/A f N/A N/A codecs open changes_path w utf-8 N/A N/A N/A f write changes_txt N/A N/A N/A f close N/A next_version_tuple N/A _tuple_from_version next_version N/A N/A i ver_file N/A enumerate version_files N/A N/A ver_content N/A N/A N/A N/A codecs open ver_file r utf-8 read N/A N/A ver_file_type ver_info N/A parsed_version_files N/A i N/A N/A ver_file_type json N/A N/A marker N/A "version": "%s" version N/A N/A marker ver_content N/A N/A N/A Error N/A couldn't find `%s' version marker in `%s' content: can't prep for subsequent dev N/A marker ver_file N/A ver_content N/A N/A ver_content replace marker N/A "version": "%s" next_version N/A N/A N/A ver_file_type javascript N/A N/A marker N/A var VERSION = "%s"; version N/A N/A marker ver_content N/A N/A N/A Error N/A couldn't find `%s' version marker in `%s' content: can't prep for subsequent dev N/A marker ver_file N/A ver_content N/A N/A ver_content replace marker N/A var VERSION = "%s"; next_version N/A N/A N/A ver_file_type python N/A N/A marker N/A __version_info__ = %r N/A version_info N/A N/A marker ver_content N/A N/A N/A Error N/A couldn't find `%s' version marker in `%s' content: can't prep for subsequent dev N/A marker ver_file N/A ver_content N/A N/A ver_content replace marker N/A __version_info__ = %r N/A next_version_tuple N/A N/A N/A ver_file_type version N/A N/A ver_content next_version N/A N/A N/A Error N/A unknown ver_file_type: %r ver_file_type N/A N/A dry_run N/A N/A N/A N/A log info update version to '%s' in '%s' next_version ver_file N/A f N/A N/A codecs open ver_file w utf-8 N/A N/A N/A f write ver_content N/A N/A N/A f close N/A N/A dry_run N/A N/A N/A run N/A git commit %s %s -m "prep for future dev" N/A changes_path N/A N/A join version_files N/A N/A run git push N/A _indent N/A N/A s indent N/A N/A N/A N/A indent N/A N/A indent join N/A N/A s splitlines True N/A _tuple_from_version N/A N/A version N/A N/A _intify N/A N/A s N/A N/A N/A N/A N/A N/A int s N/A N/A N/A ValueError N/A N/A s N/A N/A N/A tuple N/A N/A _intify b N/A b N/A N/A version split . N/A _get_next_version_info N/A N/A version_info N/A N/A N/A next N/A list N/A version_info N/A N/A N/A next N/A -1 1 N/A N/A tuple next N/A _version_from_version_info N/A N/A version_info N/A N/A N/A v N/A str N/A version_info N/A 0 N/A state_dot_join True N/A i N/A version_info N/A 1 N/A N/A state_dot_join N/A N/A N/A N/A N/A int i N/A N/A N/A ValueError N/A N/A state_dot_join False N/A N/A N/A state_dot_join N/A N/A v N/A . N/A str i N/A N/A v N/A str i N/A v N/A N/A _version_re N/A N/A re compile ^(\d+)\.(\d+)(?:\.(\d+)([abc](\d+)?)?)?$ _version_info_from_version N/A N/A version N/A N/A N/A m N/A N/A _version_re match version N/A N/A m N/A N/A N/A Error N/A could not convert '%s' version to version info version N/A version_info N/A N/A g N/A N/A m groups N/A N/A N/A g None N/A N/A N/A N/A N/A N/A N/A version_info append N/A int g N/A N/A N/A ValueError N/A N/A N/A N/A version_info append g N/A N/A tuple version_info N/A _parse_version_file N/A N/A version_file N/A N/A N/A Get version info from the given file. It can be any of:

    Supported version file types (i.e. types of files from which we know
    how to parse the version string/number -- often by some convention):
    - json: use the "version" key
    - javascript: look for a `var VERSION = "1.2.3";`
    - python: Python script/module with `__version_info__ = (1, 2, 3)`
    - version: a VERSION.txt or VERSION file where the whole contents are
      the version string

    @param version_file {str} Can be a path or "type:path", where "type"
        is one of the supported types.
     N/A version_file_type None N/A match N/A N/A N/A N/A re compile ^([a-z]+):(.*)$ search version_file N/A match N/A N/A version_file N/A N/A match group 2 N/A version_file_type N/A N/A match group 1 N/A aliases N/A js javascript N/A N/A version_file_type aliases N/A N/A version_file_type N/A aliases N/A version_file_type N/A f N/A N/A codecs open version_file r utf-8 N/A content N/A N/A f read N/A N/A N/A f close N/A N/A version_file_type N/A N/A base N/A basename version_file N/A ext N/A N/A splitext base N/A 1 N/A N/A ext .json N/A N/A version_file_type json N/A N/A N/A ext .py N/A N/A version_file_type python N/A N/A N/A ext .js N/A N/A version_file_type javascript N/A N/A N/A N/A content startswith #! N/A N/A shebang N/A N/A N/A content splitlines False N/A 0 N/A shebang_bits N/A N/A re split [/ \t] shebang N/A N/A name typ N/A N/A N/A python node python javascript items N/A N/A N/A name shebang_bits N/A N/A version_file_type typ N/A N/A N/A N/A base N/A VERSION VERSION.txt N/A N/A version_file_type version N/A N/A version_file_type N/A N/A N/A RuntimeError N/A can't extract version from '%s': no idea what type of file it it version_file N/A N/A version_file_type json N/A N/A obj N/A N/A json loads content N/A version_info N/A _version_info_from_version N/A obj N/A version N/A N/A N/A version_file_type python N/A N/A m N/A N/A re search ^__version_info__ = (.*?)$ content N/A re M N/A version_info N/A eval N/A N/A m group 1 N/A N/A N/A version_file_type javascript N/A N/A m N/A N/A re search ^var VERSION = "(.*?)";$ content N/A re M N/A version_info N/A _version_info_from_version N/A N/A m group 1 N/A N/A N/A version_file_type version N/A N/A version_info N/A _version_info_from_version N/A N/A content strip N/A N/A N/A RuntimeError N/A unexpected version_file_type: %r version_file_type N/A N/A version_file_type version_info N/A parse_changelog N/A N/A changes_path N/A N/A N/A Parse the given changelog path and return `(content, parsed, nyr)`
    where `nyr` is the ' (not yet released)' marker and `parsed` looks like:

        [{'body': u'
(nothing yet)

',
          'verline': u'restify 1.0.1 (not yet released)',
          'version': u'1.0.1'},    # version is parsed out for top section only
         {'body': u'...',
          'verline': u'1.0.0'},
         {'body': u'...',
          'verline': u'1.0.0-rc2'},
         {'body': u'...',
          'verline': u'1.0.0-rc1'}]

    A changelog (CHANGES.md) is expected to look like this:

        # $project Changelog

        ## $next_version (not yet released)

        ...

        ## $version1

        ...

        ## $version2

        ... and so on

    The version lines are enforced as follows:

    - The top entry should have a " (not yet released)" suffix. "Should"
      because recovery from half-cutarelease failures is supported.
    - A version string must be extractable from there, but it tries to
      be loose (though strict "X.Y.Z" versioning is preferred). Allowed

            ## 1.0.0
            ## my project 1.0.1
            ## foo 1.2.3-rc2

      Basically, (a) the " (not yet released)" is stripped, (b) the
      last token is the version, and (c) that version must start with
      a digit (sanity check).
     N/A N/A N/A exists changes_path N/A N/A N/A Error N/A changelog file '%s' not found changes_path N/A content N/A N/A N/A N/A codecs open changes_path r utf-8 read N/A parser N/A N/A re compile ^##\s*(?P<verline>[^\n]*?)\s*$(?P<body>.*?)(?=^##|\Z) N/A N/A re M N/A re S N/A sections N/A N/A parser findall content N/A N/A sections N/A N/A template ## 1.0.0 (not yet released)

(nothing yet)
 N/A N/A Error N/A changelog '%s' must have at least one section, suggestion:

%s N/A changes_path N/A _indent template N/A first_section_verline N/A N/A sections N/A 0 N/A 0 N/A nyr  (not yet released) N/A items N/A N/A N/A i section N/A enumerate sections N/A N/A item N/A verline body N/A section N/A 0 N/A section N/A 1 N/A N/A i 0 N/A N/A verline N/A section N/A 0 N/A N/A N/A verline endswith nyr N/A N/A verline N/A verline N/A 0 N/A N/A len nyr N/A version N/A N/A N/A verline split N/A -1 N/A N/A N/A N/A int N/A version N/A 0 N/A N/A N/A ValueError N/A N/A msg N/A N/A N/A version endswith ) N/A N/A msg N/A  (cutarelease is picky about the trailing %r on the top version line. Perhaps you misspelled that?) nyr N/A N/A Error N/A changelog '%s' top section version '%s' is invalid: first char isn't a number%s N/A changes_path version msg N/A N/A item N/A version version N/A N/A N/A items append item N/A N/A content items nyr N/A query_yes_no N/A N/A question default N/A yes N/A N/A Ask a yes/no question via raw_input() and return their answer.

    "question" is a string that is presented to the user.
    "default" is the presumed answer if the user just hits <Enter>.
        It must be "yes" (the default), "no" or None (meaning
        an answer is required of the user).

    The "answer" return value is one of "yes" or "no".
     N/A valid N/A yes y ye no n yes yes yes no no N/A N/A default None N/A N/A prompt  [y/n]  N/A N/A N/A default yes N/A N/A prompt  [Y/n]  N/A N/A N/A default no N/A N/A prompt  [y/N]  N/A N/A N/A ValueError N/A invalid default answer: '%s' default N/A 1 N/A N/A N/A N/A N/A sys stdout write N/A question prompt N/A choice N/A N/A N/A raw_input lower N/A N/A N/A default None N/A choice N/A N/A default N/A N/A N/A choice N/A N/A valid keys N/A N/A N/A valid N/A choice N/A N/A N/A N/A N/A sys stdout write Please respond with 'yes' or 'no' (or 'y' or 'n').
 N/A _capture_stdout N/A N/A argv N/A N/A N/A subprocess N/A p N/A N/A subprocess Popen argv stdout N/A subprocess PIPE N/A N/A N/A N/A p communicate N/A 0 N/A _NoReflowFormatter N/A N/A optparse IndentedHelpFormatter N/A N/A An optparse formatter that does NOT reflow the description. format_description N/A N/A self description N/A N/A N/A N/A description N/A N/A run N/A N/A cmd N/A N/A N/A Run the given command.

    Raises OSError is the command returns a non-zero exit status.
     N/A N/A N/A log debug running '%s' cmd N/A fixed_cmd cmd N/A N/A N/A N/A sys platform win32 N/A N/A N/A cmd count " 2 N/A N/A fixed_cmd N/A N/A " cmd " N/A retval N/A N/A os system fixed_cmd N/A N/A hasattr os WEXITSTATUS N/A N/A status N/A N/A os WEXITSTATUS retval N/A N/A status retval N/A status N/A N/A N/A OSError status N/A error running '%s' cmd N/A _setup_command_prefix N/A N/A N/A N/A N/A prefix N/A N/A N/A sys platform darwin N/A N/A prefix COPY_EXTENDED_ATTRIBUTES_DISABLE=1  N/A prefix N/A main N/A N/A argv N/A N/A N/A N/A N/A logging basicConfig format %(name)s: %(levelname)s: %(message)s N/A N/A N/A log setLevel N/A logging INFO N/A parser N/A N/A optparse OptionParser prog cutarelease usage version N/A %prog  __version__ description __doc__ formatter N/A _NoReflowFormatter N/A N/A N/A parser add_option -v --verbose dest log_level action store_const const N/A logging DEBUG help more verbose output N/A N/A N/A parser add_option -q --quiet dest log_level action store_const const N/A logging WARNING help quieter output (just warnings and errors) N/A N/A N/A parser set_default log_level N/A logging INFO N/A N/A N/A parser add_option --test action store_true help run self-test and exit (use 'eol.py -v --test' for verbose test output) N/A N/A N/A parser add_option -p --project-name metavar NAME help the name of this project (default is the base dir name) default N/A basename N/A N/A os getcwd N/A N/A N/A parser add_option -f --version-file metavar [TYPE:]PATH action append dest version_files help The path to the project file holding the version info. Can be specified multiple times if more than one file should be updated with new version info. If excluded, it will be guessed. N/A N/A N/A parser add_option -n --dry-run action store_true help Do a dry-run default False N/A N/A opts args N/A N/A parser parse_args N/A N/A N/A log setLevel N/A opts log_level N/A N/A cutarelease N/A opts project_name N/A opts version_files dry_run N/A opts dry_run N/A N/A N/A __name__ __main__ N/A N/A N/A N/A retval N/A main N/A sys argv N/A N/A N/A KeyboardInterrupt N/A N/A N/A N/A sys exit 1 N/A N/A SystemExit N/A N/A N/A N/A N/A traceback logging N/A N/A N/A N/A log handlers N/A N/A N/A logging root handlers N/A N/A N/A N/A logging basicConfig N/A skip_it False N/A exc_info N/A N/A sys exc_info N/A N/A hasattr N/A exc_info N/A 0 __name__ N/A N/A N/A exc_class exc tb exc_info N/A N/A N/A isinstance exc IOError N/A N/A N/A exc args N/A 0 32 N/A N/A skip_it True N/A N/A skip_it N/A N/A N/A tb_path tb_lineno tb_func N/A N/A N/A N/A traceback extract_tb tb N/A -1 N/A 3 N/A N/A N/A log error %s (%s:%s in %s) N/A exc_info N/A 1 tb_path tb_lineno tb_func N/A N/A N/A N/A log error N/A exc_info N/A 0 N/A N/A skip_it N/A N/A N/A N/A log isEnabledFor N/A logging DEBUG N/A N/A N/A N/A traceback print_exception exc_info N/A N/A N/A sys exit 1 N/A N/A N/A N/A sys exit retval