##// END OF EJS Templates
patch: make extract() a context manager (API)...
patch: make extract() a context manager (API) Previously, this function was creating a temporary file and relying on callers to unlink it. Yuck. We convert the function to a context manager and tie the lifetime of the temporary file to that of the context manager. This changed indentation not only from the context manager, but also from the elination of try blocks. It was just easier to split the heart of extract() into its own function. The single consumer of this function has been refactored to use it as a context manager. Code for cleaning up the file in tryimportone() has also been removed. .. api:: ``patch.extract()`` is now a context manager. Callers no longer have to worry about deleting the temporary file it creates, as the file is tied to the lifetime of the context manager. Differential Revision: https://phab.mercurial-scm.org/D3306
Gregory Szorc -
r37639:5537d8f5 default
Show More
Name Size Modified Last Commit Author
contrib
doc
hgdemandimport
hgext
hgext3rd
i18n
mercurial
rust
tests
.arcconfig Loading ...
.clang-format Loading ...
.editorconfig Loading ...
.hgignore Loading ...
.hgsigs Loading ...
.hgtags Loading ...
.jshintrc Loading ...
CONTRIBUTING Loading ...
CONTRIBUTORS Loading ...
COPYING Loading ...
Makefile Loading ...
README.rst Loading ...
hg Loading ...
hgeditor Loading ...
hgweb.cgi Loading ...
setup.py Loading ...

Mercurial

Mercurial is a fast, easy to use, distributed revision control tool for software developers.

Basic install:

$ make            # see install targets
$ make install    # do a system-wide install
$ hg debuginstall # sanity-check setup
$ hg              # see help

Running without installing:

$ make local      # build for inplace usage
$ ./hg --version  # should show the latest version

See https://mercurial-scm.org/ for detailed installation instructions, platform-specific notes, and Mercurial user information.