| 1 |
# Mercurial 4.5 (2018-02-01) |
| 2 |
|
| 3 |
|
| 4 |
## Mercurial 4.5 release |
| 5 |
|
| 6 |
### New Features |
| 7 |
|
| 8 |
#### revert --interactive |
| 9 |
The revert command now accepts the flag --interactive to allow reverting only |
| 10 |
some of the changes to the specified files. |
| 11 |
|
| 12 |
|
| 13 |
#### Accessing hidden changesets |
| 14 |
Set config option 'experimental.directaccess = True' to access hidden |
| 15 |
changesets from read only commands. |
| 16 |
|
| 17 |
|
| 18 |
#### githelp extension |
| 19 |
The `githelp` extension provides the `hg githelp` command. This command |
| 20 |
attempts to convert a `git` command to its Mercurial equivalent. The extension |
| 21 |
can be useful to Git users new to Mercurial. |
| 22 |
|
| 23 |
|
| 24 |
#### Largefiles changes |
| 25 |
|
| 26 |
- largefiles: add a 'debuglfput' command to put largefile into the store |
| 27 |
- largefiles: add support for 'largefiles://' url scheme |
| 28 |
- largefiles: allow to run 'debugupgraderepo' on repo with largefiles |
| 29 |
- largefiles: convert EOL of hgrc before appending to bytes IO |
| 30 |
- largefiles: explicitly set the source and sink types to 'hg' for lfconvert |
| 31 |
- largefiles: modernize how capabilities are added to the wire protocol |
| 32 |
|
| 33 |
|
| 34 |
#### hgweb changes |
| 35 |
|
| 36 |
hgweb now shows more information about commits: phase (if it's not public), obsolescence status (with a short explanation and links to the successors) and instabilities (e.g. orphan, phase-divergent or content-divergent). |
| 37 |
|
| 38 |
Client-side graph code has been simplified by delegating more work to the backend, so /graph page is now more in sync with /log page, visually and feature-wise. Unfortunately, this code change means that 3rd-party themes for 4.5+ are required to have `graphentry.tmpl` template available (copy it from the base theme if you don't use `%include` and then reference it in map file) and render entries in `graph.tmpl` -- look at one of the core themes to see what it needs to look like. JS functions that create graph vertices and edges are now available in `Graph.prototype`, making it possible to call the original functions from custom theme-specific functions if needed. |
| 39 |
|
| 40 |
Graph now shows different symbols for normal, branch-closing, obsolete and unstable commits, and marks currently checked out commit with a circle around its graph node. |
| 41 |
|
| 42 |
There's also now `json-graph` API endpoint that can be used for rendering commit graph in 3rd-party applications. |
| 43 |
|
| 44 |
|
| 45 |
#### Other Changes |
| 46 |
|
| 47 |
- When interactive revert is run against a revision other than the working directory parent, the diff shown is the diff to <em>apply</em> to the working directory, rather than the diff to <em>discard</em> from the working copy. This is in line with related user experiences with 'git' and appears to be less confusing with 'ui.interface=curses'. |
| 48 |
- Let 'hg rebase' avoid content-divergence by skipping obsolete changesets (and their descendants) when they are present in the rebase set along with one of their successors but none of their successors is in destination. |
| 49 |
- A new experimental config flag, 'rebase.experimental.inmemory', makes rebase perform an in-memory merge instead of doing it on-disk in the working copy. |
| 50 |
- The `HGPLAINEXCEPT` environment variable can now include `color` to allow automatic output colorization in otherwise automated environments. |
| 51 |
- A new unamend command in uncommit extension which undoes the effect of the amend command by creating a new changeset which was there before amend and moving the changes that were amended to the working directory. |
| 52 |
- A '--abort' flag to merge command to abort the ongoing merge. |
| 53 |
- An experimental flag '--rev' to 'hg branch' which can be used to change branch of changesets. |
| 54 |
- bundle2 read I/O significantly improved |
| 55 |
- bundle2 memory use significantly reduced during read |
| 56 |
- clonebundle: it is now possible to serve the clonebundle using a git-lfs compatible server. |
| 57 |
- templatefilters: add slashpath() to convert path separator to slash (Bts:issue5572) |
| 58 |
- A new experimental config flag, 'inline-color-diff', adds within-line color diff capacity |
| 59 |
- histedit: add support to output nodechanges using formatter to help with editor integrations |
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
### Backwards Compatibility Changes |
| 65 |
|
| 66 |
- `log --follow-first -rREV`, which is deprecated, now follows the first parent of merge revisions from the specified `REV` just like `log --follow -rREV`. |
| 67 |
- `log --follow -rREV FILE..` now follows file history across copies and renames. |
| 68 |
- transaction: register summary callbacks only at start of transaction |
| 69 |
- hgweb's graph view no longer supports browsers that lack <canvas> support |
| 70 |
- hgweb: only include graph-related data in jsdata variable on /graph pages |
| 71 |
- graphlog: add another graph node type, unstable, using character `*` |
| 72 |
- remove: print message for each file in verbose mode only while using '-A' |
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
### Bug Fixes |
| 77 |
|
| 78 |
- Bookmark, whose name is longer than 255, can again be exchanged again between 4.4+ client and servers (Bts:issue5165) |
| 79 |
- The convert extension works with bzr < 2.6.0 again (Bts:issue5733) |
| 80 |
- Mercurial will now attempt to use hardlinks on NTFS on Windows (Bts:issue4580) |
| 81 |
- The revset `x^::` is now correctly parsed as `(x^)::` instead of being an error (Bts:issue5764) |
| 82 |
- Setting the diff.noprefix configuration option no longer breaks the `--stat` flag on `hg diff` (Bts:issue5759) |
| 83 |
- `hg outgoing` now honors `:pushurl` paths from hgrc (Bts:issue5365) |
| 84 |
- log: translate column labels at once (Bts:issue5750) |
| 85 |
- patch: improve heuristics to not take the word `diff` as header (Bts:issue1879) |
| 86 |
- templater: look up symbols/resources as if they were separated (Bts:issue5699) |
| 87 |
- http and ssh: support for emitting extra debug logs about requests as they happen |
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
### API Changes |
| 92 |
|
| 93 |
- `bundlerepo.bundlerepository.bundle` and `bundlerepo.bundlerepository.bundlefile` are now prefixed with an underscore. |
| 94 |
- Rename bundlerepo.bundlerepository.bundlefilespos to _cgfilespos. |
| 95 |
- dirstate no longer provides a 'dirs()' method. To test for the existence of a directory in the dirstate, use 'dirstate.hasdir(dirname)'. |
| 96 |
- mapping does not contain all template resources. use context.resource() in template functions. |
| 97 |
- `text=False|True` option is dropped from the vfs interface because of Python 3 compatibility issue. Use `util.tonativeeol/fromnativeeol()` to convert EOL manually. |
| 98 |
- `wireproto.streamres.__init__` no longer accepts a `reader` argument. Use the `gen` argument instead. |
| 99 |
- exchange.getbundlechunks() now returns a 2-tuple instead of just an iterator. |
| 100 |
- bundle2 parts are no longer seekable by default |
| 101 |
- memfilectx: the changectx argument is now mandatory in constructor |