无法将文件添加到 CVSNT

发布于 2024-08-01 20:19:25 字数 784 浏览 2 评论 0原文

我在尝试将文件添加到 CVS 时遇到奇怪的错误。

问题开始是因为大小写错误,并导致问题(即 MyFile.js 在 CVS 中为 myfile.js),

我尝试删除该文件,然后将其添加回来,现在我收到以下错误:

cvs server: could not find parsed rcsfile MyFile.js

是否有任何问题我如何永久删除该文件并开始新的?

在 Windows 资源管理器(在服务器上)中删除文件并没有解决问题。 当我在 Windows 资源管理器中删除该文件时,它允许我将其添加回来,但在我再次更新时告诉我该文件已被删除。

编辑:

我已尝试以下操作:

  • 通过 cvs 服务器上的 Windows 资源管理器删除版本控制文件,并通过 cvs add 和 commit 将其添加回来。 这允许我添加它,但然后在第一次更新时将其从我的沙箱中删除。
  • 将文件添加为另一个名称(即 MyFile2.js),并使用 cvs rename 重命名为正确的名称(MyFile.js)。 这会将文件保留在我的沙箱中,但所有其他用户都会获得其他名称 (MyFile2.js)。 如果我从沙箱中删除该文件,那么它会以其他名称 (MyFile2.js) 的形式返回。
  • 通过 cvs 服务器上的 Windows 资源管理器删除版本控制文件,并通过 cvs add 和 commit 添加它,然后尝试通过 CVS 删除它。 这会导致来自 CVS 的消息不同步。 更新会从我的沙箱中删除该文件。

I'm getting a strange error while trying to add a file to CVS.

The problem started because the case was wrong, and causing issues (i.e. MyFile.js was in CVS as myfile.js)

I tried deleting the file, and adding it back in, and now I'm getting the following error:

cvs server: could not find parsed rcsfile MyFile.js

Is there any way for me to permanently delete this file and start new?

Deleting the file in Windows Explorer (on the server) did not solve the issue. When I delete the file in Windows Explorer, it allows me to add it back in, but tells me that it has been removed as soon as I update again.

EDIT:

I've tried the following:

  • Removing the versioned file via windows explorer on the cvs server and adding it back via cvs add and commit. This allows me to add it, but then deletes it from my sandbox upon the first update.
  • Adding the file as another name (i.e. MyFile2.js), and using cvs rename to rename to the correct name (MyFile.js). This will keep the file in my sandbox, but all other users get the other name (MyFile2.js). If I delete the file from my sandbox, then it comes back as the other name (MyFile2.js).
  • Removing the versioned file via windows explorer on the cvs server and adding it via cvs add and commit, then trying to remove it via CVS. This results in an out of sync message from CVS. An update removes the file from my sandbox.

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

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

发布评论

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

评论(5

空‖城人不在 2024-08-08 20:19:25

NT 文件系统在大小写方面有点奇怪:它会记住初始大小写,但此后会忽略任何更改。

所有这些都意味着您将必须在存储库中采取一些激烈的步骤。 首先进行备份,如果您不习惯这样做,请找了解 CVS 的人。

第一步是找到您的存储库。 如果您进入工作目录并查看文件 CVS/Root 的内容,您将看到如下所示的字符串:

:ext:rivendell:/tera/cvs

这表示我的 CVS 存储库由主机“rivendell”提供服务,在目录“/tera/cvs”中。 在该目录下,您将找到各个项目,最终您将深入浏览目录,直到找到您想要的项目。

此时,您要么会看到版本文件(之所以如此命名,是因为它末尾有一个“,v”),要么不会。 如果没有,请查找名为 Attic 的目录(尽管您说 CVSNT 没有 Attic,但我不相信您)。

在这里你有两个选择。 最简单的就是删除版本文件。 您还可以将其重命名为一些无害的名称,例如“ix,v”,然后使用正确的大小写重新命名。 无论如何,下一步不会改变

现在返回您的工作站,并删除您的工作目录。 完全地。 不要尝试删除 CVS 子目录或任何奇特的东西。 如果您有需要保留的文件(因为它们尚未签入),请将它们复制到安全的地方。

从存储库中查看项目的新副本,并使用正确的大小写创建文件。 同样,由于 NTFS 对大小写不太确定,因此您不能简单地将保存的版本复制到目录中并重命名。

The NT filesystem is more than a bit wacked when it comes to capitalization: it remembers the initial capitalization, but thereafter ignores any changes.

All of which means that you're going to have to take some drastic steps in the repository. Make a backup first, and if you're not comfortable doing this, find someone who knows CVS.

First step is to find your repository. If you go into the working directory and look at the contents of the file CVS/Root, you'll see a string like the following:

:ext:rivendell:/tera/cvs

This says that my CVS repository is served from host "rivendell", in directory "/tera/cvs". Under that directory you'll find the individual projects, and eventually you'll drill down through directories until you get to the one you want.

At this point, either you'll see the version file -- so named because it has a ",v" on the end, or you won't. If you don't, look for a directory named Attic (and although you said that CVSNT doesn't have an Attic, I'm not believing you).

Here you have two choices. The easiest is to delete the version file. You could also rename it to some innocuous name, like "ix,v", then name it back with the correct capitalization. Regardless, the next step does not change.

Now go back to your workstation, and delete your working directory. Completely. Don't try to delete the CVS sub-directory, or anything fancy. If you have files that you need to preserve (because they haven't been checked in yet), copy them somewhere safe.

