Browse Source

Fixed SD2-1023: SharpDevelop.exe.config bindingRedirect contains question marks

Update to new NSvn version (can now use Subversion 1.4 working copies)
Update StringResources.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1719 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 19 years ago
parent
commit
a3fb4dd463
  1. BIN
      data/resources/StringResources.cz.resources
  2. BIN
      data/resources/StringResources.de.resources
  3. BIN
      data/resources/StringResources.es-mx.resources
  4. BIN
      data/resources/StringResources.es.resources
  5. BIN
      data/resources/StringResources.fr.resources
  6. BIN
      data/resources/StringResources.hu.resources
  7. BIN
      data/resources/StringResources.it.resources
  8. BIN
      data/resources/StringResources.kr.resources
  9. BIN
      data/resources/StringResources.nl.resources
  10. BIN
      data/resources/StringResources.no.resources
  11. BIN
      data/resources/StringResources.pl.resources
  12. BIN
      data/resources/StringResources.pt-br.resources
  13. BIN
      data/resources/StringResources.ro.resources
  14. BIN
      data/resources/StringResources.se.resources
  15. BIN
      data/resources/StringResources.tr.resources
  16. 96
      doc/technotes/Versioning.html
  17. 11
      src/AddIns/Misc/SubversionAddIn/Project/Src/Commands/AutostartCommands.cs
  18. 4
      src/AddIns/Misc/SubversionAddIn/Project/Src/Commands/ProjectBrowserCommands.cs
  19. 2
      src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/DiffPanel.cs
  20. 22
      src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/HistoryViewDisplayBinding.cs
  21. 2
      src/AddIns/Misc/SubversionAddIn/Project/Src/SubversionStateCondition.cs
  22. 8
      src/AddIns/Misc/SubversionAddIn/Project/SubversionAddIn.csproj
  23. BIN
      src/Main/StartUp/Project/Resources/StringResources.resources
  24. 9
      src/Tools/SVNChangeLogToXml/SVNChangelogToXml.csproj
  25. 2
      src/Tools/SVNChangeLogToXml/SVNChangelogToXml.sln
  26. 17
      src/Tools/UpdateAssemblyInfo/Main.cs

BIN
data/resources/StringResources.cz.resources

Binary file not shown.

BIN
data/resources/StringResources.de.resources

Binary file not shown.

BIN
data/resources/StringResources.es-mx.resources

Binary file not shown.

BIN
data/resources/StringResources.es.resources

Binary file not shown.

BIN
data/resources/StringResources.fr.resources

Binary file not shown.

BIN
data/resources/StringResources.hu.resources

Binary file not shown.

BIN
data/resources/StringResources.it.resources

Binary file not shown.

BIN
data/resources/StringResources.kr.resources

Binary file not shown.

BIN
data/resources/StringResources.nl.resources

Binary file not shown.

BIN
data/resources/StringResources.no.resources

Binary file not shown.

BIN
data/resources/StringResources.pl.resources

Binary file not shown.

BIN
data/resources/StringResources.pt-br.resources

Binary file not shown.

BIN
data/resources/StringResources.ro.resources

Binary file not shown.

BIN
data/resources/StringResources.se.resources

Binary file not shown.

BIN
data/resources/StringResources.tr.resources

Binary file not shown.

96
doc/technotes/Versioning.html

