Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / 000289.html
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">
4 <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6    <meta name="generator" content="Movable Type 5.2.3" />
7
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" />
11
12    <title>Status for Andrew DeFaria: cvs_report.pl</title>
13
14    <link rel="start" href="http://defaria.com/blogs/Status/" title="Home" />
15    <link rel="prev" href="http://defaria.com/blogs/Status/archives/000288.html" title="Built 012405" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/000290.html" title="CVS corruption" />
17
18    
19
20    
21
22    <script type="text/javascript" src="http://defaria.com/blogs/Status/mt-site.js"></script>
23 </head>
24 <body class="layout-one-column" onload="individualArchivesOnLoad(commenter_name)">
25    <div id="container">
26       <div id="container-inner" class="pkg">
27
28          <div id="banner">
29             <div id="banner-inner" class="pkg">
30                <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
31                <h2 id="banner-description">Searchable status reports and work log</h2>
32             </div>
33          </div>
34
35          <div id="pagebody">
36             <div id="pagebody-inner" class="pkg">
37                <div id="alpha">
38                   <div id="alpha-inner" class="pkg">
39
40                      <p class="content-nav">
41                         <a href="http://defaria.com/blogs/Status/archives/000288.html">&laquo; Built 012405</a> |
42                         <a href="http://defaria.com/blogs/Status/">Main</a>
43                         | <a href="http://defaria.com/blogs/Status/archives/000290.html">CVS corruption &raquo;</a>
44                      </p>
45
46                      <a id="a000289"></a>
47                      <div class="entry" id="entry-289">
48                         <h3 class="entry-header">cvs_report.pl</h3>
49                         <div class="entry-content">
50                            <div class="entry-body">
51                               <p>I've updated cvs_report.pl to be more parameterized and flexible. One goal was to make it smart enough to produce a report showing the ECRs between two labels. This is helpful when one wants to get the ECRs that were picked up in this build.</p>
52
53                            </div>
54                            <div id="more" class="entry-more">
55                               <p>Here's the usage:</p>
56
57 <div class="code"><pre>
58 $ cvs_report.pl -u
59 Usage: cvs_report.pl [-u] [-email-to &lt;<i>list</i>&gt;] [-email-cc &lt;<i>list</i>&gt;]
60                      -from &lt;<i>tag</i>&gt; -to &lt;<i>tag</i>&gt; -m &lt;<i>cvs_module</i>&gt;
61
62 Where:
63
64         -u:             Display usage
65         -email-to:      Comma separated list of email addresses
66                         to send the report to (Default: Report sent to STDOUT)
67         -email-cc:      Comma separated list of email addresses
68                         to cc the report to
69         -from:          CVS tag used as the base (Default: Extracted from CVS
70                         area - error if no CVS area)
71         -to:            CVS tag used as the delta (Default: HEAD)
72         -m:             CVS module to process
73 </pre></div>
74
75 <p>Notice that there are options for -email-to and -email-cc. If no email options are specified then cvs_report just outputs the report to STDOUT. This can be used to capture what was picked up. For example, to pickup the ECRs that were incorporated between Lion_lynxos_120604 and Lion_lynxos_012405 one could:</p>
76
77 <div class="code"><pre>
78 $ cvs_report.pl -from Lion_lynxos_120405 -to Lion_lynxos_012405 -m lynxos > /tmp/ECRs.log
79 </pre></div>
80
81 <p>Note that if -to is not specified then it defaults to HEAD. So the following cronjob could be configured:</p>
82
83 <div class="code"><pre>
84 * 4 * * * /it/bin/cvs_report.pl -email-to &lt;<i>email alias</i>&gt;
85 </pre></div>
86
87 <p>(It would be best if email aliases were used to control who the report is normally sent to).</p>
88
89 <p>You may notice that there is no -from in the cronjob. This is possible because of another optimization change to cvs_report.  The old cvs_report.pl would check out a module into a temporary directory based on a tag then do an update capturing and processing the output from cvs update as the files that have changed. Then it would remove that temporary area. This is a waste as the next night the CVS area is created again from the same -from or base tag. The new cvs_report will also create the temporary area by using $module.cvsr (e.g. lynxos.cvsr). Additionally it will create a file in $module.cvsr named .cvsr containing the -from tag. Subsequent runs of cvs_report without a -from will use the .cvsr file to ascertain what base level the CVS area is at. Thus it does not need to "refresh" the CVS area again and can instead proceed to the cvs update step. This saves several minutes of processing time.</p>
90
91 <p>Finally, even the cronjob does not need to ever be changed (except if we change the -email-to parameter, which, again, should be an email alias thus we would not change the cronjob rather we would change the email alias - think of people subscribing to receive the CVS report). When we go from Lion_lynxos_012405 -> the next tag all that need be done in a shell window is:</p>
92
93 <div class="code"><pre>
94 $ cvs_report.pl -from &lt;<i>new tag</i>&gt; -m lynxos
95 </pre></div>
96
97 <p>Since -from is specified, cvs_report will refresh the lynxos.cvs area and update the .cvsr file to reflect the change. The nightly cronjob will automatically sense the change and just work!</p>
98
99 <p>Oh, and in passing, I make a change such that new files, files who were not present at the -from tag, are tagged with an "*" to indicate that this file is new file in CVS.</p>
100
101                            </div>
102                         </div>
103                         <p class="entry-footer">
104                            <span class="post-footers">Posted by  on January 27, 2005  4:11 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000289.html">Permalink</a>
105                         </p>
106                      </div>
107
108                      
109
110                      
111                   </div>
112                </div>
113             </div>
114          </div>
115       </div>
116    </div>
117 </body>
118 </html>