Pulkit Goyal <7895pulkit@gmail.com> [Fri, 25 May 2018 01:25:31 +0530] rev 38147
graft: use state.cmdstate() to check whether graftstate exists
This is a step towards make graft use the new state.cmdstate() class. This patch
replaces the ugly try-except with nice if-else conditionals.
Differential Revision: https://phab.mercurial-scm.org/D3652
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 25 May 2018 01:15:30 +0530] rev 38146
graft: factor out function to read graft state in separate function
Fatcoring out the logic in a separate function will help us in adding
conditional logic for different versions of graft state files.
Differential Revision: https://phab.mercurial-scm.org/D3651
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 25 May 2018 01:46:06 +0530] rev 38145
state: removing remaining instances of opts class variable
The cmdstate class used to have a class variable opts which used to be a dict
which stored all the data for the state. Recent cleanups removed the use of that
variable. There were couple of instances left which are removed by this patch.
Differential Revision: https://phab.mercurial-scm.org/D3653
Yuya Nishihara <yuya@tcha.org> [Thu, 24 May 2018 23:26:28 +0900] rev 38144
help: mention pattern syntax of latesttag() template function
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 May 2018 22:25:00 -0400] rev 38143
py3: replace str.format(x) with `str % x` in githelp
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 May 2018 22:17:04 -0400] rev 38142
githelp: drop the trailing period from single sentence output for consistency
There are several instances of multiple sentence output, which I left alone.
That is already nonstandard style, so dropping the period doesn't seem like an
improvement.
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:37:52 +0900] rev 38141
hgweb: wrap {entries}* of filelog with mappinglist
They were lists of mappings.
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:37:03 +0900] rev 38140
hgweb: don't use dict(key=value) to build a mapping dict in filelog
It wasn't Py3 compatible because mapping keys must be bytes.
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:31:16 +0900] rev 38139
hgweb: wrap {diffopts} of annotate by hybriddict()
The diffopts here is a plain dict, which should be wrapped by hybriddict.
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:29:58 +0900] rev 38138
hgweb: wrap {parents} of {annotate} with mappinggenerator
It's a generator of at most two mappings, which has to be wrapped.
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:28:51 +0900] rev 38137
hgweb: wrap {annotate} with mappinggenerator
No bare generator of mappings should be put in a template mapping.
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:24:04 +0900] rev 38136
hgweb: wrap {bookmarks} of summary with mappinggenerator
No bare generator of mappings should be put in a template mapping.
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:21:29 +0900] rev 38135
hgweb: wrap {lastchange} of bookmarks with mappinglist
It was an 1-length list of a mapping, can be wrapped with a mappinglist.
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:19:51 +0900] rev 38134
hgweb: wrap {entries}* of bookmarks with mappinggenerator
They were functions returning a generator of mappings. The laziness is
handled by the mappinggenerator class.
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 23 May 2018 03:13:04 +0530] rev 38133
state: raise CorruptedState error isntead of ProgrammingError
There are old state files which don't have a version number in top of them and
hence we have to read them to check whether they are good or not.
ProgrammingError is not apt for this case. Thanks to Yuya for suggesting
CorruptedState error.
Differential Revision: https://phab.mercurial-scm.org/D3644
Kyle Lippincott <spectral@google.com> [Tue, 22 May 2018 11:20:55 -0700] rev 38132
localrepo: add docstring to _makedirstate to make it less likely to be removed
Differential Revision: https://phab.mercurial-scm.org/D3643
David Demelier <markand@malikania.fr> [Tue, 15 May 2018 14:35:41 +0200] rev 38131
scmutil: move repair.stripbmrevset as scmutil.bookmarkrevs (API)
Matt Harbison <matt_harbison@yahoo.com> [Tue, 22 May 2018 23:48:08 -0400] rev 38130
githelp: cleanup one more abort message
This makes the string localizable, uses the more standard hint argument, quotes
the problem option so it stands out, and kills a stray apostrophe.
Yuya Nishihara <yuya@tcha.org> [Tue, 22 May 2018 20:43:42 +0900] rev 38129
githelp: do not concatenate i18n messages dynamically so they can be collected
Kyle Lippincott <spectral@google.com> [Wed, 16 May 2018 14:59:32 -0700] rev 38128
narrow: only wrap dirstate functions once, instead of per-reposetup
chg will call reposetup multiple times, and we would end up double-wrapping (or
worse) the dirstate functions; this can cause issues like OSError 'No such file
or directory' during rebase operations, when we go to double-delete our
narrowspec backup file.
Differential Revision: https://phab.mercurial-scm.org/D3559
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 22 May 2018 00:25:18 +0530] rev 38127
state: temporary silence pyflakes warning by removing variable assignment
The variable 'version' is going to be used in upcoming series where we will be
using the version number to read a certain state file. However currently,
pyflakes fails because of the variable not being used. Let's remove the
assignment temporarily so that buildbots and test-suite is happy until I iterate
over remaining part of the series.
Differential Revision: https://phab.mercurial-scm.org/D3641
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 22 May 2018 00:22:23 +0530] rev 38126
state: fix usage of an unassigned variable
The variable iv was used in earlier iterations of the patches and was dropped
since we made sure 'version' is always int. This usage of 'iv' should have been
replaced by 'version' in the original patch only.
Differential Revision: https://phab.mercurial-scm.org/D3640
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 20 May 2018 18:53:03 +0530] rev 38125
py3: add b'' prefixes in tests/test-revset2.t
# skip-blame because just b'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D3637
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 21 May 2018 23:26:53 +0530] rev 38124
py3: use encoding.strfromlocal() instead of pycompat.sysstr()
opts['dateformat'] is provided by the user and can be encoded in local encoding.
Thanks to Yuya for catching.
Differential Revision: https://phab.mercurial-scm.org/D3642
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 May 2018 23:05:18 -0400] rev 38123
tests: stabilize test-patch.t on Windows
$PYTHON needs to be quoted when invoking with cmd.exe, because the value expands
to c:/Python27/python.exe, which seems to be interpreted as 'c' being a command.
We can't just convert to '\', because there are a few places that run $PYTHON
directly in MSYS. If unquoted there, it results in c:Python27python.exe being
run. I wonder if we should bake the quotes into the environment variable to
avoid this.
It also wasn't happy with the quoting around exit1.py:
c:/Python27/python.exe: can't open file ''$TESTTMP/d/exit1.py'': [Errno 22] Invalid argument
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 May 2018 23:04:28 -0400] rev 38122
githelp: lowercase the start of output messages for consistency
I left 'Mercurial' as a proper name capitalized.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 May 2018 22:57:05 -0400] rev 38121
githelp: rewrite a Yoda conditional
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 May 2018 22:55:17 -0400] rev 38120
githelp: make several strings localizable
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 May 2018 22:41:55 -0400] rev 38119
githelp: cleanly abort if the `svn` command is unknown
Previously, the warning was lost above the sea of KeyError stacktrace output.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 May 2018 22:32:15 -0400] rev 38118
githelp: fail gracefully in a couple cases where arguments are missing
I didn't bother adding tests because the other commands that already handled
missing arguments don't test these edge cases. I didn't read over all of the
code, rather I scanned for `args` not being checked before indexing.