Mercurial > evolve
annotate tests/hghaveaddon.py @ 6889:a66cf9008781
obslog: also display patch for rebased changesets
This applies the same logic that is used for "merge-diff" to rebased
changesets. The successors' content is compared to the content of the
predecessors rebased in-memory on the new parents.
This highlights the changes that were actually introduced while rebasing (like
conflict resolution or API adjustment).
As a side effect, obslog now also outputs slightly more diffs for splits,
showing what parts of the original big changeset were moved to the smaller
split components (but for now it only works for the first few changesets).
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 22 Sep 2024 02:58:54 +0200 |
parents | 9638dd0fb4ea |
children |
rev | line source |
---|---|
2959
ef361938dfa1
doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
1 import hghave |
ef361938dfa1
doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
2 |
ef361938dfa1
doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
3 @hghave.check("docgraph-ext", "Extension to generate graph from repository") |
ef361938dfa1
doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
4 def docgraph(): |
ef361938dfa1
doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
5 try: |
ef361938dfa1
doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
6 import hgext.docgraph |
ef361938dfa1
doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
7 hgext.docgraph.cmdtable # trigger import |
ef361938dfa1
doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
8 except ImportError: |
ef361938dfa1
doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
9 try: |
ef361938dfa1
doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
10 import hgext3rd.docgraph |
ef361938dfa1
doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
11 hgext3rd.docgraph.cmdtable # trigger import |
ef361938dfa1
doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
12 except ImportError: |
ef361938dfa1
doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
13 return False |
ef361938dfa1
doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
14 return True |
5338
6a50faea786d
tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents:
2959
diff
changeset
|
15 |
6a50faea786d
tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents:
2959
diff
changeset
|
16 @hghave.check("flake8", "Flake8 python linter") |
6a50faea786d
tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents:
2959
diff
changeset
|
17 def has_flake8(): |
6a50faea786d
tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents:
2959
diff
changeset
|
18 try: |
6a50faea786d
tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents:
2959
diff
changeset
|
19 import flake8 |
6a50faea786d
tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents:
2959
diff
changeset
|
20 |
6a50faea786d
tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents:
2959
diff
changeset
|
21 flake8.__version__ |
6a50faea786d
tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents:
2959
diff
changeset
|
22 except ImportError: |
6a50faea786d
tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents:
2959
diff
changeset
|
23 return False |
6a50faea786d
tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents:
2959
diff
changeset
|
24 else: |
6a50faea786d
tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents:
2959
diff
changeset
|
25 return True |
5339
f2139537c2be
tests: use hghaveaddon.py to check for check-manifest
Anton Shestakov <av6@dwimlabs.net>
parents:
5338
diff
changeset
|
26 |
f2139537c2be
tests: use hghaveaddon.py to check for check-manifest
Anton Shestakov <av6@dwimlabs.net>
parents:
5338
diff
changeset
|
27 @hghave.check("check-manifest", "check-manifest MANIFEST.in checking tool") |
f2139537c2be
tests: use hghaveaddon.py to check for check-manifest
Anton Shestakov <av6@dwimlabs.net>
parents:
5338
diff
changeset
|
28 def has_check_manifest(): |
f2139537c2be
tests: use hghaveaddon.py to check for check-manifest
Anton Shestakov <av6@dwimlabs.net>
parents:
5338
diff
changeset
|
29 return hghave.matchoutput('check-manifest --version 2>&1', |
f2139537c2be
tests: use hghaveaddon.py to check for check-manifest
Anton Shestakov <av6@dwimlabs.net>
parents:
5338
diff
changeset
|
30 br'check-manifest version') |
6483
e41b99cec0c2
tests: update tests output for changegroup3 becoming the new default
Anton Shestakov <av6@dwimlabs.net>
parents:
5339
diff
changeset
|
31 |
6849
9638dd0fb4ea
tests: add `twine check` to test-check-sdist.t
Anton Shestakov <av6@dwimlabs.net>
parents:
6483
diff
changeset
|
32 @hghave.check("twine", "twine utility for publishing Python packages") |
9638dd0fb4ea
tests: add `twine check` to test-check-sdist.t
Anton Shestakov <av6@dwimlabs.net>
parents:
6483
diff
changeset
|
33 def has_twine(): |
9638dd0fb4ea
tests: add `twine check` to test-check-sdist.t
Anton Shestakov <av6@dwimlabs.net>
parents:
6483
diff
changeset
|
34 return hghave.matchoutput('twine --help 2>&1', |
9638dd0fb4ea
tests: add `twine check` to test-check-sdist.t
Anton Shestakov <av6@dwimlabs.net>
parents:
6483
diff
changeset
|
35 br'usage: twine .*\bcheck\b') |
9638dd0fb4ea
tests: add `twine check` to test-check-sdist.t
Anton Shestakov <av6@dwimlabs.net>
parents:
6483
diff
changeset
|
36 |
6483
e41b99cec0c2
tests: update tests output for changegroup3 becoming the new default
Anton Shestakov <av6@dwimlabs.net>
parents:
5339
diff
changeset
|
37 @hghave.check("default-cg3", "changegroup3 by default") |
e41b99cec0c2
tests: update tests output for changegroup3 becoming the new default
Anton Shestakov <av6@dwimlabs.net>
parents:
5339
diff
changeset
|
38 def has_default_changegroup3(): |
e41b99cec0c2
tests: update tests output for changegroup3 becoming the new default
Anton Shestakov <av6@dwimlabs.net>
parents:
5339
diff
changeset
|
39 from mercurial import configitems |
e41b99cec0c2
tests: update tests output for changegroup3 becoming the new default
Anton Shestakov <av6@dwimlabs.net>
parents:
5339
diff
changeset
|
40 |
e41b99cec0c2
tests: update tests output for changegroup3 becoming the new default
Anton Shestakov <av6@dwimlabs.net>
parents:
5339
diff
changeset
|
41 try: |
e41b99cec0c2
tests: update tests output for changegroup3 becoming the new default
Anton Shestakov <av6@dwimlabs.net>
parents:
5339
diff
changeset
|
42 return configitems.coreitems[b'experimental'][b'changegroup3'].default |
e41b99cec0c2
tests: update tests output for changegroup3 becoming the new default
Anton Shestakov <av6@dwimlabs.net>
parents:
5339
diff
changeset
|
43 except (AttributeError, KeyError): |
e41b99cec0c2
tests: update tests output for changegroup3 becoming the new default
Anton Shestakov <av6@dwimlabs.net>
parents:
5339
diff
changeset
|
44 return False |