This commit is contained in:
Mario Voigt 2024-01-25 17:13:52 +01:00
parent b71904e22a
commit fa29b92010
1 changed files with 4 additions and 6 deletions

View File

@ -72,11 +72,8 @@ class AboutUpgradeMightyScape(inkex.EffectExtension):
inkex.utils.debug("Nothing to do! MightyScape is already up to date!")
except git.exc.GitCommandError as e:
if "Your local changes to the following files would be overwritten by merge" in str(e):
inkex.utils.debug("Please save or stash your local git changes first and try again. You can enable 'Stash untracked files' to continue.")
else:
inkex.utils.debug("Error: ")
inkex.utils.debug(e)
inkex.utils.debug("git command failed. Please save or stash your local git changes first and try again. You can enable 'Stash untracked files' to continue. This will also reset your branch to master.")
inkex.utils.debug("Error was: {}".format(str(e)))
return False
return True
@ -142,7 +139,8 @@ class AboutUpgradeMightyScape(inkex.EffectExtension):
#drop local changed. update might fail if file changes are present
if so.stash_untracked is True:
local_repo.git.stash('save')
local_repo.git.checkout('origin/master')
local_repo.git.checkout('master')
#local_repo.git.checkout('origin/master')
existingRemotes = [] #check for existing remotes. if one is missing, add it (or delete and recreate)
for r in local_repo.remotes: