diff --git a/README.rst b/README.rst index e6dd3c741..edc7cc7a4 100644 --- a/README.rst +++ b/README.rst @@ -43,15 +43,15 @@ of how it works: Installing salsita-gitflow ========================== -You can install ``salsita gitflow``, using:: +You can install ``salsita-gitflow`` using:: - pip install salsita-gitflow + pip install --allow-external rbtools --allow-unverified rbtools salsita-gitflow -Or, if you'd like to use ``easy_install`` instead:: +To upgrade the package to the current version, just add ``-U`` flag to the command:: - easy_install salsita-gitflow + pip install -U --allow-external rbtools --allow-unverified rbtools salsita-gitflow -``salsita-gitflow`` requires Python 2.7. +Please not that ``salsita-gitflow`` requires Python 2.7. Setting it up ------------- diff --git a/gitflow/__init__.py b/gitflow/__init__.py index f5ac7e77e..726e7e298 100644 --- a/gitflow/__init__.py +++ b/gitflow/__init__.py @@ -9,7 +9,7 @@ # Distributed under a BSD-like license. For full terms see the file LICENSE.txt # -VERSION = (1, 4, 8) +VERSION = (1, 4, 9) __version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:]) __author__ = "Ondrej Kupka, Tomas Brambora, Hartmut Goebelm, Vincent Driessen" diff --git a/gitflow/exceptions.py b/gitflow/exceptions.py index e15808a4e..8c074375b 100644 --- a/gitflow/exceptions.py +++ b/gitflow/exceptions.py @@ -18,6 +18,7 @@ class OperationsError(GitflowError): pass class PrefixNotUniqueError(OperationsError): pass class MergeError(OperationsError): pass class PostReviewError(OperationsError): pass +class SubmitReviewError(OperationsError): pass class StatusError(GitflowError): pass class WorkdirIsDirtyError(StatusError): pass diff --git a/gitflow/review.py b/gitflow/review.py index cc7f90953..0ee09ef6b 100644 --- a/gitflow/review.py +++ b/gitflow/review.py @@ -9,7 +9,7 @@ from gitflow.core import GitFlow from gitflow.exceptions import (GitflowError, MultipleReviewRequestsForBranch, NoSuchBranchError, AncestorNotFound, EmptyDiff, - PostReviewError) + PostReviewError, SubmitReviewError) class ReviewRequestLimitError(GitflowError): def __str__(self): @@ -178,7 +178,19 @@ def submit(self): assert self._status if self._status == 'submitted': return - self._update(status='submitted') + + cmd = ['rbt', 'close', '--close-type', 'submitted', str(self.get_id())] + p = sub.Popen(cmd, stdout=sub.PIPE, stderr=sub.PIPE) + (outdata, errdata) = p.communicate() + + if p.returncode != 0: + print('>>>> rbt error output') + print(errdata) + print('<<<< rbt error output') + print('If the error output is not sufficient, execute') + print('\n $ rbt close --debug --close-type submitted {0}\n'.format(self.get_id())) + print('and see what happens.') + raise SubmitReviewError('Failed to submit review request.') def is_accepted(self): assert self._rid