summaryrefslogtreecommitdiff
path: root/src/backend/libsisyphus.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/libsisyphus.py')
-rw-r--r--src/backend/libsisyphus.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/libsisyphus.py b/src/backend/libsisyphus.py
index 7425530..aab0522 100644
--- a/src/backend/libsisyphus.py
+++ b/src/backend/libsisyphus.py
@@ -237,10 +237,14 @@ def syncPortageConfig():
localBranch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'])
remoteBranch = subprocess.check_output(['git', 'rev-parse', '--symbolic-full-name', '@{u}'])
- gitExecStage1 = subprocess.Popen(['git', 'fetch', '--depth=1', 'origin'] + localBranch.decode().strip().split() + ['--quiet'], stdout=subprocess.PIPE)
+ gitExecStage1 = subprocess.Popen(['git', 'stash'], stdout=subprocess.PIPE)
gitExecStage1.wait()
- gitExecStage2 = subprocess.Popen(['git', 'reset', '--hard'] + remoteBranch.decode().strip().replace('refs/remotes/','').split() + ['--quiet'], stdout=subprocess.PIPE)
+ gitExecStage2 = subprocess.Popen(['git', 'fetch', '--depth=1', 'origin'] + localBranch.decode().strip().split() + ['--quiet'], stdout=subprocess.PIPE)
gitExecStage2.wait()
+ gitExecStage3 = subprocess.Popen(['git', 'reset', '--hard'] + remoteBranch.decode().strip().replace('refs/remotes/','').split() + ['--quiet'], stdout=subprocess.PIPE)
+ gitExecStage3.wait()
+ gitExecStage4 = subprocess.Popen(['git', 'stash', 'apply'], stdout=subprocess.PIPE)
+ gitExecStage4.wait()
def regenPortageMetadata():
if os.path.isdir(portageMetadataDir):