@ -6,73 +6,24 @@ @@ -6,73 +6,24 @@
<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.0 (Win32)">
<META NAME="AUTHOR" CONTENT="Daniel Grunwald">
<META NAME="CREATED" CONTENT="20051129;18411803">
<META NAME="CHANGED" CONTENT="20051129;18415575">
</HEAD>
<BODY LANG="en-US" DIR="LTR">
<H1>Assembly Versioning in SharpDevelop</H1>
<H2>How the versions are set</H2>
<P>The assemblyInfo.cs files are updated by the tool
&quot;UpdateAssemblyInfo&quot;. &quot;UpdateAssemblyInfo Startup&quot;
runs as pre-compile target and always set's SharpDevelop.exe's
revision to the subversion revision number. That number is displayed
in the splash screen, error dialog and about dialog.
</P>
<P>The libraries (Core, SharpDevelop, TextEditor, NRefactoring,
Addins) however are a little different. Their assemblyinfos are not
&quot;templated&quot; like the one in Startup, but directly included
in the repository. However, we don't want to re-commit them on every
commit. Therefore, the versioning is different.
</P>
<P>&quot;ReleaseBuild.bat&quot; updates their AssemblyInfo, too; but
the normal &quot;build.bat&quot; doesn't. In the repository, they are
always included with the version number &quot;2.0.0.1&quot;. When
doing a releasebuild, this version is replaced by the major version
from Startup + the subversion revision number. (That means if you
want to change from &quot;2.0.0.x&quot; to &quot;2.0.1.x&quot;, you
only have to change Startup\AssemblyInfo.<B>template</B>)
</P>
<P>If you now want to commit local repository changes, you have to
revert the assembly infos back to &quot;2.0.0.1&quot; first. This is
done by the file &quot;resetAssemblyInfo.bat&quot;.
</P>
<P STYLE="margin-bottom: 0cm">So in conclusion, the assemblies are
versioned like this:
</P>
<TABLE CELLPADDING=2 CELLSPACING=2>
<TR>
<TH>
<P>&nbsp;</P>
</TH>
<TH>
<P>Debug</P>
</TH>
<TH>
<P>Release</P>
</TH>
</TR>
<TR>
<TH>
<P>SharpDevelop.exe</P>
</TH>
<TD>
<P>2.x.y.r</P>
</TD>
<TD>
<P>2.x.y.r</P>
</TD>
</TR>
<TR>
<TH>
<P>Libraries</P>
</TH>
<TD>
<P>2.x.0.1</P>
</TD>
<TD>
<P>2.x.y.r</P>
</TD>
</TR>
</TABLE>
&quot;UpdateAssemblyInfo&quot;. UpdateAssemblyInfo
runs as pre-compile target and always sets the number in GlobalAssemblyInfo.cs
to the subversion revision number. That number is displayed
in the splash screen, error dialog and about dialog.
It is also used as assembly version.
</P>
<p>
The revision number is retrieved by running a function in NSvn.Core.dll equivalent to "svn info"
in the "src" folder.
When this doesn't work (e.g. in an exported tree like the source code download on the build server), the
content of the file src/REVISION is used as revision number.
When even this fails, the revision '9999' is used.
</p>
<H2>Publisher Policy</H2>
<P>While the assembly versioning schema is not so important inside
SharpDevelop, it is important for 3rd party addins because the main
@ -81,17 +32,24 @@ assembly compiled against a strong-named assembly can only be used @@ -81,17 +32,24 @@ assembly compiled against a strong-named assembly can only be used
with exactly the version of the library it was compiled with.
</P>
<P>This means if a 3rd-party addin was compiled against version
2.0.1.a, it cannot bind to version 2.0.1.b or 2.0.2.c; even if it
2.1.0.a, it cannot bind to version 2.0.0.b or 2.0.1.c; even if it
would run without problems. Therefore, SharpDevelop.exe.config
contains binding redirects for the strong-named libraries that addins
would want to reference.
</P>
<P>The binding redirects always redirect from version 2.x.0.1 to the
current version. That means 3rd-party addins must be compiled against
a debug version of SharpDevelop (after executing
&quot;resetAssemblyInfo.bat&quot;) and they will bind to every
SharpDevelop version (and if the classes used by the addin stayed
binary compatible, it will even run with every SharpDevelop version).
<P>The binding redirects always redirect requests of a version in the range
from some past version containing large breaking changes to the current version.
We will not do such changes anymore after the first release candidate of a SharpDevelop version,
so after the release of SharpDevelop x.y RC1, all future SharpDevelop x.y.*.* versions will be
in large parts binary compatible.
<br>
For example, SharpDevevelop 2.1.0.1708 uses this redirection:</P>
<pre>&lt;bindingRedirect oldVersion="2.1.0.1661-2.1.0.1708" newVersion="2.1.0.1708"/&gt;</pre>
<P>
That means if you want to release a 3rd-party AddIn (AddIn that is not shipped with SharpDevelop),
compile it against the oldest SharpDevelop version you want your AddIn to run with.<br>
An AddIn compiled against 2.1.0.1800 will run with 2.1.0.1801 (and hopefully even with 2.1.23.45678),
but an AddIn compiled against 2.1.0.1801 will fail to load in SharpDevelop 2.1.0.1800.
</P>
</BODY>
</HTML>

