HI!
As requested by Ben Collins-Sussman, I am reposting this from the users list to the dev list.
I think we have found a bug in Subversion's merge command.
I am attaching 3 versions of the same file:
- TransportOutUtil-B1.java = Rev 1 in the branch
- TransportOutUtil-B2.java = Rev 2 in the branch
- TransportOutUtil-T.java = trunk
Now we are merging the diff between B1 and B2 into T.
The unified diff between B1 and B2 looks like this:
--------------------------------------------------
@@ -444,20 +444,20 @@
if (vkRahmenObj != null) {
vkRahmenObj.setGeliefert(vkRahmenObj.getGeliefert() - lieferMenge);
vkRahmenObj.update();
+
+ where = "KARTIKEL = '" + vkRahmenObj.getKartikel()+ "' and " +
+ "EDIPARTNER = '" + vkRahmenObj.getEdipartner() + "' and " +
+ "WERKKUNDE = '" + vkRahmenObj.getWerkkunde() + "' and " +
+ "ABLADESTELLE = '" + vkRahmenObj.getAbladestelle() + "' and
" +
+ "STATUS = 1";
+ lieferabrufInObj = LieferabrufInFactory.search2(manager,
+ where,
+ READ_LOCK,
+ true);
+ LieferabrufInUtil.unDispatchDeliverySchedule(lieferabrufInObj);
+ LieferabrufInUtil.dispatchDeliverySchedule(lieferabrufInObj);
}
- where = "KARTIKEL = '" + vkRahmenObj.getKartikel()+ "' and " +
- "EDIPARTNER = '" + vkRahmenObj.getEdipartner() + "' and " +
- "WERKKUNDE = '" + vkRahmenObj.getWerkkunde() + "' and " +
- "ABLADESTELLE = '" + vkRahmenObj.getAbladestelle() + "' and "
+
- "STATUS = 1";
- lieferabrufInObj = LieferabrufInFactory.search2(manager,
- where,
- READ_LOCK,
- true);
- LieferabrufInUtil.unDispatchDeliverySchedule(lieferabrufInObj);
- LieferabrufInUtil.dispatchDeliverySchedule(lieferabrufInObj);
-
} finally {
manager.release();
}
--------------------------------------------------
The code in the trunk looks slightly different there, so IMHO the merge
should result in a conflict (trying with GNU diff3 results in a conflict).
But it doesn't. After the merge, the new block has just been added without
conflict and the old block has not been removed.
Before:
if (vkRahmenObj != null) {
vkRahmenObj.setGeliefert(vkRahmenObj.getGeliefert() -
lieferMenge);
vkRahmenObj.update();
where = "KARTIKEL = '" + vkRahmenObj.getKartikel()+ "' and " +
"EDIPARTNER = '" + vkRahmenObj.getEdipartner() + "' and
" +
"WERKKUNDE = '" + vkRahmenObj.getWerkkunde() + "' and "
+
"ABLADESTELLE = '" + vkRahmenObj.getAbladestelle() + "'
and " +
"STATUS = 1";
lieferabrufInObj = LieferabrufInFactory.search2(manager,
where,
READ_LOCK,
false);
if (lieferabrufInObj != null) {
LieferabrufInUtil.unDispatchDeliverySchedule(lieferabrufInObj);
LieferabrufInUtil.dispatchDeliverySchedule(lieferabrufInObj);
}
After the merge:
where = "KARTIKEL = '" + vkRahmenObj.getKartikel()+ "' and " +
"EDIPARTNER = '" + vkRahmenObj.getEdipartner() + "' and
" +
"WERKKUNDE = '" + vkRahmenObj.getWerkkunde() + "' and "
+
"ABLADESTELLE = '" + vkRahmenObj.getAbladestelle() + "'
and " +
"STATUS = 1";
lieferabrufInObj = LieferabrufInFactory.search2(manager,
where,
READ_LOCK,
false);
if (lieferabrufInObj != null) {
LieferabrufInUtil.unDispatchDeliverySchedule(lieferabrufInObj);
LieferabrufInUtil.dispatchDeliverySchedule(lieferabrufInObj);
}
}
}
where = "KARTIKEL = '" + vkRahmenObj.getKartikel()+ "' and " +
"EDIPARTNER = '" + vkRahmenObj.getEdipartner() + "' and " +
"WERKKUNDE = '" + vkRahmenObj.getWerkkunde() + "' and " +
"ABLADESTELLE = '" + vkRahmenObj.getAbladestelle() + "' and
" +
"STATUS = 1";
lieferabrufInObj = LieferabrufInFactory.search2(manager,
where,
READ_LOCK,
true);
LieferabrufInUtil.unDispatchDeliverySchedule(lieferabrufInObj);
LieferabrufInUtil.dispatchDeliverySchedule(lieferabrufInObj);
Are we thinking wrong?
Thanks!
Thomas
<<TransportOutUtil-B2.java>> <<TransportOutUtil-B1.java>> <<TransportOutUtil-T.java>>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Feb 3 15:38:11 2005