#2328 optimize view_commits for case when there is no parent repo
Closed by pingou. Opened by clime.
Unknown source master

Download 2328.patch

...and don't consider the repo itself to be its parent repo

This is an optimization of commits page viewing in UI. I tested it on gecko-dev repo that contains over half million of commits and with this I could get from ~14s loading time to around ~6.5s. It also creates much less Python objects in memory.

I was able to run pep8 on changed file but couldn't manage to run unit tests yet :(. Will try to fix that. I am giving this for pre-review.

This will break the behaviour that when you are seeing the a branch (not the default one) in a repo it tells you which commit aren't in the default branch and offers you to create a pull-request for them.

For example: https://pagure.io/pagure/commits/py3_work2

The tests are getting blocked in pagure/pagure/api/fork.py:365:

    if flask.request.form.get('wait', True):
        pagure.lib.tasks.get_result(taskid).get()
        output = {'message': 'Changes merged!'}

by test_api_pull_request_merge.


Seeing your comment....You are right, I think that it will break that use-case.

Since #2329 has been merged I am closing this one.

Pull-Request has been closed by pingou

Metadata