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

Yuya Nishihara
py3: wrap tempfile.mkstemp() to use bytes path

This patch just flips the default to use a bytes path on Python 3.
ca1cf9b3cce7 is backed out as the bundlepath should be bytes now.
Yuya Nishihara
py3: wrap tempfile.NamedTemporaryFile() to return bytes fp.name

Unlike its name, tempfile.NamedTemporaryFile is not a class, so I renamed
the pycompat version to look like a plain function.

Since temp.name uses in the infinitepush extension aren't bytes-safe, this
patch leaves them unmodified. Another weird thing is tempfile.mktemp(),
which does not accept bytes suffix nor prefix. Sigh.
Yuya Nishihara
py3: wrap tempfile.mkdtemp() to use bytes path

This also flips the default to use a bytes path on Python 3.
Yuya Nishihara
extensions: peek command table of disabled extensions without importing

With chg where demandimport disabled, and if disk cache not warm, it took
more than 5 seconds to get "unknown command" error when you typo a command
name. This is horrible UX.

The new implementation is less accurate than the original one as Python
can do anything at import time and cmdtable may be imported from another
module, but I think it's good enough.

Note that the new implementation has to parse .py files, which is slightly
slower than executing .pyc if demandimport is enabled.
Yuya Nishihara
extensions: remove strip_init=True from _disabledpaths()

It's no longer used.
Yuya Nishihara
help: correct signature of separate() template function

Without the dots, it looked as if separate() would take a list of arguments.
Pulkit Goyal
graft: drop --user and --date values info from hint in case of conflicts

After previous patch, we have started preserving user and date values in
graftstate and reusing them during `hg graft --continue`. Now passing --user and
--date again with --continue makes no sense. Let's drop them from the hint.

Differential Revision: https://phab.mercurial-scm.org/D3660
Boris Feld
phases: define an official tuple of mutable phases

Such tuple was already manually defined in a couple of place. Having an
official definition makes it easy to introduce of new phases.
Boris Feld
phases: define an official tuple of phases we do not share

Same motivation as for `mutablephases`, having a single definition helps with
updating phases logic.
Matt Harbison
terse: pconvert() entries added to the temporary terse dict for Windows

Recent additional testing revealed this problem on Windows:

  --- tests/test-status.t.err
  +++ tests/test-status.t.err
  @@ -109,7 +109,7 @@

  tweaking defaults works
    $ hg status --cwd a --config ui.tweakdefaults=yes
  -  ? .
  +  ? ../a/
    ? ../b/
    ? ../in_root
    $ HGPLAIN=1 hg status --cwd a --config ui.tweakdefaults=yes
  @@ -120,7 +120,7 @@
    ? b/in_b (glob)
    ? in_root
    $ HGPLAINEXCEPT=tweakdefaults hg status --cwd a --config ui.tweakdefaults=yes
  -  ? .
  +  ? ..\a\
    ? ../b/
    ? ../in_root (glob)

AFAICT, the status list (input and output here) is always in '/' format.  The
'\' printed output on Windows is because each file is run through repo.pathto()
-> dirstate.pathto() -> util.pathto().  (And that function states that the
argument uses '/' separators.)

I fixed a similar issue in 362096cfdb1f, and given the apparent need for these
strings to be in '/' format, I wonder if cmdutil.dirnode() should be rewritten
to avoid os.path.join().  But it looks like all entries added to the temporary
terse dict should use '/' now, and cmdutil.tersedir() looks like the only user.
Boris Feld
repoview: use 'phasecache.getrevset' when computing 'unserved' filter

This reuses a precomputed set, being much faster than manual iteration.

Computing the "unserved" filter speed up by 55%.

before: wall 0.014671 comb 0.020000 user 0.020000 sys 0.000000 (best of 180)
after:  wall 0.006623 comb 0.010000 user 0.010000 sys 0.000000 (best of 401)

The "unserved" filter is used to restrict the revisions client can pull from a
server. (eg: secret changesets)
hindlemail
filemerge: don't pass function name as loadpath's module_name param
Matt Harbison
lfs: clarify pointer validation error messages

It wasn't obvious that LFS was involved from the error messages when `hg verify`
fails.
hindlemail
filemerge: don't pass function name as loadpath's module_name param
Boris Feld
phases: define an official tuple of mutable phases

Such tuple was already manually defined in a couple of place. Having an
official definition makes it easy to introduce of new phases.
Matt Harbison
terse: pconvert() entries added to the temporary terse dict for Windows

Recent additional testing revealed this problem on Windows:

  --- tests/test-status.t.err
  +++ tests/test-status.t.err
  @@ -109,7 +109,7 @@

  tweaking defaults works
    $ hg status --cwd a --config ui.tweakdefaults=yes
  -  ? .
  +  ? ../a/
    ? ../b/
    ? ../in_root
    $ HGPLAIN=1 hg status --cwd a --config ui.tweakdefaults=yes
  @@ -120,7 +120,7 @@
    ? b/in_b (glob)
    ? in_root
    $ HGPLAINEXCEPT=tweakdefaults hg status --cwd a --config ui.tweakdefaults=yes
  -  ? .
  +  ? ..\a\
    ? ../b/
    ? ../in_root (glob)

AFAICT, the status list (input and output here) is always in '/' format.  The
'\' printed output on Windows is because each file is run through repo.pathto()
-> dirstate.pathto() -> util.pathto().  (And that function states that the
argument uses '/' separators.)

I fixed a similar issue in 362096cfdb1f, and given the apparent need for these
strings to be in '/' format, I wonder if cmdutil.dirnode() should be rewritten
to avoid os.path.join().  But it looks like all entries added to the temporary
terse dict should use '/' now, and cmdutil.tersedir() looks like the only user.
Boris Feld
phases: define an official tuple of phases we do not share

