#941 Fix pagure.lib.git.get_revs_between
Merged by pingou. Opened by cverna.
cverna/pagure fix_get_revs  into  master

Download 941.patch

get_revs_between method returns an empty list, when you want to get the revision between a commit and the base of the repo.

Should we document # Case 3?

3 new commits added

  • Added test case for repo BASE is null
  • Switched newrev and oldrev in logic in order to fix
  • rename get_revs_between arguments

@pingou
I had a look at adding test of get_revs_between for forced push and new branches, but it seems to be quite an effort. (at least for me :sweat_smile: )

I wonder if we should merge this PR and open a ticket to enhance the test later, or maybe it does not worth the effort to test these 2 cases.

The current test suite doesn't not cover the forced push and new branches cases.

The new branch case shouldn't be too hard no?

  • Add two comments on master
  • Add a comment in a new branch

Otherwise, we'll need to rebase before we merge :)

rebased

New branch test case added.

Could we keep these comments? There are most helpful to help fixing the tests when we change the JSON format (new info added most often).

Is it two commits on a new branch or two commits in two different branches?

Couple of comments, otherwise looks good :)

4 new commits added

  • Add test case for get revs between 2 branches
  • Added test case for repo BASE is null
  • Switched newrev and oldrev in logic in order to fix
  • rename get_revs_between arguments

I have added back the print statement and updated the comment :wink:

Thanks :)

Pull-Request has been merged by pingou

Metadata