Xavier Lepaul <xalep@google.com> [Fri, 02 Jun 2017 10:44:40 +0200] rev 32608
help: clarify the choice of pager
This follows the change made in
d83e51654c8a to use environment variables
between system and user configuration.
Wagner Bruna <wbruna@softwareexpress.com.br> [Fri, 02 Jun 2017 20:50:46 -0300] rev 32607
i18n-pt_BR: fix syntax error on translation
Wagner Bruna <wbruna@softwareexpress.com.br> [Thu, 01 Jun 2017 20:06:02 -0300] rev 32606
i18n-pt_BR: synchronized with
870248603a4e
Siddharth Agarwal <sid0@fb.com> [Thu, 01 Jun 2017 00:40:52 -0700] rev 32605
match: introduce nevermatcher for when no ignore files are present
952017471f93 introduced a deterministic `__repr__` for ignores. However, it
didn't account for when ignore was `util.never`. This broke fsmonitor's ignore
change detection -- with an empty hgignore, it would kick in all the time.
Introduce `nevermatcher` and switch to it. This neatly parallels
`alwaysmatcher`.
Jun Wu <quark@fb.com> [Wed, 31 May 2017 11:41:54 -0700] rev 32604
check-code: suggest policy.importmod
This forbids patterns like `from mercurial.cext import parsers` which breaks
pure.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:41:10 +0200] rev 32603
test-obsolete-bundle-strip: test bundling in the seventh case
Updating all cases in the file at the same time is a bit overwhelming and harder
to double check. So each case come in its own patch.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:23:56 +0200] rev 32602
test-obsolete-bundle-strip: test bundling in the sixth case
Updating all cases in the file at the same time is a bit overwhelming and harder
to double check. So each case come in its own patch.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:20:40 +0200] rev 32601
test-obsolete-bundle-strip: test bundling in the fifth case
Updating all cases in the file at the same time is a bit overwhelming and harder
to double check. So each case come in its own patch.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:20:25 +0200] rev 32600
test-obsolete-bundle-strip: test bundling in the fourth case
Updating all cases in the file at the same time is a bit
overwhelming and harder to double check. So each case come in its own patch.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:19:11 +0200] rev 32599
test-obsolete-bundle-strip: test bundling in the third case
Updating all cases in the file at the same time is a bit overwhelming and harder
to double check. So each case come in its own patch.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:15:53 +0200] rev 32598
test-obsolete-bundle-strip: test bundling in the second case
Updating all cases in the file at the same time is a bit overwhelming and harder
to double check. So each case come in its own patch.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:11:53 +0200] rev 32597
test-obsolete-bundle-strip: test bundling in the first case
We adds a shell function checking that the relevant markers and the bundled
markers matches. Updating all cases in the file at the same time is a bit
overwhelming and harder to double checks. So each cases come in its own patch.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 25 May 2017 16:50:23 +0200] rev 32596
obsolete: raise richer exception on unknown version
We raise a more precise subclass of Abort with details about the faulty
version. This will be used to detect this case and display some information
in debugbundle.
Siddharth Agarwal <sid0@fb.com> [Wed, 31 May 2017 20:07:08 -0700] rev 32595
import-checker: add hgdemandimport to local modules
This fixes test-check-module-imports.t.
Siddharth Agarwal <sid0@fb.com> [Wed, 31 May 2017 19:46:04 -0700] rev 32594
rebase: drop unnecessary parentchange call
We're calling localrepo.setparents here, not dirstate.setparents.
localrepo.setparents calls dirstate.parentchange already.
Martin von Zweigbergk <martinvonz@google.com> [Tue, 30 May 2017 13:16:32 -0700] rev 32593
hidden: remove unnecessary guard condition
The "if visible" guard is now pretty pointless, because the function
call it guards will do almost no work anyway when there are no visible
revisions.
We can also stop wrapping "visible" in a set since it just needs to be
an iterable now.
Martin von Zweigbergk <martinvonz@google.com> [Tue, 30 May 2017 10:27:20 -0700] rev 32592
hidden: subtract pinned revs from hidden earlier
The pinned revs are simply revisions that should not be hidden even if
hideablerevs() says that should. Let's make that clear by simply
setting "hidden = hideablerevs() - pinnedrevs()" early on.
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 23:05:10 -0700] rev 32591
hidden: make _revealancestors() reveal ancestors exclusively
I think this seems more expected. It also prepares for the next
commit.
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 22:55:19 -0700] rev 32590
hidden: remove _consistencyblockers()
Roughly speaking, we currently do this to reveal hidden ancestors of
visible revisions:
1. Iterate over all visible non-public revisions and see if they have
hidden parents
2. For each revision found in step (1) walk the chain of hidden
commits and reveal it
We can simplify that by skipping step (1) and doing step (2) from all
visible non-public revisions instead.
This doesn't seem to have much impact on "perfvolatilesets".
Before:
! obsolete
! wall 0.004616 comb 0.000000 user 0.000000 sys 0.000000 (best of 570)
! visible
! wall 0.008235 comb 0.010000 user 0.010000 sys 0.000000 (best of 326)
After:
! obsolete
! wall 0.004727 comb 0.010000 user 0.010000 sys 0.000000 (best of 543)
! visible
! wall 0.008371 comb 0.000000 user 0.000000 sys 0.000000 (best of 324)
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 22:43:37 -0700] rev 32589
hidden: pass revs to iterate into _consistencyblockers()
Instead of passing the domain into _consistencyblockers() and having
the function calculate the set of revisions to iterate over, let the
caller do it. This is just a minor refactoring to make future changes
simpler.
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 22:10:20 -0700] rev 32588
hidden: remove unnecessary 'domain' parameter from _revealancestors()
The function will stop searching as soon as it runs into a non-hidden
revision, so there is no need to restrict by the domain (of mutable
revisions) as well.
This doesn't seem to have much impact on "perfvolatilesets".
Before:
! obsolete
! wall 0.004903 comb 0.000000 user 0.000000 sys 0.000000 (best of 535)
! visible
! wall 0.008913 comb 0.010000 user 0.010000 sys 0.000000 (best of 300)
After:
! obsolete
! wall 0.004616 comb 0.000000 user 0.000000 sys 0.000000 (best of 570)
! visible
! wall 0.008235 comb 0.010000 user 0.010000 sys 0.000000 (best of 326)
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 21:17:06 -0700] rev 32587
hidden: change _domainancestors() to _revealancestors()
This change makes the function actually reveal the ancestors by
removing them from the hidden set. This prepares for further
simplification.
Note that the function will now only reveal contiguous chains of
hidden revisions, but that's fine because we always pass it an
immediate child of any revision that should be revealed (or the
revision itself).
This doesn't seem to have much impact on "perfvolatilesets".
Before:
! obsolete
! wall 0.004672 comb 0.010000 user 0.010000 sys 0.000000 (best of 590)
! visible
! wall 0.008936 comb 0.010000 user 0.010000 sys 0.000000 (best of 322)
After:
! obsolete
! wall 0.004903 comb 0.000000 user 0.000000 sys 0.000000 (best of 535)
! visible
! wall 0.008913 comb 0.010000 user 0.010000 sys 0.000000 (best of 300)
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 21:08:51 -0700] rev 32586
hidden: rename "revealedrevs" to "pinnedrevs" (API)
E.g. tags and bookmarks can reveal revisions that would otherwise be
hidden. A revision can also be revealed because one if its descendants
is visible. Let's use the term "pinned" for the former case
(bookmarks etc.).
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 21:02:17 -0700] rev 32585
hidden: drop obsolete comment about cacheability
The cache was recently dropped, so I believe the comment is now obsolete.
Yuya Nishihara <yuya@tcha.org> [Thu, 25 May 2017 21:53:44 +0900] rev 32584
cat: add formatter support
This is an example showing how formatter can handle the --output option.
git subrepo isn't supported for now.
Yuya Nishihara <yuya@tcha.org> [Sat, 27 May 2017 17:58:36 +0900] rev 32583
cat: use with statement to close output file
Yuya Nishihara <yuya@tcha.org> [Thu, 25 May 2017 21:43:09 +0900] rev 32582
cat: stop using makefileobj()
Prepares for porting to the formatter API. We won't be able to utilize the
abstraction provided by makefilename() because formatter must be instantiated
per file.
Yuya Nishihara <yuya@tcha.org> [Sat, 27 May 2017 17:44:26 +0900] rev 32581
formatter: add nullformatter
This can be used as a placeholder variable.
Yuya Nishihara <yuya@tcha.org> [Sat, 27 May 2017 17:40:18 +0900] rev 32580
formatter: add helper to create a formatter optionally backed by file
To make things simple, openformatter() and maybereopen() have no support
for a plain object API. Callers must use the "with" statement.
Unlike cmdutil.makefileobj(), append mode ('ab') isn't supported by these
functions. This is because JSON output can't be simply concatenated. Perhaps
cmdutil.export() will have to build a {filename: [revs...]} map first and
write revs per file.
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Jan 2015 18:04:44 +0900] rev 32579
formatter: add option to redirect output to file object
Commands like 'export' have --output=OUTFILESPEC option, so we need a way
to write formatter output optionally to a file.
Kevin Bullock <kbullock+mercurial@ringworld.org> [Thu, 01 Jun 2017 12:24:16 -0500] rev 32578
merge with i18n
Wagner Bruna <wbruna@softwareexpress.com.br> [Wed, 31 May 2017 20:42:58 -0300] rev 32577
i18n-pt_BR: synchronized with
a0e46f6b248b
Kyle Lippincott <spectral@google.com> [Fri, 26 May 2017 13:24:07 -0700] rev 32576
zsh_completion: install as _hg not hg
The contrib/zsh_completion file itself says to name it _hg.
With a name like `hg`, if the user has a line like `autoload ${^fpath}/*(N-.:t)`
in their zshrc, it will create a shell function named `hg` that will hide the
actual hg command and make hg unusable.
Separately from that though, the underscore prefix makes it actually work. The
zsh man page states:
The convention for autoloaded functions used in completion is that they
start with an underscore
This does not seem to just be a "convention", though. With the ill-advised line
removed from my zshrc and the file named
`/usr/local/share/zsh/site-functions/hg` (without the underscore), these
completions did not seem to get loaded and the ones from the zsh installation
were loaded instead. If I renamed them to be
`/usr/local/share/zsh/site-functions/_hg`, however, they were loaded.
I manually tested the above statement by starting a new zsh instance with the
file in `/usr/local/share/zsh/site-functions` with the following names:
- As `hg`, `which _hg_labels` did not show anything
- As `_hg`, `which _hg_labels` showed the expected function.
Augie Fackler <augie@google.com> [Fri, 26 May 2017 20:03:05 -0400] rev 32575
osx: override default exclude filter for pkgbuild
To quote `man 1 pkgbuild`:
--filter filter-expression
By default, --root will include the entire contents of the
given root-path in the package payload, except for any .svn
or CVS directories, and any .DS_Store files. You can override
these default filters by specifying one or more --filter
options. Each filter-expression is an re_format(7)
``extended'' expression: any path in the root which matches
any of the given expressions will be excluded from the pack-
age payload. (Note that specifying even one --filter inhibits
the default filters, so you must respecify the default fil-
ters if you still want them to be used.)
It turns out the default filter these days *also* includes .git and
.hg. Notice how that filter expression is a regular expression? That
(presumably unintentionally) prevents a file named "chg" or "_hg" from
getting included in the distribution. Many many thanks to spectral@
for trying to include a _hg file which led us to figure this bug out.
Bug filed with Apple for this as rdar://problem/
32437369, mentioning
both the gap in documentation and the wrong defaults.
Wagner Bruna <wbruna@softwareexpress.com.br> [Wed, 31 May 2017 19:24:00 -0300] rev 32574
bugzilla: fix typo in help text
Wagner Bruna <wbruna@softwareexpress.com.br> [Wed, 31 May 2017 19:23:23 -0300] rev 32573
help: fix typos
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 31 May 2017 23:44:33 +0900] rev 32572
win32mbcs: avoid unintentional failure at colorization
Since
176ed32dc159, pycompat.bytestr() wrapped by win32mbcs returns
unicode object, if an argument is not byte-str object. And this causes
unexpected failure at colorization.
pycompat.bytestr() is used to convert from color effect "int" value to
byte-str object in color module. Wrapped pycompat.bytestr() returns
unicode object for such "int" value, because it isn't byte-str.
If this returned unicode object is used to colorize non-ASCII byte-str
in cases below, UnicodeDecodeError is raised at an operation between
them.
- colorization uses "ansi" color mode, or
Even though this isn't default on Windows, user might use this
color mode for third party pager.
- ui.write() is buffered with labeled=True
Buffering causes "ansi" color mode internally, regardless of
actual color mode. With "win32" color mode, extra escape sequences
are omitted at writing data out.
For example, with "win32" color mode, "hg status" doesn't fail for
non-ASCII filenames, but "hg log" does for non-ASCII text, because
the latter implies buffered formatter.
There are many "color effect" value lines in color.py, and making them
byte-str objects isn't suitable for fixing on stable. In addition to
it, pycompat.bytestr will be used to get byte-str object from any
types other than int, too.
To resolve this issue, this patch does:
- replace pycompat.bytestr in checkwinfilename() with newly added
hook point util._filenamebytestr, and
- make win32mbcs reverse-wrap util._filenamebytestr
(this is a replacement of
176ed32dc159)
This patch does two things above at same time, because separately
applying the former change adds broken revision (from point of view of
win32mbcs) to stable branch.
"_" prefix is added to "filenamebytestr", because it is win32mbcs
specific hook point.
Martin von Zweigbergk <martinvonz@google.com> [Wed, 31 May 2017 10:35:10 -0700] rev 32571
tests: fix typo in "flagprocesor"
Kostia Balytskyi <ikostia@fb.com> [Tue, 30 May 2017 06:22:14 -0700] rev 32570
contrib: remove unnecessary debug output from editmergeps.ps1
Kostia Balytskyi <ikostia@fb.com> [Tue, 30 May 2017 06:17:51 -0700] rev 32569
contrib: fix a bug preventing editmergeps.ps1 from running unknonw editors
'$ executable' is not a way to run executable in powershell, '& executable'
is instead. Found this when testing with regular Windows notepad.
Kostia Balytskyi <ikostia@fb.com> [Tue, 30 May 2017 06:02:31 -0700] rev 32568
contrib: make editmergeps use -NoNewWindow option in Start-Process cmdlet
Running 'Start-Process -Wait "vim" "+10" "filename"' from PowerShell
actually spawns a separate cmd window to run vim in. This looks ugly
and in most cases not what user wants. During my initial testing I was
using the Cmder app, which made me not notice this (it captures new
windows as new tabs).
Kostia Balytskyi <ikostia@fb.com> [Tue, 30 May 2017 05:56:48 -0700] rev 32567
contrib: run editmergeps.ps1 from the same location as editmergeps.bat
This change is needed for cases when user does not put editmergeps.bat
directly into PATH, but rather uses 'merge-tools.editmergeps.executable'
config option to provide a full path to editmergeps.bat. In such cases,
editmergeps.ps1 cannot be run simply by name, it needs a full path. In
BATCH file %~dp0 stands for the directory in which the original file
is located.
Yuya Nishihara <yuya@tcha.org> [Sun, 21 May 2017 16:57:32 +0900] rev 32566
help: pass commands module by argument
This removes import cycle.
Stanislau Hlebik <stash@fb.com> [Mon, 29 May 2017 06:06:13 -0700] rev 32565
copies: introduce getdstfctx
Previously `c2` may had an incorrect linkrev because getsrcfctx set wrong
_descendantrev. getsrcfctx() sets descendant rev equals to srcctx.rev() (see
_makegetfctx()), but for `c2` descendant rev should be dstctx. While we were
lucky it didn't broke copytracing it made it significantly slower in some
cases. Besides it broke some external extensions, for example remotefilelog.
Stanislau Hlebik <stash@fb.com> [Mon, 29 May 2017 05:58:08 -0700] rev 32564
copies: rename getfctx to getsrcfctx
In the next patch we'll use getdstfctx. Let's rename getfctx to getsrcfctx in
this patch.
Stanislau Hlebik <stash@fb.com> [Mon, 29 May 2017 05:57:25 -0700] rev 32563
copies: remove msrc and mdst parameters
This function already has lots of parameters. And we can get manifests from
contexts. So let's get msrc and mdst parameters from srcctx and dstctx.
Stanislau Hlebik <stash@fb.com> [Mon, 29 May 2017 05:57:03 -0700] rev 32562
copies: add dstctx parameter
Add parameter with destination context
Stanislau Hlebik <stash@fb.com> [Mon, 29 May 2017 05:56:17 -0700] rev 32561
copies: rename ctx to srcctx
In the next diff we'll pass new dstctx parameter. Let's rename ctx to srcctx in
this patch.