Clearcase重命名问题 [英] Clearcase renaming issues
问题描述
我遇到了Clearcase问题。发生了以下情况:
我有一个文件ValidationScripts.js,并想在同一目录MiscScripts.js中创建另一个文件。但是,我没有创建新文件,而是不小心将ValidationScripts.js重命名为MiscScripts.js。我尝试使用merge重新创建ValidationScripts.js文件,但现在我陷入了同一个文件,但使用两个不同名称的情况:ValidationScripts.js和MiscScripts.js。因此,每当我尝试更改ValidationScripts.js的内容时,它们也会反映在MiscScripts.js上。
是否可以解决此问题?
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。
推荐答案
尚不清楚您做了什么,但是您应该做的是,假设文件 MiscScripts.js
已经作为普通文件存在(视图私人)文本文件,而' ct
'是 cleartool
的别名:
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:
我没有创建新文件,而是不小心将ValidationScripts.js重命名为MiscScripts.js
instead of creating a new file, I accidentally renamed ValidationScripts.js to MiscScripts.js
有两种可能性:
-
mv ValidationScripts.js MiscScripts.js
-
ct mv ValidationScripts.js MiscScripts.js
mv ValidationScripts.js MiscScripts.js
ct mv ValidationScripts.js MiscScripts.js
要解决情况1,您只需运行:
To fix case 1, you should simply have run:
mv MiscScripts.js ValidationScripts.js
要修复案例2,您应该取消目录结帐或撤消移动:
To fix case 2, you should either cancel the directory checkout or undo the move:
要么
ct unco -rm .
或
ct mv MiscScripts.js ValidationScripts.js
然后继续说:
我尝试使用以下命令重新创建
ValidationScripts.js
文件合并,现在我停留在同一个文件中,但是使用了两个不同的名称:ValidationScripts.js
和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
andMiscScripts.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:
- 您是否使用
ct mkelem
创建了一个新文件?
- 如果这样做了,那么我们就不得不担心不会在VOB的
lost + found
目录中创建丢失的条目。 - 如果没有,那么生活会更简单。
- 如果这样做了,那么我们就不得不担心不会在VOB的
- 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.
- If you did, then we have to worry about not creating a lost entry in the VOB's
- 否则,不要这样做。
- 如果这样做,那么我们将需要弄清楚如何使您回到以前的版本(但我们不必再担心
丢失+找到的
文件。
- 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.
- 这有多重要,部分取决于答案先前的问题。
这篇关于Clearcase重命名问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!