semantics
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# #region GitServiceSyncMixin [C:4] [TYPE Module] [SEMANTICS git, sync, push, pull, remote, lock]
|
||||
# @LAYER: Infra
|
||||
# @LAYER Infrastructure
|
||||
# @BRIEF Push and pull operations for GitService with origin host auto-alignment (concurrent-safe).
|
||||
# @RELATION USED_BY -> [GitService]
|
||||
# @RELATION CALLED_BY -> [GitService]
|
||||
# @RELATION DEPENDS_ON -> [GitServiceUrlMixin]
|
||||
|
||||
import os
|
||||
@@ -19,8 +19,8 @@ from src.models.git import GitRepository, GitServerConfig
|
||||
class GitServiceSyncMixin:
|
||||
# region push_changes [C:4] [TYPE Function] [SEMANTICS git,push,lock]
|
||||
# @PURPOSE: Push local commits to remote (concurrent-safe).
|
||||
# @PRE: Repository exists and has an 'origin' remote.
|
||||
# @POST: Local branch commits are pushed to origin.
|
||||
# @PRE Repository exists and has an 'origin' remote.
|
||||
# @POST Local branch commits are pushed to origin.
|
||||
def push_changes(self, dashboard_id: int):
|
||||
with self._locked(dashboard_id):
|
||||
with belief_scope("GitService.push_changes"):
|
||||
@@ -113,8 +113,8 @@ class GitServiceSyncMixin:
|
||||
|
||||
# region pull_changes [C:4] [TYPE Function] [SEMANTICS git,pull,lock]
|
||||
# @PURPOSE: Pull changes from remote (concurrent-safe).
|
||||
# @PRE: Repository exists and has an 'origin' remote.
|
||||
# @POST: Changes from origin are pulled and merged into the active branch.
|
||||
# @PRE Repository exists and has an 'origin' remote.
|
||||
# @POST Changes from origin are pulled and merged into the active branch.
|
||||
def pull_changes(self, dashboard_id: int):
|
||||
with self._locked(dashboard_id):
|
||||
with belief_scope("GitService.pull_changes"):
|
||||
|
||||
Reference in New Issue
Block a user