Commit d081baa5 authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

Mercurial repository backup: using command defined in py-heptapod

The py-heptapod code is in a better place than the Rails app
to know what is exactly to be backed up and restored.
In particular:

closes #439

--HG--
branch : heptapod
parent 04637aec7c50
Pipeline #19217 passed with stage
in 12 minutes and 6 seconds
......@@ -995,17 +995,13 @@ def bundle_to_disk(save_path)
end
# Backup data (config and state) that is not part of the bundle
# TODO provide a command in py-heptapod and/or include state files in
# order for it to stay close to the definitions, and have an easy
# way to test thoroughly
def backup_additional(save_path)
output, status = popen(
['tar',
'-cf', hg_backup_config_path(save_path),
'-C', @hgpath,
'--ignore-failed-read',
'.hg/hgrc',
'.hg/default_gitlab_branch',
'.hg/hgrc.managed',
'.hg/git-mapfile']
)
output, status = hg_call(["hpd-backup-additional",
hg_backup_config_path(save_path)],
force_system_user: true)
raise StandardError, output.strip unless status == 0
end
......@@ -1030,9 +1026,9 @@ def create_from_bundle(path_to_bundle)
# Restore additional files (config and state) that are not part of bundle
def restore_additional(path_to_bundle)
output, status = popen(
['tar', '-xf', hg_backup_config_path(path_to_bundle), '-C', @hgpath]
)
output, status = hg_call(["hpd-restore-additional",
hg_backup_config_path(path_to_bundle)],
force_system_user: true)
raise StandardError, output.strip unless status == 0
end
......
hg-evolve~=10.2.0
gunicorn~=20.0.4
sentry-sdk==0.9.5
heptapod>=2.2.1
heptapod>=2.4.0dev1
hgitaly>=0.5.0
hg-git~=0.9.0
dulwich~=0.20.0
hg-loggingmod>=0.2.0
hg-configexpress~=0.4.0
\ No newline at end of file
hg-configexpress~=0.4.0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment