bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Merging bug (wrong conflicts)


From: Jacob Burckhardt
Subject: Re: Merging bug (wrong conflicts)
Date: Tue, 20 Mar 2001 08:54:27 -0800

Derek R. Price writes:
> Could you send me your 8 merge errors as sanity.sh test cases?

A patch to sanity.sh is below, but first here is some description of
what I did.

I spent about 10 hours trying to find other test cases to test and
trying to reduce my large test cases.  I gave up on trying to reduce
the large ones, but I did find some interesting new small ones.  They
may not be all that unique but at least they are small, so I decided
to include them in sanity.sh.  If anyone else wants to try to get
better test cases, I will be glad to help add them to sanity.sh.  But
for now, I am satisfied with my changes below.  They catch bugs in the
unpatched cvs, so for regression testing purposes they are good.

The existing diffmerge1 test case was pretty easy to follow.  It used
a CVS module with one file.  I wanted to add additional files which
would be additional test cases.  Then the existing single update
command would merge all of these files that are in a single module
instead of just merging the one file which used to be there.  It takes
so much room to write the code to create these extra files, that I
decided to move this code out of the way into separate shell functions,
so that the large amount of code would not distract from the
high level flow of this test.  I think this helps make it more top
down, and easier to follow.  I was not sure where I should put these
large functions which create the input files.  I picked a place close
to the beginning of "The big loop".  If you prefer a different place,
go ahead and move it or you can ask me to move it.

Note that 3 of the test cases worked on the unpatched cvs.  One of
these cases was already fixed a few years ago, and I think the others
have always worked with cvs.  Even though cvs always handled these, I
included them anyway, because Peter Miller's fmerge utility fails on
one of these, and so therefore it may be a difficult case, which makes
it good for cvs regression testing.  The other case which has always
worked, was recommend by Karl Tomlinson.  It has MINE and YOURS be
the same file.  The three cases which the unpatched cvs passes are:

testcase01
testcase07
testcase09

Therefore when you run the test on the unpatched file, you will see
diff output for 7 of the test cases but not for the 3 mentioned above.
Note that I use the directory_cmp function to do the compare, but if
it finds a difference, it does not say what file was different, so if
you want to know what files are different you may temporarily add a
diff command by uncommenting my example diff command.  I did not
want to leave it uncommented because it uses GNU diff and I think some
people might use sanity.sh who do not have GNU diff.

As long as my employer keeps me in charge of cvs issues for our
project, I intend to continue to monitor the info-cvs and bug-cvs
mailing lists and if I see anyone ask about something which might be a
merge bug, I will try to reproduce their problem and determine if
Karl's patch fixes it.

If there is anything else I can help with related to merge bugs,
please let me know.

*** /reliant/bjacob/original/cvs-1.11/src/sanity.sh     Wed Aug 23 13:02:22 2000
--- ./sanity.sh Mon Mar 19 18:00:21 2001
***************
*** 715,718 ****
--- 715,1453 ----
  }
  
