Clearcase 重命名问题

发布于 2024-12-20 11:11:48 字数 347 浏览 1 评论 0原文

我在使用 Clearcase 时遇到问题。发生的事情如下: 我有一个文件 ValidationScripts.js,并且想在同一目录中创建另一个文件 MiscScripts.js。但是,我没有创建新文件,而是意外地将 ValidationScripts.js 重命名为 MiscScripts.js。我尝试使用合并重新创建 ValidationScripts.js 文件,但现在我被困在同一个文件中,但有两个不同的名称:ValidationScripts.js 和 MiscScripts.js。因此,每当我尝试更改 ValidationScripts.js 的内容时,它们也会反映在 MiscScripts.js 上。 有什么办法可以解决这个问题吗?

TIA。

I am experiencing a problem with Clearcase. What happened was the following:
I had a file ValidationScripts.js, and wanted to create another file in the same directory, MiscScripts.js. However, instead of creating a new file, I accidentally renamed ValidationScripts.js to MiscScripts.js. I tried to recreate the ValidationScripts.js file using merge, and now I am stuck with the same file, but with two different names: ValidationScripts.js and MiscScripts.js. So, whenever I try to change to contents of ValidationScripts.js, they are also reflected on MiscScripts.js.
Is there any way to fix this?

TIA.

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

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

发布评论

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

评论(2

隱形的亼 2024-12-27 11:11:48

目前尚不完全清楚您做了什么,但您应该做的是这样的,假设文件 MiscScripts.js 已经作为纯(视图私有)文本文件存在,并且 'ct' 是 cleartool 的别名:

cd /vobs/yourvob/directory
ct co -c 'Add MiscScripts.js' .
ct mkelem -c 'Miscellaneous JavaScript Script Fragments' MiscScripts.js
ct ci -nc .
ct ci -nc MiscScripts.js

现在我们必须尝试猜测您实际上做了什么。

我假设您检查了该目录。然后你说:

我没有创建新文件,而是不小心将 ValidationScripts.js 重命名为 MiscScripts.js

有两种可能性:

  1. mv ValidationScripts.js MiscScripts.js
  2. ct mv ValidationScripts.js MiscScripts.js

要修复情况 1,您应该简单地运行:

mv MiscScripts.js ValidationScripts.js

要修复情况 2,您应该取消目录检出或撤消移动:

或者

ct unco -rm .

或者

ct mv MiscScripts.js ValidationScripts.js

然后你继续说:

我尝试使用合并重新创建 ValidationScripts.js 文件,但现在我被困在同一个文件中,但有两个不同的名称:ValidationScripts.js 和 <代码>MiscScripts.js.

这让我感到困惑......我看不出合并有什么帮助。后一条评论听起来好像您做了类似的事情:

ct ln MiscScripts.js ValidationScripts.js

在不确切知道您做了什么的情况下,很难知道要推荐什么。关键问题是:

  1. 您是否使用 ct mkelem 创建新文件?
    • 如果您这样做了,那么我们就必须担心不会在 VOB 的 lost+found 目录中创建丢失的条目。
    • 如果没有,那么生活会更简单。
  2. 您签入目录了吗?
    • 如果没有,请不要这样做。
    • 如果您这样做了,那么我们将需要弄清楚如何让您回到之前的版本(但我们不再需要担心丢失+找到文件。
  3. 您是否签入了 MiscScripts.js还没?
    • 这有多重要,部分取决于之前问题的答案。

It isn't completely clear what you did, but what you should have done is this, assuming that the file MiscScripts.js already existed as a plain (view private) text file, and that 'ct' is an alias for cleartool:

cd /vobs/yourvob/directory
ct co -c 'Add MiscScripts.js' .
ct mkelem -c 'Miscellaneous JavaScript Script Fragments' MiscScripts.js
ct ci -nc .
ct ci -nc MiscScripts.js

Now we have to try and guess what you actually did.

I will assume you checked out the directory. You then said:

instead of creating a new file, I accidentally renamed ValidationScripts.js to MiscScripts.js

There are two possibilities:

  1. mv ValidationScripts.js MiscScripts.js
  2. ct mv ValidationScripts.js MiscScripts.js

To fix case 1, you should simply have run:

mv MiscScripts.js ValidationScripts.js

To fix case 2, you should either cancel the directory checkout or undo the move:

Either

ct unco -rm .

Or

ct mv MiscScripts.js ValidationScripts.js

You then go on to say:

I tried to recreate the ValidationScripts.js file using merge, and now I am stuck with the same file, but with two different names: ValidationScripts.js and MiscScripts.js.

And this has me puzzled...I can't see how merge would help. The latter comment sounds as if you did something like:

ct ln MiscScripts.js ValidationScripts.js

Without knowing exactly what you've done, it is a little difficult to know what to recommend. Key issues are:

  1. Did you use ct mkelem to create a new file?
    • If you did, then we have to worry about not creating a lost entry in the VOB's lost+found directory.
    • If you did not, then life is simpler.
  2. Did you checkin the directory yet?
    • If not, do not do so.
    • If you did, then we will need to work out how to get you back to the previous revision (but we no longer have to worry about lost+found files.
  3. Did you checkin MiscScripts.js yet?
    • How much this matters depends in part on the answers to the prior questions.
梦里兽 2024-12-27 11:11:48

添加到 Jonathan回答,您需要检查ValidationScripts.js父目录的历史记录(cleartool lsvtree -graph):您将看到已经发生了什么在所述目录中添加/删除。

该目录中的简单“cleartool ls”还可以显示 ValidationScripts.jsMiscScripts.js 之间是否存在符号链接。
这就像您尝试恢复已删除的文件,如“中所述恢复已命名为 rmname 的元素,但生成了错误的“cleartool ln”。

To add to Jonathan's answer, you need to check the history (cleartool lsvtree -graph) of the parent directory of ValidationScripts.js: you will see what has been added/removed in said directory.

A simple 'cleartool ls' in that directory can also show you if there is a symlink between ValidationScripts.js and MiscScripts.js.
That would be like you tried to restored a deleted file, as described in "Restore an element that has been rmnamed", but made the wrong 'cleartool ln'.

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