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 20 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. 94
      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.

94
doc/technotes/Versioning.html

@ -6,73 +6,24 @@
<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.0 (Win32)"> <META NAME="GENERATOR" CONTENT="OpenOffice.org 2.0 (Win32)">
<META NAME="AUTHOR" CONTENT="Daniel Grunwald"> <META NAME="AUTHOR" CONTENT="Daniel Grunwald">
<META NAME="CREATED" CONTENT="20051129;18411803"> <META NAME="CREATED" CONTENT="20051129;18411803">
<META NAME="CHANGED" CONTENT="20051129;18415575">
</HEAD> </HEAD>
<BODY LANG="en-US" DIR="LTR"> <BODY LANG="en-US" DIR="LTR">
<H1>Assembly Versioning in SharpDevelop</H1> <H1>Assembly Versioning in SharpDevelop</H1>
<H2>How the versions are set</H2> <H2>How the versions are set</H2>
<P>The assemblyInfo.cs files are updated by the tool <P>The assemblyInfo.cs files are updated by the tool
&quot;UpdateAssemblyInfo&quot;. &quot;UpdateAssemblyInfo Startup&quot; &quot;UpdateAssemblyInfo&quot;. UpdateAssemblyInfo
runs as pre-compile target and always set's SharpDevelop.exe's runs as pre-compile target and always sets the number in GlobalAssemblyInfo.cs
revision to the subversion revision number. That number is displayed to the subversion revision number. That number is displayed
in the splash screen, error dialog and about dialog. in the splash screen, error dialog and about dialog.
</P> It is also used as assembly version.
<P>The libraries (Core, SharpDevelop, TextEditor, NRefactoring, </P>
Addins) however are a little different. Their assemblyinfos are not <p>
&quot;templated&quot; like the one in Startup, but directly included The revision number is retrieved by running a function in NSvn.Core.dll equivalent to "svn info"
in the repository. However, we don't want to re-commit them on every in the "src" folder.
commit. Therefore, the versioning is different. When this doesn't work (e.g. in an exported tree like the source code download on the build server), the
</P> content of the file src/REVISION is used as revision number.
<P>&quot;ReleaseBuild.bat&quot; updates their AssemblyInfo, too; but When even this fails, the revision '9999' is used.
the normal &quot;build.bat&quot; doesn't. In the repository, they are </p>
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>
<H2>Publisher Policy</H2> <H2>Publisher Policy</H2>
<P>While the assembly versioning schema is not so important inside <P>While the assembly versioning schema is not so important inside
SharpDevelop, it is important for 3rd party addins because the main 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
with exactly the version of the library it was compiled with. with exactly the version of the library it was compiled with.
</P> </P>
<P>This means if a 3rd-party addin was compiled against version <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 would run without problems. Therefore, SharpDevelop.exe.config
contains binding redirects for the strong-named libraries that addins contains binding redirects for the strong-named libraries that addins
would want to reference. would want to reference.
</P> </P>
<P>The binding redirects always redirect from version 2.x.0.1 to the <P>The binding redirects always redirect requests of a version in the range
current version. That means 3rd-party addins must be compiled against from some past version containing large breaking changes to the current version.
a debug version of SharpDevelop (after executing We will not do such changes anymore after the first release candidate of a SharpDevelop version,
&quot;resetAssemblyInfo.bat&quot;) and they will bind to every so after the release of SharpDevelop x.y RC1, all future SharpDevelop x.y.*.* versions will be
SharpDevelop version (and if the classes used by the addin stayed in large parts binary compatible.
binary compatible, it will even run with every SharpDevelop version). <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> </P>
</BODY> </BODY>
</HTML> </HTML>

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

