equal
deleted
inserted
replaced
|
1 $ cat <<EOF >> $HGRCPATH |
|
2 > [extensions] |
|
3 > hooklib = |
|
4 > |
|
5 > [phases] |
|
6 > publish = False |
|
7 > EOF |
|
8 $ hg init a |
|
9 $ hg --cwd a debugbuilddag . |
|
10 $ hg --cwd a phase --public 0 |
|
11 $ hg init b |
|
12 $ cat <<EOF >> b/.hg/hgrc |
|
13 > [hooks] |
|
14 > pretxnclose-phase.enforce_draft_commits = \ |
|
15 > python:hgext.hooklib.enforce_draft_commits.hook |
|
16 > EOF |
|
17 $ hg --cwd b pull ../a |
|
18 pulling from ../a |
|
19 requesting all changes |
|
20 adding changesets |
|
21 adding manifests |
|
22 adding file changes |
|
23 error: pretxnclose-phase.enforce_draft_commits hook failed: New changeset 1ea73414a91b in phase 'public' rejected |
|
24 transaction abort! |
|
25 rollback completed |
|
26 abort: New changeset 1ea73414a91b in phase 'public' rejected |
|
27 [255] |
|
28 $ hg --cwd a phase --force --draft 0 |
|
29 $ hg --cwd b pull ../a |
|
30 pulling from ../a |
|
31 requesting all changes |
|
32 adding changesets |
|
33 adding manifests |
|
34 adding file changes |
|
35 added 1 changesets with 0 changes to 0 files |
|
36 new changesets 1ea73414a91b (1 drafts) |
|
37 (run 'hg update' to get a working copy) |
|
38 $ hg --cwd a phase --public 0 |
|
39 $ hg --cwd b pull ../a |
|
40 pulling from ../a |
|
41 searching for changes |
|
42 no changes found |
|
43 error: pretxnclose-phase.enforce_draft_commits hook failed: Phase change from 'draft' to 'public' for 1ea73414a91b rejected |
|
44 abort: Phase change from 'draft' to 'public' for 1ea73414a91b rejected |
|
45 [255] |