1919 drop_analytical_index ,
2020 import_s3 ,
2121 merge ,
22- move ,
22+ move_staged ,
2323 query_analytical_index ,
24- remove ,
2524 rm ,
2625 status ,
2726 verify ,
2827)
2928
30-
3129IdentityMode = Literal ["blake3" , "meta" ]
3230HANDLED_CLI_ERRORS = (
3331 BotoCoreError ,
@@ -56,6 +54,11 @@ class CommitArgs:
5654 help = "Commit only staged changes for a branch" ,
5755 )
5856 ref : str | None = None # Branch ref to update (defaults to current branch)
57+ transfer_backend : str | None = field (
58+ default = None ,
59+ alias = ["--transfer-backend" , "--backend" ],
60+ help = "Blob transfer backend (boto3 or s5cmd)" ,
61+ )
5962
6063
6164@dataclass
@@ -79,6 +82,11 @@ class ImportArgs:
7982 help = "Repository path or URI" ,
8083 )
8184 ref : str | None = None # Branch ref to update (defaults to current branch)
85+ transfer_backend : str | None = field (
86+ default = None ,
87+ alias = ["--transfer-backend" , "--backend" ],
88+ help = "Blob transfer backend (boto3 or s5cmd)" ,
89+ )
8290
8391
8492@dataclass
@@ -101,16 +109,16 @@ class AddArgs:
101109 default = None ,
102110 help = "Branch ref for staging (defaults to current branch)" ,
103111 )
112+ transfer_backend : str | None = field (
113+ default = None ,
114+ alias = ["--transfer-backend" , "--backend" ],
115+ help = "Blob transfer backend (boto3 or s5cmd)" ,
116+ )
104117
105118
106119@dataclass
107120class RmArgs :
108121 paths : list [str ] = field (positional = True , nargs = "+" , help = "Paths to remove" )
109- message : str | None = field (
110- default = None ,
111- alias = ["-m" , "--message" ],
112- help = "Commit message for a metadata-only removal" ,
113- )
114122 root : str = field (
115123 default = "." ,
116124 alias = "--repo" ,
@@ -120,10 +128,6 @@ class RmArgs:
120128 default = None ,
121129 help = "Branch ref for staging (defaults to current branch)" ,
122130 )
123- staged : bool = flag (
124- False ,
125- help = "Stage removals instead of writing a metadata-only commit" ,
126- )
127131
128132
129133@dataclass
@@ -133,15 +137,14 @@ class MoveArgs:
133137 positional = True ,
134138 help = "Destination path or prefix" ,
135139 )
136- message : str = field (alias = ["-m" , "--message" ], help = "Commit message" )
137140 root : str = field (
138141 default = "." ,
139142 alias = "--repo" ,
140143 help = "Repository path or URI" ,
141144 )
142145 ref : str | None = field (
143146 default = None ,
144- help = "Branch ref to update (defaults to current branch)" ,
147+ help = "Branch ref for staging (defaults to current branch)" ,
145148 )
146149
147150
@@ -209,6 +212,11 @@ class VerifyArgs:
209212 alias = "--dry-run" ,
210213 help = "Report entries that would be verified without writing blobs or commits" ,
211214 )
215+ transfer_backend : str | None = field (
216+ default = None ,
217+ alias = ["--transfer-backend" , "--backend" ],
218+ help = "Blob transfer backend (boto3 or s5cmd)" ,
219+ )
212220
213221
214222@dataclass
@@ -356,6 +364,7 @@ def run_cli(argv: list[str] | None = None) -> int:
356364 identity_mode = command .identity ,
357365 staged = command .staged ,
358366 ref = command .ref ,
367+ blob_transfer = command .transfer_backend ,
359368 )
360369 print (commit_id )
361370 return 0
@@ -368,6 +377,7 @@ def run_cli(argv: list[str] | None = None) -> int:
368377 identity_mode = command .identity ,
369378 path_patterns = _flatten_option_values (command .path_patterns ),
370379 ref = command .ref ,
380+ blob_transfer = command .transfer_backend ,
371381 )
372382 print (commit_id )
373383 return 0
@@ -379,60 +389,24 @@ def run_cli(argv: list[str] | None = None) -> int:
379389 ref = command .ref ,
380390 identity_mode = command .identity ,
381391 destination_path = command .destination_path ,
392+ blob_transfer = command .transfer_backend ,
382393 )
383394 print (json .dumps (_stage_payload (stage ), indent = 2 ))
384395 return 0
385396
386397 if isinstance (command , RmArgs ):
387- if command .message is not None and command .staged :
388- print (
389- "rm error: cannot combine --message with --staged" ,
390- file = sys .stderr ,
391- )
392- return 2
393- if command .message is not None :
394- result = remove (
395- root = command .root ,
396- paths = command .paths ,
397- message = command .message ,
398- ref = command .ref ,
399- )
400- print (
401- json .dumps (
402- {
403- "ref" : result .ref ,
404- "commit_id" : result .commit_id ,
405- "removed_paths" : result .removed_paths ,
406- },
407- indent = 2 ,
408- )
409- )
410- return 0
411-
412398 stage = rm (root = command .root , paths = command .paths , ref = command .ref )
413399 print (json .dumps (_stage_payload (stage ), indent = 2 ))
414400 return 0
415401
416402 if isinstance (command , MoveArgs ):
417- result = move (
403+ stage = move_staged (
418404 root = command .root ,
419405 source_path = command .source_path ,
420406 destination_path = command .destination_path ,
421- message = command .message ,
422407 ref = command .ref ,
423408 )
424- print (
425- json .dumps (
426- {
427- "ref" : result .ref ,
428- "commit_id" : result .commit_id ,
429- "source_path" : result .source_path ,
430- "destination_path" : result .destination_path ,
431- "moved_paths" : result .moved_paths ,
432- },
433- indent = 2 ,
434- )
435- )
409+ print (json .dumps (_stage_payload (stage ), indent = 2 ))
436410 return 0
437411
438412 if isinstance (command , StatusArgs ):
@@ -493,6 +467,7 @@ def run_cli(argv: list[str] | None = None) -> int:
493467 ref = command .ref ,
494468 path_prefixes = _flatten_option_values (command .path ),
495469 dry_run = command .dry_run ,
470+ blob_transfer = command .transfer_backend ,
496471 )
497472 payload = {
498473 "commit_id" : result .commit_id ,
0 commit comments