Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Console View

Legend:   Passed Failed Warnings Failed Again Running Exception Offline No data

Jun Wu
demandimport: move HGDEMANDIMPORT test to __init__.py

The logic is now shared between demandimport{2,3}.

Differential Revision: https://phab.mercurial-scm.org/D445
Jun Wu
demandimport: disable if chg is being used

In chg's case, making modules lazily loaded could actually slow down things
since chg pre-imports them. Therefore disable demandimport if chg is being
used.

This is not done by setting `HGDEMANDIMPORT` chg client-side because that
has side-effects on child processes (hooks, etc).

Differential Revision: https://phab.mercurial-scm.org/D351
Danny Hooper
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
Gregory Szorc
tests: test behavior of IOError during transactions (issue5658)

ui._write(), ui._write_err(), and ui.flush() all trap IOError and
re-raise as error.StdioError. If a caller doesn't catch StdioError
when writing to stdio, it could bubble all the way to dispatch.

This commit adds tests for I/O failures around various transaction
operations.

The most notable badness is during abort. Here, an uncaught StdioError
will result in incomplete transaction rollback, requiring an
`hg rollback` to recover. This can result in a client "corrupting"
a remote repo via terminated HTTP and SSH socket.
Gregory Szorc
ui: restore behavior to ignore some I/O errors (issue5658)

e9646ff34d55 and 1bfb9a63b98e refactored ui methods to no longer
silently swallow some IOError instances. This is arguably the
correct thing to do. However, it had the unfortunate side-effect
of causing StdioError to bubble up to sensitive code like
transaction aborts, leading to an uncaught exceptions and failures
to e.g. roll back a transaction. This could occur when a remote
HTTP or SSH client connection dropped. The new behavior is
resulting in semi-frequent "abandonded transaction" errors on
multiple high-volume repositories at Mozilla.

This commit effectively reverts e9646ff34d55 and 1bfb9a63b98e to
restore the old behavior.

I agree with the principle that I/O errors shouldn't be ignored.
That makes this change... unfortunate. However, our hands are tied
for what to do on stable. I think the proper solution is for the
ui's behavior to be configurable (possibly via a context manager).
During critical sections like transaction rollback and abort, it
should be possible to suppress errors. But this feature would not
be appropriate on stable.
Yuya Nishihara
py3: select input or raw_input by pycompat

This seems slightly cleaner.
  • Solaris 12 sparc tests: run-tests.py (python 2.7.13) failed -  stdiowarnings (3)
  • hg tests: pure failed -  stdio
Yuya Nishihara
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.
  • Solaris 12 sparc tests: run-tests.py (python 2.7.13) failed -  stdiowarnings (3)
  • hg tests: pure failed -  stdio
Boris Feld
revset: mark evolution-related revsets as experimental

Differential Revision: https://phab.mercurial-scm.org/D416
  • Solaris 12 sparc tests: run-tests.py (python 2.7.13) failed -  stdiowarnings (3)
  • hg tests: pure failed -  stdio
Boris Feld
obsmarker: fix precnode deprecation

The deprecation message for marker.precnode was wrong. Fix the typo.

Differential Revision: https://phab.mercurial-scm.org/D413
  • Solaris 12 sparc tests: run-tests.py (python 2.7.13) failed -  stdiowarnings (3)
  • hg tests: pure failed -  stdio
Jun Wu
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
  • Solaris 12 sparc tests: run-tests.py (python 2.7.13) failed -  stdiowarnings (3)
  • hg tests: pure failed -  stdio
Boris Feld
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
  • Solaris 12 sparc tests: run-tests.py (python 2.7.13) failed -  stdiowarnings (3)
  • hg tests: pure failed -  stdio
Yuya Nishihara
templatekw: rename termwidth() per convention
  • Solaris 12 sparc tests: run-tests.py (python 2.7.13) failed -  stdiowarnings (3)
  • hg tests: pure failed -  stdio
Yuya Nishihara
templatekw: specify plural form of instability

Follows up 40739aef97f7.
  • Solaris 12 sparc tests: run-tests.py (python 2.7.13) failed -  stdiowarnings (3)
  • hg tests: pure failed -  stdio
Nathan Goldbaum
log: mention ui.logtemplate in the help text
Jun Wu
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
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
rebase: remove rebaseset from _checkobsrebase

The parameter is not used. Therefore removed.

Differential Revision: https://phab.mercurial-scm.org/D85
Jun Wu
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
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
Jun Wu
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
Jun Wu
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
Jun Wu
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
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
Augie Fackler
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
Augie Fackler
python3: whitelist another *13* tests that now pass

Differential Revision: https://phab.mercurial-scm.org/D302
Augie Fackler
python3: whitelist another *13* tests that now pass

Differential Revision: https://phab.mercurial-scm.org/D302
  • hg tests: pure failed -  stdio
Augie Fackler
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
  • hg tests: pure failed -  stdio
Augie Fackler
extensions: don't give AttributeError bytes message on Python 3

Differential Revision: https://phab.mercurial-scm.org/D353
  • hg tests: pure failed -  stdio
Augie Fackler
python3: whitelist four more passing tests

Differential Revision: https://phab.mercurial-scm.org/D298
  • hg tests: pure failed -  stdio
Augie Fackler
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
  • hg tests: pure failed -  stdio
Pulkit Goyal
pushvars: add a coreconfigitem for push.pushvars.server

Differential Revision: https://phab.mercurial-scm.org/D359
Jun Wu
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
Jun Wu
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
Jun Wu
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
Jun Wu
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
Phil Cohen
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
Phil Cohen
filemerge: pass contexts to simplemerge

Otherwise, this should be a no-op.

Differential Revision: https://phab.mercurial-scm.org/D373
Phil Cohen
filemerge: extract `_picklabels` as a helper function

This shortens `simplemerge()` and is a bit cleaner, IMO.

Differential Revision: https://phab.mercurial-scm.org/D376
Phil Cohen
simplemerge: use contexts to read file data from, if passed

Differential Revision: https://phab.mercurial-scm.org/D374
Martin von Zweigbergk
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