VSS to Clearcase transition, appending comments

倖福魔咒の 提交于 2019-12-24 00:44:48

问题


Is there a way to perform a Clearcase checkin where the checkin comments are appended directly into the source file? This is like VSS does.

Please, no debates on whether this is a good or bad thing to do, I have zero influence on these matters here.

I need to have checkin data including the date, user, and comments appended (by clearcase) to the end of the file as in VSS.

Is there a cleartool command option for this?

Thanks


回答1:


Martin is right.
There is no "command" to do a "keyword substitution," or "keyword expansion" (which is useful for simple Revision System, but can be source of trouble for Version System)

You can find more for RCS keyword extension here.
Your request does require a type manager avoiding the merge conflicts by interposing itself between the file and the real type manager, removing all RCS keywords.


The article "ClearCase keyword substitutions merge manager" involves:

  • a trigger (keyword_subst.pl)
  • a new type manager (keyed_text_file_delta)
  • a new new element type
  • the chtype over any element you want to have keyword substitution on.
  • a preop trigger on the checkin operation tied to this new element type

... a lot of work, but still doable I guess.

As mentioned in the article "Line of source cannot be bigger then 8192 characters.": if one line pass that length, it has to be treated as binary file and can no longer be a candidate for that type manager.


Note: the proposed solution has been reported as not very efficient.

  • it is published on "Developerworks" and as such unsupported.
  • The triggers' code itself was probably someone's attempt at learning Perl,
  • it is hard to make it work on Unix
  • is applied by default to text file (not xml or html files)
  • it does not support comment (which is what you requested in the first place). You need to amend the script to add %c (comment) to a $Log$ field.

As mentioned (just put here for information):

There are other ways to do what you want without adding the information into the ClearCase versions!

  • If "information as file content" IS NOT required then produce a detailed metadata manifest file.
  • If "information as file content" IS required then add a build step that hijacks these "keyword substitution" files and adds the relevant content - just don't checkin the files afterwards!



回答2:


I believe that you have to write your own ClearCase trigger to perform the desired keyword substitution. By searching the net I found an example.



来源:https://stackoverflow.com/questions/1122485/vss-to-clearcase-transition-appending-comments

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