Closed Bug 1360062 Opened 7 years ago Closed 7 years ago

Minimal development environment for Mercurial extensions and hooks

Categories

(Developer Services :: General, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(9 files)

Building on top of the work I did in bug 1357201, I want to create a minimal environment to facilitate hacking on Mercurial extensions and hooks. This environment will *not* require Docker (at least by default).
Comment on attachment 8862598 [details]
testing: install sitecustomize.py to enable code coverage;

https://reviewboard.mozilla.org/r/134446/#review139482

::: testing/vcttesting/environment.py:15
(Diff revision 3)
> +SITECUSTOMIZE = b'''
> +import os
> +
> +if os.environ.get('CODE_COVERAGE', False):
> +    import uuid
> +    import coverage
> +
> +    covpath = os.path.join(os.environ['COVERAGE_DIR'],
> +        'coverage.%s' % uuid.uuid1())
> +    cov = coverage.coverage(data_file=covpath, auto_data=True)
> +    cov._warn_no_data = False
> +    cov._warn_unimported_source = False
> +    cov.start()
> +'''

i feel this would make more sense as a separate file which is copied, but this is ok.
Attachment #8862598 - Flags: review?(glob) → review+
Comment on attachment 8862599 [details]
testing: upgrade to coverage 4.3.4;

https://reviewboard.mozilla.org/r/134448/#review139478

::: test-requirements.txt:35
(Diff revision 3)
> -coverage==3.7.1 \
> -    --hash=sha256:d1aea1c4aa61b8366d6a42dd3650622fbf9c634ed24eaf7f379c8b970e5ed44e
> +coverage==4.3.4 \
> +    --hash=sha256:ca36d83cd591d027952e5019149c4386e7058cd674bf8cb52dc622f768d689e9

i get a hash conflict on coverage:

coverage==4.3.4 from https://pypi.python.org/packages/a7/cd/27e7267c698f8b2c25786a116ad5b26a6e8f6690d5f403bde11aa1919b72/coverage-4.3.4-cp27-cp27m-macosx_10_10_x86_64.whl#md5=ace49d4f27ba75a677bf7fa9152ca932
Expected sha256 ca36d83cd591d027952e5019149c4386e7058cd674bf8cb52dc622f768d689e9
Got        36407249a0b6669c6ad4425b0f29685579df745480c03afa70f101f09f4eead3

::: vcssync/test-requirements.txt:9
(Diff revision 3)
> -coverage==3.7.1 \
> -    --hash=sha256:d1aea1c4aa61b8366d6a42dd3650622fbf9c634ed24eaf7f379c8b970e5ed44e
> +coverage==4.3.4 \
> +    --hash=sha256:ca36d83cd591d027952e5019149c4386e7058cd674bf8cb52dc622f768d689e9

if the hash needs to be fixed, it should be fixed here too :)
Attachment #8862599 - Flags: review?(glob) → review+
Comment on attachment 8862600 [details]
testing: enable branch code coverage;

https://reviewboard.mozilla.org/r/134450/#review139486
Attachment #8862600 - Flags: review?(glob) → review+
Comment on attachment 8862601 [details]
testing: generate coverage data files in own directory;

https://reviewboard.mozilla.org/r/134452/#review139488
Attachment #8862601 - Flags: review?(glob) → review+
Comment on attachment 8862248 [details]
testing: add a requirement for vcsreplicator (bug 1360062);

https://reviewboard.mozilla.org/r/134200/#review139490
Attachment #8862248 - Flags: review?(glob) → review+
Comment on attachment 8862262 [details]
testing: calculate path to mercurials from repo root (bug 1360062);

https://reviewboard.mozilla.org/r/134210/#review139494
Attachment #8862262 - Flags: review?(glob) → review+
Comment on attachment 8862620 [details]
pushlog: use grep instead of xpath for test;

https://reviewboard.mozilla.org/r/134466/#review139496

nice
Attachment #8862620 - Flags: review?(glob) → review+
Comment on attachment 8862249 [details]
testing: implement environment for hg extensions and hooks (bug 1360062);

https://reviewboard.mozilla.org/r/134202/#review139472

::: testing/requirements-hgdev.txt:1
(Diff revision 6)
> +coverage==4.3.4 \
> +    --hash=sha256:ca36d83cd591d027952e5019149c4386e7058cd674bf8cb52dc622f768d689e9

same hash conflict here.
Attachment #8862249 - Flags: review?(glob) → review+
Comment on attachment 8862250 [details]
testing: port Mercurial installation to Python (bug 1360062);

https://reviewboard.mozilla.org/r/134204/#review139510
Attachment #8862250 - Flags: review?(glob) → review+
Comment on attachment 8862599 [details]
testing: upgrade to coverage 4.3.4;

https://reviewboard.mozilla.org/r/134448/#review139478

> i get a hash conflict on coverage:
> 
> coverage==4.3.4 from https://pypi.python.org/packages/a7/cd/27e7267c698f8b2c25786a116ad5b26a6e8f6690d5f403bde11aa1919b72/coverage-4.3.4-cp27-cp27m-macosx_10_10_x86_64.whl#md5=ace49d4f27ba75a677bf7fa9152ca932
> Expected sha256 ca36d83cd591d027952e5019149c4386e7058cd674bf8cb52dc622f768d689e9
> Got        36407249a0b6669c6ad4425b0f29685579df745480c03afa70f101f09f4eead3

Ahh, the module contains compiled C extensions. I'll change this to list multiple hashes.
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/e04ab9bcabd4
testing: add a requirement for vcsreplicator ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/bcbbee294bc9
testing: calculate path to mercurials from repo root ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/750f5f2d996f
testing: implement environment for hg extensions and hooks ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/ba03aafd87e2
testing: port Mercurial installation to Python ; r=glob
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Blocks: 1363509
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: