rpms/RBTools/devel 0001-Fix-a-crash-when-using-ClearCase.patch, NONE, 1.1 0002-Fix-the-default-changeset-support-with-more-recent-v.patch, NONE, 1.1 0003-Fix-two-issues-when-using-post-review-with-Subversio.patch, NONE, 1.1 0004-Protect-against-an-uninitialized-variable.patch, NONE, 1.1 0005-Prevent-a-failure-when-there-s-an-error-reading-a-di.patch, NONE, 1.1 0006-Revert-the-change-to-encode-the-uploaded-content-as-.patch, NONE, 1.1 0007-Check-for-GNU-diff-when-needed.patch, NONE, 1.1 0008-Added-some-useful-error-information-for-empty-diffs-.patch, NONE, 1.1 FED01-Disable-ez_setup-when-installing-by-RPM.patch, NONE, 1.1 RBTools.spec, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Stephen Gallagher sgallagh at fedoraproject.org
Thu Apr 8 19:48:28 UTC 2010


Author: sgallagh

Update of /cvs/pkgs/rpms/RBTools/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv23061/devel

Modified Files:
	.cvsignore sources 
Added Files:
	0001-Fix-a-crash-when-using-ClearCase.patch 
	0002-Fix-the-default-changeset-support-with-more-recent-v.patch 
	0003-Fix-two-issues-when-using-post-review-with-Subversio.patch 
	0004-Protect-against-an-uninitialized-variable.patch 
	0005-Prevent-a-failure-when-there-s-an-error-reading-a-di.patch 
	0006-Revert-the-change-to-encode-the-uploaded-content-as-.patch 
	0007-Check-for-GNU-diff-when-needed.patch 
	0008-Added-some-useful-error-information-for-empty-diffs-.patch 
	FED01-Disable-ez_setup-when-installing-by-RPM.patch 
	RBTools.spec import.log 
Log Message:
Initial Import

0001-Fix-a-crash-when-using-ClearCase.patch:
 AUTHORS               |    1 +
 rbtools/postreview.py |    3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE 0001-Fix-a-crash-when-using-ClearCase.patch ---
>From 24b1e9d1193ed200aeae303b33616a9d02bd6213 Mon Sep 17 00:00:00 2001
From: Christian Hammond <chipx86 at chipx86.com>
Date: Sun, 21 Feb 2010 15:29:55 -0800
Subject: [PATCH 1/7] Fix a crash when using ClearCase.

The ClearCase code was calling a command and expecting the result split
across two variables, but didn't pass split_lines=True. Now it does!

Patch by Bryan Halter
Fixes bug #1423
---
 AUTHORS               |    1 +
 rbtools/postreview.py |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 15c0ad4..928fb95 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -7,6 +7,7 @@ Lead Developers:
 Contributors:
 
 	* Anthony Cruz
+	* Bryan Halter
 	* Chris Clark
 	* Dan Savilonis
 	* Dana Lacoste
diff --git a/rbtools/postreview.py b/rbtools/postreview.py
index 207f8be..91adb50 100755
--- a/rbtools/postreview.py
+++ b/rbtools/postreview.py
@@ -847,7 +847,7 @@ class ClearCaseClient(SCMClient):
             # Call cleartool to get this version and the previous version
             #   of the element.
             curr_version, pre_version = execute(
-                ["cleartool", "desc", "-pre", elem_path])
+                ["cleartool", "desc", "-pre", elem_path], split_lines=True)
             curr_version = cpath.normpath(curr_version)
             pre_version = pre_version.split(':')[1].strip()
 
-- 
1.6.6.1


0002-Fix-the-default-changeset-support-with-more-recent-v.patch:
 AUTHORS               |    1 +
 rbtools/postreview.py |    9 +++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

--- NEW FILE 0002-Fix-the-default-changeset-support-with-more-recent-v.patch ---
>From f989b7cdbbc848cad8a14d87cf02a81b7a182f8a Mon Sep 17 00:00:00 2001
From: Christian Hammond <chipx86 at chipx86.com>
Date: Sun, 21 Feb 2010 15:47:01 -0800
Subject: [PATCH 2/7] Fix the default changeset support with more recent versions of P4.

