[mdlug] [Tech Support] CVS: How can one avoid repeated conflicts during merge?

Robert Meier list1c30fe42 at bellsouth.net
Mon Jan 19 22:10:24 EST 2009


CVS users,

[Please move this to the -newbie list if appropriate.]

I am one of ~10 developers using cvs on a personal branch.
Until Thursday, I was using the command below every few days to
detect and merge changes from the trunk into my sandbox.
This was working, apparently because the same files,
but not the same lines were touched.
Now, every time I try to perform an update-clean-build,
merge conflicts make the file uncompilable.
There are ~20 files now suffering this problem,
and ~5 files/week added that needs to be merged to my personal branch.
When complete, I will have about ~50 files to merge back to the trunk,
but cannot at this time impose that update requirement on all the other
developers.

My google search turned up several score cvs personal branch usage
examples, but none included a demonstration in which the conflict
resolution was a combined line, not the BASE, nor trunk (branched
merged from), nor personal (branch matched to).



Questions:
  How can I avoid repeat of conflicts during merge?
  How can I tell cvs to accept my merges?
  What am I missing?



Command performed as part of build
  bash> TAG='NAME-FUNCTION-2008-11'
  bash> cvs update -j 1 -r $TAG imk
  bash> emacs imk # resolve conflict if necessary

Report before Thursday:
  <no complaint given>

Report post Thursday:
  retrieving revision 1.12
  retrieving revision 1.13
  merging difference between versions 1.12 and 1.13 into imk
  rcsmerge: conflicts during merge

Extimated version tree before Thursday:
   imk
    |
  [1.1]
   ...
  [1.11]
    |     NAME-FUNCTION-2008-11
  [1.12]-------.
          [1.12.22.1]

Version tree before Thursday:
   imk
    |
  [1.1]
   ...
  [1.11]
    |     NAME-FUNCTION-2008-11
  [1.12]-------.
    |     [1.12.22.1]
  [1.13]

Version tree after attempted merges:
   imk
    |
  [1.1]
   ...
  [1.11]
    |     NAME-FUNCTION-2008-11
  [1.12]-------.
    |     [1.12.22.1]
  [1.13]       |
    |     [1.12.22.2]
    |          |
    |     [1.12.22.3]
    |          |
    |     [1.12.22.4]

Software versions:
  repository:   cvs-1.11.1p1
  os:           Centos-5



Constraints:
o cvs version is on shared server and not under my control
o risk of ignoring all other developer changes until
  merge of my personal branch to trunk is unacceptably high
o cost of forcing other developers to merge my changes at this time
  is unacceptably high



Trials so far include:
o (base) procedure that was succesful before Thursday and now fails
  bash> cvs update -j 1 -r $TAG imk
  bash> emacs imk # resolve conflict with combined line
  bash> cvs commit -r $TAG imk
  bash> cvs update -j 1 -r $TAG imk # during clean build
  # ERROR: conflicts during merge produces uncompilable file
  # <<<<<<<<< imk
  # [combined line]
  # =========
  # [-j1 line]
  # >>>>>>>>> imk-1.13
o (fails same way) merge from head rather than trunk
  bash> cvs update -j HEAD -r $TAG imk
  bash> emacs imk # resolve conflict
  bash> cvs commit -r $TAG imk
  bash> cvs update -j 1 -r $TAG imk # during clean build
  # ERROR: conflicts during merge produces uncompilable file
o (fails same way) add extra line
  bash> cvs update -j 1 -r $TAG imk
  bash> emacs imk # leave line from -r1 and add extra line
  bash> cvs commit -r $TAG imk
  bash> cvs update -j 1 -r $TAG imk # during clean build
  # ERROR: conflicts during merge produces uncompilable file
  # <<<<<<<<< imk
  # [-j1 line]
  # [combined line]
  # =========
  # [-j1 line]
  # >>>>>>>>> imk-1.13

Still investigating,
-- 
Bob

  "If a man's wit be wandering, let him study the mathematics."
     -- Francis Bacon



More information about the mdlug mailing list