forked from importers/git-importer
Failing to LFS register should abort the import
This commit is contained in:
parent
56cbe0a125
commit
dc0f33354e
@ -68,7 +68,7 @@ class LFSOid:
|
|||||||
row = cur.fetchone()
|
row = cur.fetchone()
|
||||||
lfs_oid_id = row[0]
|
lfs_oid_id = row[0]
|
||||||
cur.execute(
|
cur.execute(
|
||||||
"""INSERT INTO lfs_oid_in_package (package,filename,lfs_oid_id)
|
"""INSERT INTO lfs_oid_in_package (package,filename,lfs_oid_id)
|
||||||
VALUES (%s,%s,%s)""",
|
VALUES (%s,%s,%s)""",
|
||||||
(package, filename, lfs_oid_id),
|
(package, filename, lfs_oid_id),
|
||||||
)
|
)
|
||||||
@ -133,6 +133,7 @@ class LFSOid:
|
|||||||
json=data,
|
json=data,
|
||||||
timeout=10,
|
timeout=10,
|
||||||
)
|
)
|
||||||
|
response.raise_for_status()
|
||||||
logging.info(f"Register LFS returned {response.status_code}")
|
logging.info(f"Register LFS returned {response.status_code}")
|
||||||
|
|
||||||
|
|
||||||
@ -167,7 +168,7 @@ if __name__ == "__main__":
|
|||||||
cur.execute(
|
cur.execute(
|
||||||
"""
|
"""
|
||||||
CREATE TEMPORARY TABLE lfs_oid_in_revision (
|
CREATE TEMPORARY TABLE lfs_oid_in_revision (
|
||||||
revision_id INTEGER,
|
revision_id INTEGER,
|
||||||
lfs_oid_id INTEGER NOT NULL,
|
lfs_oid_id INTEGER NOT NULL,
|
||||||
name VARCHAR(255) NOT NULL
|
name VARCHAR(255) NOT NULL
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user