Skip to content

Commit ddd713a

Browse files
committed
in case no next changesets are found for resolving merge, ask user to continue or abort
1 parent 29a0a87 commit ddd713a

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

rtcFunctions.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ def retryacceptincludingnextchangesets(self, change, changes):
239239
break
240240
else:
241241
Changes.discard(self.config, *toaccept) # revert initial state
242+
else:
243+
self.is_user_aborting(change)
242244
return changestoskip
243245

244246
@staticmethod
@@ -249,16 +251,20 @@ def is_user_agreeing_to_accept_next_change(change):
249251
if answer == "y":
250252
return True
251253
elif answer == "n":
252-
shouter.shout("Last executed command: \n" + Changes.latest_accept_command)
253-
shouter.shout("Apropriate git commit command \n" + Commiter.getcommitcommand(change))
254-
reallycontinue = "Do you want to continue? Y for continue, any key for abort"
255-
if input(reallycontinue).lower() == "y":
256-
return False
257-
else:
258-
sys.exit("Please check the output/log and rerun program with resume")
254+
return not ImportHandler.is_user_aborting(change)
259255
else:
260256
shouter.shout("Please answer with Y/N, input was " + answer)
261257

258+
@staticmethod
259+
def is_user_aborting(change):
260+
shouter.shout("Last executed command: \n" + Changes.latest_accept_command)
261+
shouter.shout("Apropriate git commit command \n" + Commiter.getcommitcommand(change))
262+
reallycontinue = "Do you want to continue? Y for continue, any key for abort"
263+
if input(reallycontinue).lower() == "y":
264+
return True
265+
else:
266+
sys.exit("Please check the output/log and rerun program with resume")
267+
262268
@staticmethod
263269
def getnextchangeset(currentchangeentry, changeentries):
264270
nextchangeentry = None

0 commit comments

Comments
 (0)