Matt Harbison <matt_harbison@yahoo.com> [Sun, 04 Feb 2018 00:33:28 -0500] rev 35924
lfs: prefetch lfs blobs during revert
The revert command oddly prints out what it will do before requesting the files
to be prefetched. But the 'need to transfer' line indicates the blobs are being
grouped.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 04 Feb 2018 14:14:28 -0500] rev 35923
cmdutil: convert _revertprefetch() to a generic stored file hook (API)
This will be used by LFS to fetch required files in a group for multiple
commands, prior to being accessed. That avoids the one-at-a-time fetch when the
filelog wrapper goes to access it, and it is missing locally (which costs two
round trips to the server.) The core command list that needs this is probably
at least:
- annotate
- archive (which is also used by extdiff)
- cat
- diff
- export
- grep
- verify (sadly)
- anything that has the '{data}' template
There are no core users of the revert prefetch hook, and never have been since
it was introduced in
45e02cfad4bd for remotefilelog. Thanks to Yuya for
figuring out a way to reliably trigger the deprecated warning. Unfortunately,
it wanted to blame the caller of revert. Passing along an adjusted stack level
seemed the least bad choice (although it still blames a core function).
One thing to note is that the store lock isn't being held when this is called.
I'm not at all familiar with remotefilelog or its locking requirements, so this
may not be a big deal. Currently, LFS doesn't hold a lock when downloading
files. Even though largefiles doesn't either, I'm starting to think it should,
and maybe the .hg/store/lock isn't good enough to cover the globally shared
cache.
.. api::
The cmdutil._revertprefetch() hook point for prefetching stored files has
been replaced by the command agnostic cmdutil._prefetchfiles(). The new
function takes a list of files, instead of a list of lists of files.
Matt Harbison <matt_harbison@yahoo.com> [Sat, 03 Feb 2018 21:26:12 -0500] rev 35922
lfs: prefetch lfs blobs when applying merge updates
In addition to merge, this method ultimately gets called by many commands:
- backout
- bisect
- clone
- fetch
- graft
- import (without --bypass)
- pull -u
- rebase
- strip
- share
- transplant
- unbundle
- update
Additionally, it's also called by histedit, shelve, unshelve, and split, but it
seems that the related blobs should always be available locally for these.
For `hg update`, it happens after the normal argument checking and pre-update
hook processing, and remote corruption is detected prior to manipulating the
working directory. Other commands could use this treatment (archive, cat,
revert, etc), but this covers so many of the frequently used bulk commands, it
seems like a good starting point.
Losing the verbose message that prints the file name before a corrupt blob
aborts the command is a little sad, because there's no easy way to go from oid
to file name. I'd like to change that message to list the file name so it looks
cleaner and less cryptic, but the pointer object is nowhere near where it needs
to be to do this. So punt on that for now.
Matt Harbison <matt_harbison@yahoo.com> [Sat, 27 Jan 2018 14:53:16 -0500] rev 35921
lfs: factor out a method for extracting the pointer of a single file
This will be useful for filesets, among other things, instead of traversing the
whole context.
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 05 Feb 2018 13:24:02 +0530] rev 35920
py3: add b'' to literals in check-config.py
# skip-blame because we are just adding b''
Differential Revision: https://phab.mercurial-scm.org/D2046
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 29 Dec 2017 05:40:49 +0530] rev 35919
check-config: specify the mode 'rb' to open the file
Differential Revision: https://phab.mercurial-scm.org/D2045
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 05 Feb 2018 13:12:36 +0530] rev 35918
py3: use open() instead of file()
file() is not present in Python 3
Differential Revision: https://phab.mercurial-scm.org/D2044
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 05 Feb 2018 13:12:01 +0530] rev 35917
py3: use pycompat.strkwargs() to convert kwargs' key to str
Differential Revision: https://phab.mercurial-scm.org/D2043
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 05 Feb 2018 13:10:33 +0530] rev 35916
py3: add __bytes__() for mq.patchheader and make sure __str__ returns str
Before this patch, __str__() function for mq.patchheader class return bytes
which is not str on Python 3. So let's move that logic to __bytes__() and for
__str__() convert the return value of __bytes__() to str.
Differential Revision: https://phab.mercurial-scm.org/D2042
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 05 Feb 2018 13:01:35 +0530] rev 35915
py3: use "%d" to convert integer to bytes
Differential Revision: https://phab.mercurial-scm.org/D2041
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 05 Feb 2018 12:59:57 +0530] rev 35914
py3: use .startswith() instead of bytes[0]
Differential Revision: https://phab.mercurial-scm.org/D2040
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 05 Feb 2018 12:58:51 +0530] rev 35913
py3: slice on bytes to prevent getting the ascii values
Differential Revision: https://phab.mercurial-scm.org/D2039
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 04 Feb 2018 20:46:26 +0530] rev 35912
py3: add r'' to convert keys to keyword arguments to str
# skip-blame as we are just adding r''
Differential Revision: https://phab.mercurial-scm.org/D2038
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 04 Feb 2018 15:41:37 +0530] rev 35911
py3: add b'' to tweakdefaults config string
The tweakdefaults config string is enclosed inside triple quotes and the
transformer does not adds b'' there.
# skip-blame because we are just adding b''
Differential Revision: https://phab.mercurial-scm.org/D2037
Boris Feld <boris.feld@octobus.net> [Sun, 04 Feb 2018 12:00:17 +0100] rev 35910
cmdutil: introduce deprecated aliases
c8e2d6ed1f9e moved some objects used by Evolve and hence broke the latest
Evolve revision. Next Evolve version will use the new objects when available
but introduce deprecated aliases so users using older version of Evolve won't
have a broken Evolve extension.
Differential Revision: https://phab.mercurial-scm.org/D2023
Anton Shestakov <av6@dwimlabs.net> [Mon, 05 Feb 2018 18:39:41 +0800] rev 35909
makefile: remove Ubuntu Yakkety and Zesty docker targets
Yakkety (16.10) was supported until 2017-07-20 and Zesty (17.04) was supported
until 2018-01-13.
Kyle Lippincott <spectral@google.com> [Sat, 20 Jan 2018 15:33:48 -0800] rev 35908
merge: use operation-provided labels (ex: dest/source) in several merge-tools
Tools that did not use labels already, used only one, or used some label other
than the exact strings of "local" or "other" were unmodified. Cases that used
the label "base" were modified as well, if they were otherwise changed in this
CL; "merged" was *not* changed.
There are other possible changes we might want to make, but I didn't:
- bcompare (linux and osx) uses the labels "parent1" and "parent2" instead of
"local" and "other", so it was left alone, even though beyondcompare3
(windows) *was* changed.
- araxis used the labels "Other", "Base", and "Local :$local", so it was also
left alone.
- UltraCompare didn't provide a label for 'local', just for 'base' and 'other',
so it was left alone.
Differential Revision: https://phab.mercurial-scm.org/D2012
Kyle Lippincott <spectral@google.com> [Wed, 17 Jan 2018 17:35:05 -0800] rev 35907
filemerge: support passing labels to external merge tools
This adds $labellocal, $labelother, and $labelbase to the replacement set for
merge-tools.<tool>.args config variables, and to the environment as HG_MY_LABEL,
HG_OTHER_LABEL, and HG_BASE_LABEL, respectively.
We also add merge-tools.<tool>.mergemarkers and
merge-tools.<tool>.mergemarkertemplate config variables as counterparts of
the variables available in [ui]. We are intentionally *not* respecting
ui.mergemarkers when calling out to external merge programs; too often the
default template will be too wide to display comfortably in most GUIs.
Differential Revision: https://phab.mercurial-scm.org/D2011
Matt Harbison <matt_harbison@yahoo.com> [Fri, 02 Feb 2018 23:20:55 -0500] rev 35906
bookmarks: drop deprecated methods (API)
The ProgrammingError prevents accidental usage of the dict base class methods.
.. api::
The following deprecated methods have been removed from bookmarks:
__setitem__(), __delitem__(), update(), and recordchange(). Use
bookmarks.applychanges() instead.
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Feb 2018 15:26:13 +0900] rev 35905
archive: rewrite default metadata template as a multi-line bytes literal
This fixes test-directaccess.t on Python 3.
Yuya Nishihara <yuya@tcha.org> [Sat, 27 Jan 2018 17:46:37 +0900] rev 35904
py3: drop b'' from repr() of smartset
cmdutil._maybebytestr() is moved to pycompat.
Yuya Nishihara <yuya@tcha.org> [Sat, 27 Jan 2018 17:31:25 +0900] rev 35903
py3: always drop b'' prefix from repr() of bytestr
Perhaps this is what we wanted for py2-3 compatibility.
Yuya Nishihara <yuya@tcha.org> [Sat, 27 Jan 2018 17:13:51 +0900] rev 35902
py3: format revision number as '%d' in debugrevspec
Now "hg debugrevspec" works on Python 3.
Yuya Nishihara <yuya@tcha.org> [Sat, 27 Jan 2018 17:12:35 +0900] rev 35901
py3: build repr() of smartset as bytes then convert to str
This isn't pretty, but we have no way to teach Python 3 that our __repr__()
would like to return a byte string.
Yuya Nishihara <yuya@tcha.org> [Sat, 27 Jan 2018 13:33:31 +0900] rev 35900
py3: factor out helpers to apply string conversion recursively
Yuya Nishihara <yuya@tcha.org> [Sat, 27 Jan 2018 13:14:06 +0900] rev 35899
py3: replace "if ispy3" by pycompat.sysbytes() or util.forcebytestr()
Yuya Nishihara <yuya@tcha.org> [Sat, 27 Jan 2018 13:11:46 +0900] rev 35898
py3: replace "if ispy3" by pycompat.bytestr()
Yuya Nishihara <yuya@tcha.org> [Sat, 27 Jan 2018 13:09:49 +0900] rev 35897
py3: replace "if ispy3" by encoding.strtolocal()
Matt Harbison <matt_harbison@yahoo.com> [Sat, 03 Feb 2018 00:01:57 -0500] rev 35896
localrepo: drop the deprecated walk() method (API)
.. api::
The deprecated localrepo.walk() has been removed, and replaced by
repo[node].walk().
Matt Harbison <matt_harbison@yahoo.com> [Fri, 02 Feb 2018 23:57:52 -0500] rev 35895
dirstate: drop deprecated methods (API)
.. api::
beginparentchange() and endparentchange() have been replaced by the
parentchange context manager.
Matt Harbison <matt_harbison@yahoo.com> [Fri, 02 Feb 2018 23:53:57 -0500] rev 35894
templatekw: drop the deprecated '{troubles}' keyword
Matt Harbison <matt_harbison@yahoo.com> [Fri, 02 Feb 2018 23:52:19 -0500] rev 35893
obsutil: drop deprecated methods (API)
.. api::
The following deprecated methods have been removed from obsutil:
marker.precnode() and allprecursors(). Use marker.prednode() and
allpredecessors() instead.