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

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez Gual <lluis@novell.com>2011-04-08 19:58:47 +0400
committerLluis Sanchez Gual <lluis@novell.com>2011-04-08 19:58:47 +0400
commit02ca133cbd204472b6414c77b848896d0367e06b (patch)
treedd011e751025b367770c53910e1985b70db24004 /main/src/addins/ChangeLogAddIn
parent36770575f334441adcb0e84102fa4831100d3a28 (diff)
Fix 686051 - Create patch command on on project fails.
Diffstat (limited to 'main/src/addins/ChangeLogAddIn')
-rw-r--r--main/src/addins/ChangeLogAddIn/ChangeLogService.cs10
-rw-r--r--main/src/addins/ChangeLogAddIn/CommitDialogExtensionWidget.cs2
2 files changed, 6 insertions, 6 deletions
diff --git a/main/src/addins/ChangeLogAddIn/ChangeLogService.cs b/main/src/addins/ChangeLogAddIn/ChangeLogService.cs
index e3de21e86a..988601fc1a 100644
--- a/main/src/addins/ChangeLogAddIn/ChangeLogService.cs
+++ b/main/src/addins/ChangeLogAddIn/ChangeLogService.cs
@@ -38,7 +38,7 @@ namespace MonoDevelop.ChangeLogAddIn
// Returns the path of the ChangeLog where changes of the provided file have to be logged.
// Returns null if no ChangeLog could be found.
// Returns an empty string if changes don't have to be logged.
- public static string GetChangeLogForFile (string baseCommitPath, string file, out SolutionItem parentEntry, out ChangeLogPolicy policy)
+ public static string GetChangeLogForFile (string baseCommitPath, FilePath file, out SolutionItem parentEntry, out ChangeLogPolicy policy)
{
parentEntry = null;
policy = null;
@@ -48,16 +48,16 @@ namespace MonoDevelop.ChangeLogAddIn
// Find the project that contains the file. If none is found
// find a combine entry at the file location
string bestPath = null;
- file = FileService.GetFullPath (file);
+ file = file.CanonicalPath;
foreach (SolutionItem e in IdeApp.Workspace.GetAllSolutionItems ()) {
if (e is Project && ((Project)e).Files.GetFile (file) != null) {
parentEntry = e;
break;
}
- string epath = FileService.GetFullPath (e.BaseDirectory) + Path.DirectorySeparatorChar;
- if (file.StartsWith (epath) && (bestPath == null || bestPath.Length < epath.Length)) {
- bestPath = epath;
+ FilePath epath = e.BaseDirectory.CanonicalPath;
+ if ((file == epath || file.IsChildPathOf (epath)) && (bestPath == null || bestPath.Length < epath.ToString().Length)) {
+ bestPath = epath.ToString();
parentEntry = e;
}
}
diff --git a/main/src/addins/ChangeLogAddIn/CommitDialogExtensionWidget.cs b/main/src/addins/ChangeLogAddIn/CommitDialogExtensionWidget.cs
index 35e766d326..295d992861 100644
--- a/main/src/addins/ChangeLogAddIn/CommitDialogExtensionWidget.cs
+++ b/main/src/addins/ChangeLogAddIn/CommitDialogExtensionWidget.cs
@@ -253,7 +253,7 @@ namespace MonoDevelop.ChangeLogAddIn
ChangeLogEntry entry;
if (!entries.TryGetValue (logf, out entry)) {
entry = new ChangeLogEntry ();
- entry.AuthorInformation = parentItem.AuthorInformation;
+ entry.AuthorInformation = parentItem != null ? parentItem.AuthorInformation : AuthorInformation.Default;
entry.MessageStyle = ChangeLogService.GetMessageStyle (parentItem);
entry.CantGenerate = cantGenerate;
entry.File = logf;