Commit Graph

20 Commits

Author SHA1 Message Date
Matt Harbison
0afe294dbc outgoing: accept revset argument for --rev
There may be a more generic way that would add revset support to more commands
by adding revset support to addbranchrevs(), but given the proximity of the next
code freeze, a minimal change seems like the better choice.
2012-07-15 12:43:10 -04:00
Mads Kiilerich
fa1c4e5ebe tests: add missing trailing 'cd ..'
Many tests didn't change back from subdirectories at the end of the tests ...
and they don't have to. The missing 'cd ..' could always be added when another
test case is added to the test file.

This change do that tests (99.5%) consistently end up in $TESTDIR where they
started, thus making it simpler to extend them or move them around.
2012-06-11 01:40:51 +02:00
Patrick Mezard
aa6e824ce1 phase: make if abort on nullid for the good reason
The good reason being you cannot call retractboundary() on nullid, not
revset.set() cannot resolve '-1'.
2012-05-12 00:24:07 +02:00
Patrick Mezard
df9b03eafa test-phases: test changing null revision phase
The behaviour is correct but for bad reasons: the repo.set() call in
phase command fails for '-1'. It should be rejected explicitely by phase
boundary commands, sadly this is hard to do because phase changes are
not applied atomically.
2012-05-10 18:21:15 +02:00
Pierre-Yves David
c37b1089b6 branchmap: server should not advertise secret changeset in branchmap (Issue3303)
Discovery now use an overlay above branchmap to prune invisible "secret"
changeset from branchmap.

To minimise impact on the code during the code freeze, this is achieve by
recomputing non-secret heads on the fly when any secret changeset exists. This
is a computation heavy approach similar to the one used for visible heads. But
few sever should contains secret changeset anyway.  See comment in code for more
robust approach.

On local repo the wrapper is applied explicitly while the wire-protocol take
care of wrapping branchmap call in a transparent way. This could be unified by
the Peter Arrenbrecht and Sune Foldager proposal of a `peer` object.

An inappropriate `(+i heads)` may still appear when pushing new changes on a
repository with secret changeset. (see Issue3394 for details)
2012-04-24 16:32:44 +02:00
Patrick Mezard
e1749878c6 phase: when phase cannot be reduced, hint at --force and return 1 (BC)
Before, trying to change the phase of a "public" node to "draft" would result
in:

  $ hg phase --draft .
  no phases changed
  [0]

With this patch:

  $ hg phase --draft .
  cannot move 1 changesets to a more permissive phase, use --force
  no phases changed
  [1]

On partial failures, the exit status is now 1 instead of 0 and the number of
changed nodes is displayed while it was only with --verbose. It seems useful to
tell the user that despite the apparent failure, something changed.

  $ hg phase --draft '5 or 7'
  cannot move 1 changesets to a more permissive phase, use --force
  phase changed for 1 changesets
  [1]
2012-02-08 20:00:52 +01:00
Pierre-Yves David
ad2799644a phases: allow phase name in phases.new-commit settings
Before this commit only phase index where accepted
2012-01-30 17:46:15 +01:00
Mads Kiilerich
e347788597 tests: don't use alias
alias doesn't work in Solaris sh.
2012-01-27 03:00:03 +01:00
Pierre-Yves David
1b001a85f3 changeset_printer: display changeset phase on debug level
Backward compatibility make it hard to display it on higher level
2012-01-17 20:23:23 +01:00
Pierre-Yves David
a04b3a6ec3 phases: exclude secret when doing a local clone
This is achieved by denying copy clone when any secret changeset exist.
2012-01-11 17:26:27 +01:00
Pierre-Yves David
32c99d5daa phases: make outgoing object and discovery aware of exclusion
The outgoing object gains an "excluded" members holding all changesets which
were excluded because there where secret.

The core discovery code now remove secret changeset from discovery by default.
This means that any command relying on discovery will exclude secret changeset.
Most notable one are outgoing and bundle. (But bundle with and explicit
``--base`` still allow to bundle outgoing changeset.
2012-01-11 00:27:46 +01:00
Pierre-Yves David
a2fe028df9 phases: add a phases command to display and manipulate phases 2012-01-10 19:45:35 +01:00
Pierre-Yves David
47a0f8f964 phases: `{phase}` template keyword display the phase name
``{phaseidx}`` is providing the phase index as integer. This integer
 representation is useful when people need to use the fact that phase are
 ordered.

Test keep using the number version for readability purpose.
2012-01-06 11:20:49 +01:00
Pierre-Yves David
074b67eb86 phases: fix phase synchronization on push
The bugs seemed to show up when element not in future common changeset should
hold new hold phase data.

The whole phase push machinery was rewritten in the process.
2012-01-04 01:12:31 +01:00
Pierre-Yves David
b6988087ea phases: implements simple revset symbol
This changeset adds ``public()``, ``draft()`` and ``secret`` symbol for
revset.
2012-01-06 10:04:20 +01:00
Pierre-Yves David
8abd0aa7c9 phases: do not exchange secret changesets
Any secret changesets will be excluded from pull and push. Phase data are
properly synchronized on pull and push if a changeset is seen as secret locally
but is non-secret remote side.

This patch does not handle the case of a changeset secret on remote but known
locally.
2011-12-22 00:42:25 +01:00
Pierre-Yves David
ef5fe34436 phases: test the new-commit option and proper inheritence of phase 2011-12-22 00:40:46 +01:00
Pierre-Yves David
6284fc8c91 phases: add a bit more test for local phase movement. 2011-12-18 23:15:12 +01:00
Pierre-Yves David
0f1186823a phases: set new commit in 1-phase 2011-11-11 00:15:22 +01:00
Pierre-Yves David
fbd6b51e95 phases: add a very simple test
Note that the expected output is wrong as is should be phase-1. But
the machinery to plant new root is to come in later commit.
2011-11-04 00:40:47 +01:00