The new default changeset support was failing to set a default changeset
description on newer versions of P4, which we would later need to parse
in order to get the file listing. We now go through the same code path we went
through with older versions of P4 in order to generate a default description
in order to get those generated files.

Patch by Laurent Nicolas.
Reviewed at http://reviews.reviewboard.org/r/1418/
---
 AUTHORS               |    1 +
 rbtools/postreview.py |    8 +++++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 928fb95..39bf0b2 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -15,6 +15,7 @@ Contributors:
 	* Flavio Castelli
 	* Jason Felice
 	* Jeremy Bettis
+	* Laurent Nicolas
 	* Lepton Wu
 	* Luke Lu
 	* Luke Robison
diff --git a/rbtools/postreview.py b/rbtools/postreview.py
index 91adb50..330054c 100755
--- a/rbtools/postreview.py
+++ b/rbtools/postreview.py
@@ -1636,9 +1636,11 @@ class PerforceClient(SCMClient):
 
         v = self.p4d_version
 
-        if cl_is_pending and (v[0] < 2002 or (v[0] == "2002" and v[1] < 2)):
-            # Pre-2002.2 doesn't give file list in pending changelists, so we
-            # have to get it a different way
+        if cl_is_pending and (v[0] < 2002 or (v[0] == "2002" and v[1] < 2)
+                              or changenum == "default"):
+            # Pre-2002.2 doesn't give file list in pending changelists,
+            # or we don't have a description for a default changeset,
+            # so we have to get it a different way.
             info = execute(["p4", "opened", "-c", str(changenum)],
                            split_lines=True)
 
-- 
1.6.6.1


0003-Fix-two-issues-when-using-post-review-with-Subversio.patch:
 AUTHORS               |    1 +
 rbtools/postreview.py |   19 +++++++++++++++----
 2 files changed, 16 insertions(+), 4 deletions(-)

--- NEW FILE 0003-Fix-two-issues-when-using-post-review-with-Subversio.patch ---
>From dbfbd077cefbf45bc68491efc1218b9f04d812bc Mon Sep 17 00:00:00 2001
From: Christian Hammond <chipx86 at chipx86.com>
Date: Wed, 24 Feb 2010 23:04:34 -0800
Subject: [PATCH 3/7] Fix two issues when using post-review with Subversion.

First, using --revision-range with 0 wouldn't work, as the path given
wouldn't have existed in revision 0. The repository path is now assumed
if using revision 0, in order to get a diff of all the files.

Second, sometimes an svn diff would have excess tabs in the diff file headers,
which we wouldn't catch correctly. We now make sure to only split the headers
into two groups, regardless of the number of tabs.

Patch by Nathan Heijermans.
Reviewed at http://reviews.reviewboard.org/r/1429/
---
 AUTHORS               |    1 +
 rbtools/postreview.py |   18 +++++++++++++++---
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 39bf0b2..8c3f0d8 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -21,6 +21,7 @@ Contributors:
 	* Luke Robison
 	* Matthew Woehlke
 	* Mike Crute
+	* Nathan Heijermans
 	* Paul Scott
 	* Petr Novák
 	* Raghu Kaippully
diff --git a/rbtools/postreview.py b/rbtools/postreview.py
index 330054c..99dcad3 100755
--- a/rbtools/postreview.py
+++ b/rbtools/postreview.py
@@ -1186,9 +1186,20 @@ class SVNClient(SCMClient):
 
             url = repository_info.path + repository_info.base_path
 
-            old_url = url + '@' + revisions[0]
             new_url = url + '@' + revisions[1]
 
+            # When the source revision is zero, assume the user wants to
+            # upload a diff containing all the files in ``base_path`` as new
+            # files. If the base path within the repository is added to both
+            # the old and new URLs, the ``svn diff`` command will error out
+            # since the base_path didn't exist at revision zero. To avoid
+            # that error, use the repository's root URL as the source for
+            # the diff.
+            if revisions[0] == "0":
+                url = repository_info.path
+
+            old_url = url + '@' + revisions[0]
+
             return self.do_diff(["svn", "diff", "--diff-cmd=diff", old_url,
                                  new_url] + files,
                                 repository_info)
@@ -1309,8 +1320,9 @@ class SVNClient(SCMClient):
         if "\t" in s:
             # There's a \t separating the filename and info. This is the
             # best case scenario, since it allows for filenames with spaces
