diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2011-10-26 15:57:32 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2011-10-26 15:57:32 +0400 |
commit | 5ba64e4f967e49c0ddc96179fe919a0837463e27 (patch) | |
tree | 284278e01c75bd78f6054e39ae5bead0bc7f7cb2 /main/src/addins/VersionControl | |
parent | 6cf6e34954b32247d8970a0712e1a12cebe4b52d (diff) | |
parent | 21ad778ec4c166c9e06218ccc173a547c2c0f6ec (diff) |
Merge branch 'master' into newresolver
Conflicts:
main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/CSharpTextEditorCompletion.cs
main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/MemberCompletionData.cs
main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectInfoService.cs
Diffstat (limited to 'main/src/addins/VersionControl')
4 files changed, 22 insertions, 32 deletions
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/SvnClient.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/SvnClient.cs index 4e0cc04613..f168a3c555 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/SvnClient.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion.Unix/MonoDevelop.VersionControl.Subversion.Unix/SvnClient.cs @@ -639,7 +639,8 @@ namespace MonoDevelop.VersionControl.Subversion.Unix IntPtr result_rev = IntPtr.Zero; IntPtr localpool = newpool (pool); try { - url = NormalizePath (url, localpool); + // Using Uri here because the normalization method doesn't remove the redundant port number when using https + url = NormalizePath (new Uri(url).ToString(), localpool); string npath = NormalizePath (path, localpool); CheckError (svn.client_checkout (result_rev, url, npath, ref rev, (recurse ? 1 :0), ctx, localpool)); } finally { diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/BlameView.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/BlameView.cs index d39f273e51..656a2f2ab3 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/BlameView.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/BlameView.cs @@ -93,15 +93,10 @@ namespace MonoDevelop.VersionControl.Views { this.widget.Editor.Document.Redo (); } - - void IUndoHandler.BeginAtomicUndo () - { - this.widget.Editor.Document.BeginAtomicUndo (); - } - - void IUndoHandler.EndAtomicUndo () + + IDisposable IUndoHandler.OpenUndoGroup () { - this.widget.Editor.Document.EndAtomicUndo (); + return this.widget.Editor.OpenUndoGroup (); } bool IUndoHandler.EnableUndo { diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/DiffView.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/DiffView.cs index ca36faf2e7..067aeb2520 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/DiffView.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/DiffView.cs @@ -156,14 +156,9 @@ namespace MonoDevelop.VersionControl.Views this.ComparisonWidget.OriginalEditor.Document.Redo (); } - void IUndoHandler.BeginAtomicUndo () + IDisposable IUndoHandler.OpenUndoGroup () { - this.ComparisonWidget.OriginalEditor.Document.BeginAtomicUndo (); - } - - void IUndoHandler.EndAtomicUndo () - { - this.ComparisonWidget.OriginalEditor.Document.EndAtomicUndo (); + return this.ComparisonWidget.OriginalEditor.OpenUndoGroup (); } bool IUndoHandler.EnableUndo { diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/EditorCompareWidgetBase.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/EditorCompareWidgetBase.cs index ae438f8b8d..4a23fb10b1 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/EditorCompareWidgetBase.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/EditorCompareWidgetBase.cs @@ -658,23 +658,22 @@ namespace MonoDevelop.VersionControl.Views protected virtual void UndoChange (TextEditor fromEditor, TextEditor toEditor, Hunk hunk) { - toEditor.Document.BeginAtomicUndo (); - var start = toEditor.Document.GetLine (hunk.InsertStart); - int toOffset = start != null ? start.Offset : toEditor.Document.Length; - if (start != null && hunk.Inserted > 0) { - int line = Math.Min (hunk.InsertStart + hunk.Inserted - 1, toEditor.Document.LineCount); - var end = toEditor.Document.GetLine (line); - toEditor.Remove (start.Offset, end.EndOffset - start.Offset); - } - - if (hunk.Removed > 0) { - start = fromEditor.Document.GetLine (Math.Min (hunk.RemoveStart, fromEditor.Document.LineCount)); - int line = Math.Min (hunk.RemoveStart + hunk.Removed - 1, fromEditor.Document.LineCount); - var end = fromEditor.Document.GetLine (line); - toEditor.Insert (toOffset, start.Offset == end.EndOffset ? toEditor.EolMarker : fromEditor.Document.GetTextBetween (start.Offset, end.EndOffset)); + using (var undo = toEditor.OpenUndoGroup ()) { + var start = toEditor.Document.GetLine (hunk.InsertStart); + int toOffset = start != null ? start.Offset : toEditor.Document.Length; + if (start != null && hunk.Inserted > 0) { + int line = Math.Min (hunk.InsertStart + hunk.Inserted - 1, toEditor.Document.LineCount); + var end = toEditor.Document.GetLine (line); + toEditor.Remove (start.Offset, end.EndOffset - start.Offset); + } + + if (hunk.Removed > 0) { + start = fromEditor.Document.GetLine (Math.Min (hunk.RemoveStart, fromEditor.Document.LineCount)); + int line = Math.Min (hunk.RemoveStart + hunk.Removed - 1, fromEditor.Document.LineCount); + var end = fromEditor.Document.GetLine (line); + toEditor.Insert (toOffset, start.Offset == end.EndOffset ? toEditor.EolMarker : fromEditor.Document.GetTextBetween (start.Offset, end.EndOffset)); + } } - - toEditor.Document.EndAtomicUndo (); } class MiddleArea : DrawingArea |