| 1 |
# Mercurial 5.1 (2019-07-28) |
| 2 |
|
| 3 |
|
| 4 |
## Mercurial 5.1 release |
| 5 |
|
| 6 |
This is an overview of the 5.1 release. |
| 7 |
|
| 8 |
### New Features |
| 9 |
|
| 10 |
- New config `commands.commit.post-status` shows status after successful |
| 11 |
commit. |
| 12 |
|
| 13 |
- `hg root` now has templating support, including support for showing |
| 14 |
where a repo share's source is. See `hg help -v root` for details. |
| 15 |
|
| 16 |
- New `--force-close-branch` flag for `hg commit` to forcibly close |
| 17 |
branch from a non-head changeset. |
| 18 |
|
| 19 |
- The curses-based interface for commands like `hg commit -i` now supports |
| 20 |
a range-select mechanism. Select the first line using space like before, |
| 21 |
navigate to the last line, and press X (capital x) to set all items in |
| 22 |
the range at once. Lowercase x has been added as a synonym for space to |
| 23 |
help reinforce the mechanism, and pressing enter/return continues to be a |
| 24 |
synonym for "toggle the current line and move down to the next item in |
| 25 |
this section." |
| 26 |
|
| 27 |
### New Experimental Features |
| 28 |
|
| 29 |
- New config `experimental.log.topo` makes `hg log -G` use |
| 30 |
topological sorting. This is especially useful for aliases since it |
| 31 |
lets the alias accept an `-r` option while still using topological |
| 32 |
sorting with or without the `-r` (unlike if you use the `sort(..., |
| 33 |
topo)` revset). |
| 34 |
|
| 35 |
|
| 36 |
### Bug Fixes |
| 37 |
|
| 38 |
- issue4292: "hg log and {files} {file_adds} {file_mods} {file_dels} |
| 39 |
in template show wrong files on merged revision". See details in |
| 40 |
"Backwards Compatibility Changes". |
| 41 |
|
| 42 |
|
| 43 |
### Backwards Compatibility Changes |
| 44 |
|
| 45 |
- Removed (experimental) support for log graph lines mixing |
| 46 |
parent/grandparent styles. Setting |
| 47 |
e.g. `experimental.graphstyle.parent = !` and |
| 48 |
`experimental.graphstyle.grandparent = 3.` would use `!` for the |
| 49 |
first three lines of the graph and then `.`. This is no longer |
| 50 |
supported. |
| 51 |
|
| 52 |
- If `ui.origbackuppath` had been (incorrectly) configured to point |
| 53 |
to a file, we will now replace that file by a directory and put |
| 54 |
backups in that directory. This is similar to how we would |
| 55 |
previously replace files *in* the configured directory by |
| 56 |
subdirectories. |
| 57 |
|
| 58 |
- Template keyword `{file_mods}`, `{file_adds}`, and `{file_dels}` |
| 59 |
have changed behavior on merge commits. They used to be relative to |
| 60 |
the first parent, but they now consider both parents. `{file_adds}` |
| 61 |
shows files that exists in the commit but did not exist in either |
| 62 |
parent. `{file_dels}` shows files that do not exist in the commit |
| 63 |
but existed in either parent. `{file_mods}` show the remaining |
| 64 |
files from `{files}` that were not in the other two |
| 65 |
sets. |
| 66 |
|
| 67 |
|
| 68 |
### Internal API Changes |
| 69 |
|
| 70 |
- Matchers are no longer iterable. Use `match.files()` instead. |
| 71 |
|
| 72 |
- `match.visitdir()` and `match.visitchildrenset()` now expect the |
| 73 |
empty string instead of '.' to indicate the root directory. |
| 74 |
|
| 75 |
- `util.dirs()` and `util.finddirs()` now include an entry for the |
| 76 |
root directory (empty string). |
| 77 |
|
| 78 |
- shelve is no longer an extension now. it will be turned on by default. |
| 79 |
|
| 80 |
- New API to manage unfinished operations: Earlier there were distinct APIs |
| 81 |
which dealt with unfinished states and separate lists maintaining them |
| 82 |
that are `cmdutil.afterresolvestates`, `cmdutil.unfinishedstates` and |
| 83 |
`cmdutil.STATES`. Now these have been unified to a single |
| 84 |
API which handles the various states and their utilities. This API |
| 85 |
has been added to `state.py`. Now instead of adding to these 3 lists |
| 86 |
independently a state for a new operation can be registered using |
| 87 |
`addunfinished()` in `state` module. |
| 88 |
|
| 89 |
- `cmdutil.checkunfinished()` now includes detection for merge too. |
| 90 |
|
| 91 |
- merge abort has been disallowed in case an operation of higher |
| 92 |
precedence is in progress to avoid cases of partial abort of |
| 93 |
operations. |
| 94 |
|
| 95 |
- We used to automatically attempt to make extensions compatible with |
| 96 |
Python 3 (by translating their source code while loading it). We no |
| 97 |
longer do that. |