Kyle Lippincott <spectral@google.com> [Mon, 24 Jun 2019 16:00:39 -0700] rev 42587
largefiles: make last line of prompts <40 english chars (
issue6158)
Differential Revision: https://phab.mercurial-scm.org/D6571
Yuya Nishihara <yuya@tcha.org> [Sun, 30 Jun 2019 18:32:43 +0900] rev 42586
rust-dirstate: add helper to iterate ancestor paths
This is modeled after std::path::Path::ancestors().
find_dirs(b"") yields b"" because Mercurial's util.finddirs() works in that
way, and the test case for DirsMultiset expects such behavior.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 09 Jul 2019 20:51:48 -0400] rev 42585
tests: update test-commit-interactive.t for no-execbit platforms
These changes correspond with
f802a75da585.
Differential Revision: https://phab.mercurial-scm.org/D6624
Taapas Agrawal <taapas2897@gmail.com> [Fri, 28 Jun 2019 00:35:52 +0530] rev 42584
abort: added support for histedit
This patch adds the support for `histedit` in `hg abort` plan.
As seperate `hgaborthistedit()` function is created to handle
independent calls for abortion of `histedit`. This function is
then registered as `abortfunc` for state detection API.
hg abort in case of `histedit` also supports ` history-editing-backup`
config option.
Results are shown as tests.
Differential Revision: https://phab.mercurial-scm.org/D6582
Taapas Agrawal <taapas2897@gmail.com> [Sun, 23 Jun 2019 23:11:35 +0530] rev 42583
abort: added support for rebase
This adds support of `rebase` to `hg abort` plan.
An independent abort logic for `rebase` is created
under `abortrebase()` function. For this a seperate
`rebaseruntime` object is created under the function to
handle an unfinished `rebasestate` and abort that using
abort logic under `_prepareabortorcontinue`.
Results of tests are shown.
Differential Revision: https://phab.mercurial-scm.org/D6568
Taapas Agrawal <taapas2897@gmail.com> [Sun, 23 Jun 2019 22:31:31 +0530] rev 42582
abort: added support for graft
This adds support of `graft` to `hg abort` plan.
The patch creates a seperate function `cmdutil.hgabortgraft`
so that abort logic for graft can be called independently.
This logic is registered to the statedetection API as `abortfunc`.
Results are shown as tests.
Differential Revision: https://phab.mercurial-scm.org/D6567
Taapas Agrawal <taapas2897@gmail.com> [Sun, 23 Jun 2019 20:58:01 +0530] rev 42581
abort: added logic for of hg abort
This is part of `GSoC19` project `Implement abort and
continue commands`. This patch is part of the `abort plan`.
This adds the basic logic for `hg abort`. This command
aborts an multistep operation like graft, histedit, rebase,
merge and unshelve if they are in an unfinished state.
The first part of the logic is determining the unfinished
operation from the state detection API under `statemod`.
This API is extended to support `hg abort` by adding a method
to register the abort logic as a function (here `abortfunc`).
Once the unfinished operation is determined the registered
logic is used to abort the command. The benefit of this kind
of framework is that any new extension developed can support
`hg abort` by registering the command and logic under
statedetection API.
`hg abort` currently supports `--dry-run/-n` flag only.
It is used to dry run `hg abort`
Further patches sequentially add support for `graft`, `rebase`,
`unshelve`, `histedit` and `merge`.
Differential Revision: https://phab.mercurial-scm.org/D6566
Augie Fackler <augie@google.com> [Tue, 09 Jul 2019 10:09:46 -0400] rev 42580
merge with stable
Taapas Agrawal <taapas2897@gmail.com> [Tue, 09 Jul 2019 12:58:29 +0300] rev 42579
merge: disallow merge abort in case of an unfinished operation (
issue6160)
This patch disallows `hg merge --abort` in case an operation of higher
precedence i.e unshelve, rebase, histedit are in unfinished states.
This is done so as to avoid partial abort of these operations in case
merge abort is called at an interrupted step.
The patch adds a `cmdutil.getunfinishedstate` function which checks
for operations under progress and returns a `statecheck` object for it.
Differential Revision: https://phab.mercurial-scm.org/D6607
Kyle Lippincott <spectral@google.com> [Mon, 08 Jul 2019 15:01:18 -0700] rev 42578
relnotes: document new range-select mechanism in crecord
Differential Revision: https://phab.mercurial-scm.org/D6622
Taapas Agrawal <taapas2897@gmail.com> [Fri, 05 Jul 2019 00:17:26 +0530] rev 42577
statecheck: updated docstrings related to afterresolvedstates
Differential Revision: https://phab.mercurial-scm.org/D6606
Augie Fackler <augie@google.com> [Mon, 08 Jul 2019 14:01:01 -0400] rev 42576
extdata: avoid crashing inside subprocess when we get a revset parse error
Differential Revision: https://phab.mercurial-scm.org/D6616
Augie Fackler <augie@google.com> [Mon, 08 Jul 2019 13:57:44 -0400] rev 42575
extdata: demonstrate bad behavior when a subprocess emits garbage
Differential Revision: https://phab.mercurial-scm.org/D6615
Martin von Zweigbergk <martinvonz@google.com> [Sun, 07 Jul 2019 23:04:55 -0700] rev 42574
py3: don't run source transformer on hgext3rd (extensions)
It's unclear why the source transformer runs on hgext3rd. It's been
like that since it was introduced in
1c22400db72d (mercurial:
implement a source transforming module loader on Python 3,
2016-07-04), and that commit didn't say anything about it (but it says
that it doesn't have "support [...] for extensions").
I find that the current handling of hgext3rd just makes it harder to
convert extensions to Python 3. It makes you convert a bunch of
strings passed to getattr() and kwargs[] to r'' that could otherwise
have been left alone. It's also really confusing that the source
transformer runs when you import the extension as "extensions.foo=",
but not as "extension.foo=/some/path".
I suppose there is small number of (very simple) extensions that would
have worked without this patch that would now be broken. It seems okay
to me to break those.
Differential Revision: https://phab.mercurial-scm.org/D6614
Kyle Lippincott <spectral@google.com> [Mon, 08 Jul 2019 13:10:34 -0700] rev 42573
crecord: provide 'X' as a range-select mechanism
Differential Revision: https://phab.mercurial-scm.org/D6621
Kyle Lippincott <spectral@google.com> [Mon, 08 Jul 2019 13:06:46 -0700] rev 42572
crecord: make KEY_ENTER usable in tests (by not updating UI)
Differential Revision: https://phab.mercurial-scm.org/D6620
Kyle Lippincott <spectral@google.com> [Mon, 08 Jul 2019 12:38:37 -0700] rev 42571
crecord: fix if -> elif when handling key presses
This shouldn't actually change any behavior, I only noticed it since I started
using KEY_UP in tests, and it was complaining when it got down to the ^L
handler that initscr hadn't been called yet.
Differential Revision: https://phab.mercurial-scm.org/D6619
Kyle Lippincott <spectral@google.com> [Mon, 08 Jul 2019 12:17:06 -0700] rev 42570
crecord: add "x" alias for space, remove test-only "TOGGLE" alias
Differential Revision: https://phab.mercurial-scm.org/D6618
Kyle Lippincott <spectral@google.com> [Mon, 08 Jul 2019 12:15:37 -0700] rev 42569
crecord: stop using test-only "X" as alternative for "c"
Differential Revision: https://phab.mercurial-scm.org/D6617
Taapas Agrawal <taapas2897@gmail.com> [Sat, 06 Jul 2019 22:19:36 +0530] rev 42568
graft: moved abortgraft and readgraft to cmdutil
This patch moves `abortgraft` and `readgraft` to
`cmdutil`. Various callers are updated accordingly.
This is done because these serve as ulitlity functions
for command `graft` and so that new functions regarding
graft can be built from them.
Differential Revision: https://phab.mercurial-scm.org/D6608
Augie Fackler <augie@google.com> [Thu, 20 Jun 2019 14:33:42 -0400] rev 42567
cleanup: use named constants for second arg to .seek()
Differential Revision: https://phab.mercurial-scm.org/D6556
Kyle Lippincott <spectral@google.com> [Thu, 20 Jun 2019 14:45:52 -0700] rev 42566
patch: use a short, fixed-size message for last line of prompt (
issue6158)
See
issue6158 and the previous commit for examples of what might go wrong if we
have some combinations of readline version and terminal and need to wrap the
line.
Briefly: readline may not display the beginning of the last line of the prompt,
or it may print over it with the end of the prompt, making it difficult for
users to know what's going on.
Differential Revision: https://phab.mercurial-scm.org/D6563
Kyle Lippincott <spectral@google.com> [Thu, 20 Jun 2019 11:40:47 -0700] rev 42565
filemerge: make last line of prompts <40 english chars (
issue6158)
I've chosen <40 as the target so that other languages that may have a 2x blowup
in character count can still have a chance to fit into an 80 column screen.
Previously, we would show a prompt like:
```
keep (l)ocal [dest], take (o)ther [source], or leave (u)nresolved for some/potentially/really/long/path?
```
On at least some systems, if readline was in use then the last line of the
prompt would be wrapped strangely if it couldn't fit entirely on one line. This
strange wrapping may be just a carriage return without a line feed, overwriting
the beginning of the line; example (100 columns wide, 65 character filename, and
yes there's 10 spaces on the end, I assume this is to handle the user inputting
longest word we provide as an option, "unresolved"):
```
ng/dir/name/that/does/not/work/well/with/readline/file.txt? ave (u)nresolved for some/lon
```
In some cases it may partially wrap onto the next line, but still be missing
earlier parts in the line, such as below (60 columns wide, 65 character
filename):
```
rev], or leave (u)nresolved for some/long/dir/name/that/do
s/not/work/well/with/readline/file.txt?
```
With this fix, this looks like this on a 60 column screen:
```
tool vim_with_markers (for pattern some/long/dir/name/that/d
oes/not/work/well/with/readline/file.txt) can't handle binar
y
tool meld can't handle binary
tool vim_with_markers can't handle binary
tool internal:merge3 can't handle binary
tool merge can't handle binary
no tool found to merge some/long/dir/name/that/does/not/work
/well/with/readline/file.txt
file 'some/long/dir/name/that/does/not/work/well/with/readli
ne/file.txt' needs to be resolved.
You can keep (l)ocal [working copy], take (o)ther [merge rev
], or leave (u)nresolved.
What do you want to do?
```
Differential Revision: https://phab.mercurial-scm.org/D6562
Augie Fackler <raf@durin42.com> [Tue, 09 Jul 2019 10:07:35 -0400] rev 42564
Added signature for changeset
97ada9b8d51b
Augie Fackler <raf@durin42.com> [Tue, 09 Jul 2019 10:07:33 -0400] rev 42563
Added tag 5.0.2 for changeset
97ada9b8d51b
Augie Fackler <augie@google.com> [Mon, 08 Jul 2019 13:12:20 -0400] rev 42562
posix: always seek to EOF when opening a file in append mode
Python 3 already does this, so skip it there.
Consider the program:
#include <stdio.h>
int main() {
FILE *f = fopen("narf", "w");
fprintf(f, "narf\n");
fclose(f);
f = fopen("narf", "a");
printf("%ld\n", ftell(f));
fprintf(f, "troz\n");
printf("%ld\n", ftell(f));
return 0;
}
on macOS, FreeBSD, and Linux with glibc, this program prints
5
10
but on musl libc (Alpine Linux and probably others) this prints
0
10
By my reading of
https://pubs.opengroup.org/onlinepubs/
009695399/functions/fopen.html
this is technically correct, specifically:
> Opening a file with append mode (a as the first character in the
> mode argument) shall cause all subsequent writes to the file to be
> forced to the then current end-of-file, regardless of intervening
> calls to fseek().
in other words, the file position doesn't really matter in append-mode
files, and we can't depend on it being at all meaningful unless we
perform a seek() before tell() after open(..., 'a'). Experimentally
after a .write() we can do a .tell() and it'll always be reasonable,
but I'm unclear from reading the specification if that's a smart thing
to rely on. This matches what we do on Windows and what Python 3 does
for free, so let's just be consistent. Thanks to Yuya for the idea.
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Sat, 06 Jul 2019 19:55:29 -0400] rev 42561
tweakdefaults: make hg resolve require --re-merge flag to re-merge
Pulkit suggested it in https://phab.mercurial-scm.org/D4379, and a
discussion with Octobus people reminded me that people still use the
error-prone default behavior of `hg resolve`.
Differential Revision: https://phab.mercurial-scm.org/D6610
Navaneeth Suresh <navaneeths1998@gmail.com> [Thu, 04 Jul 2019 21:29:28 +0530] rev 42560
unshelve: rename _dounshelve() to dounshelve()
This is a follow-up patch to
3de4f17f4824.
Differential Revision: https://phab.mercurial-scm.org/D6605
Raphaël Gomès <rgomes@octobus.net> [Mon, 01 Jul 2019 15:07:31 +0200] rev 42559
rust: remove Deref in favor of explicit methods
Differential Revision: https://phab.mercurial-scm.org/D6593
Raphaël Gomès <rgomes@octobus.net> [Mon, 01 Jul 2019 10:53:36 +0200] rev 42558
rust: simplify overly complicated expression
Differential Revision: https://phab.mercurial-scm.org/D6592
Raphaël Gomès <rgomes@octobus.net> [Mon, 01 Jul 2019 10:50:18 +0200] rev 42557
rust: run rfmt on all hg-core/hg-cpython code
Differential Revision: https://phab.mercurial-scm.org/D6591
Anton Shestakov <av6@dwimlabs.net> [Wed, 03 Jul 2019 10:06:39 +0800] rev 42556
move: --force flag forcibly moves, not copies
Anton Shestakov <av6@dwimlabs.net> [Wed, 03 Jul 2019 10:01:51 +0800] rev 42555
copy: correct synopsis by making SOURCE a required argument
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 02 Jul 2019 10:53:29 +0200] rev 42554
debugrevlog: fix average size computation for empty data (
issue6167)
If the file has no full snapshot (eg: was always empty), `hg debugrevlog` would
fails when trying to compute their average size.
Martin von Zweigbergk <martinvonz@google.com> [Mon, 01 Jul 2019 16:25:51 -0700] rev 42553
changelog: fix handling of empty copy entries in changeset
Before this patch, when an empty value was found in the changeset, we
would get a ValueError, which would result in None being returned for
addedfiles/removedfiles and p1copies/p2copies. That made
278dcb24e535
(copies: write empty entries in changeset when also writing to
filelog, 2019-04-23) ineffective at helping the read path not look for
copies in the filelogs.
Differential Revision: https://phab.mercurial-scm.org/D6595
Sushil khanchi <sushilkhanchi97@gmail.com> [Sun, 30 Jun 2019 17:52:57 +0530] rev 42552
relnotes: document the new --force-close-branch flag
Differential Revision: https://phab.mercurial-scm.org/D6590
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 11 Jun 2019 20:53:14 +0300] rev 42551
py3: hack around inconsistency of type of name passed to DNSQuestion
I don't like this patch but this is the easiest way I could fix it. There are
some callers which pass name which is bytes, some pass name which is str. I just
encode() that if that's str.
This does makes test-paths.t pass, but I am not confident whether the whole of
zeroconf will work on py3 or not.
Differential Revision: https://phab.mercurial-scm.org/D6511
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 11 Jun 2019 20:48:59 +0300] rev 42550
py3: add r'' prefixes and do ('%d' % int) instead of str(int)
This addresses more failures related to zeroconf on py3.
Differential Revision: https://phab.mercurial-scm.org/D6510
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Feb 2019 12:07:31 -0800] rev 42549
zeroconf: port to Python 3
Since we're using the source transformer on Python 3, calls into
Zeroconf and return values from it are generally bytes.
But various socket functions require str on Python 3.
This commit contains enough changes to coerce test-paths.t into
passing on Python 3. I suspect there are still a handful of bugs
on Python 3. But the tests do pass.
Differential Revision: https://phab.mercurial-scm.org/D5805
Martin von Zweigbergk <martinvonz@google.com> [Fri, 28 Jun 2019 16:40:36 -0700] rev 42548
copies: return only path from _tracefile() since that's all caller needs
Differential Revision: https://phab.mercurial-scm.org/D6587
Navaneeth Suresh <navaneeths1998@gmail.com> [Sun, 30 Jun 2019 13:04:26 +0530] rev 42547
extensions: add shelve to _builtin
This is a follow-up patch to
3de4f17f4824. This adds `shelve` to
`extensions._builtin` so that the shelve extension is silently
ignored.
Differential Revision: https://phab.mercurial-scm.org/D6589
Yuya Nishihara <yuya@tcha.org> [Sun, 30 Jun 2019 15:10:56 +0900] rev 42546
merge with stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 29 Jun 2019 23:23:07 -0400] rev 42545
bookmarks: backout the attempt to fix the delete race
This backs out
044045dce23a because it broke a bunch of tests on Windows.
Yuya's theory is that we still rely on in-memory changelog data to be flushed
out of the transaction.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 28 Jun 2019 14:13:00 -0700] rev 42544
automv: access status fields by name, not index
Differential Revision: https://phab.mercurial-scm.org/D6586
Martin von Zweigbergk <martinvonz@google.com> [Fri, 28 Jun 2019 14:07:09 -0700] rev 42543
automv: use public API for getting copies
Differential Revision: https://phab.mercurial-scm.org/D6585
Sushil khanchi <sushilkhanchi97@gmail.com> [Sat, 18 May 2019 15:44:23 +0530] rev 42542
commit: add --force-close-branch flag to close a non-head changeset
While closing branch from a changeset which is not a branch head
current implementation abort this action in every case but, there
can be the situations where the changeset is not a local head but
could be a remote head. This patch adds the functionality to bypass
the "abort: can only close branch heads" by introducing
--force-close-branch flag.
Test case changes demonstrate the new functionality added.
Differential Revision: https://phab.mercurial-scm.org/D6490
Navaneeth Suresh <navaneeths1998@gmail.com> [Fri, 28 Jun 2019 21:31:34 +0530] rev 42541
shelve: move shelve extension to core
Until now, `shelve` was bootstrapped as an extension. This patch adds
`shelve` on core.
Differential Revision: https://phab.mercurial-scm.org/D6553
Navaneeth Suresh <navaneeths1998@gmail.com> [Fri, 28 Jun 2019 22:57:48 +0530] rev 42540
shelve: remove rebase.clearstatus()
This is a follow-up patch to
c829749e7639. After this, shelve will be
no longer dependent on rebase. This removes rebase.clearstatus() from
shelve.
Differential Revision: https://phab.mercurial-scm.org/D6584