Commit Graph

22 Commits

Author SHA1 Message Date
Gilles Moris
c60f7ce967 summary: move the parents phase marker to commit line (issue4688)
The phase of the pending commit depends on the parent of the working directory
and on the phases.newcommit configuration.
First, this information rather depend on the commit line which describe the
pending commit.
Then, we only want to be advertised when the pending phase is going to be higher
than the default new commit phase.

So the format will change from

$ hg summary
parent: 2:ab91dfabc5ad
 foo
parent: 3:24f1031ad244 tip
 bar
branch: default
commit: 1 modified, 1 unknown, 1 unresolved (merge)
update: (current)
phases: 1 secret (secret)

to

parent: 2:ab91dfabc5ad
 foo
parent: 3:24f1031ad244 tip
 bar
branch: default
commit: 1 modified, 1 unknown, 1 unresolved (merge) (secret)
update: (current)
phases: 1 secret
2015-05-29 22:23:58 +02:00
Gilles Moris
7771de9187 summary: add a phase line (draft, secret) to the output
The number of draft and secret changesets are currently not summarized.
This is an important information because the number of drafts give some rough
idea of the number of outgoing changesets in typical workflows, without needing
to probe a remote repository. And a non-zero number of secrets means that
those changeset will not be pushed.

If the repository is "dirty" - some draft or secret changesets exists - then
summary will display a line like:

phases: X draft, Y secret (public)

The phase in parenthesis corresponds to the highest phase of the parents of
the working directory, i.e. the current phase.

By default, the line is not printed if the repository is "clean" - all
changesets are public - but if verbose is activated, it will display:

phases: (public)

On the other hand, nothing will be printed if quiet is in action.

A few tests have been added in test-phases.t to cover the -v and -q cases.
2015-05-14 17:38:38 +02:00
Durham Goode
312ed291dd obsolete: update tests to use obsolete options
The obsolete._enabled flag has become a config option. This updates all but one
of the tests to use the minimal number of flags necessary for them to pass.  For
most tests this is just 'createmarkers', for a couple tests it's
'allowunstable', and for even fewer it's 'exchange'.
2014-10-14 13:34:25 -07:00
Mads Kiilerich
9f5571e9f8 bisect: --command without --noupdate should flag the parent rev it tested
b33db384a66e not only introduced the 'bisect(current)' revset predicate, it
also changed how the 'current' revision is used in combination with --command.
The new behaviour might be ok for --noupdate where the working directory and
its revision shouldn't be used, but it also did that when --command is used to
run a command on the currently checked out revision then it could register the
test result on the wrong revision.

An example:

Before, bisect with --command could use the wrong revision when recording the
test result:

  $ hg up -qr 0
  $ hg bisect --command "python \"$TESTTMP/script.py\" and some parameters"
  changeset 31:58c80a7c8a40: bad
  abort: inconsistent state, 31:58c80a7c8a40 is good and bad

Now it works as before and as expected and uses the working directory revision
for the --command result:

  $ hg up -qr 0
  $ hg bisect --command "python \"$TESTTMP/script.py\" and some parameters"
  changeset 0:b99c7b9c8e11: bad
  ...
2013-11-16 15:46:29 -05:00
Mads Kiilerich
7014dca534 bisect: report "both good and bad" as such, not as "not directly related" 2013-11-10 18:51:21 +01:00
Bryan O'Sullivan
b571e7ddcf summary: add tests for some extensions we plan to modify 2013-05-14 11:23:17 -07:00
Pierre-Yves David
ea74bd73ed bisect: use changelog for iteration
With changelog filtering, we can not use xrange anymore. We have to use the
changelog to do the iteration. This way, the changelog excludes filtered
revision and we can safely use what we iterate over.

Without this changes, bisect crash with a traceback if there is filtered
revision in the repo. Tests have been updated.
2013-01-22 03:23:02 +01:00
Mads Kiilerich
c4b6cff1d3 bisect: store state sorted 2012-12-12 02:38:14 +01:00
Adrian Buehlmann
c288410706 test-bisect: adapt for Windows 2012-06-15 01:02:44 +02:00
Martin Geisler
1b024d518a bisect: lowercase status message 2012-06-12 14:18:18 +02:00
Bryan O'Sullivan
2493c7a8d1 bisect: set HG_NODE when runing a command
When running a command, set the environment variable HG_NODE to
tell the command which changeset is being visited.
2012-05-08 15:31:00 -07:00
Bryan O'Sullivan
01cb9841ca bisect: track the current changeset (issue3382)
Introduce a new revset feature, bisect(current), that identifies
the changeset currently being bisected.
2012-05-08 15:29:09 -07:00
Mads Kiilerich
d648884b09 tests: add 'hghave system-sh' to skip tests on windows 2011-11-16 03:45:14 +01:00
Yann E. MORIN
0380741552 revset: rename bisected() to bisect()
Rename the 'bisected' keyword to simply 'bisect'.
Still accept the old name, but no longer advertise it.

As discussed with Matt on IRC.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-09-18 22:54:11 +02:00
Benoit Boissinot
544721ef7a revset: add a revset command to get bisect state. 2011-03-12 18:48:30 +01:00
Mads Kiilerich
ea28311c45 tests: avoid checking the exitcode of false
Solaris false returns 255 instead of 1, so we remove one unneeded instance and
replaces another with (exit 1) as suggested by Brodie Rao.
2010-09-25 21:52:17 +02:00
Martin Geisler
3d112b3042 tests: added a short description to issue numbers
Many tests already had a short line to describe what IssueXXX is
about. I find that quite useful when reading a test.
2010-09-24 10:13:49 +02:00
Matt Mackall
5d9fc42983 tests: drop a bunch of sed calls from unified tests 2010-09-21 16:44:13 -05:00
Matt Mackall
ac660e9f65 tests: cleanup exit code handling in unified tests 2010-09-21 16:00:02 -05:00
Matt Mackall
08439e0f2d tests: add exit codes to unified tests 2010-09-16 17:51:32 -05:00
Dirkjan Ochtman
fe46f658e0 bisect: allow revsets in addition to single revs (issue2360) 2010-09-08 12:53:15 +02:00
Nicolas Dumazet
72eb746e29 tests: convert test-bisect 2010-08-30 12:02:31 +09:00