mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-03 05:09:58 -05:00
* GET /api/repos/<id>/log: the checked out branch's commits, newest first, a page at a time, with the total. The repo page has a Files | History toggle (the tree is only listed for Files). * GET /api/repos/<id>/archive.zip: `git archive HEAD` streamed to the browser; the file name is reduced to safe characters. Everything is read from the database before the response starts, because the request's session closes once a streamed response begins. * repository.submodules (default off): submodules are checked out with the repo's mode and the same git restrictions, and removed when the option is turned off. A submodule that cannot be downloaded (e.g. an ssh URL) does not stop the repo from updating; the download is retried with the submodule's error. * The README speed test bound is loose enough for a busy machine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
22 lines
571 B
Python
22 lines
571 B
Python
"""A git Repo can also download its submodules: repository.submodules.
|
|
|
|
Revision ID: 2026_10_06_1400
|
|
Revises: 2026_10_06_1300
|
|
"""
|
|
import sqlalchemy as sa
|
|
from alembic import op
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '2026_10_06_1400'
|
|
down_revision = '2026_10_06_1300'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
op.add_column('repository', sa.Column('submodules', sa.Boolean(), server_default=sa.false(), nullable=False))
|
|
|
|
|
|
def downgrade():
|
|
with op.batch_alter_table('repository') as batch_op:
|
|
batch_op.drop_column('submodules')
|