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: Remove Empty Branch Trigger</title>
14 <link rel="start" href="http://defaria.com/blogs/Status/" title="Home" />
15 <link rel="prev" href="http://defaria.com/blogs/Status/archives/000530.html" title="Resuming" />
16 <link rel="next" href="http://defaria.com/blogs/Status/archives/000532.html" title="Unit Test bugs" />
22 <script type="text/javascript" src="http://defaria.com/blogs/Status/mt-site.js"></script>
24 <body class="layout-one-column" onload="individualArchivesOnLoad(commenter_name)">
26 <div id="container-inner" class="pkg">
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>
36 <div id="pagebody-inner" class="pkg">
38 <div id="alpha-inner" class="pkg">
40 <p class="content-nav">
41 <a href="http://defaria.com/blogs/Status/archives/000530.html">« Resuming</a> |
42 <a href="http://defaria.com/blogs/Status/">Main</a>
43 | <a href="http://defaria.com/blogs/Status/archives/000532.html">Unit Test bugs »</a>
47 <div class="entry" id="entry-531">
48 <h3 class="entry-header">Remove Empty Branch Trigger</h3>
49 <div class="entry-content">
50 <div class="entry-body">
51 I have a trigger called the <i>Remove Empty Branch Trigger</i>:<br>
53 <p><a href="https://defaria.com/Resume/Clearcase/RemoveEmptyBranch.php">Remove
54 Empty Branch Trigger</a>: This trigger removes the branch and the zero element that is left when a user checks out an element on a branch then cancels the checkout. Normally this causes a branch with only a zero element which is identical to the version from which it was branched. Essentially this empty branch is useless. This trigger prevents that.</p>
57 <p>Not only is this empty branch useless but:</p>
59 <li>It clutters the version tree</li>
61 <li>Causes Clearcase to maintain more meta data, slowing down operations</li>
63 <li>Can cause additional work for UCM when you rebase</li>
66 <p>I'm experiencing that last bullet item right now. At one time I was attempting to do a delivery for somebody from another stream, first rebasing my stream. The delivery was unsuccessful and it was decided that this other engineer would work on it and deliver himself. So I canceled the delivery. One would think then that my view was relatively clean.</p>
68 <p>However now I want to deliver something else and I see this old rebase activity hanging around. In looking into the change set I notice a bunch of items from that older attempt at delivering. Why were these still hanging around? I had canceled that delivery right?</p>
70 <p>Well I believe the problem comes from having empty branches. Take for example the following:</p>
72 <p><img src="/blogs/images/RmEmptyBranch.png" alt=""></p>
74 <p>It shows a rebase from osaka/5 -> defaria_osaka/1. Yet these two version compare to be the same! How did this happen? Well think about it. Prior to the rebase I had an empty branch (i.e. I had
75 defaria_osaka/0 left over from the canceled delivery which merely did an unco). This means that osaka/4 and defaria_osaka/0 were identical. Then osaka/5 came into existance. Now 4 != 5 and when I rebase Clearcase has to propogate osaka/5 creating defaria_osaka/1. Now I have two identical versions and associate meta data and all for naught! Additionally I have a baseline lable on defaria_osaka/1 which give the air of importance to this unimportant version.</p>
77 <p>Had we had a remove empty branch trigger, when the delivery canceled, the unco would have left defaria_osaka/0 and the remove empty branch trigger would have removed the empty branch. Then my view would have been pointing to osaka/4 (and would have moved to osaka/5 if I were using .../osaka/LATEST and a dynamic view or updated to osaka/5 during the normal course of updating the view). Indeed, allowing empty branches to persist can cause developers to unknowingly get "stuck in
80 <div id="more" class="entry-more">
84 <p class="entry-footer">
85 <span class="post-footers">Posted by on March 28, 2006 2:25 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000531.html">Permalink</a>