11
src/AddIns/Misc/SubversionAddIn/Project/Src/Commands/AutostartCommands.cs

@ -11,6 +11,7 @@ using System.Windows.Forms; @@ -11,6 +11,7 @@ using System.Windows.Forms;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Project;
using NSvn.Common;
using NSvn.Core;
namespace ICSharpCode.Svn.Commands
@ -60,7 +61,7 @@ namespace ICSharpCode.Svn.Commands @@ -60,7 +61,7 @@ namespace ICSharpCode.Svn.Commands
try {
if (AddInOptions.AutomaticallyAddFiles) {
if (!CanBeVersionControlled(e.FileName)) return;
SvnClient.Instance.Client.Add(Path.GetFullPath(e.FileName), false);
SvnClient.Instance.Client.Add(Path.GetFullPath(e.FileName), Recurse.None);
}
} catch (Exception ex) {
MessageService.ShowError("File added exception: " + ex);
@ -102,7 +103,7 @@ namespace ICSharpCode.Svn.Commands @@ -102,7 +103,7 @@ namespace ICSharpCode.Svn.Commands
case StatusKind.Replaced:
if (MessageService.AskQuestion("The file has local modifications. Do you really want to remove it?")) {
// modified files cannot be deleted, so we need to revert the changes first
SvnClient.Instance.Client.Revert(new string[] { fullName }, e.IsDirectory);
SvnClient.Instance.Client.Revert(new string[] { fullName }, e.IsDirectory ? Recurse.Full : Recurse.None);
} else {
e.Cancel = true;
return;
@ -115,7 +116,7 @@ namespace ICSharpCode.Svn.Commands @@ -115,7 +116,7 @@ namespace ICSharpCode.Svn.Commands
return;
}
}
SvnClient.Instance.Client.Revert(new string[] { fullName }, e.IsDirectory);
SvnClient.Instance.Client.Revert(new string[] { fullName }, e.IsDirectory ? Recurse.Full : Recurse.None);
return;
default:
MessageService.ShowError("The file/directory cannot be removed because it is in subversion status '" + status.TextStatus + "'.");
@ -152,7 +153,7 @@ namespace ICSharpCode.Svn.Commands @@ -152,7 +153,7 @@ namespace ICSharpCode.Svn.Commands
} else if (e.IsDirectory) {
goto default;
} else {
SvnClient.Instance.Client.Revert(new string[] { fullSource }, false);
SvnClient.Instance.Client.Revert(new string[] { fullSource }, Recurse.None);
FileService.FileRenamed += new AutoAddAfterRenameHelper(e).Renamed;
}
return;
@ -186,7 +187,7 @@ namespace ICSharpCode.Svn.Commands @@ -186,7 +187,7 @@ namespace ICSharpCode.Svn.Commands
return;
if (args.SourceFile != e.SourceFile || args.TargetFile != e.TargetFile)
return;
SvnClient.Instance.Client.Add(e.TargetFile, false);
SvnClient.Instance.Client.Add(e.TargetFile, Recurse.None);
}
}
}

