1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard">
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Movable Type 5.2.3" />
8 <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles-site.css" type="text/css" />
9 <link rel="alternate" type="application/atom+xml" title="Atom" href="http://defaria.com/blogs/Status/atom.xml" />
10 <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://defaria.com/blogs/Status/index.xml"$>" />
12 <title>Status for Andrew DeFaria: December 11, 2005 - December 17, 2005 Archives</title>
14 <link rel="start" href="http://defaria.com/blogs/Status/" title="Home" />
15 <link rel="prev" href="http://defaria.com/blogs/Status/archives/week_2005_12_04.html" title="December 4, 2005 - December 10, 2005" />
16 <link rel="next" href="http://defaria.com/blogs/Status/archives/week_2005_12_18.html" title="December 18, 2005 - December 24, 2005" />
18 <body class="layout-one-column">
20 <div id="container-inner" class="pkg">
23 <div id="banner-inner" class="pkg">
24 <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
25 <h2 id="banner-description">Searchable status reports and work log</h2>
30 <div id="pagebody-inner" class="pkg">
32 <div id="alpha-inner" class="pkg">
34 <p class="content-nav">
35 <a href="http://defaria.com/blogs/Status/archives/week_2005_12_04.html">« December 4, 2005 - December 10, 2005</a> |
36 <a href="http://defaria.com/blogs/Status/">Main</a>
37 | <a href="http://defaria.com/blogs/Status/archives/week_2005_12_18.html">December 18, 2005 - December 24, 2005 »</a>
43 <h2 class="date-header">December 15, 2005</h2>
45 <div class="entry" id="entry-498">
46 <h3 class="entry-header">CQ Web/Rebase/GNATS Access</h3>
47 <div class="entry-content">
48 <div class="entry-body">
50 <li>Set up GNATS access for a user</li>
52 <li>Helped Vinh with issues regarding old CQ Web and a bug that it has</li>
54 <li>Assisted a few users with resolving Evil Twin problems</li>
56 <li>More fully documented how to resolve Evil Twin problems by merging the parent directory</li>
58 <lI>Investigated implementing the other half of BinMerge where we use rebase instead of find merge</li>
63 <p>Initially I thought that rebase did not work like findmerge in that it didn't have options for performing essentially the merge operate and just telling you what needed to merge. Turns out it does have that option - cleartool merge -preview -long. The long option causes rebase to list out what needs to be merged.</p>
65 <p>But rebase is more than just a findmerge. Additionally one needs to do the following:</p>
68 <li>Create and set an activity for the view</li>
70 <li>Check out items first</li>
72 <li>Perform the merge with -abort noting which merges failed and how they failed</li>
74 <li>Execute the rebase command to mark the view as being rebased</li>
76 <li>Execute the rebase -complete to mark the rebase completed (IFF all elements are rebased)</li>
79 <p>Of course this is just a preliminary list - we still need to figure out if rebasing, merging actually, of directories need to be done first (probably), how to execute rebase to mark "rebase in progress" without actually attempting to merge anything, etc.</p>
81 <p class="entry-footer">
82 <span class="post-footers">Posted by at 5:06 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000498.html">Permalink</a>
92 <h2 class="date-header">December 14, 2005</h2>
94 <div class="entry" id="entry-497">
95 <h3 class="entry-header">get_views_for_stream/create_dev_snapview.pl</h3>
96 <div class="entry-content">
97 <div class="entry-body">
99 <li>Found and fixed bug in get_views_for_stream</li>
101 <li>Fixed bug in create_dev_snapview.pl::ParseBaselines
104 <h2>get_views_for_stream</h2>
106 <p>Hi Naga. I'm writing you this because I believe there's a bug, possibly with Clearcase, but that seems to manifest itself in code I believe you wrote. I came across this implementing enhancements to create_dev_snapview.pl for Andrew Feltham. In essence Andrew wants to be able to have multiple views in a stream. I've implemented a -reuse_stream parm to allow this. If -reuse_stream is used then the code will skip recreating the stream and effectively just make another view in that same stream. If -reuse_stream is not specified then the stream is removed - along with any views that that stream has.</p>
108 <p>It appears as if the code was coded to attempt to handle the case where a stream has multiple views however it fails due to a possible but with lsstream. When calling create_stream the code checks to see if the stream exists and if it does it attempts to recreate the stream by determining the view(s) in the stream, deleting them, deleting the stream and creating the stream anew.</p>
110 <p>To determine the view(s) in the stream get_views_for_stream is called. Here's the original function:</p>
112 <div class="code"><pre>
113 sub get_views_for_stream {
114 my $sel_pvob = $_[0];
115 my $sel_stream = $_[1];
117 my @views = split(/\n/, `cleartool lsstream -fmt \"\%\[views\]p\\n\" stream:$sel_stream\@\\$sel_pvob`);
122 <p>Essentially it does an lsstream asking for only the views, separated by newlines. The problem is that lsstream (with that format) does not return the views separated by newlines:</p>
124 <div class="code"><pre>
125 P:\>cleartool lsstream -fmt "%[views]p\n" stream:Build_rmnaNT_adefaria_LTSJCA-ADEFARIA_sv_ldx_2.3@\rmna_projects
126 adefaria_test adefaria_test2 adefaria_test3
131 <p>As you can see adefaria_test, adefaria_test2 and adefaria_test3 all appear on the same line. The code then splits the line on \n and effectively always returns a 1 entry array with possibly multiple view names in the first entry separated by spaces. Needless to say this will fail later on when remove_view is called and it generates a "cleartool rmview -force <view names>".</p>
133 <p>Here's my proposed fix:</p>
135 <div class="code"><pre>
136 sub get_views_for_stream {
137 my $sel_pvob = $_[0];
138 my $sel_stream = $_[1];
139 # Modified Wed Dec 14 11:25:09 PST 2005 Andrew@DeFaria.com
141 # Note: The format -fmt "%[views]p\n" below does not work! What is
142 # expected to be returned is:
148 # However what is actually returned is:
152 # Therefore the old spilt of /\n/ always returned a single entry
153 # array with possibly multiple view names in the first
154 # entry. Changed to use / / for split and not append a \n.
155 my @views = split(/ /, `cleartool lsstream -fmt \"\%\[views\]p\" stream:$sel_stream\@\\$sel_pvob`);
160 <p>Is this acceptable to you?</p>
162 <p class="entry-footer">
163 <span class="post-footers">Posted by at 1:48 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000497.html">Permalink</a>
173 <h2 class="date-header">December 13, 2005</h2>
175 <div class="entry" id="entry-496">
176 <h3 class="entry-header">cvsims</h3>
177 <div class="entry-content">
178 <div class="entry-body">
180 <li>Updated triggers on ccase-rmna-3 as some new vobs seem to lack them</li>
182 <li>Updated cvsims to parse input and handle both -pre and -post operations</li>
184 <li>Had problems with CVS admin files</li>
189 <p>I have managed to learn how to update IMS and I'm at the point where I need to understand the input requirements better. I will describe what I envision happening and follow it with a few questions.</p>
191 <p>In general the desire seems to be to update IMS when a commit happens in certain CVS repositories<a href="#q1"><sup>1</sup></a>. As such commit comment information will need to conform to a certain format. Commit comments need to have the following in them identifying the IMS Issue ID they are associated with:</p>
193 <div class="code"><pre>
194 IMSIssueID: <issue ID>
197 <h3>Pre-commit checks (i.e. verifymsg)</h3>
199 <p>The string "IMSIssueID: " must appear at the start of a line followed by the issue ID<a href="#q2"><sup>2</sup></a>. The IMSIssueID must exist in IMS<a href="#q3"><sup>3</sup></a>. If the issue ID is not in IMS then the commit will not be allowed. Commits lacking any IMSIssueID will be rejected<a href="#q4"><sup>4</sup></a>.</p>
201 <h3>Post-commit operations (i.e. loginfo)</h3>
203 <p>If the pre-commit checks pass the IMS issue will have it's change set field updated with the file names of the committed files. As change set is an append only field the following separator will be added first followed by the list of files<a href="#q5"><sup>5</sup></a>:</p>
205 <div class="code"><pre>
206 # <USERNAME> <DATE_TIME> committed:
212 <p>Again, as change set is an append only field there may be multiple updates like so:</p>
214 <div class="code"><pre>
215 # <USERNAME> <DATE_TIME> committed:
219 # <USERNAME> <DATE_TIME> committed:
225 <li><a name="q1"></a>Which repositories does this apply?</li>
227 <li><a name="q2"></a>Are multiple IMSIssueIDs allowed? If so then are multiple lines such
228 as the above acceptable or should the script search for perhaps a comma separated list of issue IDs?</li>
230 <li><a name="q3"></a>Should the script also check to insure that the issue ID is not in say a closed state?</li>
232 <li><a name="q4"></a>Is it true that all commits in a repository/module/directory <b>must</b> be associated to an IMS Issue?</li>
234 <li><a name="q5"></a>In addition to the file name should we include the revision checked in? Also should any other information be logged (e.g. repository)?</li>
237 <h2>CVS Admin Files</h2>
239 <p>I got myself into a pickle. Here's what I was doing...</p>
241 <p>I wanted to modify <span>rcsinfo, verifymsg and loginfo
242 in our CVS test area (:pserver:adefaria@cvsps-irva-1:/projects/ccase_irva/cvsmaster)
243 so I checked out CVSROOT and modified those files. The idea was to have rcsinfo point to a template file so the user knows where to put the IMSIssueID, change verifymsg to call cvsism
244 (the connector) to verify that it can find the IssueID and that the IssueID exists in IMS and change loginfo to call cvsism to update the change set after the commit. Unfortunately I modified the files in such a way that I cannot check in at all. I need help in fixing this because I believe what needs to be done needs to be done on the server and I don't have a login there let alone root access.</p>
246 <p>The problem is that I don't understand what the cwd is when CVS fires off these triggers. For example, in rcsinfo I have the following line:</p>
248 <div class="code"><pre>
249 ALL /tmp/IMSIssueTemplate
252 <p>"ALL" means for all files and /tmp/IMSIssueTemplate is the template file. But where is /tmp? Is it supposed to be on the server? Where's a good place to put these template files?</p>
254 <p>In verifymsg I have:</p>
256 <div class="code"><pre>
257 DEFAULT SCM/cvsbin/cvsims -pre
260 <p>I want to run cvsims (which is in my home directory under SCM/cvsbin) but this also fails.
261 As a result of this I cannot use cvs commit to change verifymsg, hence I'm stuck!</p>
263 <p>In <span>loginfo</span> I have:</p>
265 <div class="code"><pre>
266 DEFAULT SCM/cvsbin/cvsims -post %{s}
269 <p>Again SCM/cvsbin/cvsims is not a valid path.</p>
271 <p>How can I get this fixed? Where should I put these files?</p>
273 <p class="entry-footer">
274 <span class="post-footers">Posted by at 12:35 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000496.html">Permalink</a>
284 <h2 class="date-header">December 12, 2005</h2>
286 <div class="entry" id="entry-495">
287 <h3 class="entry-header">mktriggers/CVS</h3>
288 <div class="entry-content">
289 <div class="entry-body">
291 <li>Worked with Shivdutt on clearfsimport</li>
293 <li>Updated mktriggers to use fully qualified paths to Perl</li>
295 <li>Added stuff to CVS area - have not committed yet - wanna establish a commitinfo script to get an idea of what input is available to commit</li>
298 <p class="entry-footer">
299 <span class="post-footers">Posted by at 6:14 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000495.html">Permalink</a>