-            # without much work.
-            parts = s.split("\t")
+            # without much work. The info can also contain tabs after the
+            # initial one; ignore those when splitting the string.
+            parts = s.split("\t", 1)
 
         # There's spaces being used to separate the filename and info.
         # This is technically wrong, so all we can do is assume that
-- 
1.6.6.1


0004-Protect-against-an-uninitialized-variable.patch:
 postreview.py |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- NEW FILE 0004-Protect-against-an-uninitialized-variable.patch ---
>From 84366dbc714224eac0e939eac9c7e4eaf1d157ae Mon Sep 17 00:00:00 2001
From: Christian Hammond <chipx86 at chipx86.com>
Date: Wed, 24 Feb 2010 23:12:46 -0800
Subject: [PATCH 4/7] Protect against an uninitialized variable.

The new flexible HTTP error handling code had an uninitialized variable. This
checks for it and makes sure not to break.

Patch by Laurent Nicolas.
Reviewed at http://reviews.reviewboard.org/r/1427/
---
 rbtools/postreview.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/rbtools/postreview.py b/rbtools/postreview.py
index 99dcad3..d5fa0e0 100755
--- a/rbtools/postreview.py
+++ b/rbtools/postreview.py
@@ -125,7 +125,7 @@ class APIError(Exception):
         if self.error_code:
             code_str += ', API Error %d' % self.error_code
 
-        if 'err' in self.rsp:
+        if self.rsp and 'err' in self.rsp:
             return '%s (%s)' % (self.rsp['err']['msg'], code_str)
         else:
             return code_str
@@ -417,6 +417,8 @@ class ReviewBoardServer(object):
             rsp = self.api_post('api/json/reviewrequests/new/', data)
         except APIError, e:
             if e.error_code == 204: # Change number in use
+                rsp = e.rsp
+
                 if options.diff_only:
                     # In this case, fall through and return to tempt_fate.
                     debug("Review request already exists.")
@@ -427,8 +429,9 @@ class ReviewBoardServer(object):
                         rsp['review_request']['id'])
             else:
                 raise e
+        else:
+            debug("Review request created")
 
-        debug("Review request created")
         return rsp['review_request']
 
     def set_review_request_field(self, review_request, field, value):
-- 
1.6.6.1


0005-Prevent-a-failure-when-there-s-an-error-reading-a-di.patch:
 postreview.py |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- NEW FILE 0005-Prevent-a-failure-when-there-s-an-error-reading-a-di.patch ---
>From 665c6af5ad344af0d0b17e53ad93af30e9458a34 Mon Sep 17 00:00:00 2001
From: Christian Hammond <chipx86 at chipx86.com>
Date: Wed, 10 Mar 2010 01:12:36 -0800
Subject: [PATCH 5/7] Prevent a failure when there's an error reading a diff.

If reading a diff failed and we received a one-line error message,
post-review would crash. It assumed a second line always existed. Now
we properly abort with debug information.

Patch by Laurent Nicolas.
Reviewed at http://reviews.reviewboard.org/r/1457/
---
 rbtools/postreview.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/rbtools/postreview.py b/rbtools/postreview.py
index d5fa0e0..cff06be 100755
--- a/rbtools/postreview.py
+++ b/rbtools/postreview.py
@@ -1809,7 +1809,7 @@ class PerforceClient(SCMClient):
             dl.insert(0, "==== %s#%s ==%s== %s ====\n" % \
                 (depot_path, base_revision, changetype_short, local_path))
             dl.append('\n')
-        else:
+        elif len(dl) > 1:
             m = re.search(r'(\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d)', dl[1])
             if m:
                 timestamp = m.group(1)
@@ -1847,6 +1847,8 @@ class PerforceClient(SCMClient):
             # that the resulting diff file isn't broken.
             if dl[-1][-1] != '\n':
                 dl.append('\n')
+        else:
+            die("ERROR, no valid diffs: %s" % dl[0])
 
         return dl
 
-- 
1.6.6.1


0006-Revert-the-change-to-encode-the-uploaded-content-as-.patch:
 postreview.py |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- NEW FILE 0006-Revert-the-change-to-encode-the-uploaded-content-as-.patch ---
