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:
authorTherzok <teromario@yahoo.com>2013-07-26 18:39:07 +0400
committerTherzok <teromario@yahoo.com>2013-07-26 18:39:59 +0400
commit269ab9dfb84c3f19fb8518c3174b8deb8a522c44 (patch)
treea6f318e57f885b310ad42f1364df883a7fba1870 /main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion
parent7b5965e5a21ba1f1ed7c296d53cfa251928e6951 (diff)
Fixed up Svn Blame throwing when modifying last lines.
Diffstat (limited to 'main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion')
-rw-r--r--main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/SubversionRepository.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/SubversionRepository.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/SubversionRepository.cs
index d24705e6e1..28c8f520f9 100644
--- a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/SubversionRepository.cs
+++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/SubversionRepository.cs
@@ -549,15 +549,18 @@ namespace MonoDevelop.VersionControl.Subversion
public override Annotation[] GetAnnotations (FilePath localPath)
{
List<Annotation> annotations = new List<Annotation> (Svn.GetAnnotations (this, localPath, SvnRevision.First, SvnRevision.Base));
- Annotation nextRev = new Annotation (GettextCatalog.GetString ("working copy"), "", DateTime.MinValue);
+ Annotation nextRev = new Annotation (GettextCatalog.GetString ("working copy"), "<uncommitted>", DateTime.MinValue);
var baseDocument = new Mono.TextEditor.TextDocument (GetBaseText (localPath));
var workingDocument = new Mono.TextEditor.TextDocument (File.ReadAllText (localPath));
// "SubversionException: blame of the WORKING revision is not supported"
foreach (var hunk in baseDocument.Diff (workingDocument)) {
- annotations.RemoveRange (hunk.RemoveStart, hunk.Removed);
+ annotations.RemoveRange (hunk.RemoveStart - 1, hunk.Removed);
for (int i = 0; i < hunk.Inserted; ++i) {
- annotations.Insert (hunk.InsertStart - 1, nextRev);
+ if (hunk.InsertStart + i >= annotations.Count)
+ annotations.Add (nextRev);
+ else
+ annotations.Insert (hunk.InsertStart - 1, nextRev);
}
}