4
src/AddIns/Misc/SubversionAddIn/Project/Src/Commands/ProjectBrowserCommands.cs

@ -135,7 +135,7 @@ namespace ICSharpCode.Svn.Commands @@ -135,7 +135,7 @@ namespace ICSharpCode.Svn.Commands
{
protected override void Run(string filename)
{
PropertyDictionary pd = SvnClient.Instance.Client.PropGet("svn:ignore", Path.GetDirectoryName(filename), Revision.Working, false);
PropertyDictionary pd = SvnClient.Instance.Client.PropGet("svn:ignore", Path.GetDirectoryName(filename), Revision.Working, Recurse.None);
if (pd != null) {
string shortFileName = Path.GetFileName(filename);
foreach (Property p in pd.Values) {
@ -149,7 +149,7 @@ namespace ICSharpCode.Svn.Commands @@ -149,7 +149,7 @@ namespace ICSharpCode.Svn.Commands
}
}
SvnClient.Instance.Client.PropSet(new Property(p.Name, b.ToString()),
Path.GetDirectoryName(filename), false);
Path.GetDirectoryName(filename), Recurse.None);
}
MessageService.ShowMessage(shortFileName + " was removed from the ignore list.");
Callback();

2
src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/DiffPanel.cs

@ -70,7 +70,7 @@ namespace ICSharpCode.Svn @@ -70,7 +70,7 @@ namespace ICSharpCode.Svn
fromRevision,
fileName,
toRevision,
false,
Recurse.None,
false,
true,
outStream,

22
src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/HistoryViewDisplayBinding/HistoryViewDisplayBinding.cs

@ -29,9 +29,10 @@ namespace ICSharpCode.Svn @@ -29,9 +29,10 @@ namespace ICSharpCode.Svn
return new ICSharpCode.SharpDevelop.Gui.ISecondaryViewContent[] { new HistoryView(viewContent) };
}
private class SvnHelper {
private static class SvnHelper {
// load NSvn.Core only when a directory actually contains the ".svn" folder
static Client client;
static bool firstSvnClientException = true;
internal static bool IsVersionControlled(string fileName)
{
@ -39,8 +40,17 @@ namespace ICSharpCode.Svn @@ -39,8 +40,17 @@ namespace ICSharpCode.Svn
LoggingService.Info("SVN: HistoryViewDisplayBinding initializes client");
client = new Client();
}
Status status = client.SingleStatus(Path.GetFullPath(fileName));
return status != null && status.Entry != null;
try {
Status status = client.SingleStatus(Path.GetFullPath(fileName));
return status != null && status.Entry != null;
} catch (SvnClientException ex) {
if (firstSvnClientException) {
firstSvnClientException = false;
MessageService.ShowWarning("An error occurred while getting the Subversion status: " + ex.Message);
} else {
LoggingService.Warn("Svn: IsVersionControlled Exception", ex);
}
}
}
}
@ -49,8 +59,10 @@ namespace ICSharpCode.Svn @@ -49,8 +59,10 @@ namespace ICSharpCode.Svn
if (content.IsUntitled || content.FileName == null || !File.Exists(content.FileName)) {
return false;
}
string svnDir = Path.Combine(Path.GetDirectoryName(content.FileName), ".svn");
if (!Directory.Exists(svnDir))
string baseDir = Path.GetDirectoryName(content.FileName);
string svnDir1 = Path.Combine(baseDir, ".svn");
string svnDir2 = Path.Combine(baseDir, "_svn");
if (!Directory.Exists(svnDir1) && !Directory.Exists(svnDir2))
return false;
return SvnHelper.IsVersionControlled(content.FileName);
}

2
src/AddIns/Misc/SubversionAddIn/Project/Src/SubversionStateCondition.cs

