Changeset - 90e50aa705ee
[Not reviewed]
stable
0 1 0
Mads Kiilerich - 6 years ago 2019-09-04 23:26:18
mads@kiilerich.com
Grafted from: 60b909795564
hg: fix pull requests between repositories by using the makeunionrepository factory with Mercurial 4.8

Follow-up to 9ca238e56396 that missed one case ...
1 file changed with 8 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/pullrequests.py
Show inline comments
 
@@ -532,9 +532,14 @@ class PullrequestsController(BaseRepoCon
 
                            # Note: org_scm_instance.path must come first so all
 
                            # valid revision numbers are 100% org_scm compatible
 
                            # - both for avail_revs and for revset results
 
                            hgrepo = unionrepo.unionrepository(org_scm_instance.baseui,
 
                                                               org_scm_instance.path,
 
                                                               other_scm_instance.path)
 
                            try:
 
                                hgrepo = unionrepo.makeunionrepository(org_scm_instance.baseui,
 
                                                                       org_scm_instance.path,
 
                                                                       other_scm_instance.path)
 
                            except AttributeError: # makeunionrepository was introduced in Mercurial 4.8 23f2299e9e53
 
                                hgrepo = unionrepo.unionrepository(org_scm_instance.baseui,
 
                                                                   org_scm_instance.path,
 
                                                                   other_scm_instance.path)
 
                        else:
 
                            hgrepo = org_scm_instance._repo
 
                        show = set(hgrepo.revs('::%ld & !::parents(%s) & !::%s',
0 comments (0 inline, 0 general)