diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-03-06 21:43:18 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-03-06 21:43:18 +0000 |
commit | a1067ff82a989fb6d7d8026bd16992ab9fb13898 (patch) | |
tree | cc3de7b56e2ac1c3ebce98b2b09389b6fd3cda78 /src/backend/sync.py | |
parent | 170f9d7b708902c2f8b58d911383aef2ef35941a (diff) |
backend:
* drop some checks we had in place due to expensive metadata regen
* less time checking -> more time working -> faster sisyphus
Diffstat (limited to 'src/backend/sync.py')
-rw-r--r-- | src/backend/sync.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/backend/sync.py b/src/backend/sync.py index ebea39c..2490c04 100644 --- a/src/backend/sync.py +++ b/src/backend/sync.py @@ -9,14 +9,20 @@ def portage(): 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', 'reset', '--hard'] + remoteBranch.decode().strip().replace('refs/remotes/','').split() + ['--quiet'], stdout=subprocess.PIPE) + gitExecStage1 = subprocess.Popen(['git', 'fetch', '--depth=1', 'origin'] + localBranch.decode().strip().split() + ['--quiet'], stdout=subprocess.PIPE) gitExecStage1.wait() + gitExecStage2 = subprocess.Popen(['git', 'reset', '--hard'] + remoteBranch.decode().strip().replace('refs/remotes/','').split() + ['--quiet'], stdout=subprocess.PIPE) + gitExecStage2.wait() + def overlay(): os.chdir(sisyphus.filesystem.redcoreRepoDir) 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.wait() + gitExecStage1 = subprocess.Popen(['git', 'reset', '--hard'] + remoteBranch.decode().strip().replace('refs/remotes/','').split() + ['--quiet'], stdout=subprocess.PIPE) gitExecStage1.wait() |