+ # The following 4 functions are used by the diffmerge1 test case:
+ diffmerge_create_older_files() {
+         # Note, that to examine only one test case you must look in
+         # 4 functions (this function, and the 3 that follow it).
+         # For example to examine test case 1, look at what each
+         # function writes to the filename "testcase01".  To examine the
+         # next case, look at what each function writes to the file
+         # named testcase02.
+ 
+         # The text of the file is inlined here because `echo' loses
+         # newlines, and I don't know how portable the -e flag is.
+         # This test case was supplied by Noah Friedman:
+         echo "// Button.java
+ 
+ package random.application;
+ 
+ import random.util.star;
+ 
+ public class Button
+ {
+   /star Instantiates a Button with origin (0, 0) and zero width and height.
+    star You must call an initializer method to properly initialize the Button.
+    star/
+   public Button ()
+   {
+     super ();
+ 
+     _titleColor = Color.black;
+     _disabledTitleColor = Color.gray;
+     _titleFont = Font.defaultFont ();
+   }
+ 
+   /star Convenience constructor for instantiating a Button with
+    star bounds x, y, width, and height.  Equivalent to
+    star     foo = new Button ();
+    star     foo.init (x, y, width, height);
+    star/
+   public Button (int x, int y, int width, int height)
+   {
+     this ();
+     init (x, y, width, height);
+   }
+ }" > testcase01
+ 
+ # This test case was supplied by Jacob Burckhardt:
+ echo "a
+ a
+ a
+ a
+ a" > testcase02
+ 
+ # This test case was supplied by Karl Tomlinson who also wrote the
+ # patch which lets CVS correctly handle this and several other cases:
+ echo "x
+ s
+ a
+ b
+ s
+ y" > testcase03
+ 
+ # This test case was supplied by Karl Tomlinson:
+ echo "s
+ x
+ m
+ m
+ x
+ s
+ v
+ s
+ x
+ m
+ m
+ x
+ s" > testcase04
+ 
+ # This test case was supplied by Karl Tomlinson:
+ echo "s
+ x
+ m
+ m
+ x
+ x
+ x
+ x
+ x
+ x
+ x
+ x
+ x
+ x
+ s
+ s
+ s
+ s
+ s
+ s
+ s
+ s
+ s
+ s
+ v" > testcase05
+ 
+ # This test case was supplied by Jacob Burckhardt:
+ echo "g
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ i" > testcase06
+ 
+ # This test is supposed to verify that the horizon lines are the same
+ # for both 2-way diffs, but unfortunately, it does not fail with the
+ # old version of cvs.  However, Karl Tomlinson still thought it would
+ # be good to test it anyway:
+ echo "h
+ f
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ g
+ r
+ 
+ 
+ 
+ i
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ i" > testcase07
+ 
+ # This test case was supplied by Jacob Burckhardt:
+ echo "Both changes move this line to the end of the file.
+ 
+ no
+ changes
+ here
+ 
+ First change will delete this line.
+ 
+ First change will also delete this line.
+ 
+     no
+     changes
+     here
+ 
+ Second change will change it here.
+ 
+         no
+         changes
+         here" > testcase08
+ 
+ # This test case was supplied by Jacob Burckhardt.  Note that I do not
+ # think cvs has ever failed with this case, but I include it anyway,
+ # since I think it is a hard case.  It is hard because Peter Miller's
+ # fmerge utility fails on it:
+ echo "m
+ a
+ {
+ }
+ b
+ {
+ }" > testcase09
+ 
+ # This test case was supplied by Martin Dorey and simplified by Jacob
+ # Burckhardt:
+ echo "
+     petRpY ( MtatRk );
+     fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+ 
+     MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * 
jfle_Uecopd_MfJe_fY_nEtek );
+     OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_MfJe_fY_nEtek, 
nRVVep );
+ 
+     Bloke_GttpfIRte_MtpeaL ( &acI );
+ MTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )
+ {
+     fV ( Y < 16 )
+     {
+         petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * 
noot_Uecopd.MectopkFepBlRktep +
+                                                       Y * 
jfle_Uecopd_MfJe_fY_Mectopk,
+                                 jfle_Uecopd_MfJe_fY_Mectopk,
+                                 nRVVep ) );
+     }
+     elke
+     {
+         petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * 
noot_Uecopd.MectopkFepBlRktep +
+                                                  ( Y - 16 ) * 
jfle_Uecopd_MfJe_fY_Mectopk,
+                                 jfle_Uecopd_MfJe_fY_Mectopk,
+                                 nRVVep ) );
+     }
+ 
+ }
+ 
+ 
+ /****************************************************************************
+ *                                                                           *
+ *   Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY )                      *
+ *                                                                           *
+ ****************************************************************************/
+ 
+ MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
+ {
+ MTGTXM MtatRk = Zy;
+ 
+     MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, 
KRL_Mectopk, nRVVep );
+ 
+     petRpY ( MtatRk );
+ 
+ }
+     HfkQipfte ( waYdle,                 /*  waYdle                         */
+                 waYdleFok,              /*  ZVVket VpoL ktapt oV dfkQ      */
+                 (coYkt RfYt8*) nRVVep,  /*  nRVVep                         */
+                 0,                      /*  MRrepVlRoRk KfxoYfkL           */
+                 beYgtz                  /*  nEtek to Apfte                 */
+               );
+ 
+     petRpY ( Zy );
+ }
+ " > testcase10
+ }
+ 
+ diffmerge_create_your_files() {
+         # remove the Button() method
+         echo "// Button.java
+ 
+ package random.application;
+ 
+ import random.util.star;
+ 
+ public class Button
+ {
+   /star Instantiates a Button with origin (0, 0) and zero width and height.
+    star You must call an initializer method to properly initialize the Button.
+    star/
+   public Button ()
+   {
+     super ();
+ 
+     _titleColor = Color.black;
+     _disabledTitleColor = Color.gray;
+     _titleFont = Font.defaultFont ();
+   }
+ }" > testcase01
+ 
+ echo "y
+ a
+ a
+ a
+ a" > testcase02
+ 
+ echo "x
+ s
+ a
+ b
+ s
+ b
+ s
+ y" > testcase03
+ 
+ echo "s
+ m
+ s
+ v
+ s
+ m
+ s" > testcase04
+ 
+ echo "v
+ s
+ m
+ s
+ s
+ s
+ s
+ s
+ s
+ s
+ s
+ s
+ s
+ v" > testcase05
+ 
+ # Test case 6 and test case 7 both use the same input files, but they
+ # order the input files differently.  In one case, a certain file is
+ # used as the older file, but in the other test case, that same file
+ # is used as the file which has changes.  I could have put echo
+ # commands here, but since the echo lines would be the same as those
+ # in the previous function, I decided to save space and avoid repeating
+ # several lines of code.  Instead, I merely swap the files:
+ mv testcase07 tmp
+ mv testcase06 testcase07
+ mv tmp testcase06
+ 
+ # Make the date newer so that cvs thinks that the files are changed:
+ touch testcase06 testcase07
+ 
+ echo "no
+ changes
+ here
+ 
+ First change has now added this in.
+ 
+     no
+     changes
+     here
+ 
+ Second change will change it here.
+ 
+         no
+         changes
+         here
+ 
+ Both changes move this line to the end of the file." > testcase08
+ 
+ echo "
+ m
+ a
+ {
+ }
+ b
+ {
+ }
+ c
+ {
+ }" > testcase09
+ 
+ echo "
+     fV ( BzQkV_URYYfYg ) (*jfle_Uecopdk)[0].jfle_Uecopd_KRLIep = ZpfgfYal_jUK;
+ 
+     petRpY ( MtatRk );
+     fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+ 
+     fV ( jfle_Uecopd_KRLIep < 16 )
+     {
+         MtatRk = Uead_Ktz_qjT_jfle_Uecopd ( jfle_Uecopd_KRLIep, (uofd*)nRVVep 
);
+     }
+     elke
+     {
+         MtatRk = ZreY_GttpfIRte_MtpeaL ( qjT_jfle_Uecopdk, 
qjT_jfle_Uecopd_BoRYt, HGTG_TvFD, KXbb, KXbb, &acI );
+         fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+ 
+         MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * 
jfle_Uecopd_MfJe_fY_nEtek );
+         OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, 
jfle_Uecopd_MfJe_fY_nEtek, nRVVep );
+ 
+     Bloke_GttpfIRte_MtpeaL ( &acI );
+ MTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )
+ {
+ MTGTXM MtatRk = Zy;
+ 
+     fV ( Y < 16 )
+     {
+         petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * 
noot_Uecopd.MectopkFepBlRktep +
+                                                       Y * 
jfle_Uecopd_MfJe_fY_Mectopk,
+                                 jfle_Uecopd_MfJe_fY_Mectopk,
+                                 nRVVep ) );
+     }
+     elke
+     {
+         petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * 
noot_Uecopd.MectopkFepBlRktep +
+                                                  ( Y - 16 ) * 
jfle_Uecopd_MfJe_fY_Mectopk,
+                                 jfle_Uecopd_MfJe_fY_Mectopk,
+                                 nRVVep ) );
+     }
+ 
+     petRpY ( MtatRk );
+ 
+ }
+ 
+ 
+ /****************************************************************************
+ *                                                                           *
+ *   Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY )                      *
+ *                                                                           *
+ ****************************************************************************/
+ 
+ MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
+ {
+ MTGTXM MtatRk = Zy;
+ 
+     MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, 
KRL_Mectopk, nRVVep );
+ 
+     petRpY ( MtatRk );
+ 
+ }
+     HfkQipfte ( waYdle,                 /*  waYdle                         */
+                 waYdleFok,              /*  ZVVket VpoL ktapt oV dfkQ      */
+                 (coYkt RfYt8*) nRVVep,  /*  nRVVep                         */
+                 0,                      /*  MRrepVlRoRk KfxoYfkL           */
+                 beYgtz                  /*  nEtek to Apfte                 */
+               );
+ 
+     petRpY ( Zy );
+ }
+ " > testcase10
+ }
+ 
+ diffmerge_create_my_files() {
+           # My working copy still has the Button() method, but I
+         # comment out some code at the top of the class.
+         echo "// Button.java
+ 
+ package random.application;
+ 
+ import random.util.star;
+ 
+ public class Button
+ {
+   /star Instantiates a Button with origin (0, 0) and zero width and height.
+    star You must call an initializer method to properly initialize the Button.
+    star/
+   public Button ()
+   {
+     super ();
+ 
+     // _titleColor = Color.black;
+     // _disabledTitleColor = Color.gray;
+     // _titleFont = Font.defaultFont ();
+   }
+ 
+   /star Convenience constructor for instantiating a Button with
+    star bounds x, y, width, and height.  Equivalent to
+    star     foo = new Button ();
+    star     foo.init (x, y, width, height);
+    star/
+   public Button (int x, int y, int width, int height)
+   {
+     this ();
+     init (x, y, width, height);
+   }
+ }" > testcase01
+ 
+ echo "a
+ a
+ a
+ a
+ m" > testcase02
+ 
+ echo "x
+ s
+ c
+ s
+ b
+ s
+ y" > testcase03
+ 
+ echo "v
+ s
+ x
+ m
+ m
+ x
+ s
+ v
+ s
+ x
+ m
+ m
+ x
+ s
+ v" > testcase04
+ 
+ # Note that in test case 5, there are no changes in the "mine"
+ # section, which explains why there is no command here which writes to
+ # file testcase05.
+ 
+ # no changes for testcase06
+ 
+ # The two branches make the same changes:
+ cp ../diffmerge1_yours/testcase07 .
+ 
+ echo "no
+ changes
+ here
+ 
+ First change will delete this line.
+ 
+ First change will also delete this line.
+ 
+     no
+     changes
+     here
+ 
+ Second change has now changed it here.
+ 
+         no
+         changes
+         here
+ 
+ Both changes move this line to the end of the file." > testcase08
+ 
+ echo "m
+ a
+ {
+ }
+ b
+ {
+ }
+ c
+ {
+ }" > testcase09
+ 
+ echo "
+     petRpY ( MtatRk );
+     fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+ 
+     MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * 
jfle_Uecopd_MfJe_fY_nEtek );
+     OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_MfJe_fY_nEtek, 
nRVVep );
+ 
+     Bloke_GttpfIRte_MtpeaL ( &acI );
+ MTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )
+ {
+     fV ( Y < 16 )
+     {
+         petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * 
noot_Uecopd.MectopkFepBlRktep +
+                                                       Y * 
jfle_Uecopd_MfJe_fY_Mectopk,
+                                 jfle_Uecopd_MfJe_fY_Mectopk,
+                                 nRVVep ) );
+     }
+     elke
+     {
+         petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * 
noot_Uecopd.MectopkFepBlRktep +
+                                                  ( Y - 16 ) * 
jfle_Uecopd_MfJe_fY_Mectopk,
+                                 jfle_Uecopd_MfJe_fY_Mectopk,
+                                 nRVVep ) );
+     }
+ 
+ }
+ 
+ 
+ /****************************************************************************
+ *                                                                           *
+ *   Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY )                      *
+ *                                                                           *
+ ****************************************************************************/
+ 
+ MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
+ {
+ MTGTXM MtatRk = Zy;
+ 
+     MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, 
KRL_Mectopk, nRVVep );
+ 
+     petRpY ( MtatRk );
+ 
+ }
+     HfkQipfte ( waYdle,                 /*  waYdle                         */
+                 waYdleFok,              /*  ZVVket VpoL ktapt oV dfkQ      */
+                 (coYkt RfYt8*) nRVVep,  /*  nRVVep                         */
+                 beYgtz                  /*  nEtek to Apfte                 */
+               );
+ 
+     petRpY ( Zy );
+ }
+ " > testcase10
+ }
+ 
+ diffmerge_create_expected_files() {
+         echo "// Button.java
+ 
+ package random.application;
+ 
+ import random.util.star;
+ 
+ public class Button
+ {
+   /star Instantiates a Button with origin (0, 0) and zero width and height.
+    star You must call an initializer method to properly initialize the Button.
+    star/
+   public Button ()
+   {
+     super ();
+ 
+     // _titleColor = Color.black;
+     // _disabledTitleColor = Color.gray;
+     // _titleFont = Font.defaultFont ();
+   }
+ }" > testcase01
+ 
+ echo "y
+ a
+ a
+ a
+ m" > testcase02
+ 
+ echo "x
+ s
+ c
+ s
+ b
+ s
+ b
+ s
+ y" > testcase03
+ 
+ echo "v
+ s
+ m
+ s
+ v
+ s
+ m
+ s
+ v" > testcase04
+ 
+ # Since there are no changes in the "mine" section, just take exactly
+ # the changes in the "yours" section:
+ cp ../diffmerge1_yours/testcase05 .
+ 
+ cp ../diffmerge1_yours/testcase06 .
+ 
+ # Since the two branches make the same changes, the result should be
+ # the same as both branches.  Here, I happen to pick yours to copy from,
+ # but I could have also picked mine, since the source of the copy is
+ # the same in either case.  However, the mine has already been
+ # altered by the update command, so don't use it.  Instead, use the
+ # yours section which has not had an update on it and so is unchanged:
+ cp ../diffmerge1_yours/testcase07 .
+ 
+ echo "no
+ changes
+ here
+ 
+ First change has now added this in.
+ 
+     no
+     changes
+     here
+ 
+ Second change has now changed it here.
+ 
+         no
+         changes
+         here
+ 
+ Both changes move this line to the end of the file." > testcase08
+ 
+ echo "
+ m
+ a
+ {
+ }
+ b
+ {
+ }
+ c
+ {
+ }" > testcase09
+ 
+ echo "
+     fV ( BzQkV_URYYfYg ) (*jfle_Uecopdk)[0].jfle_Uecopd_KRLIep = ZpfgfYal_jUK;
+ 
+     petRpY ( MtatRk );
+     fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+ 
+     fV ( jfle_Uecopd_KRLIep < 16 )
+     {
+         MtatRk = Uead_Ktz_qjT_jfle_Uecopd ( jfle_Uecopd_KRLIep, (uofd*)nRVVep 
);
+     }
+     elke
+     {
+         MtatRk = ZreY_GttpfIRte_MtpeaL ( qjT_jfle_Uecopdk, 
qjT_jfle_Uecopd_BoRYt, HGTG_TvFD, KXbb, KXbb, &acI );
+         fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+ 
+         MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * 
jfle_Uecopd_MfJe_fY_nEtek );
+         OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, 
jfle_Uecopd_MfJe_fY_nEtek, nRVVep );
+ 
+     Bloke_GttpfIRte_MtpeaL ( &acI );
+ MTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )
+ {
+ MTGTXM MtatRk = Zy;
+ 
+     fV ( Y < 16 )
+     {
+         petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * 
noot_Uecopd.MectopkFepBlRktep +
+                                                       Y * 
jfle_Uecopd_MfJe_fY_Mectopk,
+                                 jfle_Uecopd_MfJe_fY_Mectopk,
+                                 nRVVep ) );
+     }
+     elke
+     {
+         petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * 
noot_Uecopd.MectopkFepBlRktep +
+                                                  ( Y - 16 ) * 
jfle_Uecopd_MfJe_fY_Mectopk,
+                                 jfle_Uecopd_MfJe_fY_Mectopk,
+                                 nRVVep ) );
+     }
+ 
+     petRpY ( MtatRk );
+ 
+ }
+ 
+ 
+ /****************************************************************************
+ *                                                                           *
+ *   Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY )                      *
+ *                                                                           *
+ ****************************************************************************/
+ 
+ MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
+ {
+ MTGTXM MtatRk = Zy;
+ 
+     MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, 
KRL_Mectopk, nRVVep );
+ 
+     petRpY ( MtatRk );
+ 
+ }
+     HfkQipfte ( waYdle,                 /*  waYdle                         */
+                 waYdleFok,              /*  ZVVket VpoL ktapt oV dfkQ      */
+                 (coYkt RfYt8*) nRVVep,  /*  nRVVep                         */
+                 beYgtz                  /*  nEtek to Apfte                 */
+               );
+ 
+     petRpY ( Zy );
+ }
+ " > testcase10
+ }
+ 
  # Set up CVSROOT (the crerepos tests will test operating without CVSROOT set).
  CVSROOT_DIRNAME=${TESTDIR}/cvsroot
