Mercurial > hg
annotate tests/test-hooklib-reject_new_heads.t @ 49779:7d6c8943353a stable
hg: show the correct message when cloning an LFS repo with extension disabled
The `extensions._disabledpaths()` doesn't handle fetching help from `__index__`,
so it returns an empty dictionary of paths. That means None is always returned
from `extensions.disabled_help()` when embedding resources inside the pyoxidizer
or py2exe binary, regardless of the arg or if is an external extension stored in
the filesystem. And that means wrongly telling the user with an explicitly
disabled LFS extension that it will be enabled locally upon cloning from an LFS
remote. That causes test-lfs-serve.t:295 to fail.
This effectively reverts most of the rest of 843418dc0b1b, while keeping the
help text change in place (which was specifically identified as a problem).
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 05 Dec 2022 15:14:33 -0500 |
parents | 4cabeea6d214 |
children |
rev | line source |
---|---|
44413
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
1 $ cat <<EOF >> $HGRCPATH |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
2 > [extensions] |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
3 > hooklib = |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
4 > |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
5 > [phases] |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
6 > publish = False |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
7 > EOF |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
8 $ hg init a |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
9 $ hg --cwd a debugbuilddag '.:parent.*parent' |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
10 $ hg --cwd a log -G |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
11 o changeset: 2:fa942426a6fd |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
12 | tag: tip |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
13 | parent: 0:1ea73414a91b |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
14 | user: debugbuilddag |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
15 | date: Thu Jan 01 00:00:02 1970 +0000 |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
16 | summary: r2 |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
17 | |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
18 | o changeset: 1:66f7d451a68b |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
19 |/ user: debugbuilddag |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
20 | date: Thu Jan 01 00:00:01 1970 +0000 |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
21 | summary: r1 |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
22 | |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
23 o changeset: 0:1ea73414a91b |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
24 tag: parent |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
25 user: debugbuilddag |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
26 date: Thu Jan 01 00:00:00 1970 +0000 |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
27 summary: r0 |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
28 |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
29 $ hg init b |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
30 $ cat <<EOF >> b/.hg/hgrc |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
31 > [hooks] |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
32 > pretxnclose.reject_new_heads = \ |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
33 > python:hgext.hooklib.reject_new_heads.hook |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
34 > EOF |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
35 $ hg --cwd b pull ../a |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
36 pulling from ../a |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
37 requesting all changes |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
38 adding changesets |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
39 adding manifests |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
40 adding file changes |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
41 error: pretxnclose.reject_new_heads hook failed: Changes on branch 'default' resulted in multiple heads |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
42 transaction abort! |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
43 rollback completed |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
44 abort: Changes on branch 'default' resulted in multiple heads |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
45 [255] |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
46 $ hg --cwd b pull ../a -r 1ea73414a91b |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
47 pulling from ../a |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
48 adding changesets |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
49 adding manifests |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
50 adding file changes |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
51 added 1 changesets with 0 changes to 0 files |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
52 new changesets 1ea73414a91b (1 drafts) |
4cabeea6d214
hgext: start building a library for simple hooks
Joerg Sonnenberger <joerg@bec.de>
parents:
diff
changeset
|
53 (run 'hg update' to get a working copy) |