File tree 1 file changed +18
-2
lines changed 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -70,11 +70,27 @@ def validate(self):
70
70
71
71
def href (self ):
72
72
if self .is_comment_to_file :
73
- href = self .req .href .browser (self .path , rev = self .revision , codecomment = self .id )
73
+ href = self .req .href .browser (self .path , rev = self .revision ,
74
+ codecomment = self .id )
74
75
elif self .is_comment_to_changeset :
75
76
href = self .req .href .changeset (self .revision , codecomment = self .id )
77
+ base_url = self .env .abs_href ()
78
+ pathList = base_url .split ('/' )
79
+ projectPath = ""
80
+ if len (pathList ) > 4 :
81
+ del pathList [0 :3 ]
82
+ projectPath = '/' .join (pathList )
83
+ projectPath = '/' + projectPath
84
+ if href .startswith (projectPath ):
85
+ href = href .split ("/" )
86
+ del href [0 :len (pathList )+ 1 ]
87
+ href = '/' .join (href )
88
+ href = '/' + href
76
89
elif self .is_comment_to_attachment :
77
- href = self .req .href ('/attachment/ticket/%d/%s' % (self .attachment_ticket , self .attachment_filename ), codecomment = self .id )
90
+ href = self .req .href ('/attachment/ticket/%d/%s' % (
91
+ self .attachment_ticket ,
92
+ self .attachment_filename ),
93
+ codecomment = self .id )
78
94
if self .line and not self .is_comment_to_changeset :
79
95
href += '#L' + str (self .line )
80
96
return href
You can’t perform that action at this time.
0 commit comments