[ReviewBoard] Replace references of id2= with id= for cgit
Stephen Gallagher
sgallagh at fedoraproject.org
Thu Mar 21 11:46:59 UTC 2013
commit d6a59a71fade781af8da6bdc89945f2394d18fa2
Author: Stephen Gallagher <sgallagh at redhat.com>
Date: Thu Mar 21 07:46:22 2013 -0400
Replace references of id2= with id= for cgit
- Use file blobs rather than plaintext representation with Fedora
Hosted cgit repositories
FED05-Fix-references-to-cgit-id.patch | 73 +++++++++++++++++++++++++++++++++
ReviewBoard.spec | 9 ++++-
2 files changed, 81 insertions(+), 1 deletions(-)
---
diff --git a/FED05-Fix-references-to-cgit-id.patch b/FED05-Fix-references-to-cgit-id.patch
new file mode 100644
index 0000000..2428d52
--- /dev/null
+++ b/FED05-Fix-references-to-cgit-id.patch
@@ -0,0 +1,73 @@
+From b349c683a4454440d69506c37299dfd34499edf3 Mon Sep 17 00:00:00 2001
+From: Stephen Gallagher <sgallagh at redhat.com>
+Date: Tue, 5 Mar 2013 08:03:48 -0500
+Subject: [PATCH] Fix references to cgit id=
+
+id2= is used only for diffs.
+
+See https://fedorahosted.org/fedora-infrastructure/ticket/3687 for
+additional details.
+---
+ docs/manual/admin/configuration/repositories.txt | 6 +++---
+ reviewboard/hostingsvcs/fedorahosted.py | 4 ++--
+ reviewboard/hostingsvcs/tests.py | 2 +-
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/docs/manual/admin/configuration/repositories.txt b/docs/manual/admin/configuration/repositories.txt
+index f6d361ec037b23a641e7fc9acd20ba54572a612f..0e643333aa627d18739b24b3ae37707cac24d77a 100644
+--- a/docs/manual/admin/configuration/repositories.txt
++++ b/docs/manual/admin/configuration/repositories.txt
+@@ -144,7 +144,7 @@ listed will depend on the requirements of the hosting service.
+ For example:
+
+ * **cgit**:
+- ``http://git.gnome.org/browse/gtk+/blob/<filename>?id2=<revision>``
++ ``http://git.gnome.org/browse/gtk+/blob/<filename>?id=<revision>``
+ * **Gitweb**:
+ ``http://git.kernel.org/?p=bluetooth/bluez-gnome.git;a=blob_plain;f=<filename>;hb=<revision>``
+
+@@ -476,11 +476,11 @@ cgit
+
+ For cgit, this path should be in the form of:
+
+-:samp:`http://{servername}/browse/repo/blob/<filename>?id2=<revision>`
++:samp:`http://{servername}/browse/repo/blob/<filename>?id=<revision>`
+
+ For example:
+
+-:samp:`http://git.gnome.org/browse/gtk+/blob/<filename>?id2=<revision>`
++:samp:`http://git.gnome.org/browse/gtk+/blob/<filename>?id=<revision>`
+
+
+ Gitweb
+diff --git a/reviewboard/hostingsvcs/fedorahosted.py b/reviewboard/hostingsvcs/fedorahosted.py
+index ca0c1ccd7acb936c78df0041a404fd5b14fca94f..267fbfe0643427a759ec1862b3df4adb8fd79ddc 100644
+--- a/reviewboard/hostingsvcs/fedorahosted.py
++++ b/reviewboard/hostingsvcs/fedorahosted.py
+@@ -24,8 +24,8 @@ class FedoraHosted(HostingService):
+ 'path': 'git://git.fedorahosted.org/git/'
+ '%(fedorahosted_repo_name)s.git',
+ 'raw_file_url': 'http://git.fedorahosted.org/cgit/'
+- '%(fedorahosted_repo_name)s.git/plain/'
+- '<filename>?id2=<revision>'
++ '%(fedorahosted_repo_name)s.git/blob/'
++ '<filename>?id=<revision>'
+ },
+ 'Mercurial': {
+ 'path': 'http://hg.fedorahosted.org/hg/'
+diff --git a/reviewboard/hostingsvcs/tests.py b/reviewboard/hostingsvcs/tests.py
+index 271a01015948322115baa81eb682596549c85ed4..8fbdffa8f19e5a07d8ae45fd1253f15dfeadb2d1 100644
+--- a/reviewboard/hostingsvcs/tests.py
++++ b/reviewboard/hostingsvcs/tests.py
+@@ -161,7 +161,7 @@ class FedoraHosted(ServiceTests):
+ 'git://git.fedorahosted.org/git/myrepo.git')
+ self.assertEqual(fields['raw_file_url'],
+ 'http://git.fedorahosted.org/cgit/myrepo.git/'
+- 'plain/<filename>?id2=<revision>')
++ 'blob/<filename>?id=<revision>')
+
+ def test_repo_field_values_mercurial(self):
+ """Testing the Fedora Hosted repository field values for Mercurial"""
+--
+1.8.1.4
+
diff --git a/ReviewBoard.spec b/ReviewBoard.spec
index 3e9716b..6227f39 100644
--- a/ReviewBoard.spec
+++ b/ReviewBoard.spec
@@ -2,7 +2,7 @@
Name: ReviewBoard
Version: 1.7.6
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Web-based code review tool
Group: Applications/Internet
License: MIT
@@ -72,6 +72,7 @@ Requires: mercurial
Patch1003: FED03-Change-default-cache-file-path.patch
Patch1004: FED04-Compress-JavaScript-with-SlimIt.patch
+Patch1005: FED05-Fix-references-to-cgit-id.patch
%description
Review Board is a powerful web-based code review tool that offers
@@ -83,6 +84,7 @@ of the stress and time out of the code review process.
%setup -q -n %{name}-%{version}
%patch1003 -p1
%patch1004 -p1
+%patch1005 -p1
# Remove packaged egg-info so it's regenerated by setup.py
rm -rf ReviewBoard*.egg-info
@@ -129,6 +131,11 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitelib}/webtests/*.py*
%changelog
+* Thu Mar 21 2013 Stephen Gallagher <sgallagh at redhat.com> - 1.7.6-2
+- Replace references of id2= with id= for cgit
+- Use file blobs rather than plaintext representation with Fedora
+ Hosted cgit repositories
+
* Thu Feb 21 2013 Stephen Gallagher <sgallagh at redhat.com> - 1.7.6-1
- New upstream release 1.7.6
- http://www.reviewboard.org/docs/releasenotes/dev/reviewboard/1.7.6/
More information about the scm-commits
mailing list