Lines 403-416 in curateipsum/fs.py restore directory mtimes after sync operations (since modifying files inside directories changes their parent mtime). However, this operation doesn't yield any action:
# restore dir mtimes in dst, updated by updating filesforsrc_entryinscantree(src_root_abs,dir_first=True):ifnotsrc_entry.is_dir():continuerel_path=src_entry.path[len(src_root_abs)+1:]dst_path=os.path.join(dst_root_abs,rel_path)src_stat=src_entry.stat(follow_symlinks=False)dst_stat=os.lstat(dst_path)ifsrc_stat.st_mtime!=dst_stat.st_mtime:_lg.debug("Rsync, restoring directory mtime: %s",dst_path)os.utime(dst_path,(src_stat.st_atime,src_stat.st_mtime),follow_symlinks=False)# Missing: yield rel_path, Actions.UPDATE_TIME, ""
Impact
API consumers can't consistently track what changed when switching between internal/external rsync modes.
Solution
Add yield rel_path, Actions.UPDATE_TIME, "" after the os.utime() call around line 415.
Discovery
Found during test implementation for rsync_ext() function (see TestRsyncExt in test_fs.py).
# Internal rsync doesn't report directory mtime updates
## Problem
Internal `rsync()` and external `rsync_ext()` produce inconsistent action outputs for directory mtime updates.
## Current Behavior
**File time changes:**
- Internal `rsync()`: yields `Actions.REWRITE` ✓
- External `rsync_ext()`: yields `Actions.REWRITE` ✓
**Directory time changes:**
- Internal `rsync()`: Updates mtime silently, yields nothing ✗
- External `rsync_ext()`: yields `Actions.UPDATE_TIME` ✓
## Details
Lines 403-416 in `curateipsum/fs.py` restore directory mtimes after sync operations (since modifying files inside directories changes their parent mtime). However, this operation doesn't yield any action:
```python
# restore dir mtimes in dst, updated by updating files
for src_entry in scantree(src_root_abs, dir_first=True):
if not src_entry.is_dir():
continue
rel_path = src_entry.path[len(src_root_abs) + 1:]
dst_path = os.path.join(dst_root_abs, rel_path)
src_stat = src_entry.stat(follow_symlinks=False)
dst_stat = os.lstat(dst_path)
if src_stat.st_mtime != dst_stat.st_mtime:
_lg.debug("Rsync, restoring directory mtime: %s", dst_path)
os.utime(dst_path, (src_stat.st_atime, src_stat.st_mtime),
follow_symlinks=False)
# Missing: yield rel_path, Actions.UPDATE_TIME, ""
```
## Impact
API consumers can't consistently track what changed when switching between internal/external rsync modes.
## Solution
Add `yield rel_path, Actions.UPDATE_TIME, ""` after the `os.utime()` call around line 415.
## Discovery
Found during test implementation for `rsync_ext()` function (see TestRsyncExt in test_fs.py).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Internal rsync doesn't report directory mtime updates
Problem
Internal
rsync()and externalrsync_ext()produce inconsistent action outputs for directory mtime updates.Current Behavior
File time changes:
rsync(): yieldsActions.REWRITE✓rsync_ext(): yieldsActions.REWRITE✓Directory time changes:
rsync(): Updates mtime silently, yields nothing ✗rsync_ext(): yieldsActions.UPDATE_TIME✓Details
Lines 403-416 in
curateipsum/fs.pyrestore directory mtimes after sync operations (since modifying files inside directories changes their parent mtime). However, this operation doesn't yield any action:Impact
API consumers can't consistently track what changed when switching between internal/external rsync modes.
Solution
Add
yield rel_path, Actions.UPDATE_TIME, ""after theos.utime()call around line 415.Discovery
Found during test implementation for
rsync_ext()function (see TestRsyncExt in test_fs.py).