SVN中的E状态码是什么意思?

发布于 2024-12-09 10:29:40 字数 681 浏览 0 评论 0原文

我刚刚第一次收到 SVN 的 E 状态代码。这是什么意思? 更新文档说它代表“Existed”,但仅提供更多细节。

或者,什么是“阻碍路径”?长帮助文件指出“第一列中报告了阻碍路径,代码为‘E’。”

一些背景:我从工作副本中删除了一个不应该删除的文件。从 SVN 更新并没有恢复它,所以我创建了一个具有相同文件名的新文件,并将该文件的存储库副本复制粘贴到其中。

然后我将其添加到版本控制中,但这给了它“需要添加到远程存储库的版本化文件”状态,而不是“无本地更改”状态。

使用 Subclipse,我选择了替换为 >父文件夹上的来自存储库的最新,并且发生了这种情况:

revert -N C:/foo/Bar.java
    Reverted C:/foo/Bar.java
update C:/foo/Bar.java -r HEAD --force
    E   C:/foo/Bar.java
    Updated to revision 396.
    ===== File Statistics: =====
    Existing: 1

I just got SVN's E status code for the first time. What does it mean? The update documentation says that it stands for "Existed," but gives no more detail than that.

Alternately, what is an "obstructing path"? The long help file states that "Obstructing paths are reported in the first column with code 'E'."

Some background: I deleted a file from my working copy that I shouldn't have deleted. Updating from SVN didn't restore it, so I created a new file with the same filename and copy-pasted the repo copy of the file into it.

I then added it to version control, but that gave it the "versioned file that needs to be added to the remote repository" status, not the "no local changes" status.

Using Subclipse, I selected Replace With > Latest from Repository on the parent folder, and this happened:

revert -N C:/foo/Bar.java
    Reverted C:/foo/Bar.java
update C:/foo/Bar.java -r HEAD --force
    E   C:/foo/Bar.java
    Updated to revision 396.
    ===== File Statistics: =====
    Existing: 1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

娇俏 2024-12-16 10:29:40

“阻塞路径”是指更新命令需要复制版本化文件或文件夹的路径处的现有未版本化文件或文件夹。

E 状态仅在使用 --force 标志时出现,如果没有该标志,更新就会失败。有了该标志,它就不会影响该文件,并允许您决定如何处理它。

这种情况令人费解的是,它最终如何认为文件在成功恢复后立即取消了版本控制。

参考:svn 帮助更新

如果阻碍路径是相同类型(文件
或目录)作为存储库中的相应路径,它变成
版本化,但其内容“按原样”保留在工作副本中。

An "obstructing path" refers to an existing unversioned file or folder at a path where the update command needs to copy a versioned file or folder.

The E status only appears when the --force flag is used, without the flag the update would just fail. With the flag, it leaves the file alone and allows you to decide what to do with it.

The puzzling thing about this situation is how it ended up thinking the file was unversioned immediately after a successful revert.

Ref: svn help update

If the obstructing path is the same type (file
or directory) as the corresponding path in the repository it becomes
versioned but its contents are left 'as-is' in the working copy.

骄兵必败 2024-12-16 10:29:40

E = 文件在更新之前已存在。

http://plind.dk/2009/06/26/svn-status- cheatsheet/

“工作中未版本化的阻碍路径
如果更新尝试复制不会自动导致失败
添加相同的路径。如果阻碍路径是相同类型(文件
或目录)作为存储库中的相应路径,它变成
版本化,但其内容“按原样”保留在工作副本中。
这意味着阻碍目录的未版本化子目录可能会
也会阻碍并被版本化。对于文件,任何内容差异
障碍物和存储库之间被视为本地
对工作副本的修改。存储库中的所有属性
应用于阻碍路径。报告阻碍路径
在第一列中,代码为“E”。

使用 --set-depth 选项设置新的工作副本深度
此次行动的目标。”

E = File existed before the update.

http://plind.dk/2009/06/26/svn-status-cheatsheet/

"Unversioned obstructing paths in the working
copy do not automatically cause a failure if the update attempts to
add the same path. If the obstructing path is the same type (file
or directory) as the corresponding path in the repository it becomes
versioned but its contents are left 'as-is' in the working copy.
This means that an obstructing directory's unversioned children may
also obstruct and become versioned. For files, any content differences
between the obstruction and the repository are treated like a local
modification to the working copy. All properties from the repository
are applied to the obstructing path. Obstructing paths are reported
in the first column with code 'E'.

Use the --set-depth option to set a new working copy depth on the
targets of this operation."

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文