@ -95,7 +95,7 @@ namespace ICSharpCode.Svn @@ -95,7 +95,7 @@ namespace ICSharpCode.Svn
} else {
status = SvnClient.Instance.Client.SingleStatus(fileName).TextStatus.ToString();
if (status == "Unversioned") {
PropertyDictionary pd = SvnClient.Instance.Client.PropGet("svn:ignore", Path.GetDirectoryName(fileName), Revision.Working, false);
PropertyDictionary pd = SvnClient.Instance.Client.PropGet("svn:ignore", Path.GetDirectoryName(fileName), Revision.Working, Recurse.None);
if (pd != null) {
string shortFileName = Path.GetFileName(fileName);
foreach (Property p in pd.Values) {

8
src/AddIns/Misc/SubversionAddIn/Project/SubversionAddIn.csproj

@ -128,15 +128,15 @@ @@ -128,15 +128,15 @@
<Link>LibAprUtil.Dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\RequiredLibraries\LibDB42.dll">
<Link>LibDB42.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<ProjectReference Include="..\..\..\..\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj">
<Project>{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}</Project>
<Name>ICSharpCode.SharpDevelop.Dom</Name>
<Private>False</Private>
</ProjectReference>
<Content Include="..\RequiredLibraries\LibDB44.dll">
<Link>LibDB44.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
</Project>

BIN
src/Main/StartUp/Project/Resources/StringResources.resources

Binary file not shown.

9
src/Tools/SVNChangeLogToXml/SVNChangelogToXml.csproj

@ -66,17 +66,16 @@ @@ -66,17 +66,16 @@
<Link>LibAprUtil.Dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="..\..\AddIns\Misc\SubversionAddIn\RequiredLibraries\LibDB42.dll">
<Link>LibDB42.dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="..\..\AddIns\Misc\SubversionAddIn\RequiredLibraries\msvcp70.dll">
<Link>msvcp70.dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="..\..\AddIns\Misc\SubversionAddIn\RequiredLibraries\LibDB44.dll">
<Link>LibDB44.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\AddIns\Misc\SubversionAddIn\RequiredLibraries\msvcr70.dll">
<Link>msvcr70.dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />

2
src/Tools/SVNChangeLogToXml/SVNChangelogToXml.sln

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# SharpDevelop 2.0.0.1166
# SharpDevelop 2.1.0.1673
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SVNChangelogToXml", "SVNChangelogToXml.csproj", "{c6159c5e-f6ef-4a63-b152-0e49159b6059}"
EndProject
Global

17
src/Tools/UpdateAssemblyInfo/Main.cs

@ -68,8 +68,6 @@ namespace UpdateAssemblyInfo @@ -68,8 +68,6 @@ namespace UpdateAssemblyInfo
}
}
static Regex BindingRedirect = new Regex(@"<bindingRedirect oldVersion=""2.0.0.1"" newVersion=""[\d\.]+""/>");
static void UpdateRedirectionConfig(string fullVersionNumber)
{
string content;
@ -101,12 +99,23 @@ namespace UpdateAssemblyInfo @@ -101,12 +99,23 @@ namespace UpdateAssemblyInfo
using (StreamReader r = new StreamReader(templateFile)) {
string line;
while ((line = r.ReadLine()) != null) {
const string search = "string Version = \"";
string search = "string Major = \"";
int pos = line.IndexOf(search);
if (pos >= 0) {
int e = line.IndexOf('"', pos + search.Length + 1);
version = line.Substring(pos + search.Length, e - pos - search.Length);
break;
}
search = "string Minor = \"";
pos = line.IndexOf(search);
if (pos >= 0) {
int e = line.IndexOf('"', pos + search.Length + 1);
version = version + "." + line.Substring(pos + search.Length, e - pos - search.Length);
}
search = "string Build = \"";
pos = line.IndexOf(search);
if (pos >= 0) {
int e = line.IndexOf('"', pos + search.Length + 1);
version = version + "." + line.Substring(pos + search.Length, e - pos - search.Length);
}
}
}

Loading…
Cancel
Save