Mercurial > hg
annotate tests/test-demandimport.py.out @ 41163:0101a35deae2
phabricator: warn if unable to amend, instead of aborting after posting
There was a divergence in behavior here between obsolete and strip based
amending. I first noticed the abort when testing outside of the test harness,
but then had trouble recreating it here after reverting the code changes. It
turns out, strip based amend was successfully amending the public commit after
it was posted! It looks like the protection is in the `commit --amend` command,
not in the underlying code that it calls.
I considered doing a preflight check and aborting. But the locks are only
acquired at the end, if amending, and this is too large a section of code to be
wrapped in a maybe-it's-held-or-not context manager for my tastes.
Additionally, some people do post-push reviews, and amending is the default
behavior, so they shouldn't see a misleading error message.
The lack of a 'Differential Revision' entry in the commit message breaks a
{phabreview} test, so it had to be partially conditionalized.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 05 Jan 2019 15:20:33 -0500 |
parents | 1d0610fdd63b |
children |
rev | line source |
---|---|
36237
b39f0fdb0338
tests: actually check that HGDEMANDIMPORT=disable disables demandimport
Martin von Zweigbergk <martinvonz@google.com>
parents:
32448
diff
changeset
|
1 node = <module 'mercurial.node' from '?'> |
36251
c2c5f9f6fa21
tests: avoid referring to pvec in demandimport test
Martin von Zweigbergk <martinvonz@google.com>
parents:
36237
diff
changeset
|
2 errorproxy = <unloaded module 'error'> |
c2c5f9f6fa21
tests: avoid referring to pvec in demandimport test
Martin von Zweigbergk <martinvonz@google.com>
parents:
36237
diff
changeset
|
3 errorproxy.__doc__ = 'Mercurial exceptions. This ...' |
c2c5f9f6fa21
tests: avoid referring to pvec in demandimport test
Martin von Zweigbergk <martinvonz@google.com>
parents:
36237
diff
changeset
|
4 errorproxy.__name__ = 'mercurial.error' |
c2c5f9f6fa21
tests: avoid referring to pvec in demandimport test
Martin von Zweigbergk <martinvonz@google.com>
parents:
36237
diff
changeset
|
5 errorproxy.__dict__['__name__'] = 'mercurial.error' |
c2c5f9f6fa21
tests: avoid referring to pvec in demandimport test
Martin von Zweigbergk <martinvonz@google.com>
parents:
36237
diff
changeset
|
6 errorproxy = <proxied module 'error'> |
4631
e3afa670e484
demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
7 os = <unloaded module 'os'> |
e3afa670e484
demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
8 os.system = <built-in function system> |
e3afa670e484
demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
9 os = <module 'os' from '?'> |
37964
1d0610fdd63b
tests: migrate demandimport.py away from deprecated `util` module symbols
Matt Harbison <matt_harbison@yahoo.com>
parents:
36251
diff
changeset
|
10 procutil = <unloaded module 'procutil'> |
1d0610fdd63b
tests: migrate demandimport.py away from deprecated `util` module symbols
Matt Harbison <matt_harbison@yahoo.com>
parents:
36251
diff
changeset
|
11 procutil.system = <function system at 0x?> |
1d0610fdd63b
tests: migrate demandimport.py away from deprecated `util` module symbols
Matt Harbison <matt_harbison@yahoo.com>
parents:
36251
diff
changeset
|
12 procutil = <module 'mercurial.utils.procutil' from '?'> |
1d0610fdd63b
tests: migrate demandimport.py away from deprecated `util` module symbols
Matt Harbison <matt_harbison@yahoo.com>
parents:
36251
diff
changeset
|
13 procutil.system = <function system at 0x?> |
27535
0d0f4070f6d7
test-demandimport: ensure that relative imports are deferred
Bryan O'Sullivan <bos@serpentine.com>
parents:
21025
diff
changeset
|
14 hgweb = <unloaded module 'hgweb'> |
0d0f4070f6d7
test-demandimport: ensure that relative imports are deferred
Bryan O'Sullivan <bos@serpentine.com>
parents:
21025
diff
changeset
|
15 hgweb_mod = <unloaded module 'hgweb_mod'> |
0d0f4070f6d7
test-demandimport: ensure that relative imports are deferred
Bryan O'Sullivan <bos@serpentine.com>
parents:
21025
diff
changeset
|
16 hgweb = <module 'mercurial.hgweb' from '?'> |
4631
e3afa670e484
demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
17 fred = <unloaded module 're'> |
32447
252d2260c74e
demandimport: look for 'mod' suffix as alternative name for module reference
Yuya Nishihara <yuya@tcha.org>
parents:
30647
diff
changeset
|
18 remod = <unloaded module 're'> |
4631
e3afa670e484
demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
19 re = <unloaded module 'sys'> |
e3afa670e484
demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
20 fred = <unloaded module 're'> |
e3afa670e484
demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
21 fred.sub = <function sub at 0x?> |
e3afa670e484
demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
22 fred = <proxied module 're'> |
32447
252d2260c74e
demandimport: look for 'mod' suffix as alternative name for module reference
Yuya Nishihara <yuya@tcha.org>
parents:
30647
diff
changeset
|
23 remod = <module 're' from '?'> |
4631
e3afa670e484
demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
24 re = <unloaded module 'sys'> |
13083
c0290fc6b486
test-demandimport.py: PyPy support
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
9174
diff
changeset
|
25 re.stderr = <open file '<whatever>', mode 'w' at 0x?> |
4631
e3afa670e484
demandimport: fix issue579 and add a test
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
26 re = <proxied module 'sys'> |
30022
26a4e46af2bc
demandimport: error out early on missing attribute of non package (issue5373)
Yuya Nishihara <yuya@tcha.org>
parents:
27535
diff
changeset
|
27 contextlib = <unloaded module 'contextlib'> |
26a4e46af2bc
demandimport: error out early on missing attribute of non package (issue5373)
Yuya Nishihara <yuya@tcha.org>
parents:
27535
diff
changeset
|
28 contextlib.unknownattr = ImportError: cannot import name unknownattr |
30647
1914db1b7d9e
demandimport: do not raise ImportError for unknown item in fromlist
Yuya Nishihara <yuya@tcha.org>
parents:
30022
diff
changeset
|
29 __import__('contextlib', ..., ['unknownattr']) = <module 'contextlib' from '?'> |
1914db1b7d9e
demandimport: do not raise ImportError for unknown item in fromlist
Yuya Nishihara <yuya@tcha.org>
parents:
30022
diff
changeset
|
30 hasattr(contextlibimp, 'unknownattr') = False |