Skip to content

Commit b285f72

Browse files
committed
ignore perms/users on sync
1 parent 96b41b2 commit b285f72

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

geotessera/registry_cli.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,12 +1521,18 @@ def sync_remote_command(args):
15211521
rsync_cmd = [
15221522
'rsync',
15231523
'-avz',
1524+
'--no-perms',
1525+
'--no-owner',
1526+
'--no-group',
15241527
'--itemize-changes',
15251528
'--dry-run',
15261529
f'{remote_endpoint}/global_0.1_degree_representation/',
15271530
f'{repr_dir}/'
15281531
]
15291532

1533+
# Show the rsync command being run
1534+
console.print(f"[dim]Running: {' '.join(rsync_cmd)}[/dim]")
1535+
15301536
try:
15311537
result = subprocess.run(
15321538
rsync_cmd,
@@ -1551,9 +1557,9 @@ def sync_remote_command(args):
15511557
continue
15521558

15531559
# Parse rsync itemize-changes format
1554-
# Format: >f+++++++++ path/to/file or .f...pog... path/to/file
1555-
# >f = file transfer, .f = file with attribute changes (permissions/ownership/timestamps)
1556-
if line.startswith('>f') or line.startswith('.f'):
1560+
# Format: >f+++++++++ path/to/file (file being transferred)
1561+
# Only detect new files, ignore permission/ownership changes
1562+
if line.startswith('>f'):
15571563
parts = line.split()
15581564
if len(parts) >= 2:
15591565
file_path = parts[-1]
@@ -1655,11 +1661,17 @@ def sync_remote_command(args):
16551661
rsync_sync_cmd = [
16561662
'rsync',
16571663
'-avz',
1664+
'--no-perms',
1665+
'--no-owner',
1666+
'--no-group',
16581667
'--progress',
16591668
f'{remote_endpoint}/global_0.1_degree_representation/',
16601669
f'{repr_dir}/'
16611670
]
16621671

1672+
# Show the rsync command being run
1673+
console.print(f"[dim]Running: {' '.join(rsync_sync_cmd)}[/dim]")
1674+
16631675
try:
16641676
# Run rsync with real-time output
16651677
process = subprocess.Popen(

0 commit comments

Comments
 (0)