Set exit code to 3 on merge conflict
[stgit] / stgit / lib / transaction.py
index 663d393..0ca647e 100644 (file)
@@ -1,4 +1,4 @@
-from stgit import exception
+from stgit import exception, utils
 from stgit.out import *
 from stgit.lib import git
 
@@ -111,6 +111,11 @@ class StackTransaction(object):
         self.__stack.patchorder.applied = self.__applied
         self.__stack.patchorder.unapplied = self.__unapplied
 
+        if self.__error:
+            return utils.STGIT_CONFLICT
+        else:
+            return utils.STGIT_SUCCESS
+
     def __halt(self, msg):
         self.__error = msg
         raise TransactionHalted(msg)