Check out a fresh copy of your project from the repository, and create the file with the correct capitalization. Again, since NTFS is wonky about captialization, you can't simply copy the saved version into the directory and rename it.

清风疏影 2024-08-08 20:19:25

您还需要从存储库本身的 Attic 文件夹中删除该文件。

You also need to delete the file from the Attic folder, in the repository itself.

赠佳期 2024-08-08 20:19:25

CVS 正在成为一个废弃软件:它仍然有很多错误并且不会被修补。 如果你能切换到SVN那就更好了。 甚至还有一些工具可以进行导入(我自己用过一个,效果很好)。 他们导入所有内容,包括每个文件的历史记录。 然后您将能够轻松解决您的问题。

众所周知,CVS 在重命名(以及其他操作)方面非常痛苦。 因此,如果您改用 SVN,您将来会花更少的时间与版本控制软件作斗争。

如果您无法切换到 SVN:

  • 如果您确实需要解决这个问题,最终的解决方案是重新安装 CVS。 这是最后的手段,但它会起作用。

编辑:我找到了这个。 也许您可以删除文件混乱的修订版本? 使用-0range命令。 小心:据说该命令很危险。 因此,您可能需要先备份您的简历。

CVS is becoming an abandonware : it still has a lot of bugs and they won't be patched. If you can switch to SVN it would be for the better. There are even some tools to do the import (used one myself and it worked perfectly). They import everything including the history of each files. And then you will be able to easily solve your problem.

CVS has been known to be a pain when it comes to renaming (amongst other operations). So you would spend less time fighting your versioning software in the future if you change to SVN.

If you can't switch to SVN :

  • it you REALLY need to solve this, the ultimate solution would be to reinstall CVS. It's the last resort but it will work.

Edit : I found this. Maybe you could delete the revision where the file was messed up ? With the -0range command. Beware : The command is said to be dangerous. So you might want to back up your cvs first.

与之呼应 2024-08-08 20:19:25

“cvs remove”后跟“cvs commit”不起作用吗?

Does "cvs remove " followed by "cvs commit" not work?

故事未完 2024-08-08 20:19:25

您是否尝试发出“cvs删除”命令从沙箱中删除文件并将其标记为在服务器上删除,提交删除并重新添加它? 我猜您所遇到的情况是您的沙箱和服务器不同步。 一旦文件受 cvs 控制,您就不应该删除/重命名/等等。 使用 shell 命令时,您应该只使用 CVS 命令。 另请注意,CVSNT 需要重命名后跟“目录”提交 - 仅提交文件不会在服务器端注册重命名 - 无论如何,重命名存在一些问题,其中一些在最近的版本中已解决。

Did you try to issue "cvs remove" command to remove the file from your sandbox and mark it delete on the server, commit the delete and the re-adding it? I guess what you've been experiencing was that your sandbox and the server got out of sync. Once files are under cvs control, you should not delete/rename/etc. using shell commands, you should work on the using only CVS commands. Also note that CVSNT requires a rename to be followed by a "directory" commit - committing the file only won't register the rename on the server side - anyway there was some issues with renaming, some solved in recent releases.

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