- Jan 10, 2020
-
-
Georges Racinet authored
Not merely installing install-requirements from the .gitlab-ci.yml because that would also install Mercurial, which is either a no-op or a costly ignored step.
-
- Jan 07, 2020
-
-
Georges Racinet authored
-
Georges Racinet authored
-
- Jan 05, 2020
-
-
Georges Racinet authored
We've always had the 'pushing to' message in Heptapod, but now that we're pushing directly on the FS without the entremise of SSH, it has become way too precise. At best it's a distraction, some would even consider it a disclosure of important information. At some point, we might in Heptapod use a completely new command instead of the generic push, but for the time being, we are reduced to this really hacky patching. This effectively silences everything except postclose hooks that `hg-git` will define – but it'll take care of them itself.
-
Georges Racinet authored
This can be used on top of the `required.hgrc` that we provide
-
Georges Racinet authored
Some of these could be enforced directly by the `heptapod` extension, but we want to make sure that they are still overridable by local admins.
-
Georges Racinet authored
-
Georges Racinet authored
-
Georges Racinet authored
pull-force-topic command See merge request !2
-
Georges Racinet authored
This is part of the refactoring of HGRC files that is motivated by running from source: it's cleaner to separate the user defined application-wide hgrc from the one bundled with Heptapod.
-
- Dec 21, 2019
-
-
Georges Racinet authored
This is part of heptapod#144: now that we're firing the pre-receive hook ourselves, we don't need to go over SSH at all. This also means that we don't need the `repositories-root` confiuration item anymore.
-
- Dec 19, 2019
-
-
Georges Racinet authored
This will be a major ingredient of SSH push support in Heptapod. Thanks to the factorizing effort we've done in `hooks.perm`, the implementation is almost trivial.
-
Georges Racinet authored
It's nicer and clearer to invoke it as `heptapod.hooks.perm.check_publish`
-
Georges Racinet authored
For now we just extract the generic part of `check_publish`.
-
- Dec 24, 2019
-
-
Georges Racinet authored
-
- Dec 18, 2019
-
-
Georges Racinet authored
As the docstring explains, this will help us somewhat with uniformity or how user information is passed around.
-
- Dec 19, 2019
-
-
Georges Racinet authored
-
- Dec 16, 2019
-
-
Georges Racinet authored
-
- Dec 15, 2019
-
-
Georges Racinet authored
updated the badges on README to reflect the default branch as well
-
Georges Racinet authored
-
Georges Racinet authored
and this uncovers a funny phenomenon, that hook gives an infinite loop when running on local Mercurial repos. Most of the work of the git_sync hook is done indirectly by the fact that `hg-git` rewraps the `push command`, but this still would catch stupid mistakes in that glue code, and `py-heptadod` is now 100% covered.
-
Georges Racinet authored
We don't need `repositories-root` if we have a fixed value for `mirror-path`. This allows us to shift indentation a bit, and that shouldn't be dangerous because the `mirror_path()` function is now fully tested
-
Georges Racinet authored
That one may sound futile, but it's actually a good thing to now that these debugging things are reliable, when using them to investigate actual problems.
-
Georges Racinet authored
We don't support Python3 at the time being, we'll jump into Python3-only at some time in the (near) future. With this, we have full coverage of the wsgi module. Hence the tests will catch true problems, thanks to Py3 incompatibility between `bytes` and `str`. This is better than adding a `pragma: no cover`.
-
Georges Racinet authored
since this wsgi server is meant for service the wire protocol of repos over HTTP only, the utility is a bit dubious, but let's honour it anyway. Normally, `hgweb_mod` should do it as well, but I couldn't get it to see a different config value (seems to be unsettable by .hg/hgrc)
-
Georges Racinet authored
that means actually testing that it's properly passed to `hgweb_mod`, the one doing the job
-
Georges Racinet authored
This actually finishes ec9c7408d7df, in which I forgot to use the value. That was wrong, yet didn't break anything in practice, because the hardcoded value is still the only useful one outside of tests. Doing the conditional instantiation in a class method allows to test it independently without resorting to ugly stuff such as module reload.
-
Georges Racinet authored
-
Georges Racinet authored
-
Georges Racinet authored
This will be help bootsrapping developer environments. Apparently it's now deprecated to run tests with `setup.py test`, so we don't bother listing it in setup.py.
-
- Dec 14, 2019
-
-
Georges Racinet authored
This is about as much we can test without using a WSGI request object (fake or real)
-
Georges Racinet authored
For now this is testing of current behaviour, keeping note of a potential security tightening (not a hole because HgServe is always invoked from localhost with the Heptapod headers, but it would be better to stay secure if it accidentally were to respond on public interfaces)
-
Georges Racinet authored
this will be more direct for unit tests. Also we did not need to store its path. More tests will demonstrate that.
-
Georges Racinet authored
we now have a proper Mercurial extension and it declares that configuration item
-
Georges Racinet authored
This depends onto heptapod-docker!5, which sets said environment variable. This still allows us to run in a gunicorn one-liner without any further wrapper, while being less hardcoded and unit-testable, as the first test demonstrates. It would be even nicer to instantiate `HgServe` without any configuration file (relying e.g. on baseui to pass configuration), this could be done later.
-
- Dec 12, 2019
-
-
Georges Racinet authored
found these by redoing a pull-force-topic after a first one (with an incomplete strip leading to the error)
-
Georges Racinet authored
This is meant to import Pull Requests from external systems, such as Bitbucket. We don't provide a way to also change the branch in this first implementation (users can do it afterwards if they want to). But if it turns out we get lots of MRs wrongly targetted because of this, we'll do it. The implementation is a lower version of doing hg `incoming --bundle`, followed by `hg log` on the bundle to know the contained changesets, and then `hg unbundle` and `hg topic TOPIC` Being lower level than the CLI, we can do the whole in one single transaction, which will be important for Heptapod (single inner Git push) We decided to stay quite close to the CLI surface though, hence we still need to link the bundle file on the filesystem, and reopen it aftewards. We could have instead cherry-picked from the `exchange.pull`, but that would have been awkward. If we turn out to have problems with real life cases with phases or obsmarkers, we could cherry-pick from `exchange.pull` instead, but that will be more complicated.
-
- Dec 13, 2019
-
-
Georges Racinet authored
-
- Dec 14, 2019
-
-
Georges Racinet authored
This gives a 100% coverage on this module for me
-
- Dec 13, 2019
-
-
Georges Racinet authored
in our cases, failures depend whether other extensions, such as evolve or hg-git are themselves ready for Mercurial default. Currently we do have a test in a topic that's broken because evolve 9.2.1 is not compatible with Mercurial default. We will of course change the build to use evolve default, but it's not guaranteed to work, and even so, that may break later on. We don't want to stall our development for this.
-