Same motivation as for `mutablephases`, having a single definition helps with
updating phases logic.
Boris Feld
repoview: use 'phasecache.getrevset' when computing 'unserved' filter

This reuses a precomputed set, being much faster than manual iteration.

Computing the "unserved" filter speed up by 55%.

before: wall 0.014671 comb 0.020000 user 0.020000 sys 0.000000 (best of 180)
after:  wall 0.006623 comb 0.010000 user 0.010000 sys 0.000000 (best of 401)

The "unserved" filter is used to restrict the revisions client can pull from a
server. (eg: secret changesets)
Pulkit Goyal
tests: add test showing --continue not preserving --date and --user flags

This patch adds test showing that we don't preserve the user passed --date and
--user values in `hg graft`. I was fixing that and realized this is untested.
Adding tests before so that behavior change or the fix is easy to realize.

Differential Revision: https://phab.mercurial-scm.org/D3658
Pulkit Goyal
graft: drop --user and --date values info from hint in case of conflicts

After previous patch, we have started preserving user and date values in
graftstate and reusing them during `hg graft --continue`. Now passing --user and
--date again with --continue makes no sense. Let's drop them from the hint.

Differential Revision: https://phab.mercurial-scm.org/D3660
Pulkit Goyal
graft: store user passed date and user information in graftstate

Right now, `hg help graft` says:

The -c/--continue option does not reapply earlier options, except for --force.

which should be treated as a bug.

A good user experience is that the commands remember the arguments passed
initially and preserve them during `hg graft --continue`.

This patch starts storing the user and date information in graftstate if user
passed it. Upcoming patches will make sure we preserve that information during
--continue and them don't allow user to pass any new arguments with --continue.

I don't think there is any another `--continue` flag which allows new options to
be passed with it.

Differential Revision: https://phab.mercurial-scm.org/D3657
Pulkit Goyal
graft: reuse --user and --date values in `hg graft --continue` (BC)

Reading the user and date information from graftstate during `hg graft
--continue` will help us in preserving the user and date arguments passed when
`hg graft` was called. This patch reads that information and reuses that while
running `hg graft --continue`. So after this patch, --user and --date values are
preserved even if conflicts occur and user don't need to pass them again.

The test changes demonstrate the fix.

This is a backward incompatible change but I think of this more as a bug fix.
Also thinking about removing the line from `hg help graft` which says --continue
does not reapply other flags but need to check what are the other flags which
needs to be preserved.

Differential Revision: https://phab.mercurial-scm.org/D3659
Pulkit Goyal
graft: use cmdstate.delete() to delete the state file

Previous patches start using state.cmdstate() class for statefiles. The class
has a function delete() to delete the state file. This patch replaces the
existing repo.vfs.unlink() with that delete() function.

Differential Revision: https://phab.mercurial-scm.org/D3656
John Stiles
graph: add outputgraph() function, called by ascii() to print
the graph to the ui.

This allows a cleaner entrypoint for extensions to tweak the
graph output without needing to rewrite all of ascii(), or needing
to manually guess where the graph nodes/edges end and the rev
note portion begins.

This patch does not affect graph output or behavior in any way.

Differential Revision: https://phab.mercurial-scm.org/D3655
Pulkit Goyal
graft: add test for reading old graftstate files with new mechanism

This tests the reading of old graftstate file using the new logic. The tests
shows that if user is in middle of a graft and then updates their mercurial to
the version where we have new graftstate format, we can still read the old graft
state format files correctly.

Differential Revision: https://phab.mercurial-scm.org/D2597
Pulkit Goyal
graft: start using the cmdstate class to read and write data to graftstate

This patch replaces the logic to read and write data to graftstate file to use
the state.cmdstate() class.

The previous graftstate format didn't had any version number on top of that, so
we have to catch the CorruptedState error and then read the graftstate in case
of old state files.

This will help us to implement nice additions to graft commands like
`--no-commit`, `--abort`, `--stop` flags.

Passing on test-graft.t shows that things are working fine.

Differential Revision: https://phab.mercurial-scm.org/D3654
Pulkit Goyal
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
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
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
help: mention pattern syntax of latesttag() template function
Matt Harbison
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.
Matt Harbison
py3: replace str.format(x) with `str % x` in githelp
Yuya Nishihara
hgweb: do not try to replace signal handlers while locking

According to the issue 5889, mod_wsgi issues a warning on signal.signal()
call, and we wouldn't want to see it in error log. The problem addressed
by d77c3b023393 could potentially occur in web session, but that would be
less likely than in user processes.
Yuya Nishihara
hgweb: wrap {annotate} with mappinggenerator

No bare generator of mappings should be put in a template mapping.
Yuya Nishihara
hgweb: wrap {lastchange} of bookmarks with mappinglist

It was an 1-length list of a mapping, can be wrapped with a mappinglist.
Yuya Nishihara
hgweb: wrap {entries}* of filelog with mappinglist

They were lists of mappings.
Yuya Nishihara
hgweb: wrap {bookmarks} of summary with mappinggenerator

No bare generator of mappings should be put in a template mapping.
Yuya Nishihara
hgweb: wrap {parents} of {annotate} with mappinggenerator

It's a generator of at most two mappings, which has to be wrapped.
Yuya Nishihara
lock: add internal config to not replace signal handlers while locking

signal.signal() is blocked in some WSGI environments, and a horrible warning
is sent to the server log. So we need a way to disable it, and I think
abusing ui.config is the simplest workaround.
Yuya Nishihara
hgweb: wrap {diffopts} of annotate by hybriddict()

The diffopts here is a plain dict, which should be wrapped by hybriddict.