diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2021-01-18 14:02:10 -0500 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2021-01-18 17:57:39 -0500 |
commit | 0e0d2e1da1d2417d6e60bd25450b8cab56544468 (patch) | |
tree | 593e605c509aaa1b58e989d6b3c52364491d93b2 | |
parent | 46fe21d7e210404a1f9a9291c0d637245bfa0c9f (diff) | |
download | grokmirror-0e0d2e1da1d2417d6e60bd25450b8cab56544468.tar.gz |
If plumbing operations fail, try porcelain
If we tried to fetch objects using plumbing commands but they failed,
try again using porcelain.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rwxr-xr-x | grokmirror/fsck.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/grokmirror/fsck.py b/grokmirror/fsck.py index 8414693..19cdca1 100755 --- a/grokmirror/fsck.py +++ b/grokmirror/fsck.py @@ -1084,7 +1084,10 @@ def fsck_mirror(config, force=False, repack_only=False, conn_only=False, if fetch: grokmirror.lock_repo(obstrepo, nonblocking=False) logger.info(' fetch: %s -> %s', gitdir, os.path.basename(obstrepo)) - grokmirror.fetch_objstore_repo(obstrepo, childpath, use_plumbing=objstore_uses_plumbing) + success = grokmirror.fetch_objstore_repo(obstrepo, childpath, use_plumbing=objstore_uses_plumbing) + if not success and objstore_uses_plumbing: + # Try using git porcelain + grokmirror.fetch_objstore_repo(obstrepo, childpath) grokmirror.unlock_repo(obstrepo) if gitdir not in manifest: |