Fri, 18 Aug 2017 11:08:17 -0700 demandimport: move HGDEMANDIMPORT test to __init__.py
Jun Wu <quark@fb.com> [Fri, 18 Aug 2017 11:08:17 -0700] rev 33859
demandimport: move HGDEMANDIMPORT test to __init__.py The logic is now shared between demandimport{2,3}. Differential Revision: https://phab.mercurial-scm.org/D445
Tue, 15 Aug 2017 10:15:31 -0700 log: add a "graphwidth" template variable
Danny Hooper <hooper@google.com> [Tue, 15 Aug 2017 10:15:31 -0700] rev 33858
log: add a "graphwidth" template variable Wrapping text in templates for 'hg log --graph' can't be done very well, because the template doesn't know how wide the graph drawing is. The edge drawing function needs to know the number of lines in the template output, so we need to also determine how wide that drawing would be before we call the edgefn or evaluate the template. This patch makes edgefn compute the graph width and pass it into the template so that we can do something like this: COLUMNS=10 hg log --graph --template "{fill(desc, termwidth - graphwidth)}" @ a a a a | a a a a | a a a a o a a a |\ a a a | | a a a | | a a a Using extensions to do this would be relatively complicated due to a lack of hooks in this area of the code. In the future it may make sense to have a more generic "textwidth" that tells you how many columns you can expect to fill without causing the terminal to wrap your output. I'm not sure there are other situations to motivate this yet, or if it is entirely feasible. Differential Revision: https://phab.mercurial-scm.org/D360
Wed, 16 Aug 2017 10:18:57 +0200 obsmarker: fix precnode deprecation
Boris Feld <boris.feld@octobus.net> [Wed, 16 Aug 2017 10:18:57 +0200] rev 33857
obsmarker: fix precnode deprecation The deprecation message for marker.precnode was wrong. Fix the typo. Differential Revision: https://phab.mercurial-scm.org/D413
Wed, 16 Aug 2017 10:26:26 +0200 obsmarker: precnode was renamed into prednode
Boris Feld <boris.feld@octobus.net> [Wed, 16 Aug 2017 10:26:26 +0200] rev 33856
obsmarker: precnode was renamed into prednode Update all calls to formatter.write first arguments to remove references to precnode and use prednode consistently everywhere. Differential Revision: https://phab.mercurial-scm.org/D414
Wed, 16 Aug 2017 16:48:41 +0200 revset: mark evolution-related revsets as experimental
Boris Feld <boris.feld@octobus.net> [Wed, 16 Aug 2017 16:48:41 +0200] rev 33855
revset: mark evolution-related revsets as experimental Differential Revision: https://phab.mercurial-scm.org/D416
Tue, 15 Aug 2017 17:22:57 -0700 push: fix docsstring
Jun Wu <quark@fb.com> [Tue, 15 Aug 2017 17:22:57 -0700] rev 33854
push: fix docsstring Seems the code block misses `::`. This patch makes sure `[push]` and `pushvars.server = true` are in two lines. Differential Revision: https://phab.mercurial-scm.org/D411
Wed, 16 Aug 2017 13:54:24 +0900 py3: select input or raw_input by pycompat
Yuya Nishihara <yuya@tcha.org> [Wed, 16 Aug 2017 13:54:24 +0900] rev 33853
py3: select input or raw_input by pycompat This seems slightly cleaner.
Wed, 16 Aug 2017 13:50:11 +0900 py3: make encoding.strio() an identity function on Python 2
Yuya Nishihara <yuya@tcha.org> [Wed, 16 Aug 2017 13:50:11 +0900] rev 33852
py3: make encoding.strio() an identity function on Python 2 It's the convention the other encoding.str*() functions follow. To make things simple, this also drops kwargs from the strio() constructor.
Sun, 13 Aug 2017 14:12:28 +0900 templatekw: specify plural form of instability
Yuya Nishihara <yuya@tcha.org> [Sun, 13 Aug 2017 14:12:28 +0900] rev 33851
templatekw: specify plural form of instability Follows up 40739aef97f7.
Wed, 16 Aug 2017 13:57:19 +0900 templatekw: rename termwidth() per convention
Yuya Nishihara <yuya@tcha.org> [Wed, 16 Aug 2017 13:57:19 +0900] rev 33850
templatekw: rename termwidth() per convention
Fri, 11 Aug 2017 01:08:07 -0700 rebase: optimize "source" calculation in adjustdest
Jun Wu <quark@fb.com> [Fri, 11 Aug 2017 01:08:07 -0700] rev 33849
rebase: optimize "source" calculation in adjustdest The "source" variable is calculated inside a loop but it does not depend on loop variables. Therefore move it outside the loop. Differential Revision: https://phab.mercurial-scm.org/D345
Fri, 11 Aug 2017 01:36:59 -0700 rebase: remove "state >= revtodo" condition
Jun Wu <quark@fb.com> [Fri, 11 Aug 2017 01:36:59 -0700] rev 33848
rebase: remove "state >= revtodo" condition Now the minimal value of state is revtodo, that condition is always true, therefore removed. Differential Revision: https://phab.mercurial-scm.org/D344
Fri, 11 Aug 2017 01:05:47 -0700 rebase: remove self.destancestors
Jun Wu <quark@fb.com> [Fri, 11 Aug 2017 01:05:47 -0700] rev 33847
rebase: remove self.destancestors The state is no longer used after calculating "self.external", therefore removed. Differential Revision: https://phab.mercurial-scm.org/D343
Fri, 14 Jul 2017 09:01:45 -0700 rebase: remove rebaseset from _checkobsrebase
Jun Wu <quark@fb.com> [Fri, 14 Jul 2017 09:01:45 -0700] rev 33846
rebase: remove rebaseset from _checkobsrebase The parameter is not used. Therefore removed. Differential Revision: https://phab.mercurial-scm.org/D85
Mon, 10 Jul 2017 12:18:32 -0700 rebase: remove revignored and nullmerge states
Jun Wu <quark@fb.com> [Mon, 10 Jul 2017 12:18:32 -0700] rev 33845
rebase: remove revignored and nullmerge states They are no longer necessary to make rebase behavior correct. Therefore remove them to make the code cleaner and easier to reason about. Differential Revision: https://phab.mercurial-scm.org/D26
Sat, 08 Jul 2017 20:38:34 -0700 rebase: remove messages for nullmerge and revignored (BC)
Jun Wu <quark@fb.com> [Sat, 08 Jul 2017 20:38:34 -0700] rev 33844
rebase: remove messages for nullmerge and revignored (BC) These states will be removed to make the code cleaner and more robust. Remove their messages first to make review easier. Differential Revision: https://phab.mercurial-scm.org/D25
Sat, 08 Jul 2017 20:38:34 -0700 rebase: remove revprecursor and revpruned states (BC)
Jun Wu <quark@fb.com> [Sat, 08 Jul 2017 20:38:34 -0700] rev 33843
rebase: remove revprecursor and revpruned states (BC) Those states are no longer necessary for rebase to function properly. Remove them to make the code cleaner. Marked as BC because in a corner case where working parent is obsoleted, and is skipped for rebase, we no longer move working parent after rebase completes. That is better since if working parent is obsoleted, it should be the user moving working parent back there (after a rebase) explicitly, in that case, we shouldn't move working parent again. Differential Revision: https://phab.mercurial-scm.org/D24
Sat, 08 Jul 2017 20:14:33 -0700 rebase: move obsoleted not rebased messages earlier (BC)
Jun Wu <quark@fb.com> [Sat, 08 Jul 2017 20:14:33 -0700] rev 33842
rebase: move obsoleted not rebased messages earlier (BC) A later patch will clean up those states. This patch moves the messages earlier. Marked as BC since the order of message has changed. Differential Revision: https://phab.mercurial-scm.org/D23
Sat, 08 Jul 2017 20:05:52 -0700 rebase: extract ctx description logic to a function
Jun Wu <quark@fb.com> [Sat, 08 Jul 2017 20:05:52 -0700] rev 33841
rebase: extract ctx description logic to a function The function will be used in a later patch. Differential Revision: https://phab.mercurial-scm.org/D22
Thu, 27 Jul 2017 00:00:15 -0400 python3: whitelist another *13* tests that now pass
Augie Fackler <augie@google.com> [Thu, 27 Jul 2017 00:00:15 -0400] rev 33840
python3: whitelist another *13* tests that now pass Differential Revision: https://phab.mercurial-scm.org/D302
Mon, 24 Jul 2017 14:38:40 -0400 py3: introduce a wrapper for __builtins__.{raw_,}input()
Augie Fackler <augie@google.com> [Mon, 24 Jul 2017 14:38:40 -0400] rev 33839
py3: introduce a wrapper for __builtins__.{raw_,}input() In order to make this work, we have to wrap the io streams in a TextIOWrapper so that __builtins__.input() can do unicode IO on Python 3. We can't just restore the original (unicode) sys.std* because we might be running a cmdserver, and if we blindly restore sys.* to the original values then we end up breaking the cmdserver. Sadly, TextIOWrapper tries to close the underlying stream during its __del__, so we have to make a sublcass to prevent that. If you see errors like: TypeError: a bytes-like object is required, not 'str' On an input() or print() call on Python 3, the substitution of sys.std* is probably the root cause. A previous version of this change tried to put the bytesinput() method in pycompat - it turns out we need to do some encoding handling, so we have to be in a higher layer that's allowed to use mercurial.encoding.encoding. As a result, this is in util for now, with the TextIOWrapper subclass hiding in encoding.py. I'm not sure of a better place for the time being. Differential Revision: https://phab.mercurial-scm.org/D299
Wed, 26 Jul 2017 23:33:26 -0400 python3: whitelist four more passing tests
Augie Fackler <augie@google.com> [Wed, 26 Jul 2017 23:33:26 -0400] rev 33838
python3: whitelist four more passing tests Differential Revision: https://phab.mercurial-scm.org/D298
Fri, 11 Aug 2017 15:09:54 -0400 extensions: don't give AttributeError bytes message on Python 3
Augie Fackler <augie@google.com> [Fri, 11 Aug 2017 15:09:54 -0400] rev 33837
extensions: don't give AttributeError bytes message on Python 3 Differential Revision: https://phab.mercurial-scm.org/D353
Tue, 25 Jul 2017 22:49:43 -0400 extensions: if on py3 and propname is a bytestr, convert to sysstr
Augie Fackler <augie@google.com> [Tue, 25 Jul 2017 22:49:43 -0400] rev 33836
extensions: if on py3 and propname is a bytestr, convert to sysstr Property names are unicodes on Python 3. Differential Revision: https://phab.mercurial-scm.org/D296
Sat, 12 Aug 2017 04:47:40 +0530 pushvars: add a coreconfigitem for push.pushvars.server
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 12 Aug 2017 04:47:40 +0530] rev 33835
pushvars: add a coreconfigitem for push.pushvars.server Differential Revision: https://phab.mercurial-scm.org/D359
Tue, 18 Jul 2017 02:05:19 -0700 phabricator: add phabupdate command to update status in batch
Jun Wu <quark@fb.com> [Tue, 18 Jul 2017 02:05:19 -0700] rev 33834
phabricator: add phabupdate command to update status in batch Changing status (accept, etc) on the webpage is not very convenient - currently there is no way to accept (or abandon etc.) a stack using a single click or command. This patch adds a `phabupdate` command that could be used to change status in batch. It also supports `--comment` which will write a comment on the last revision, which is similar to what we do using emails. Differential Revision: https://phab.mercurial-scm.org/D127
Tue, 18 Jul 2017 01:34:55 -0700 phabricator: add status to revision query language
Jun Wu <quark@fb.com> [Tue, 18 Jul 2017 01:34:55 -0700] rev 33833
phabricator: add status to revision query language This patch adds status words (ex. `abandoned`, `accepted`, `needsreview`, `needsrevision`, `closed`) to the revision query language so people can select revision in a more flexible way. Test Plan: Try something like `phabread ':2 & accepted'`, `phabread ':105 - closed` and make sure they have desired outputs. Differential Revision: https://phab.mercurial-scm.org/D126
Mon, 17 Jul 2017 23:19:11 -0700 phabricator: add a small language to query Differential Revisions
Jun Wu <quark@fb.com> [Mon, 17 Jul 2017 23:19:11 -0700] rev 33832
phabricator: add a small language to query Differential Revisions Previously, `phabread` can only be used to read a single patch, or a single stack of patches. In the future, we want to have more complex queries like filtering with status (open, accepted, closed, etc), or maybe more complex like filtering by reviewers etc. The command line flag approach won't scale with that. Besides, we might want to have other commands to update Differential Revision status in batch, like accepting a stack using a single command. Therefore, this patch adds a small language. It has basic set operations: `&`, `+`, `-` and an ancestor operator to support `--stack`. Test Plan: Try querying this Phabricator instance: hg phabread 1+2 # 1, 2 hg phabread D2+D1 # 2, 1 hg phabread ':118-115+:2-1' # 114, 116, 117, 118, 2 hg phabread '((:118-(D115+117)))&:117' # 114, 116 hg phabread ':2&:117' --debug # differential.query is called only once Make sure the output is expected and prefetch works. Differential Revision: https://phab.mercurial-scm.org/D125
Mon, 17 Jul 2017 23:14:06 -0700 phabricator: change "readpatch" to be more flexible
Jun Wu <quark@fb.com> [Mon, 17 Jul 2017 23:14:06 -0700] rev 33831
phabricator: change "readpatch" to be more flexible Previously, `readpatch` and `querydrev` take a same `params` and `stack` parameters. This patch changes `readpatch` so it takes the output of `querydrev`, not the input of `querydrev`. This makes the code more flexible and cleaner. Differential Revision: https://phab.mercurial-scm.org/D124
Sun, 13 Aug 2017 22:46:16 -0700 filemerge: extract `_picklabels` as a helper function
Phil Cohen <phillco@fb.com> [Sun, 13 Aug 2017 22:46:16 -0700] rev 33830
filemerge: extract `_picklabels` as a helper function This shortens `simplemerge()` and is a bit cleaner, IMO. Differential Revision: https://phab.mercurial-scm.org/D376
Sun, 13 Aug 2017 22:46:03 -0700 simplemerge: write merge result to the localctx, if passed
Phil Cohen <phillco@fb.com> [Sun, 13 Aug 2017 22:46:03 -0700] rev 33829
simplemerge: write merge result to the localctx, if passed Differential Revision: https://phab.mercurial-scm.org/D375
Sun, 13 Aug 2017 20:06:52 -0700 simplemerge: use contexts to read file data from, if passed
Phil Cohen <phillco@fb.com> [Sun, 13 Aug 2017 20:06:52 -0700] rev 33828
simplemerge: use contexts to read file data from, if passed Differential Revision: https://phab.mercurial-scm.org/D374
Sun, 13 Aug 2017 20:06:52 -0700 filemerge: pass contexts to simplemerge
Phil Cohen <phillco@fb.com> [Sun, 13 Aug 2017 20:06:52 -0700] rev 33827
filemerge: pass contexts to simplemerge Otherwise, this should be a no-op. Differential Revision: https://phab.mercurial-scm.org/D373
Sun, 13 Aug 2017 20:06:52 -0700 simplemerge: add optional context parameters to simplemerge
Phil Cohen <phillco@fb.com> [Sun, 13 Aug 2017 20:06:52 -0700] rev 33826
simplemerge: add optional context parameters to simplemerge Rename the existing parameters for clarity. These will, in subsequent patches, allow callers to redirect reads (of the three sides of the merge) and writes (of the result) to the given contexts, instead of using the filesystem. While in most cases, the writes will go to a workingfilectx, this opens the door for it to be a memfilectx in the case of an in-memory merge. Repo will be necessary in a subsequent comit. Differential Revision: https://phab.mercurial-scm.org/D372
Sun, 13 Aug 2017 20:06:52 -0700 simplemerge: extract verifytext as a helper function
Phil Cohen <phillco@fb.com> [Sun, 13 Aug 2017 20:06:52 -0700] rev 33825
simplemerge: extract verifytext as a helper function This will be used in a subsequent commit. Differential Revision: https://phab.mercurial-scm.org/D371
Mon, 14 Aug 2017 23:26:54 -0700 commit: use context manager with dirstateguard
Martin von Zweigbergk <martinvonz@google.com> [Mon, 14 Aug 2017 23:26:54 -0700] rev 33824
commit: use context manager with dirstateguard When I wrote 5ac845ca059a (commit: don't let failed commit with --addremove update dirstate (issue5645), 2017-07-31), Durham's 609606d21765 (rebase: use one dirstateguard for when using rebase.singletransaction, 2017-07-20) had not yet landed, so I had to write it in the old-fashioned way. Now that Durham's patch is in, we can simplify by using a context manager. Differential Revision: https://phab.mercurial-scm.org/D406
Mon, 14 Aug 2017 23:26:51 -0700 commit: move dirstateguard creation out of try-block
Martin von Zweigbergk <martinvonz@google.com> [Mon, 14 Aug 2017 23:26:51 -0700] rev 33823
commit: move dirstateguard creation out of try-block This is just a simple refactoring to make the next patch simpler. If the dirstateguard constructor raises an exception, the finally-block won't do anything anyway, so this is functionally equivalent (and there is no except-block). Differential Revision: https://phab.mercurial-scm.org/D405
Wed, 16 Aug 2017 00:25:20 +0530 copies: add more details to the documentation of mergecopies()
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 16 Aug 2017 00:25:20 +0530] rev 33822
copies: add more details to the documentation of mergecopies() This documentation is very helpful for any developer to understand what copytracing is and what the function does. Since this is the main function of doing copytracing, I have also included bits about copytracing in it. This additions are picked from a doc by Stash@Fb. So thanks to him. Differential Revision: https://phab.mercurial-scm.org/D409
Wed, 26 Jul 2017 17:58:19 -0400 httppeer: add support for httppostargs when we're sending a file
Augie Fackler <augie@google.com> [Wed, 26 Jul 2017 17:58:19 -0400] rev 33821
httppeer: add support for httppostargs when we're sending a file This is probably only used in the 'unbundle' command, but the code ended up being cleaner to make it generic and treat *all* httppostargs with a non-args request body as though they were file-like in nature. It also means we get test coverage more or less for free. A previous version of this change didn't use io.BytesIO, and it was a lot more complicated. This also fixes a server-side bug, so anyone using httppostargs should update all of their servers to this revision or later *before* this gets to their clients, otherwise servers will hang trying to over-read the POST body. Differential Revision: https://phab.mercurial-scm.org/D231
Tue, 15 Aug 2017 21:09:33 +0900 i18n: get translation entries for description of each compression engines
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 15 Aug 2017 21:09:33 +0900] rev 33820
i18n: get translation entries for description of each compression engines Now, hggettext can be applied safely on util.py, of which i18nfunctions contains appropriate objects related to each compression types.
Tue, 15 Aug 2017 21:06:26 +0900 i18n: ignore docstring for modules under mercurial
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 15 Aug 2017 21:06:26 +0900] rev 33819
i18n: ignore docstring for modules under mercurial Docstring of modules is needed only for "hg help -e EXTNAME". This is a preparation for applying hggettext on util.py, which has module docstring, but it isn't needed for translation.
Tue, 15 Aug 2017 19:27:24 +0900 i18n: use saved object to get actual function information if available
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 15 Aug 2017 19:27:24 +0900] rev 33818
i18n: use saved object to get actual function information if available To list up available compression types instead of ".. bundlecompressionmarker" in "hg help bundlespec" output, proxy object "docobject" is used, because: - current online help system requires that __doc__ of registered object (maybe, function) is already well formatted in reST syntax - bundletype() method of compressionengine classes is used to list up available compression types, but - __doc__ of bundletype() object (= "instancemethod") is read-only On the other hand, hggettext requires original function object, in order to get document location in source code. Therefore, description of each compression types isn't yet translatable. Even if translatable, translators should make much effort to determine location of original texts in source code. To get actual function information, this patch makes hggettext use function object saved as "_origfunc", if it is available. This patch also changes bundlecompressiontopics() side, in order to explain how these changes work easily. This patch is a part of preparations for making description of each compression types translatable.
Sun, 13 Aug 2017 15:20:16 +0900 i18n: ignore doctest part to avoid warning at "make update-pot"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sun, 13 Aug 2017 15:20:16 +0900] rev 33817
i18n: ignore doctest part to avoid warning at "make update-pot" hggettext assumes that backslashes in docstring are always doubled in original source code, in order to find the location of original docstring out certainly. This assumption almost always works as expected. But doctest easily breaks it, because many of backslashes in doctests aren't doubled. This mismatching causes "unknown offset in ..." warning at "make update-pot". To avoid such warning, this patch ignores doctest part of docstring before finding the location of original docstring out. BTW, at this patch, only person() in templatefilters.py has doctest part, which causes "unknown offset ..." warning. Therefore, just making backslashes in that doctest doubled can avoid such warning, too. But forcing doctest writers to double backslashes in doctest isn't reasonable, IMHO.
Wed, 02 Aug 2017 01:15:07 +0900 largefiles: fix help text to avoid warning at "make update-pot"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 02 Aug 2017 01:15:07 +0900] rev 33816
largefiles: fix help text to avoid warning at "make update-pot" This change helps hggettext to find out help text in original source, because it assumes that backslash ('\') is doubled in docstring.
Wed, 02 Aug 2017 01:03:20 +0900 i18n: make hggettext use original docstring to compute offset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 02 Aug 2017 01:03:20 +0900] rev 33815
i18n: make hggettext use original docstring to compute offset Before this patch, hggettext uses __doc__ of each functions to compute offset of document text. But __doc__ of many functions is already modified by decorators in registrar (e.g. @templatekeyword adds ":NAME: " prefix to it), and hggettext can not find it out in original source. This causes many "unknown offset in ..." warning at "make update-pot", and leaving them might cause overlooking serious problems. This patch makes hggettext use original docstring, which decorators in registrar save into _origdoc, to compute offset. Even after this patch, there are still a few "unknown offset in ..." warning at "make update-pot" for specific reasons. These will be fixed later one by one.
Fri, 11 Aug 2017 14:21:49 +0200 run-tests: also color the summary messages (skipped, failed...)
Matthieu Laneuville <matthieu.laneuville@octobus.net> [Fri, 11 Aug 2017 14:21:49 +0200] rev 33814
run-tests: also color the summary messages (skipped, failed...)
Sun, 13 Aug 2017 00:17:13 -0700 crecord: fixes the formatting of the select status in the status line
Filip Filmar <filmil@gmail.com> [Sun, 13 Aug 2017 00:17:13 -0700] rev 33813
crecord: fixes the formatting of the select status in the status line The status line in the crecord has the "space" status field which has variable length depending on the length of the status label in the language of choice. In English, the status labels are "space: deselect" and "space:select". The "deselect" label is 2 glyphs longer. This makes the terminal output jump around if the terminal width is just right so that the shorter label makes the status line 1 line long, and the longer label makes it 2 lines long. This patch formats the selected status into a fixed-width field. The field width is the maximum of the lengths of the two possible labels, to account for differing translations and label lengths. This should make the label behavior uniform across localizations. There does not seem to be a test for crecord, so I verified the change manually with a local build of 'hg'.
Mon, 14 Aug 2017 13:35:26 +0900 cext: move PyInt macros to charencode.c properly
Yuya Nishihara <yuya@tcha.org> [Mon, 14 Aug 2017 13:35:26 +0900] rev 33812
cext: move PyInt macros to charencode.c properly Python3 build was broken at e9996bd7203f.
(0) -30000 -10000 -3000 -1000 -300 -100 -48 +48 +100 +300 +1000 +3000 +10000 tip