You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法将含*.EXE/*.DLL的SVN代码检出至USB存储设备

Alright, let's dig into this tricky SVN checkout issue you're facing with USB drives and executable files. Based on all the details you've shared, here's a structured breakdown of the problem and actionable steps to fix it:

Core Issue Summary

You're hitting a misleading "invalid cross-device link" error when checking out SVN repos with .EXE or .DLL files to USB drives—even though the source and target paths are on the same device. The checkout works flawlessly on local C: drives or network drives, and the problem is isolated to USB storage across Windows 7 Pro and 10. Oddly, two identical Windows 7 Pro machines using the same enterprise account show inconsistent behavior (one works, one fails).

Key Observations

  • Both Cygwin SVN and TortoiseSVN throw identical error messages
  • Checkout succeeds when targeting local C: drives or network drives mapped via net use
  • Problem occurs on both Windows 7 Pro and Windows 10
  • Inconsistent results on two identical Windows 7 Pro machines with the same account
  • Only .EXE/.DLL files trigger the error; all other files/directories checkout normally
  • Issue persists across multiple USB flash drives and external hard drives
  • Antivirus logs show no interference (ruled out since local drive checkout works)
  • No relevant events appear in Windows Event Log after the failure

Error Details

Cygwin SVN Error

svn: E155009: Failed to run the WC DB work queue associated with '/cygdrive/d/BT_HEATSHRINK_000003_0.3.1/test', work item 1 (file-install test/heatshrink.exe 1 0 1 1) 
svn: E000018: Can't move '/cygdrive/d/BT_HEATSHRINK_000003_0.3.1/.svn/tmp/svn-1AtIka' to '/cygdrive/d/BT_HEATSHRINK_000003_0.3.1/test/heatshrink.exe': Invalid cross-device link

TortoiseSVN Error

Error: Failed to run the WC DB work queue associated with 
Error: 'D:\BT_HEATSHRINK_000003_0.3.1\test', work item 1 (file-install 
Error: test/heatshrink.exe 1 0 1 1) 
Error: Can't move 'D:\BT_HEATSHRINK_000003_0.3.1\.svn\tmp\svn-35B5CA2A' to 
Error: 'D:\BT_HEATSHRINK_000003_0.3.1\test\heatshrink.exe': The system cannot move 
Error: the file to a different disk drive.

Critical Note

The error falsely claims a cross-device link, but manual file moves between the same USB drive paths work without issue. The problem is exclusive to USB storage—local and network drives function normally.

Version Info

  • Cygwin SVN: 1.10.0 (r1827917)
  • TortoiseSVN: 1.10.0, Build 28176 - 64-bit (updated 2018/04/14 08:00:32)

Troubleshooting & Fix Recommendations

  1. Adjust USB Drive Write Caching

    • Open Device Manager → Expand "Disk Drives" → Right-click your USB drive → Properties → Policies tab
    • Switch to "Quick removal" mode (or uncheck "Enable write caching on the device" if using "Better performance")
    • This resolves filesystem-level inconsistencies that SVN might misinterpret as cross-device issues.
  2. Verify USB Drive Filesystem

    • Ensure your USB drives are formatted with NTFS (not FAT32 or exFAT). SVN's working copy database has known issues with FAT filesystems, especially when handling executable files with special attributes.
    • To reformat: Right-click the USB drive in File Explorer → Format → Select NTFS → Check "Quick Format" → Start.
  3. Disable SVN Atomic Writes

    • SVN uses atomic file moves (via MoveFileEx on Windows) which can fail on some USB storage drivers even for same-device operations.
    • For TortoiseSVN: Go to Settings → General → Subversion configuration file → Edit
    • For Cygwin SVN: Edit ~/.subversion/config
    • Add this line under the [miscellany] section:
      use-atomic-writes = false
      
    • This forces SVN to use non-atomic file operations, bypassing the false cross-device error.
  4. Update SVN Versions

    • Your SVN version (1.10.0) is quite old (2018). Later versions (1.14+) include fixes for Windows filesystem edge cases, especially with USB storage. Try updating to the latest stable release of both TortoiseSVN and Cygwin SVN.
  5. Check Enterprise Group Policy Differences

    • Since one Windows 7 machine works and the other doesn't with the same account, compare applied group policies:
      • Run gpresult /h gpresult.html on both machines to generate policy reports
      • Look for policies related to USB storage, file permissions, or executable file restrictions (e.g., blocking .EXE writes to removable media)
  6. Test with a Clean Working Copy

    • Delete any partial working copies on the USB drive, then try a fresh checkout with the --no-auto-props flag to rule out interfering automatic property settings:
      svn checkout --no-auto-props <repo-url> <usb-target-path>
      

内容的提问来源于stack exchange,提问作者Steven Christensen

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 09:08:07