# hgrc/draft -- repository configuration for work-in-progress draft
# changesets before they are committed to the public history

[extensions]
evolve =
topic =

[phases]
# Keep draft-phase changesets pushed here as such -- don't transition
# them to public-phase.
publish = false

[server]
# Serve public-phase and draft-phase changesets, but not secret-phase
# changesets and not obsolete changesets.
view = visible

[hooks]
# Reject files that collide in normalization or case, so that this
# repository can be safely checked out on, e.g., macOS HFS+ or APFS.
pretxnchangegroup.reject_normcasecollision = python:netbsd_hghooks.reject_normcasecollision.hook

# Accept only draft changesets.
pretxnclose-phase.enforce_draft_commits = python:hgext.hooklib.enforce_draft_commits.hook

# Notify on transition from draft to public.
#
# XXX Shouldn't draft to public be done only in the public view, since
# you can't make things public in this view anyway?
#
# XXX Shouldn't we notify on transition from draft to
# obsolete-without-successor?
txnclose-phase.changeset_published = python:hgext.hooklib.changeset_published.hook
#txnclose.changeset_obsoleted = python:/etc/mercurial/changeset_obsoleted.py:hook