***************
*** 17692,17730 ****
          cd diffmerge1
  
!         # The text of the file is inlined here because `echo' loses
!         # newlines, and I don't know how portable the -e flag is.
!         # 
!         # This is the file we both start out with:
!         echo "// Button.java
! 
! package random.application;
! 
! import random.util.star;
! 
! public class Button
! {
!   /star Instantiates a Button with origin (0, 0) and zero width and height.
!    star You must call an initializer method to properly initialize the Button.
!    star/
!   public Button ()
!   {
!     super ();
! 
!     _titleColor = Color.black;
!     _disabledTitleColor = Color.gray;
!     _titleFont = Font.defaultFont ();
!   }
! 
!   /star Convenience constructor for instantiating a Button with
!    star bounds x, y, width, and height.  Equivalent to
!    star     foo = new Button ();
!    star     foo.init (x, y, width, height);
!    star/
!   public Button (int x, int y, int width, int height)
!   {
!     this ();
!     init (x, y, width, height);
!   }
! }" > the_file
  
          dotest diffmerge1_import \
--- 18427,18432 ----
          cd diffmerge1
  
!         # These are the files we both start out with:
!         diffmerge_create_older_files
  
          dotest diffmerge1_import \
***************
*** 17734,17837 ****
          rm -rf diffmerge1
  
