Add branch using

This commit is contained in:
Ivan Vazhenin
2023-11-30 16:29:32 +03:00
parent 3841f50628
commit 436703641b
2 changed files with 6 additions and 3 deletions

Binary file not shown.

View File

@@ -570,14 +570,17 @@ def apply_commits(params, files, url):
repl = req.find('replication')
scheme = repl.get('scheme')
commit = repl.get('id')
branch, new_scheme = get_branch(params['from'].replace('tcp://', ''), scheme)
bnd = params['from'].replace('tcp://', '')
branch, new_scheme = get_branch(bnd, scheme)
if new_scheme:
scheme = new_scheme
if branch:
logging.warning(branch)
con = OOConnectionParams(scheme, Config.oodb_host, Config.oodb_port, Config.oodb_dbname,
Config.oodb_username, Config.oodb_passwd, scheme)
ws = OODBWorkspace.ws(scheme)
ws.setCurrentUser(bnd)
if branch:
logging.warning(branch)
ws.switchBranch(branch)
if not ws.isInit():
res = ws.init(con)
logger.warning(res)