@ -11,6 +11,7 @@ using System.Windows.Forms;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Project; using ICSharpCode.SharpDevelop.Project;
using NSvn.Common;
using NSvn.Core; using NSvn.Core;
namespace ICSharpCode.Svn.Commands namespace ICSharpCode.Svn.Commands
@ -60,7 +61,7 @@ namespace ICSharpCode.Svn.Commands
try { try {
if (AddInOptions.AutomaticallyAddFiles) { if (AddInOptions.AutomaticallyAddFiles) {
if (!CanBeVersionControlled(e.FileName)) return; 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) { } catch (Exception ex) {
MessageService.ShowError("File added exception: " + ex); MessageService.ShowError("File added exception: " + ex);
@ -102,7 +103,7 @@ namespace ICSharpCode.Svn.Commands
case StatusKind.Replaced: case StatusKind.Replaced:
if (MessageService.AskQuestion("The file has local modifications. Do you really want to remove it?")) { 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 // 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 { } else {
e.Cancel = true; e.Cancel = true;
return; return;
@ -115,7 +116,7 @@ namespace ICSharpCode.Svn.Commands
return; return;
} }
} }
SvnClient.Instance.Client.Revert(new string[] { fullName }, e.IsDirectory); SvnClient.Instance.Client.Revert(new string[] { fullName }, e.IsDirectory ? Recurse.Full : Recurse.None);
return; return;
default: default:
MessageService.ShowError("The file/directory cannot be removed because it is in subversion status '" + status.TextStatus + "'."); MessageService.ShowError("The file/directory cannot be removed because it is in subversion status '" + status.TextStatus + "'.");
@ -152,7 +153,7 @@ namespace ICSharpCode.Svn.Commands
} else if (e.IsDirectory) { } else if (e.IsDirectory) {
goto default; goto default;
} else { } else {
SvnClient.Instance.Client.Revert(new string[] { fullSource }, false); SvnClient.Instance.Client.Revert(new string[] { fullSource }, Recurse.None);
FileService.FileRenamed += new AutoAddAfterRenameHelper(e).Renamed; FileService.FileRenamed += new AutoAddAfterRenameHelper(e).Renamed;
} }
return; return;
@ -186,7 +187,7 @@ namespace ICSharpCode.Svn.Commands
return; return;
if (args.SourceFile != e.SourceFile || args.TargetFile != e.TargetFile) if (args.SourceFile != e.SourceFile || args.TargetFile != e.TargetFile)
return; 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
{ {
protected override void Run(string filename) 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) { if (pd != null) {
string shortFileName = Path.GetFileName(filename); string shortFileName = Path.GetFileName(filename);
foreach (Property p in pd.Values) { foreach (Property p in pd.Values) {
@ -149,7 +149,7 @@ namespace ICSharpCode.Svn.Commands
} }
} }
SvnClient.Instance.Client.PropSet(new Property(p.Name, b.ToString()), 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."); MessageService.ShowMessage(shortFileName + " was removed from the ignore list.");
Callback(); Callback();

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

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

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

@ -29,9 +29,10 @@ namespace ICSharpCode.Svn
return new ICSharpCode.SharpDevelop.Gui.ISecondaryViewContent[] { new HistoryView(viewContent) }; 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 // load NSvn.Core only when a directory actually contains the ".svn" folder
static Client client; static Client client;
static bool firstSvnClientException = true;
internal static bool IsVersionControlled(string fileName) internal static bool IsVersionControlled(string fileName)
{ {
@ -39,8 +40,17 @@ namespace ICSharpCode.Svn
LoggingService.Info("SVN: HistoryViewDisplayBinding initializes client"); LoggingService.Info("SVN: HistoryViewDisplayBinding initializes client");
client = new Client(); client = new Client();
} }
Status status = client.SingleStatus(Path.GetFullPath(fileName)); try {
return status != null && status.Entry != null; 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
if (content.IsUntitled || content.FileName == null || !File.Exists(content.FileName)) { if (content.IsUntitled || content.FileName == null || !File.Exists(content.FileName)) {
return false; return false;
} }
string svnDir = Path.Combine(Path.GetDirectoryName(content.FileName), ".svn"); string baseDir = Path.GetDirectoryName(content.FileName);
if (!Directory.Exists(svnDir)) string svnDir1 = Path.Combine(baseDir, ".svn");
string svnDir2 = Path.Combine(baseDir, "_svn");
if (!Directory.Exists(svnDir1) && !Directory.Exists(svnDir2))
return false; return false;
return SvnHelper.IsVersionControlled(content.FileName); return SvnHelper.IsVersionControlled(content.FileName);
} }

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

@ -95,7 +95,7 @@ namespace ICSharpCode.Svn
} else { } else {
status = SvnClient.Instance.Client.SingleStatus(fileName).TextStatus.ToString(); status = SvnClient.Instance.Client.SingleStatus(fileName).TextStatus.ToString();
if (status == "Unversioned") { 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) { if (pd != null) {
string shortFileName = Path.GetFileName(fileName); string shortFileName = Path.GetFileName(fileName);
foreach (Property p in pd.Values) { foreach (Property p in pd.Values) {

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

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

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

Binary file not shown.

9
src/Tools/SVNChangeLogToXml/SVNChangelogToXml.csproj

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

2
src/Tools/SVNChangeLogToXml/SVNChangelogToXml.sln

@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 9.00 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}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SVNChangelogToXml", "SVNChangelogToXml.csproj", "{c6159c5e-f6ef-4a63-b152-0e49159b6059}"
EndProject EndProject
Global Global

17
src/Tools/UpdateAssemblyInfo/Main.cs

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