0

I spent some time learning RCS, wearing my unix tool archeologist hat. I encountered a weird behavior wrt rcsmerge. I've googled rcsmerge, I Read The FM, etc, but found no explanation to this behavior below. I'd expect to see all three letters a b and c with possible conflict markers at the bottom.

% echo b >f
% ci -l -t-f f
f,v  <--  f
initial revision: 1.1
done
% echo c >>f
% ci -mc f
f,v  <--  f
new revision: 1.2; previous revision: 1.1
done
% co -l -r1.1 f
f,v  -->  f
revision 1.1 (locked)
done
% sed -i '1ia' f
% ci -ma f
f,v  <--  f
new revision: 1.1.1.1; previous revision: 1.1
done
% co -r1.2 -l f
f,v  -->  f
revision 1.2 (locked)
done
% rcsmerge -r1.1.1.1 f
RCS file: f,v
retrieving revision 1.1.1.1
retrieving revision 1.2
Merging differences between 1.1.1.1 and 1.2 into f
% cat f
b
c
% 

I think I might have missed something in the manual. My question is: how you really merge revisions with RCS?!

grault
  • 55
  • 5
  • I'd guess you want `rcsmerge -r1.1 -r1.1.1.1 f` i.e. apply the changes between 1.1 and 1.1.1.1 to the current file. But I'm guessing, and I don't know if the single -r version was meant to do that anyway. – Rup Oct 05 '18 at 23:01
  • Hmm.. changing the rcsmerge command to yours (doing all the other commands without a change) yielded abc.. which is what I want to see, though this' weird. For me, 1.1 is a file with only b. 1.1.1.1 is one with ab. How on earth is the merge of a and ab is abc? My only guess is that "rcsmerge -rA -rB" is "apply the patch A->B to the current checkout". That'd make sense. – grault Oct 05 '18 at 23:16

0 Answers0