Show More
@@ -437,8 +437,8 b' def make_map(config):' | |||||
437 | '/{repo_name:.*}/compare/{org_ref_type}@{org_ref}...{other_ref_type}@{other_ref}', |
|
437 | '/{repo_name:.*}/compare/{org_ref_type}@{org_ref}...{other_ref_type}@{other_ref}', | |
438 | controller='compare', action='index', |
|
438 | controller='compare', action='index', | |
439 | conditions=dict(function=check_repo), |
|
439 | conditions=dict(function=check_repo), | |
440 | requirements=dict(org_ref_type='(branch|book|tag)', |
|
440 | requirements=dict(org_ref_type='(branch|book|tag|rev)', | |
441 | other_ref_type='(branch|book|tag)')) |
|
441 | other_ref_type='(branch|book|tag|rev)')) | |
442 |
|
442 | |||
443 | rmap.connect('pullrequest_home', |
|
443 | rmap.connect('pullrequest_home', | |
444 | '/{repo_name:.*}/pull-request/new', controller='pullrequests', |
|
444 | '/{repo_name:.*}/pull-request/new', controller='pullrequests', |
@@ -161,8 +161,20 b' class PullRequestModel(BaseModel):' | |||||
161 | for cs in reversed(map(binascii.hexlify, revs)): |
|
161 | for cs in reversed(map(binascii.hexlify, revs)): | |
162 | changesets.append(org_repo.get_changeset(cs)) |
|
162 | changesets.append(org_repo.get_changeset(cs)) | |
163 | else: |
|
163 | else: | |
164 | revs = ['ancestors(%s) and not ancestors(%s)' % (org_ref[1], |
|
164 | _revset_predicates = { | |
165 | other_ref[1])] |
|
165 | 'branch': 'branch', | |
|
166 | 'book': 'bookmark', | |||
|
167 | 'tag': 'tag', | |||
|
168 | 'rev': 'id', | |||
|
169 | } | |||
|
170 | ||||
|
171 | revs = [ | |||
|
172 | "ancestors(%s('%s')) and not ancestors(%s('%s'))" % ( | |||
|
173 | _revset_predicates[org_ref[0]], org_ref[1], | |||
|
174 | _revset_predicates[other_ref[0]], other_ref[1] | |||
|
175 | ) | |||
|
176 | ] | |||
|
177 | ||||
166 | from mercurial import scmutil |
|
178 | from mercurial import scmutil | |
167 | out = scmutil.revrange(org_repo._repo, revs) |
|
179 | out = scmutil.revrange(org_repo._repo, revs) | |
168 | for cs in reversed(out): |
|
180 | for cs in reversed(out): |
General Comments 0
You need to be logged in to leave comments.
Login now