Hi,

Could you try with the attached patch?

Thanks,
-David

On Wed, Nov 11, 2015 at 5:36 PM, Californian <huichua...@gmail.com> wrote:

> I checked the log again. After upgrading from 2.0.18 to 2.5.1.1, I created
> a new request from a commit. There are errors. See error_1.txt.
> Then I
> modified 
> /usr/lib/python2.7/site-packages/ReviewBoard-2.5.1.1-py2.7.egg/reviewboard/hostingsvcs/gitlab.py",
> line 299, replaced "message = commit['message']" with "message =
> commit['title']".
>
> And then, I created another new request from another new commit.
> Unfortunately, I am getting more errors. See error_2.txt.
>
> From what I got, I think  the original gitlab.py file is incompatible with
> the version of Gitlab we are using (7.1.1).
>
> Upgrading RB to 2.5.1.1 does not resolve the issue we have (missing view
> diff tab on the review request action bar ).
>
> Any help will be appreciated.
>
> Thanks!
>
>
>
>
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/reviewboard/hostingsvcs/gitlab.py 
b/reviewboard/hostingsvcs/gitlab.py
index 3de8163..0ff93ad 100644
--- a/reviewboard/hostingsvcs/gitlab.py
+++ b/reviewboard/hostingsvcs/gitlab.py
@@ -296,7 +296,7 @@ class GitLab(HostingService):
             author_name = commit['author_name']
             date = commit['created_at']
             parent_revision = commit['parent_ids'][0]
-            message = commit['message']
+            message = commit.get('message', '')
 
         # Step 2: Get the diff. The revision is the commit header in here.
         # Firstly, a diff url should be built up, which has the format of
@@ -310,8 +310,9 @@ class GitLab(HostingService):
         path_with_namespace = project['path_with_namespace']
 
         # Build up diff url and get diff.
-        diff_url = ('https://gitlab.com/%s/commit/%s.diff?private_token=%s'
-                    % (path_with_namespace, revision, private_token))
+        diff_url = ('%s/%s/commit/%s.diff?private_token=%s'
+                    % (self.account.hosting_url, path_with_namespace,
+                       revision, private_token))
         diff, headers = self.client.http_get(
             diff_url,
             headers={'Accept': 'text/plain'})

Reply via email to