rpms/mono/devel mono-2.0-BinarySerialization.patch, NONE, 1.1 mono-2.0-DataTable.patch, NONE, 1.1 mono-2.0-StringReplace.patch, NONE, 1.1 import.log, 1.6, 1.7 mono.spec, 1.80, 1.81 sources, 1.24, 1.25
Paul F. Johnson
pfj at fedoraproject.org
Thu Oct 2 23:53:35 UTC 2008
- Previous message: rpms/libgdiplus/devel import.log, 1.3, 1.4 libgdiplus.spec, 1.32, 1.33 sources, 1.19, 1.20
- Next message: rpms/mono-basic/devel import.log,1.2,1.3 mono-basic.spec,1.9,1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: pfj
Update of /cvs/pkgs/rpms/mono/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8276/devel
Modified Files:
import.log mono.spec sources
Added Files:
mono-2.0-BinarySerialization.patch mono-2.0-DataTable.patch
mono-2.0-StringReplace.patch
Log Message:
Bump to RC4
Added backported patches for binaryserialization, datatable and stringreplace
mono-2.0-BinarySerialization.patch:
--- NEW FILE mono-2.0-BinarySerialization.patch ---
--- trunk/mcs/class/System.Data/Test/System.Data/BinarySerializationTest.cs 2008/09/16 12:52:47 113147
+++ trunk/mcs/class/System.Data/Test/System.Data/BinarySerializationTest.cs 2008/09/16 12:53:08 113148
@@ -172,6 +172,59 @@
dt.Rows[0].RejectChanges();
dt.Rows[1].RejectChanges();
}
+
+ [Test]
+ public void TestDefaultValues ()
+ {
+ //Serialize Table
+ DataTable tb1 = new DataTable ();
+ tb1.Columns.Add ("id", typeof (int));
+ tb1.Columns.Add ("Date", typeof (string));
+ tb1.Columns["id"].DefaultValue = 10;
+ tb1.Columns["Date"].DefaultValue = "9/15/2008";
+ tb1.Rows.Add (tb1.NewRow());
+
+ MemoryStream ms = new MemoryStream ();
+ BinaryFormatter bf = new BinaryFormatter ();
+ tb1.RemotingFormat = SerializationFormat.Binary;
+ bf.Serialize (ms,tb1);
+ byte [] serializedStream = ms.ToArray ();
+ ms.Close ();
+ //DserializeTable
+ ms = new MemoryStream (serializedStream);
+ DataTable dt = (DataTable)bf.Deserialize (ms);
+ ms.Close ();
+
+ //Table Data
+ for (int i = 0; i < tb1.Rows.Count; i++)
+ for (int j = 0; j < tb1.Columns.Count; j++) {
+ Assert.AreEqual (tb1.Columns[j].DefaultValue, dt.Rows [i][j], "#1 Element differs from DefaultValue at Row :{0} Column :{1}", i, j);
+ Assert.AreEqual (tb1.Rows [i][j], dt.Rows [i][j], "#2 Elements differ at Row :{0} Column :{1}", i, j);
+ }
+ }
+
+ [Test]
+ public void TestEmptyTable ()
+ {
+ //Serialize Table
+ DataTable tb1 = new DataTable ();
+ tb1.Columns.Add ("id", typeof (int));
+ tb1.Columns.Add ("Date", typeof (string));
+
+ MemoryStream ms = new MemoryStream ();
+ BinaryFormatter bf = new BinaryFormatter ();
+ tb1.RemotingFormat = SerializationFormat.Binary;
+ bf.Serialize (ms,tb1);
+ byte [] serializedStream = ms.ToArray ();
+ ms.Close ();
+ //DserializeTable
+ ms = new MemoryStream (serializedStream);
+ DataTable dt = (DataTable)bf.Deserialize (ms);
+ ms.Close ();
+
+ Assert.AreEqual(tb1.Rows.Count, dt.Rows.Count);
+ }
+
[Test]
public void Test_With_Null_Values1 ()
{
mono-2.0-DataTable.patch:
--- NEW FILE mono-2.0-DataTable.patch ---
--- trunk/mcs/class/System.Data/System.Data/DataTable.cs 2008/09/16 12:52:47 113147
+++ trunk/mcs/class/System.Data/System.Data/DataTable.cs 2008/09/16 12:53:08 113148
@@ -2497,6 +2497,8 @@
internal void DeserializeRecords (ArrayList arrayList, ArrayList nullBits, BitArray rowStateBitArray)
{
BitArray nullBit = null;
+ if (arrayList == null || arrayList.Count < 1)
+ return;
int len = ((Array) arrayList [0]).Length;
object [] tmpArray = new object [arrayList.Count];
int k = 0;
@@ -2566,8 +2568,8 @@
Columns[i].Prefix = info.GetString (prefix + "Prefix");
Columns[i].DataType = (Type) info.GetValue (prefix + "DataType",
typeof (Type));
- Columns[i].DefaultValue = (DBNull) info.GetValue (prefix + "DefaultValue",
- typeof (DBNull));
+ Columns[i].DefaultValue = info.GetValue (prefix + "DefaultValue",
+ typeof (Object));
Columns[i].AllowDBNull = info.GetBoolean (prefix + "AllowDBNull");
Columns[i].AutoIncrement = info.GetBoolean (prefix + "AutoIncrement");
Columns[i].AutoIncrementStep = info.GetInt64 (prefix + "AutoIncrementStep");
@@ -2752,6 +2754,8 @@
}
SerializeConstraints (info, prefix + "Constraints");
for (int j = 0; j < columnsCount; j++) {
+ if (rowsCount == 0)
+ continue;
BitArray nullBits = new BitArray (rowsCount);
Array recordArray = Array.CreateInstance (Rows[0][j].GetType (), recordsCount);
DataColumn column = Columns [j];
@@ -2775,7 +2779,7 @@
version = DataRowVersion.Default;
}
if (dr.IsNull (column, version) == false) {
- nullBits [l] = false;
+ nullBits [l] = false;
recordArray.SetValue (dr [j, version], l);
} else {
nullBits [l] = true;
mono-2.0-StringReplace.patch:
--- NEW FILE mono-2.0-StringReplace.patch ---
Index: corlib/System/String.cs
===================================================================
--- mono-2.0/mcs/class/corlib/System/String.cs (revision 112532)
+++ mono-2.0/mcs/class/corlib/System/String.cs (working copy)
@@ -1689,6 +1689,8 @@
}
i = found + oldValue.length;
}
+ if (count == 0)
+ return this;
int nlen = this.length + ((newValue.length - oldValue.length) * count);
String tmp = InternalAllocateStr (nlen);
Index: corlib/System.Text/StringBuilder.cs
===================================================================
--- mono-2.0/mcs/class/corlib/System.Text/StringBuilder.cs (revision 112532)
+++ mono-2.0/mcs/class/corlib/System.Text/StringBuilder.cs (working copy)
@@ -309,15 +309,22 @@
if (oldValue.Length == 0)
throw new ArgumentException ("The old value cannot be zero length.");
- // TODO: OPTIMIZE!
- string replace = _str.Substring(startIndex, count).Replace(oldValue, newValue);
+ string substr = _str.Substring(startIndex, count);
+ string replace = substr.Replace(oldValue, newValue);
+ // return early if no oldValue was found
+ if ((object) replace == (object) substr)
+ return this;
InternalEnsureCapacity (replace.Length + (_length - count));
- string end = _str.Substring (startIndex + count, _length - startIndex - count );
+ // shift end part
+ if (replace.Length < count)
+ String.CharCopy (_str, startIndex + replace.Length, _str, startIndex + count, _length - startIndex - count);
+ else if (replace.Length > count)
+ String.CharCopyReverse (_str, startIndex + replace.Length, _str, startIndex + count, _length - startIndex - count);
+ // copy middle part back into _str
String.CharCopy (_str, startIndex, replace, 0, replace.Length);
- String.CharCopy (_str, startIndex + replace.Length, end, 0, end.Length);
_length = replace.Length + (_length - count);
Index: import.log
===================================================================
RCS file: /cvs/pkgs/rpms/mono/devel/import.log,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- import.log 19 Sep 2008 08:59:14 -0000 1.6
+++ import.log 2 Oct 2008 23:53:05 -0000 1.7
@@ -4,3 +4,4 @@
mono-2_0-6_fc10:HEAD:mono-2.0-6.fc10.src.rpm:1221073246
mono-2_0-7_fc10:HEAD:mono-2.0-7.fc10.src.rpm:1221685120
mono-2_0-8_fc10:HEAD:mono-2.0-8.fc10.src.rpm:1221814700
+mono-2_0-10_fc10:HEAD:mono-2.0-10.fc10.src.rpm:1222991530
Index: mono.spec
===================================================================
RCS file: /cvs/pkgs/rpms/mono/devel/mono.spec,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- mono.spec 19 Sep 2008 08:59:14 -0000 1.80
+++ mono.spec 2 Oct 2008 23:53:05 -0000 1.81
@@ -1,6 +1,6 @@
Name: mono
Version: 2.0
-Release: 8%{?dist}
+Release: 10%{?dist}
Summary: A .NET runtime environment
Group: Development/Languages
@@ -46,6 +46,9 @@
Patch10: mono-2.0-metadata-makefile.patch
Patch11: mono-2.0-tablelayout.patch
Patch12: mono-2.0-mimeicon.patch
+Patch13: mono-2.0-BinarySerialization.patch
+Patch14: mono-2.0-DataTable.patch
+Patch15: mono-2.0-StringReplace.patch
%description
The Mono runtime implements a JIT engine for the ECMA CLI
@@ -263,6 +266,9 @@
%patch10 -p1 -b .metadata
%patch11 -p1 -b .tablelayout
%patch12 -p1 -b .mimeicon
+%patch13 -p1 -b .serialisation
+%patch14 -p1 -b .datatable
+%patch15 -p1 -b .stringreplace
autoreconf -f -i -s
# Add undeclared Arg
@@ -617,6 +623,14 @@
%gac_dll IBM.Data.DB2
%changelog
+* Fri Oct 03 2008 Paul F. Johnson <paul at all-the-johnsons.co.uk> 2.0-10
+- bump to RC4
+
+* Sun Sep 28 2008 Paul F. Johnson <paul at all-the-johnsons.co.uk> 2.0-9
+- backported binaryserialisation and datatable patches
+- backported stringreplace optimisation
+- bump to RC3
+
* Thu Sep 18 2008 Paul F. Johnson <paul at all-the-johnsons.co.uk> 2.0-8
- MimeIcon patch added
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/mono/devel/sources,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- sources 10 Sep 2008 19:26:55 -0000 1.24
+++ sources 2 Oct 2008 23:53:05 -0000 1.25
@@ -1 +1 @@
-bdca04300dd35ca3916614d3bff40e3e mono-2.0.tar.bz2
+d8fb1b2bab0066b82289b8a5856b9705 mono-2.0.tar.bz2
- Previous message: rpms/libgdiplus/devel import.log, 1.3, 1.4 libgdiplus.spec, 1.32, 1.33 sources, 1.19, 1.20
- Next message: rpms/mono-basic/devel import.log,1.2,1.3 mono-basic.spec,1.9,1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list