>From 26540943679090076f5f68ae91c394415bbc5909 Mon Sep 17 00:00:00 2001
From: Christian Hammond <chipx86 at chipx86.com>
Date: Wed, 10 Mar 2010 01:50:04 -0800
Subject: [PATCH 6/7] Revert the change to encode the uploaded content as UTF-8.

The change made to RC1 for fixing diff uploading in some cases actually
broke things. The content length was no longer correct, if we even could
encode to UTF-8. We now upload the raw bytes once again.
---
 rbtools/postreview.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/rbtools/postreview.py b/rbtools/postreview.py
index cff06be..2dccc7a 100755
--- a/rbtools/postreview.py
+++ b/rbtools/postreview.py
@@ -656,7 +656,7 @@ class ReviewBoardServer(object):
 
         content_type = "multipart/form-data; boundary=%s" % BOUNDARY
 
-        return content_type, content.encode('utf-8')
+        return content_type, content
 
 
 class SCMClient(object):
-- 
1.6.6.1


0007-Check-for-GNU-diff-when-needed.patch:
 postreview.py |   36 +++++++++++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)

--- NEW FILE 0007-Check-for-GNU-diff-when-needed.patch ---
>From 7dce756516ca45ae284eabf73bfedd04b74b0ddd Mon Sep 17 00:00:00 2001
From: Christian Hammond <chipx86 at chipx86.com>
Date: Sun, 28 Mar 2010 16:42:37 -0700
Subject: [PATCH 7/9] Check for GNU diff when needed.

Another common problem in RBTools is that people try to use Subversion
without having GNU diff installed. We require GNU diff to work around some
bugs in Subversion's differ.

Now, when we've determined we have a Subversion repository, we perform a check
for GNU diff. If it's not installed, we error out with an explanation. If
running on Windows, we also link to the download page for a standalone
GNU diff.

Fixes bug #769
Reviewed at http://reviews.reviewboard.org/r/1488/
---
 rbtools/postreview.py |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/rbtools/postreview.py b/rbtools/postreview.py
index 2dccc7a..3dd8c9a 100755
--- a/rbtools/postreview.py
+++ b/rbtools/postreview.py
@@ -111,6 +111,8 @@ user_config = None
 tempfiles = []
 options = None
 
+GNU_DIFF_WIN32_URL = 'http://gnuwin32.sourceforge.net/packages/diffutils.htm'
+
 
 class APIError(Exception):
     def __init__(self, http_status, error_code, rsp=None, *args, **kwargs):
@@ -1112,10 +1114,13 @@ class SVNClient(SCMClient):
         # Get the SVN repository path (either via a working copy or
         # a supplied URI)
         svn_info_params = ["svn", "info"]
+
         if options.repository_url:
             svn_info_params.append(options.repository_url)
+
         data = execute(svn_info_params,
                        ignore_errors=True)
+
         m = re.search(r'^Repository Root: (.+)$', data, re.M)
         if not m:
             return None
@@ -1132,6 +1137,10 @@ class SVNClient(SCMClient):
         if not m:
             return None
 
+        # Now that we know it's SVN, make sure we have GNU diff installed,
+        # and error out if we don't.
+        check_gnu_diff()
+
         return SvnRepositoryInfo(path, base_path, m.group(1))
 
     def scan_for_server(self, repository_info):
@@ -2339,6 +2348,31 @@ def check_install(command):
         return False
 
 
