Re: [cciug] merge bug?

From: Paul D. Smith (pausmith@nortelnetworks.com)
Date: Tue Feb 29 2000 - 00:36:42 EST


%% harryd@crt.com writes:

  h> We have encountered a merge problem that is baffling me. I have used
  h> clearcase since 1994 and I don't remember ever having seen a problem
  h> with the merge logic within clearcase. But this one has gotten the
  h> most of me. If you consider yourself a merge expert and can offer me
  h> insight on why we are seeing this problem, I highly appreciate your
  h> input.

What ClearCase is doing seems correct to me.

  h> $ kt lsvtree -all -merge adv.java
  h> adv.java@@\main
  h> adv.java@@\main\0 (ADV_1.0_BASE)
  h> adv.java@@\main\hd130
  h> adv.java@@\main\hd130\0
  h> adv.java@@\main\hd130\1
  h> adv.java@@\main\hd130\2
  h> -> \main\1
  h> adv.java@@\main\hd130\3
  h> -> \main\1
  h> adv.java@@\main\1 (ADV_2.0_BASE)

  h> $ kt findmerge adv.java@@/main/hd130/3 -d -log NUL -fversion /main/1 -print -whynot
  h> Needs Merge "adv.java" [(automatic) to \main\hd130\3 from \main\1 (base also \main\hd130\3 )]

  h> [holy maceroni - a merge is needed?]

Sure. You have merged from the /main/hd130 branch _to_ /main, but
you've never merged from /main to /main/hd130. ClearCase knows that
/main/1 is the combination of /main/hd130/3, plus potentially some
changes done during the merge. It needs to see a merge arrow from /main
to /main/hd130 to make sure that all the changes in /main/1 are put back
into /main/hd130.

That is, _you_ may know that when you did the merge into /main you just
did a trivial copy, but _ClearCase_ can't assume that.

It's actually quite often the case that user-enforced processes will
allow for more generous trivial merge detection than ClearCase can
assume, because a process often makes restrictions on exactly what can
be submitted into a baseline--in our process, for example, as in
others' I've seen post here, we force every merge into the baseline to
be trivial; we have a script that ensures that is true before the merge
is allowed.

This means we can actually make much more positive statements about what
is trivial and what isn't than ClearCase can: I actually use a perl
script that parses the output of ct lsvtree and calculates trivial merge
detection from that on its own, taking into account the "extra
knowledge" our process gives us. It's loosely based on the late
lamented clearperl code, with lots of local mods, so I can't give it out
unfortunately. But, it's quite doable. And, it's not even
excruciatingly slow :).

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@baynetworks.com>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  



This archive was generated by hypermail 2b29 : Sun May 06 2001 - 00:23:30 EDT