Ejemplo n.º 1
0
    def retryacceptincludingnextchangeset(self, change, changes):
        successfull = False
        nextchangeentry = self.getnextchangeset(change, changes)
        if nextchangeentry and (change.author == nextchangeentry.author
                                or "merge" in nextchangeentry.comment.lower()):
            shouter.shout("Next changeset: " + nextchangeentry.tostring())
            if input(
                    "Press Enter to try to accept it with next changeset together, press any other key to skip this"
                    " changeset and continue"):
                return False
            Changes.discard(change)
            successfull = Changes.accept(
                change, nextchangeentry, logpath=self.acceptlogpath) is 0
            if not successfull:
                Changes.discard(change, nextchangeentry)

        if not successfull:
            shouter.shout("Last executed command: \n" +
                          Changes.latest_accept_command)
            shouter.shout("Apropriate git commit command \n" +
                          Commiter.getcommitcommand(change))
            if not input(
                    "Press Enter to continue or any other key to exit the program and rerun it with resume"
            ):
                sys.exit(
                    "Please check the output and rerun programm with resume")
        return successfull
Ejemplo n.º 2
0
 def is_user_aborting(change):
     shouter.shout("Last executed command: \n" + Changes.latest_accept_command)
     shouter.shout("Apropriate git commit command \n" + Commiter.getcommitcommand(change))
     reallycontinue = "Do you want to continue? Y for continue, any key for abort"
     if input(reallycontinue).lower() == "y":
         return True
     else:
         sys.exit("Please check the output/log and rerun program with resume")