comparison rhodecode/controllers/pullrequests.py @ 3719:3534e75b2d5b beta

pullrequests: don't pass unicode strings to Mercurial
author Mads Kiilerich <madski@unity3d.com>
date Fri, 05 Apr 2013 02:49:26 +0200
parents b2575bdb847c
children 9855b31d033b
comparison
equal deleted inserted replaced
3718:b2575bdb847c 3719:3534e75b2d5b
72 c.users_groups_array = repo_model.get_users_groups_js() 72 c.users_groups_array = repo_model.get_users_groups_js()
73 73
74 def _get_repo_refs(self, repo, rev=None, branch_rev=None): 74 def _get_repo_refs(self, repo, rev=None, branch_rev=None):
75 """return a structure with repo's interesting changesets, suitable for 75 """return a structure with repo's interesting changesets, suitable for
76 the selectors in pullrequest.html""" 76 the selectors in pullrequest.html"""
77
78 # list named branches that has been merged to this named branch - it should probably merge back 77 # list named branches that has been merged to this named branch - it should probably merge back
79 peers = [] 78 peers = []
79
80 if rev:
81 rev = safe_str(rev)
82
80 if branch_rev: 83 if branch_rev:
84 branch_rev = safe_str(branch_rev)
81 # not restricting to merge() would also get branch point and be better 85 # not restricting to merge() would also get branch point and be better
82 # (especially because it would get the branch point) ... but is currently too expensive 86 # (especially because it would get the branch point) ... but is currently too expensive
83 revs = ["sort(parents(branch(id('%s')) and merge()) - branch(id('%s')))" % 87 revs = ["sort(parents(branch(id('%s')) and merge()) - branch(id('%s')))" %
84 (branch_rev, branch_rev)] 88 (branch_rev, branch_rev)]
85 otherbranches = {} 89 otherbranches = {}