gpt4 book ai didi

svn up --accept theirs-full --force 和同名的本地文件

转载 作者:行者123 更新时间:2023-12-01 06:31:28 28 4
gpt4 key购买 nike

有时,但不是每次,当我执行 svn up 并且已经有同名的本地文件时,会发生错误

$ svn update --accept theirs-full --force
Fetching external item into 'dir'
svn: warning: Failed to add file 'dir/subdir/file.txt': an unversioned file of the same name already exists

At revision 19818.

$ svn st
Performing status on external item at 'dir'
! dir
? dir/subdir/file.txt

但如果像这样尝试
$ svn up dir/subdir/file.txt
svn: Failed to add file 'dir/subdir/file.txt': an unversioned file of the same name already exists

$ svn up --force dir/subdir/file.txt
E dir/subdir/file.txt
Updated to revision 19818.

$ svn st dir/subdir/file.txt
$

所有作品。

我理解错了吗?
这在某种程度上与外部 repo 有关吗?

最佳答案

它看起来像 --force更新外部存储库时不应用选项。 documentationsvn up -h没有解释这种行为。但由于这似乎是一件安全的事情,所以这并不奇怪。

一般来说,您可以在 documentation 中看到svn update的行为在主结帐上调用和在外部结帐上直接调用时是不同的。也就是说,当在主结帐中调用时,该命令更柔和,不会执行正常结帐时通常会进行的所有更改。当直接在外部调用时,它的行为正常。

关于svn up --accept theirs-full --force 和同名的本地文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20321345/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com