+def check_gnu_diff():
+    """Checks if GNU diff is installed, and informs the user if it's not."""
+    has_gnu_diff = False
+
+    try:
+        result = execute(['diff', '--version'], ignore_errors=True)
+        has_gnu_diff = 'GNU diffutils' in result
+    except OSError:
+        pass
+
+    if not has_gnu_diff:
+        sys.stderr.write('\n')
+        sys.stderr.write('GNU diff is required for Subversion '
+                         'repositories. Make sure it is installed\n')
+        sys.stderr.write('and in the path.\n')
+        sys.stderr.write('\n')
+
+        if os.name == 'nt':
+            sys.stderr.write('On Windows, you can install this from:\n')
+            sys.stderr.write(GNU_DIFF_WIN32_URL)
+            sys.stderr.write('\n')
+
+        die()
+
+
 def execute(command, env=None, split_lines=False, ignore_errors=False,
             extra_ignore_errors=(), translate_newlines=True):
     """
@@ -2721,6 +2755,7 @@ def determine_client():
 
     return (repository_info, tool)
 
+
 def main():
     origcwd = os.path.abspath(os.getcwd())
 
-- 
1.6.6.1


0008-Added-some-useful-error-information-for-empty-diffs-.patch:
 postreview.py |   37 ++++++++++++++++++++++++++++++++++---
 1 file changed, 34 insertions(+), 3 deletions(-)

--- NEW FILE 0008-Added-some-useful-error-information-for-empty-diffs-.patch ---
>From 639b361322caaac685c84bc7068dd25311aa9804 Mon Sep 17 00:00:00 2001
From: Christian Hammond <chipx86 at chipx86.com>
Date: Sun, 28 Mar 2010 16:18:37 -0700
Subject: [PATCH 8/9] Added some useful error information for empty diffs and invalid repositories.

Our errors to date in RBTools have been less than useful. This change provides
more detailed errors for two common cases: Empty diffs, and invalid
repositories.

The new text makes it more clear what went wrong, and offers options for
fixing or investigating the problem.

Reviewed at http://reviews.reviewboard.org/r/1487/
---
 rbtools/postreview.py |   36 ++++++++++++++++++++++++++++++++++--
 1 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/rbtools/postreview.py b/rbtools/postreview.py
index 3dd8c9a..f458433 100755
--- a/rbtools/postreview.py
+++ b/rbtools/postreview.py
@@ -111,6 +111,8 @@ user_config = None
 tempfiles = []
 options = None
 
+ADD_REPOSITORY_DOCS_URL = \
+    'http://www.reviewboard.org/docs/manual/dev/admin/management/repositories/'
 GNU_DIFF_WIN32_URL = 'http://gnuwin32.sourceforge.net/packages/diffutils.htm'
 
 
@@ -429,6 +431,21 @@ class ReviewBoardServer(object):
                     rsp = self.api_post(
                         'api/json/reviewrequests/%s/update_from_changenum/' %
                         rsp['review_request']['id'])
+            elif e.error_code == 206: # Invalid repository
+                sys.stderr.write('\n')
+                sys.stderr.write('There was an error creating this review '
+                                 'request.\n')
+                sys.stderr.write('\n')
+                sys.stderr.write('The repository path "%s" is not in the\n' %
+                                 self.info.path)
+                sys.stderr.write('list of known repositories on the server.\n')
+                sys.stderr.write('\n')
+                sys.stderr.write('Ask the administrator to add this '
+                                 'repository to the Review Board server.\n')
+                sys.stderr.write('For information on adding repositories, '
+                                 'please read\n')
+                sys.stderr.write(ADD_REPOSITORY_DOCS_URL + '\n')
+                die()
             else:
                 raise e
         else:
@@ -610,6 +627,9 @@ class ReviewBoardServer(object):
             data = urllib2.urlopen(r).read()
             self.cookie_jar.save(self.cookie_file)
             return data
+        except urllib2.HTTPError, e:
+            # Re-raise so callers can interpret it.
+            raise e
         except urllib2.URLError, e:
             try:
                 debug(e.read())
@@ -2532,7 +2552,19 @@ def tempt_fate(server, tool, changenum, diff_content=None,
             server.upload_diff(review_request, diff_content,
                                parent_diff_content)
         except APIError, e:
-            print "Error uploading diff: %s" % e
+            sys.stderr.write('\n')
+            sys.stderr.write('Error uploading diff\n')
+            sys.stderr.write('\n')
+
+            if e.error_code == 105:
+                sys.stderr.write('The generated diff file was empty. This '
+                                 'usually means no files were\n')
+                sys.stderr.write('modified in this change.\n')
+                sys.stderr.write('\n')
+                sys.stderr.write('Try running with --output-diff and --debug '
+                                 'for more information.\n')
+                sys.stderr.write('\n')
+
             die("Your review request still exists, but the diff is not " +
                 "attached.")
 
@@ -2716,8 +2748,8 @@ def parse_options(args):
 
     return args
 
+
 def determine_client():
-
     repository_info = None
     tool = None
 
-- 
1.6.6.1


FED01-Disable-ez_setup-when-installing-by-RPM.patch:
 setup.py |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- NEW FILE FED01-Disable-ez_setup-when-installing-by-RPM.patch ---
>From ca0a34db9261718367903176201669301ac4fceb Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh at redhat.com>
Date: Mon, 15 Mar 2010 12:43:08 -0400
Subject: [PATCH 7/8] Disable ez_setup when installing by RPM

---
 setup.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/setup.py b/setup.py
index 08f4fbe..53da8ac 100755
--- a/setup.py
+++ b/setup.py
@@ -19,8 +19,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-from ez_setup import use_setuptools
-use_setuptools()
+#from ez_setup import use_setuptools
+#use_setuptools()
 
 from setuptools import setup, find_packages
 from setuptools.command.test import test
-- 
1.6.6.1



--- NEW FILE RBTools.spec ---
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif

Name:           RBTools
Version:        0.2
Release:        3.rc1%{?dist}
Summary:        Tools for use with ReviewBoard

Group:          Applications/Internet
License:        MIT
URL:            http://www.review-board.org
Source0:        http://downloads.review-board.org/releases/%{name}/0.2/%{name}-%{version}rc1.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  python-devel
BuildRequires:  python-setuptools
Requires:       python-setuptools
Requires:       python-simplejson

### Patches ###

## Upstream patches ##
# These patches are bugfixes from the upstream repository
Patch0001: 0001-Fix-a-crash-when-using-ClearCase.patch
Patch0002: 0002-Fix-the-default-changeset-support-with-more-recent-v.patch
Patch0003: 0003-Fix-two-issues-when-using-post-review-with-Subversio.patch
Patch0004: 0004-Protect-against-an-uninitialized-variable.patch
Patch0005: 0005-Prevent-a-failure-when-there-s-an-error-reading-a-di.patch
Patch0006: 0006-Revert-the-change-to-encode-the-uploaded-content-as-.patch
Patch0007: 0007-Check-for-GNU-diff-when-needed.patch
Patch0008: 0008-Added-some-useful-error-information-for-empty-diffs-.patch

## Fedora patches ##
# Don't use ez_setup, since RPM provides equivalent functionality
Patch0009: FED01-Disable-ez_setup-when-installing-by-RPM.patch

%description
RBTools provides client tools for interacting with a ReviewBoard
code-review server.

%prep
%setup -q -n %{name}-%{version}rc1

# Apply patches
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%patch0009 -p1

%build
%{__python} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

# While /usr/bin/post-review also exists for this purpose,
# it is still sensible to make postreview.py executable
chmod +x $RPM_BUILD_ROOT/%{python_sitelib}/rbtools/postreview.py

 
%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc AUTHORS NEWS README
%{_bindir}/post-review
%{python_sitelib}/rbtools/
%{python_sitelib}/RBTools*.egg-info/

%changelog
* Tue Apr 06 2010 Stephen Gallagher <sgallagh at redhat.com> - 0.2-3.rc1
- Add runtime requirement for python-setuptools

* Mon Apr 05 2010 Stephen Gallagher <sgallagh at redhat.com> - 0.2-2.rc1
- Remove git-patchset patch
- Add patch to check for GNU diff
- Add patch to give more useful error messages on failure

* Mon Mar 15 2010 Stephen Gallagher <sgallagh at redhat.com> - 0.2-1.rc1
- Import upstream release 0.2rc1
- Add patches from upstream
- Add patch to support git patchsets


--- NEW FILE import.log ---
RBTools-0_2-3_rc1_fc12:HEAD:RBTools-0.2-3.rc1.fc12.src.rpm:1270756092


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/RBTools/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	8 Apr 2010 02:51:57 -0000	1.1
+++ .cvsignore	8 Apr 2010 19:48:28 -0000	1.2
@@ -0,0 +1 @@
+RBTools-0.2rc1.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/RBTools/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	8 Apr 2010 02:51:58 -0000	1.1
+++ sources	8 Apr 2010 19:48:28 -0000	1.2
@@ -0,0 +1 @@
+1cdd4bba5365a8738cd26d5cba0c992f  RBTools-0.2rc1.tar.gz



More information about the scm-commits mailing list