2016-04-07

Fix SVN "Failed to run the WC DB work queue" problem

svn failed to run the wc db work queue associated with file (windows symbol ? issue)

如果使用 SQLite3 的 command line tool,
cd {work-dir-base}
sqlite3 .svn/wc.db "delete from work_queue"

因為我有裝 TDBC-SQLite3,所以就沒有下載 SQLite3 的 command line tool,直接使用 TDBC 來解決問題,下面是大概的樣子:
#!/usr/bin/tclsh
package require tdbc::sqlite3

# Fix SVN "Failed to run the WC DB work queue" problem
tdbc::sqlite3::connection create db "d:/android/.svn/wc.db" 

set statement [db prepare {delete from work_queue}]
$statement execute
$statement close

db close

這是在 Android 6.0.x code base 上發生的,原因請參閱 Forbidden file and folder names on Windows

The following are reserved names, which cannot be assigned to a folder or file (normally):
  • CON
  • PRN
  • AUX
  • CLOCK$ (NT and older)
  • NUL
  • COM1
  • COM2
  • COM3
  • COM4
  • COM5
  • COM6
  • COM7
  • COM8
  • COM9
  • LPT1
  • LPT2
  • LPT3
  • LPT4
  • LPT5
  • LPT6
  • LPT7
  • LPT8
  • LPT9
而我發現,有一個 kernel 下的檔案叫做 aux.c,所以在 Windows 平台下視為不正常的檔名。解決的方法是先建立與刪除檔案,再 svn update 或者是 svn cleanup。

建立檔案:
echo "" >  \\.\d:\android\kernel\drivers\gpu\drm\nouveau\core\subdev\i2c\aux.c

刪除檔案:
del \\.\d:\android\kernel\drivers\gpu\drm\nouveau\core\subdev\i2c\aux.c

更新: android\external\libunwind 下有一個 aux 目錄,我發覺 Windows 會非常直接的擋下來,所以我想要在 Windows 平台上看 Android 6.0.x 的 source code 將成為困難的任務,除非 Windows 修改檢查檔名的規則,不然就…… 放生吧。

沒有留言: