Finding Changed files in a ClearCase folder

被刻印的时光 ゝ 提交于 2020-06-27 08:11:39

问题


I have a Folder in ClearCase that contains a large list of Reports.
I have checked all the Reports out because I need to make a sweeping change.
I have changed a set of the Reports and now want to deploy this set.

I probably should have checked the Report files out one at a time and then deployed each as I finished.
But, since I did not do that, is there a way to inspect the ClearCase folder that contains the List of checked out Reports to see which ones have changed and which ones have not?


回答1:


You could ask cleartool for a diff with the previous version:

 cleartool lsco -r -cvi -fmt "diff -options \"-hea\" -pred \"%n\"\n" | cleartool | grep ">>>"

That would give you the list of currently checked-out modified files.

Note: remove the '-r' option if you only want the check-out files of the current directory (and not its sub-directories)




回答2:


In ClearCase (or Explorer if you have integration enabled), right-click the base of the tree, and choose "Find Modified Files". This will return a list of ALL files that have been modified, and that are part of the repo (i.e. it will not return list of private files).

If you want to know all files - checked out, modified, and private - the only way I know of is to use cleartool from within the view:

cleartool ls -r

If you want more (or less) info about the files, check the docs for the -fmt option (which doesn't work with ls, but does work with describe), and you can create a command that will give you exactly what you want (it'll take some experimenting until you get the hang of it).

NOTE: "Find Modified Files" is only available within the gui from the base of the view tree; Elsewhere your only option is "Find Checked Out Files" (confusing, to say the least).




回答3:


You can set up a second view with an identical config spec as the view with the checked out files. Once you have the second view set up you can compare the same directory in each view with a difference tool (like WinDiff). This will list all the files that have been changed.

It's not native to ClearCase but it should give the results you are looking for.




回答4:


I also found a solution. I selected my ClearCase folder and clicked on "Find Checkouts". This showed my huge list of Report files that were checked out. I then selected them all and selected "Check In". I left the "Check in if identical to previous version" option unchecked. I then selected "OK" to check in. All the modifeid files checked in and the un-modified files remained checked out. This gave me my delta of modified files vs un-modified files.



来源:https://stackoverflow.com/questions/3424734/finding-changed-files-in-a-clearcase-folder

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!