!         # Check out two working copies, one for "you" and one for "me"
!         ${testcvs} checkout diffmerge1 >/dev/null 2>&1
          mv diffmerge1 diffmerge1_yours
          ${testcvs} checkout diffmerge1 >/dev/null 2>&1
          mv diffmerge1 diffmerge1_mine
  
!         # In your working copy, you'll remove the Button() method, and
!         # then check in your change before I check in mine:
          cd diffmerge1_yours
!         echo "// Button.java
! 
! package random.application;
! 
! import random.util.star;
! 
! public class Button
! {
!   /star Instantiates a Button with origin (0, 0) and zero width and height.
!    star You must call an initializer method to properly initialize the Button.
!    star/
!   public Button ()
!   {
!     super ();
! 
!     _titleColor = Color.black;
!     _disabledTitleColor = Color.gray;
!     _titleFont = Font.defaultFont ();
!   }
! }" > the_file
          dotest diffmerge1_yours \
            "${testcvs} ci -m yours" \
            "${DOTSTAR}hecking in ${DOTSTAR}"
  
!         # My working copy still has the Button() method, but I
!         # comment out some code at the top of the class.  Then I
          # update, after both my modifications and your checkin:
          cd ../diffmerge1_mine
!         echo "// Button.java
! 
! package random.application;
! 
! import random.util.star;
! 
! public class Button
! {
!   /star Instantiates a Button with origin (0, 0) and zero width and height.
!    star You must call an initializer method to properly initialize the Button.
!    star/
!   public Button ()
!   {
!     super ();
! 
!     // _titleColor = Color.black;
!     // _disabledTitleColor = Color.gray;
!     // _titleFont = Font.defaultFont ();
!   }
! 
!   /star Convenience constructor for instantiating a Button with
!    star bounds x, y, width, and height.  Equivalent to
!    star     foo = new Button ();
!    star     foo.init (x, y, width, height);
!    star/
!   public Button (int x, int y, int width, int height)
!   {
!     this ();
!     init (x, y, width, height);
!   }
! }" > the_file
          dotest diffmerge1_mine \
