outgoing/push ignore 'secret' phase

Create issue
Issue #382 new
Esben Skovenborg created an issue

I find phases very useful, when working with hgsubversion. Changesets marked 'public' were pulled from SVN, 'draft' changesets is what I'm working on, to be pushed shortly, and 'secret' changesets should absolutely not be pushed to the SVN server (yet).

However, hgsubversion currently disregards phases, and will push 'secret' changesets to the SVN server without even a warning. This is not expected, as - "All commands related to changeset exchange will ignore secret changesets, including: push, pull, incoming, outgoing." [http://mercurial.selenic.com/wiki/Phases#Core_Command]

It would be very useful if the overridden core commands (especially outgoing, push) respected phases like these commands normally do.

I'm using hgsubversion 77b22e5b4ea6 (tag 1.5).

Comments (5)

  1. Anton M

    +1 It would be very useful. I'd like also other branches beside default to be ignored - for the same purpose

  2. Esben Skovenborg reporter

    As a sort of work-around, note that because outgoing reports the changesets that are actually going to be pushed - including any in the secret phase - it's possible to check with the command:

    hg log -r "outgoing() & secret()"

    If this command returns any changesets at all an imminent push to SVN should probably be interrupted or reviewed.

  3. Yanncha

    The same behaviour appears also when working with mq patches : unapplied patches won't be pushed, but all applied patches appear in hg outgoing, and will be finished (commited) and pushed, even if they are marked as secret.

    In addition, it seems to break the patch queue, so you have to manually edit the patch status in "status" file to mark the patches as unapplied and then remove the patches.

  4. Ben Fritz

    With this issue, combined with issue #243, is there ANY way to avoid pushing a committed changeset other than stripping it from your repository and restoring from the backup bundle later?

  5. Log in to comment