Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2008-12-17 03:42:31 +0300
committerMiguel de Icaza <miguel@gnome.org>2008-12-17 03:42:31 +0300
commit67a72d26bda348b51340379ffcd77971fcea84f2 (patch)
tree58255ee258a0b27c946939b732aa5ca49ace4290 /webcompare
parenta2479fbf36a3574c537848f863486612b144483d (diff)
2008-12-16 Miguel de Icaza <miguel@novell.com>
* index.aspx: add listing of assemblies. * status.aspx: do not crash on partial reloads. * Bundle our Mono.Cecil.dll to work on the server svn path=/trunk/mono-tools/; revision=121655
Diffstat (limited to 'webcompare')
-rw-r--r--webcompare/ChangeLog8
-rw-r--r--webcompare/Global.asax16
-rw-r--r--webcompare/Makefile9
-rw-r--r--webcompare/Web.config12
-rw-r--r--webcompare/index.aspx86
-rw-r--r--webcompare/status.aspx5
6 files changed, 116 insertions, 20 deletions
diff --git a/webcompare/ChangeLog b/webcompare/ChangeLog
index c26dde02..490faa90 100644
--- a/webcompare/ChangeLog
+++ b/webcompare/ChangeLog
@@ -1,3 +1,11 @@
+2008-12-16 Miguel de Icaza <miguel@novell.com>
+
+ * index.aspx: add listing of assemblies.
+
+ * status.aspx: do not crash on partial reloads.
+
+ * Bundle our Mono.Cecil.dll to work on the server
+
2008-12-15 Miguel de Icaza <miguel@novell.com>
* Global.asax: Load stuff relative to the current directory.
diff --git a/webcompare/Global.asax b/webcompare/Global.asax
index c922ce17..3b59781d 100644
--- a/webcompare/Global.asax
+++ b/webcompare/Global.asax
@@ -73,11 +73,10 @@ public class CompareParameters {
string info_file = Path.Combine (HttpRuntime.AppDomainAppPath, Path.Combine (Path.Combine ("masterinfos", InfoDir), Assembly) + ".xml");
string dll_file = Path.Combine (HttpRuntime.AppDomainAppPath, Path.Combine (BinDir, Assembly) + ".dll");
- using (var fs = File.OpenWrite ("/tmp/mylog")){
- var sw = new StreamWriter (fs);
- sw.WriteLine ("Comparing {0} and {1}", info_file, dll_file);
+ using (var sw = File.AppendText ("/tmp/mylog")){
+ sw.WriteLine ("{2} Comparing {0} and {1}", info_file, dll_file, DateTime.Now);
sw.Flush ();
- }
+
Console.WriteLine ("Comparing {0} and {1}", info_file, dll_file);
if (!File.Exists (info_file))
throw new Exception (String.Format ("File {0} does not exist", info_file));
@@ -88,7 +87,8 @@ public class CompareParameters {
() => new MasterAssembly (info_file),
() => new CecilAssembly (dll_file));
cc.ProgressChanged += delegate (object sender, CompareProgressChangedEventArgs a){
- Console.Error.WriteLine (a.Message);
+ sw.WriteLine (a.Message);
+sw.Flush ();
};
ManualResetEvent r = new ManualResetEvent (false);
cc.Finished += delegate { r.Set (); };
@@ -97,7 +97,13 @@ public class CompareParameters {
r.WaitOne ();
cc.Comparison.PropagateCounts ();
+
+ sw.Flush ();
+
return cc;
+
+ }
+
}
}
diff --git a/webcompare/Makefile b/webcompare/Makefile
index 19c9615b..ae3d46dd 100644
--- a/webcompare/Makefile
+++ b/webcompare/Makefile
@@ -9,11 +9,14 @@ SOURCES = \
$(base)/Metadata.cs \
$(base)/Masterinfo.cs
-all: bin/Mono.API.Compare.dll
+all: bin/Mono.API.Compare.dll bin/Mono.Cecil.dll
-bin/Mono.API.Compare.dll: $(SOURCES) Makefile
+bin/Mono.API.Compare.dll: $(SOURCES) Makefile bin/Mono.Cecil.dll
-mkdir bin
- gmcs -debug -target:library -out:bin/Mono.API.Compare.dll $(SOURCES) -r:`pkg-config --variable Libraries cecil`
+ gmcs -debug -target:library -out:bin/Mono.API.Compare.dll $(SOURCES) -r:bin/Mono.Cecil.dll
+
+bin/Mono.Cecil.dll:
+ cp `pkg-config --variable Libraries cecil` bin/
get: masterinfos-3.5.tar.gz
tar xzvf masterinfos-3.5.tar.gz
diff --git a/webcompare/Web.config b/webcompare/Web.config
index 3b30485c..2fe6d9d2 100644
--- a/webcompare/Web.config
+++ b/webcompare/Web.config
@@ -36,18 +36,8 @@
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
- <!--
- The <customErrors> section enables configuration
- of what to do if/when an unhandled error occurs
- during the execution of a request. Specifically,
- it enables developers to configure html error pages
- to be displayed in place of a error stack trace.
-
- <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
- <error statusCode="403" redirect="NoAccess.htm" />
- <error statusCode="404" redirect="FileNotFound.htm" />
+ <customErrors mode="Off">
</customErrors>
- -->
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
diff --git a/webcompare/index.aspx b/webcompare/index.aspx
new file mode 100644
index 00000000..860aa49b
--- /dev/null
+++ b/webcompare/index.aspx
@@ -0,0 +1,86 @@
+<%@ Page Language="C#" %>
+<%@ Import Namespace="System.IO" %>
+<%@ Import Namespace="System.Linq" %>
+<%@ Import Namespace="System.Text" %>
+<%@ Import Namespace="System.Web" %>
+<%@ Import Namespace="System.Collections.Generic" %>
+<%@ Import Namespace="System.Collections.Specialized" %>
+<%@ Import Namespace="GuiCompare" %>
+<html>
+<head>
+<style type="text/css">
+#col1 {
+ width: 30%;
+ float: left;
+ margin-right: 4%;
+ border-right:1px dotted #AAAAAA;
+}
+
+#col2 {
+ width: 30%;
+ float: left;
+ margin-right: 4%;
+ border-right:1px dotted #AAAAAA;
+}
+
+#col3 {
+ width: 30%;
+ float: left;
+}
+</style>
+<script runat="server">
+
+void GenerateList (string reference, string profile)
+{
+ string mpath = Server.MapPath ("masterinfos/" + reference);
+ string bpath = Server.MapPath ("binary/" + profile);
+
+ if (!Directory.Exists (mpath)){
+ Response.Write ("Directory does not exist for masterinfo: " + reference);
+ return;
+ }
+
+ if (!Directory.Exists (bpath)){
+ Response.Write ("Directory does not exist for binary: " + profile);
+ return;
+ }
+
+ var infos = from p in Directory.GetFiles (mpath)
+ select System.IO.Path.GetFileNameWithoutExtension (p);
+
+ var dlls = from p in Directory.GetFiles (bpath)
+ select System.IO.Path.GetFileNameWithoutExtension (p);
+
+ foreach (var assembly in (from p in infos.Intersect (dlls) orderby p select p))
+ Response.Write (String.Format ("<li><a href=\"status.aspx?reference={0}&profile={1}&assembly={2}\">{2}</a>\n", reference, profile, assembly));
+}
+
+</script>
+</head>
+<body>
+
+<div id="col1">
+<h1>Mono 3.5 vs .NET 3.5</h1>
+
+ <ul>
+ <% GenerateList ("3.5", "2.0"); %>
+ </ul>
+</div>
+
+<div id="col2">
+<h1>Mono 3.5 vs .NET 2.0</h1>
+
+ <ul>
+ <% GenerateList ("2.0", "2.0"); %>
+ </ul>
+</div>
+
+<div id="col3">
+<h1>Mono 1.1 vs .NET 1.1</h1>
+
+ <ul>
+ <% GenerateList ("1.1", "1.0"); %>
+ </ul>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/webcompare/status.aspx b/webcompare/status.aspx
index aa030b93..29911d2c 100644
--- a/webcompare/status.aspx
+++ b/webcompare/status.aspx
@@ -221,8 +221,11 @@ static string MemberStatus (ComparisonNode cn)
ComparisonNode ComparisonNodeFromTreeNode (TreeNode tn)
{
if (tn.Parent == null){
+ // This is needed because the tree loads chunks without calling Page_Load
+ var cp = new global_asax.CompareParameters (Page.Request.QueryString);
+ compare_context = GetCompareContext (cp);
+
return compare_context.Comparison;
- return null;
}
var match = ComparisonNodeFromTreeNode (tn.Parent);