!           "${testcvs} update" \
            "${DOTSTAR}erging${DOTSTAR}"
  
          # So if your changes didn't make it into my working copy, or
!         # in any case if the file does not look like the final text as
!         # quoted below, then the test flunks:
!         echo "// Button.java
! 
! package random.application;
! 
! import random.util.star;
! 
! public class Button
! {
!   /star Instantiates a Button with origin (0, 0) and zero width and height.
!    star You must call an initializer method to properly initialize the Button.
!    star/
!   public Button ()
!   {
!     super ();
! 
!     // _titleColor = Color.black;
!     // _disabledTitleColor = Color.gray;
!     // _titleFont = Font.defaultFont ();
!   }
! }" > comp_me
!         dotest diffmerge1_cmp "cmp the_file comp_me" ''
  
          # Clean up after ourselves:
          cd ..
!         rm -rf diffmerge1_yours diffmerge1_mine ${CVSROOT_DIRNAME}/diffmerge1
  
          ;;
--- 18436,18494 ----
          rm -rf diffmerge1
  
!         # Check out two working copies, one for "you" and one for
!         # "me".  If no branch is used and cvs detects that only one
!         # of the two people made changes, then cvs does not run the
!         # merge algorithm.  But if a branch is used, then cvs does run
!         # the merge algorithm (even in this case of only one of the two
!         # people having made changes).  CVS used to have a bug in this
!         # case.  Therefore, it is important to test this case by
!         # using a branch:
!         ${testcvs} rtag     -b tag diffmerge1 >/dev/null 2>&1
!         ${testcvs} checkout -r tag diffmerge1 >/dev/null 2>&1
          mv diffmerge1 diffmerge1_yours
          ${testcvs} checkout diffmerge1 >/dev/null 2>&1
          mv diffmerge1 diffmerge1_mine
  
