[英]Why does `svn update` unlock files and what is status B
I use the Enterprise Architect which used svn lock
to lock model files inside the the subversion repository. 我使用Enterprise Architect,后者使用svn lock
将模型文件锁定在Subversion存储库中。 For example: 例如:
>svn status
K Documents\UML\eaB\B2ACB6CFF398.xml
K Documents\UML\eaB\BE1936A1AE75.xml
K Documents\UML\eaC\C3B74A5737E1.xml
I have learned that on svn commit
you loose the locks unless you use the --keep-locks
option. 我了解到,在svn commit
,除非使用--keep-locks
选项,否则您将--keep-locks
。 Ever since Subversion 1.8 I noticed that svn update
now also unlockes: 从Subversion 1.8开始,我注意到svn update
现在也可以解锁:
>svn update
Aktualisiere ».«:
UB Documents\UML\eaB\BE1936A1AE75.xml
UB Documents\UML\eaB\B2ACB6CFF398.xml
UB Documents\UML\eaC\C3B74A5737E1.xml
Hole externen Verweis nach »Homeserver\Library\src\test\resources\config-current«:
Externer Verweis aktualisiert zu Revision 22020.
Revision 22020.
>svn status
Note that that there is nothing after svn status
. 注意, svn status
之后没有任何内容。 The lock are gone! 锁不见了! But svn update
has no --keep-locks
and no status B : 但是svn update
没有--keep-locks
并且没有状态B :
>svn help update
update (up): Aktualisiert die Arbeitskopie mit Änderungen aus dem Projektarchiv.
Aufruf: update [PFAD...]
…
A Added - Hinzugefügt
D Deleted - Gelöscht
U Updated - Aktualisiert
C Conflict - Konflikt
G Merged - Zusammengeführt
E Existed - Existierend
R Replaced - Ersetzt
Ok, it's German. 好的,是德国人。 But you don't need to speak German to see there is no B in that list. 但是您不必说德语就可以看到列表中没有B。
If I now try to relock the I am told the files are already locked: 如果现在尝试重新锁定,则系统会告知我文件已被锁定:
>svn lock Documents\UML\eaB\BE1936A1AE75.xml Documents\UML\eaB\B2ACB6CFF398.xml Documents\UML\eaC\C3B74A5737E1.xml
svn: Warnung: W160035: Path '/AndroidApp/trunk/Documents/UML/eaB/BE1936A1AE75.xml' is already locked by user 'martin.krischik' in filesystem '/srv/svn/…/db'
svn: Warnung: W160035: Path '/AndroidApp/trunk/Documents/UML/eaC/C3B74A5737E1.xml' is already locked by user 'martin.krischik' in filesystem '/srv/svn/…/db'
svn: Warnung: W160035: Path '/AndroidApp/trunk/Documents/UML/eaB/B2ACB6CFF398.xml' is already locked by user 'martin.krischik' in filesystem '/srv/svn/…/db'
Is this a bug or is there a reason for this weird behaviour. 这是bug还是这种怪异行为的原因?
Thanks to @user655063 I now know that B stands for broken lock . 感谢@ user655063,我现在知道B代表断锁 。 That's leads to the follow on questions: “Why are the locks always broken'. 这就引出了以下问题:“为什么锁总是断裂”。
Not just when locked by Enterprise Architect. 不只是由Enterprise Architect锁定时。 If I re-lock the files on the command line the locks will be considered broken and un-locked next svn update
as well. 如果我在命令行上重新锁定文件,则在下次svn update
也会认为这些锁定已损坏并且未锁定。
According to http://svnbook.red-bean.com/nightly/en/svn.ref.svn.c.update.html (svn 1.8) and http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.update.html (svn 1.7), B means "broken lock". 根据http://svnbook.red-bean.com/nightly/en/svn.ref.svn.c.update.html(svn 1.8)和http://svnbook.red-bean.com/en/1.7/ svn.ref.svn.c.update.html (svn 1.7),B表示“断锁”。
Is it maybe possible that the locks you had on the files were problematic already before you ran "svn update" (a problem that occurs once in a while when using Enterprise Architect with svn)? 在运行“ svn更新”之前,文件上的锁定是否可能已经出现问题(将Enterprise Architect与svn一起使用时会偶尔出现的问题)? See also Enterprise Architect and Subversion - The ability to import is currently locked 另请参阅Enterprise Architect和Subversion-导入功能当前已锁定
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.