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
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
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
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
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
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.
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.
Yuya Nishihara <yuya@tcha.org> [Sun, 13 Aug 2017 14:12:28 +0900] rev 33851
templatekw: specify plural form of instability
Follows up
40739aef97f7.
Yuya Nishihara <yuya@tcha.org> [Wed, 16 Aug 2017 13:57:19 +0900] rev 33850
templatekw: rename termwidth() per convention
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
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
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
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
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
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