!         # In your working copy, you'll make changes, and
!         # then check in your changes before I check in mine:
          cd diffmerge1_yours
!         diffmerge_create_your_files
          dotest diffmerge1_yours \
            "${testcvs} ci -m yours" \
            "${DOTSTAR}hecking in ${DOTSTAR}"
  
!         # Change my copy.  Then I
          # update, after both my modifications and your checkin:
          cd ../diffmerge1_mine
!         diffmerge_create_my_files
          dotest diffmerge1_mine \
!           "${testcvs} update -j tag" \
            "${DOTSTAR}erging${DOTSTAR}"
  
          # So if your changes didn't make it into my working copy, or
!         # in any case if the files do not look like the final text
!         # in the files in directory comp_me, then the test flunks:
!         cd ..
!         mkdir comp_me
!         cd comp_me
!         diffmerge_create_expected_files
!         cd ..
!         rm diffmerge1_mine/.#*
! 
!         # If you have GNU's version of diff, you may try
!         # uncommenting the following line which will give more
!         # fine-grained information about how cvs differed from the
!         # correct result:
!         #dotest diffmerge1_cmp "diff --recursive --exclude=CVS comp_me 
diffmerge1_mine" ''
!         directory_cmp comp_me diffmerge1_mine
!         if $ISDIFF ; then
!             fail diffmerge1_cmp
!         else
!             pass diffmerge1_cmp
!         fi
  
          # Clean up after ourselves:
          cd ..
!         rm -rf diffmerge1_yours diffmerge1_mine comp_me 
${CVSROOT_DIRNAME}/diffmerge1
  
          ;;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]