Merge lp:~taktaktaktaktaktaktaktaktaktak/monodevelop-bzr/2.0 into lp:monodevelop-bzr
- 2.0
- Merge into trunk
Proposed by
Levi Bard
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~taktaktaktaktaktaktaktaktaktak/monodevelop-bzr/2.0 |
Merge into: | lp:monodevelop-bzr |
Diff against target: |
665 lines 12 files modified
BazaarCLibClient.cs (+81/-49) BazaarClient.cs (+2/-0) BazaarCommands.cs (+1/-1) BazaarRepository.cs (+36/-10) BazaarRevision.cs (+10/-2) BazaarVersionControl.cs (+11/-2) Dialogs/BranchSelectionDialog.cs (+13/-0) IBazaarClient.cs (+28/-0) gtk-gui/MonoDevelop.VersionControl.Bazaar.Dialogs.BranchSelectionDialog.cs (+32/-20) gtk-gui/MonoDevelop.VersionControl.Bazaar.Dialogs.PasswordPromptDialog.cs (+0/-1) gtk-gui/generated.cs (+0/-1) gtk-gui/gui.stetic (+18/-3) |
To merge this branch: | bzr merge lp:~taktaktaktaktaktaktaktaktaktak/monodevelop-bzr/2.0 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins (community) | Approve | ||
Monodevelop-Bazaar developers | Pending | ||
Review via email: mp+13738@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Levi Bard (taktaktaktaktaktaktaktaktaktak) wrote : | # |
Revision history for this message
Robert Collins (lifeless) wrote : | # |
Looks ok to me, FWIW
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'BazaarCLibClient.cs' |
2 | --- BazaarCLibClient.cs 2009-09-26 13:35:43 +0000 |
3 | +++ BazaarCLibClient.cs 2009-10-21 21:25:16 +0000 |
4 | @@ -18,10 +18,14 @@ |
5 | using System; |
6 | using System.IO; |
7 | using System.Text; |
8 | +using System.Threading; |
9 | using System.Collections.Generic; |
10 | using System.Runtime.InteropServices; |
11 | using System.Text.RegularExpressions; |
12 | |
13 | +using MonoDevelop.Core; |
14 | +using MonoDevelop.Core.Execution; |
15 | + |
16 | namespace MonoDevelop.VersionControl.Bazaar |
17 | { |
18 | |
19 | @@ -61,6 +65,9 @@ |
20 | [DllImport ("python2.5")] |
21 | private static extern void PyErr_Clear (); |
22 | |
23 | + [DllImport ("python2.5")] |
24 | + private static extern void PyEval_InitThreads (); |
25 | + |
26 | private static Regex unicodeRegex = new Regex (@"^\s*u'(?<realString>.*)'\s*$", RegexOptions.Compiled); |
27 | private static string StringFromPython (IntPtr pystring) |
28 | { |
29 | @@ -160,6 +167,7 @@ |
30 | |
31 | static BazaarCLibClient () |
32 | { |
33 | + PyEval_InitThreads (); |
34 | Py_Initialize (); |
35 | |
36 | pymain = PyImport_AddModule ("__main__"); |
37 | @@ -190,7 +198,8 @@ |
38 | "from bzrlib import annotate", |
39 | "from bzrlib import builtins", |
40 | "from bzrlib import commands", |
41 | - "from bzrlib import errors" |
42 | + "from bzrlib import errors", |
43 | + "from bzrlib import foreign" |
44 | }; |
45 | |
46 | foreach (string import in imports) { |
47 | @@ -336,60 +345,50 @@ |
48 | return results.ToArray (); |
49 | } |
50 | |
51 | - // TODO: Rework concurrency |
52 | + static Regex revisionRegex = new Regex (@"^(?<revision>\d+): (?<committer>.*) (?<date>\d{4}-\d{2}-\d{2}) (?<message>.*)", RegexOptions.Compiled); |
53 | public override BazaarRevision[] GetHistory (BazaarRepository repo, string localFile, BazaarRevision since) |
54 | { |
55 | localFile = Path.GetFullPath (localFile); |
56 | List<BazaarRevision> history = new List<BazaarRevision> (); |
57 | - string[] revs = null; |
58 | string basePath = BazaarRepository.GetLocalBasePath (localFile); |
59 | - string author = string.Empty, msg = string.Empty, timestamp = string.Empty; |
60 | - double seconds = 0.0; |
61 | - DateTime revTime; |
62 | - |
63 | - StringBuilder command = new StringBuilder (); |
64 | - command.AppendFormat ("histtree,relpath = workingtree.WorkingTree.open_containing('{0}')\n", localFile); |
65 | - command.AppendFormat ("id = histtree.path2id(relpath)\n"); |
66 | - command.AppendFormat ("revs = ''\n"); |
67 | - command.AppendFormat ("for rev in log.find_touching_revisions(histtree.branch, id):\n"); |
68 | - command.AppendFormat (" revs = revs + repr(rev[0])+','\n"); |
69 | - |
70 | - lock (lockme) { |
71 | - IntPtr pyrevs = run (new List<string>{"revs"}, command.ToString ())[0]; |
72 | - revs = StringFromPython (pyrevs).Split (','); |
73 | - }// lock |
74 | - |
75 | - List<IntPtr> pyauthor = null; |
76 | - foreach (string rev in revs) { |
77 | - if (string.IsNullOrEmpty (rev)){ continue; } |
78 | - |
79 | - List<RevisionPath> paths = new List<RevisionPath> (); |
80 | - foreach (LocalStatus status in Status (basePath, new BazaarRevision (repo, rev))) { |
81 | - paths.Add (new RevisionPath (status.Filename, ConvertAction (status.Status), status.Status.ToString ())); |
82 | + |
83 | + string output = null; |
84 | + |
85 | + ProcessWrapper log = null; |
86 | + try { |
87 | + log = Runtime.ProcessService.StartProcess ("bzr", |
88 | + string.Format ("log --line -r {0}.. '{1}'", since.Rev, localFile), |
89 | + // string.Format ("log {0}", localFile), |
90 | + Path.GetDirectoryName (localFile), null); |
91 | + log.WaitForExit (); |
92 | + if (0 != log.ExitCode){ return null; } |
93 | + output = log.StandardOutput.ReadToEnd (); |
94 | + } finally { |
95 | + if (null != log){ log.Dispose (); } |
96 | + } |
97 | + |
98 | + Match match = null; |
99 | + foreach (string line in output.Split (new char[]{'\r','\n'}, StringSplitOptions.RemoveEmptyEntries)) { |
100 | + match = revisionRegex.Match (line); |
101 | + if (null != match && match.Success) { |
102 | + DateTime date; |
103 | + DateTime.TryParse (match.Groups["date"].Value, out date); |
104 | + history.Add (new BazaarRevision (repo, match.Groups["revision"].Value, date, |
105 | + match.Groups["committer"].Value, match.Groups["message"].Value, |
106 | + new RevisionPath[]{})); |
107 | } |
108 | - |
109 | - lock (lockme) { |
110 | - run (null, "myrev = revisionspec.RevisionSpec.from_string('{0}').in_history(histtree.branch).get()\n", rev); |
111 | - |
112 | - try { |
113 | - pyauthor = run (new List<string>{"author", "msg", "tstamp"}, |
114 | - "author = myrev.get_apparent_authors()[0]\nmsg = myrev.get_summary()\ntstamp = repr(myrev.timestamp)\n"); |
115 | - author = StringFromPython (pyauthor[0]); |
116 | - msg = StringFromPython (pyauthor[1]); |
117 | - timestamp = StringFromPython (pyauthor[2]); |
118 | - } catch { |
119 | - msg = author = timestamp = string.Empty; |
120 | + } |
121 | + |
122 | + ThreadPool.QueueUserWorkItem (delegate { |
123 | + foreach (BazaarRevision rev in history) { |
124 | + List<RevisionPath> paths = new List<RevisionPath> (); |
125 | + foreach (LocalStatus status in Status (basePath, rev)) { |
126 | + paths.Add (new RevisionPath (status.Filename, ConvertAction (status.Status), status.Status.ToString ())); |
127 | } |
128 | - }// lock |
129 | - |
130 | - revTime = (double.TryParse (timestamp, out seconds))? new DateTime (1970, 1, 1).AddSeconds (seconds): DateTime.Now; |
131 | - history.Add (new BazaarRevision (repo, rev, revTime, |
132 | - author, msg, paths.ToArray ())); |
133 | - } |
134 | - |
135 | - lock (lockme){ run (null, "del histtree\n"); } |
136 | - |
137 | - history.Reverse (); |
138 | + rev.ChangedFiles = paths.ToArray (); |
139 | + } |
140 | + }); |
141 | + |
142 | return history.ToArray (); |
143 | }// GetHistory |
144 | |
145 | @@ -552,6 +551,22 @@ |
146 | |
147 | monitor.Log.WriteLine ("Pushed to {0}", pushLocation); |
148 | } |
149 | + |
150 | + public override void DPush (string pushLocation, string localPath, bool remember, MonoDevelop.Core.IProgressMonitor monitor) |
151 | + { |
152 | + localPath = Path.GetFullPath (localPath); |
153 | + if (null == monitor){ monitor = new MonoDevelop.Core.ProgressMonitoring.NullProgressMonitor (); } |
154 | + StringBuilder command = new StringBuilder (); |
155 | + command.AppendLine ("mycmd = foreign.cmd_dpush()"); |
156 | + command.AppendLine ("mycmd._setup_outf()"); |
157 | + command.AppendLine (string.Format ("mycmd.run('{0}',{1}, '{2}')", |
158 | + pushLocation, remember? "True": "False", |
159 | + localPath)); |
160 | + |
161 | + lock (lockme){ run (null, command.ToString ()); } |
162 | + |
163 | + monitor.Log.WriteLine ("Pushed to {0}", pushLocation); |
164 | + }// DPush |
165 | |
166 | public override void Remove (string path, bool force, MonoDevelop.Core.IProgressMonitor monitor) |
167 | { |
168 | @@ -606,7 +621,7 @@ |
169 | bool modified = false; |
170 | IntPtr tuple = IntPtr.Zero, |
171 | listlen = IntPtr.Zero; |
172 | - path = Path.GetFullPath (path); |
173 | + path = Path.GetFullPath (path).Replace ("{", "{{").Replace ("}", "}}");// escape for string.format |
174 | command.AppendFormat ("tree = workingtree.WorkingTree.open_containing(\"{0}\")[0]\n", path); |
175 | |
176 | if (null == revision || BazaarRevision.HEAD == revision.Rev || BazaarRevision.NONE == revision.Rev) { |
177 | @@ -834,5 +849,22 @@ |
178 | return !pending.Equals ("1", StringComparison.Ordinal); |
179 | } |
180 | }// IsMergePending |
181 | + |
182 | + public override bool CanRebase () |
183 | + { |
184 | + string haveRebase = null; |
185 | + StringBuilder command = new StringBuilder (); |
186 | + command.AppendLine ("haveRebase = 'false'"); |
187 | + command.AppendLine ("for name, plugin in bzrlib.plugin.plugins().items():"); |
188 | + command.AppendLine (" if(name == rebase):"); |
189 | + command.AppendLine (" haveRebase = 'true'"); |
190 | + command.AppendLine (" break"); |
191 | + |
192 | + lock (lockme) { |
193 | + haveRebase = StringFromPython (run (new List<string>(){"haveRebase"}, command.ToString ())[0]); |
194 | + } |
195 | + |
196 | + return "true".Equals (haveRebase, StringComparison.Ordinal); |
197 | + }// CanRebase |
198 | }// BazaarCLibClient |
199 | } |
200 | |
201 | === modified file 'BazaarClient.cs' |
202 | --- BazaarClient.cs 2009-09-29 09:37:26 +0000 |
203 | +++ BazaarClient.cs 2009-10-21 21:25:16 +0000 |
204 | @@ -101,6 +101,7 @@ |
205 | public abstract BazaarRevision[] GetHistory (BazaarRepository repo, string localFile, BazaarRevision since); |
206 | public abstract void Merge (string mergeLocation, string localPath, bool remember, bool overwrite, BazaarRevision start, BazaarRevision end, IProgressMonitor monitor); |
207 | public abstract void Push (string pushLocation, string localPath, bool remember, bool overwrite, IProgressMonitor monitor); |
208 | + public abstract void DPush (string pushLocation, string localPath, bool remember, MonoDevelop.Core.IProgressMonitor monitor); |
209 | public abstract void Pull (string pullLocation, string localPath, bool remember, bool overwrite, IProgressMonitor monitor); |
210 | public abstract void Commit (ChangeSet changeSet, IProgressMonitor monitor); |
211 | public abstract DiffInfo[] Diff (string basePath, string[] files); |
212 | @@ -188,6 +189,7 @@ |
213 | }// IsValidExportPath |
214 | |
215 | public abstract bool IsMergePending (string localPath); |
216 | + public abstract bool CanRebase (); |
217 | } |
218 | |
219 | public class LocalStatus { |
220 | |
221 | === modified file 'BazaarCommands.cs' |
222 | --- BazaarCommands.cs 2009-09-29 09:48:17 +0000 |
223 | +++ BazaarCommands.cs 2009-10-21 21:25:16 +0000 |
224 | @@ -419,7 +419,7 @@ |
225 | if ((int)Gtk.ResponseType.Ok == bsd.Run () && !string.IsNullOrEmpty (bsd.SelectedLocation)) { |
226 | BazaarTask worker = new BazaarTask (); |
227 | worker.Description = string.Format ("Pushing to {0}", bsd.SelectedLocation); |
228 | - worker.Operation = delegate{ repo.Push (bsd.SelectedLocation, vcitem.Path, bsd.SaveDefault, bsd.Overwrite, worker.ProgressMonitor); }; |
229 | + worker.Operation = delegate{ repo.Push (bsd.SelectedLocation, vcitem.Path, bsd.SaveDefault, bsd.Overwrite, bsd.OmitHistory, worker.ProgressMonitor); }; |
230 | worker.Start (); |
231 | } |
232 | } finally { |
233 | |
234 | === modified file 'BazaarRepository.cs' |
235 | --- BazaarRepository.cs 2009-08-18 10:25:32 +0000 |
236 | +++ BazaarRepository.cs 2009-10-21 21:25:16 +0000 |
237 | @@ -28,6 +28,7 @@ |
238 | public class BazaarRepository : UrlBasedRepository |
239 | { |
240 | private Dictionary<string,string> tempfiles; |
241 | + private Dictionary<string,VersionInfo> statusCache; |
242 | |
243 | public BazaarRepository () |
244 | { |
245 | @@ -44,7 +45,7 @@ |
246 | { |
247 | Method = BazaarVersionControl.protocols[0]; |
248 | tempfiles = new Dictionary<string,string> (); |
249 | - ThreadPool.SetMaxThreads (5, 5); |
250 | + statusCache = new Dictionary<string, VersionInfo> (); |
251 | }// Init |
252 | |
253 | /// <summary> |
254 | @@ -127,7 +128,21 @@ |
255 | |
256 | public override VersionInfo GetVersionInfo (string localPath, bool getRemoteStatus) |
257 | { |
258 | - return Bazaar.GetVersionInfo (this, Path.GetFullPath (localPath), getRemoteStatus); |
259 | + return statusCache[localPath] = Bazaar.GetVersionInfo (this, Path.GetFullPath (localPath), getRemoteStatus); |
260 | + } |
261 | + |
262 | + /// <summary> |
263 | + /// Prefer cached version info for non-essential operations (menu display) |
264 | + /// </summary> |
265 | + private VersionInfo GetCachedVersionInfo (string localPath, bool getRemoteStatus) |
266 | + { |
267 | + VersionInfo status = null; |
268 | + if (statusCache.ContainsKey (localPath)) { |
269 | + status = statusCache[localPath]; |
270 | + } else { |
271 | + status = GetVersionInfo (localPath, getRemoteStatus); |
272 | + } |
273 | + return status; |
274 | } |
275 | |
276 | /// <remarks> |
277 | @@ -135,7 +150,13 @@ |
278 | /// </remarks> |
279 | public override VersionInfo[] GetDirectoryVersionInfo (string localDirectory, bool getRemoteStatus, bool recursive) |
280 | { |
281 | - return Bazaar.GetDirectoryVersionInfo (this, Path.GetFullPath (localDirectory), getRemoteStatus, recursive); |
282 | + VersionInfo[] versions = Bazaar.GetDirectoryVersionInfo (this, Path.GetFullPath (localDirectory), getRemoteStatus, recursive); |
283 | + if (null != versions) { |
284 | + foreach (VersionInfo version in versions) { |
285 | + statusCache[version.LocalPath] = version; |
286 | + } |
287 | + } |
288 | + return versions; |
289 | } |
290 | |
291 | // Deprecated |
292 | @@ -144,13 +165,13 @@ |
293 | serverPath = string.Format ("{0}{1}{2}", Url, Url.EndsWith ("/")? string.Empty: "/", serverPath); |
294 | // System.Console.WriteLine ("Got publish {0} {1}", serverPath, localPath); |
295 | Bazaar.StoreCredentials (serverPath); |
296 | - Bazaar.Push (serverPath, localPath, false, false, monitor); |
297 | + Bazaar.Push (serverPath, Path.GetFullPath (localPath), false, false, false, monitor); |
298 | return new BazaarRepository (Bazaar, serverPath); |
299 | } |
300 | |
301 | - public virtual void Push (string pushLocation, string localPath, bool remember, bool overwrite, IProgressMonitor monitor) { |
302 | + public virtual void Push (string pushLocation, string localPath, bool remember, bool overwrite, bool omitHistory, IProgressMonitor monitor) { |
303 | Bazaar.StoreCredentials (pushLocation); |
304 | - Bazaar.Push (pushLocation, Path.GetFullPath(localPath), remember, overwrite, monitor); |
305 | + Bazaar.Push (pushLocation, Path.GetFullPath (localPath), remember, overwrite, omitHistory, monitor); |
306 | }// Push |
307 | |
308 | public virtual void Pull (string pullLocation, string localPath, bool remember, bool overwrite, IProgressMonitor monitor) { |
309 | @@ -217,10 +238,10 @@ |
310 | { |
311 | if (string.IsNullOrEmpty (GetLocalBasePath (localPath))) { |
312 | return false; |
313 | - } |
314 | + } |
315 | |
316 | localPath = Path.GetFullPath (localPath); |
317 | - VersionInfo info = GetVersionInfo (localPath, false); |
318 | + VersionInfo info = GetCachedVersionInfo (localPath, false); |
319 | return (null != info && info.IsVersioned); |
320 | } |
321 | |
322 | @@ -231,7 +252,7 @@ |
323 | } |
324 | |
325 | localFile = Path.GetFullPath (localFile); |
326 | - VersionInfo info = GetVersionInfo (localFile, false); |
327 | + VersionInfo info = GetCachedVersionInfo (localFile, false); |
328 | return (null != info && info.IsVersioned && info.HasLocalChanges); |
329 | } |
330 | |
331 | @@ -242,7 +263,7 @@ |
332 | } |
333 | |
334 | localFile = Path.GetFullPath (localFile); |
335 | - VersionInfo info = GetVersionInfo (localFile, false); |
336 | + VersionInfo info = GetCachedVersionInfo (localFile, false); |
337 | return (null != info && info.IsVersioned && (0 != (info.Status & VersionStatus.Conflicted))); |
338 | } |
339 | |
340 | @@ -393,5 +414,10 @@ |
341 | { |
342 | Bazaar.Export (Path.GetFullPath(localPath), Path.GetFullPath(exportLocation), monitor); |
343 | }// Export |
344 | + |
345 | + public virtual bool CanRebase () |
346 | + { |
347 | + return Bazaar.CanRebase (); |
348 | + }// CanRebase |
349 | }// BazaarRepository |
350 | } |
351 | |
352 | === modified file 'BazaarRevision.cs' |
353 | --- BazaarRevision.cs 2008-12-08 16:53:57 +0000 |
354 | +++ BazaarRevision.cs 2009-10-21 21:25:16 +0000 |
355 | @@ -20,11 +20,19 @@ |
356 | |
357 | namespace MonoDevelop.VersionControl.Bazaar |
358 | { |
359 | - |
360 | - |
361 | + /// <summary> |
362 | + /// Represents a revision in a Bazaar branch. |
363 | + /// </summary> |
364 | public class BazaarRevision : Revision |
365 | { |
366 | public readonly string Rev; |
367 | + |
368 | + // Overriding base property to allow public/asynchronous set |
369 | + public new RevisionPath[] ChangedFiles { |
370 | + get{ return base.ChangedFiles; } |
371 | + set{ base.ChangedFiles = value; } |
372 | + } |
373 | + |
374 | public static readonly string HEAD = "-1"; |
375 | public static readonly string FIRST = "1"; |
376 | public static readonly string NONE = "NONE"; |
377 | |
378 | === modified file 'BazaarVersionControl.cs' |
379 | --- BazaarVersionControl.cs 2009-09-26 13:35:43 +0000 |
380 | +++ BazaarVersionControl.cs 2009-10-21 21:25:16 +0000 |
381 | @@ -232,8 +232,12 @@ |
382 | Client.Merge (mergeLocation, localPath, remember, overwrite, start, end, monitor); |
383 | }// Merge |
384 | |
385 | - public void Push (string pushLocation, string localPath, bool remember, bool overwrite, IProgressMonitor monitor) { |
386 | - Client.Push (pushLocation, localPath, remember, overwrite, monitor); |
387 | + public void Push (string pushLocation, string localPath, bool remember, bool overwrite, bool omitHistory, IProgressMonitor monitor) { |
388 | + if (omitHistory) { |
389 | + Client.DPush (pushLocation, localPath, remember, monitor); |
390 | + } else { |
391 | + Client.Push (pushLocation, localPath, remember, overwrite, monitor); |
392 | + } |
393 | }// Push |
394 | |
395 | public void Pull (string pullLocation, string localPath, bool remember, bool overwrite, IProgressMonitor monitor) { |
396 | @@ -339,5 +343,10 @@ |
397 | { |
398 | Client.Export (localPath, exportPath, monitor); |
399 | }// Export |
400 | + |
401 | + public bool CanRebase () |
402 | + { |
403 | + return Client.CanRebase (); |
404 | + }// CanRebase |
405 | }// BazaarVersionControl |
406 | } |
407 | |
408 | === modified file 'Dialogs/BranchSelectionDialog.cs' |
409 | --- Dialogs/BranchSelectionDialog.cs 2009-08-05 11:28:41 +0000 |
410 | +++ Dialogs/BranchSelectionDialog.cs 2009-10-21 21:25:16 +0000 |
411 | @@ -54,6 +54,18 @@ |
412 | get{ return overwriteCB.Active; } |
413 | }// Overwrite |
414 | |
415 | + public bool OmitHistory { |
416 | + get{ return omitCB.Active; } |
417 | + }// OmitHistory |
418 | + |
419 | + protected virtual void OnOmitCBToggled (object sender, System.EventArgs e) |
420 | + { |
421 | + if (omitCB.Active) { |
422 | + overwriteCB.Active = false; |
423 | + } |
424 | + overwriteCB.Sensitive = omitCB.Active; |
425 | + }// OnOmitCBToggled |
426 | + |
427 | public BranchSelectionDialog(ICollection<string> branchLocations, string defaultLocation, string localDirectory, bool enableLocalPathSelection, bool enableRemember, bool enableOverwrite) |
428 | { |
429 | this.Build(); |
430 | @@ -90,6 +102,7 @@ |
431 | if (!string.IsNullOrEmpty (localDirectory)) |
432 | localPathButton.SetCurrentFolder (localDirectory); |
433 | localPathButton.Sensitive = enableLocalPathSelection; |
434 | + omitCB.Visible = !enableLocalPathSelection; |
435 | defaultCB.Sensitive = enableRemember; |
436 | overwriteCB.Sensitive = enableOverwrite; |
437 | }// constructor |
438 | |
439 | === modified file 'IBazaarClient.cs' |
440 | --- IBazaarClient.cs 2009-09-23 19:36:55 +0000 |
441 | +++ IBazaarClient.cs 2009-10-21 21:25:16 +0000 |
442 | @@ -204,12 +204,35 @@ |
443 | /// <param name="localPath"> |
444 | /// A <see cref="System.String"/>: The local path to push |
445 | /// </param> |
446 | + /// <param name="remember"> |
447 | + /// A <see cref="System.Boolean"/>: Whether pushLocation should be remembered |
448 | + /// </param> |
449 | + /// <param name="overwrite"> |
450 | + /// A <see cref="System.Boolean"/>: Whether to overwrite stale changes at pushLocation |
451 | + /// </param> |
452 | /// <param name="monitor"> |
453 | /// A <see cref="IProgressMonitor"/>: The progress monitor to be used |
454 | /// </param> |
455 | void Push (string pushLocation, string localPath, bool remember, bool overwrite, IProgressMonitor monitor); |
456 | |
457 | /// <summary> |
458 | + /// Performs a push |
459 | + /// </summary> |
460 | + /// <param name="pushLocation"> |
461 | + /// A <see cref="System.String"/>: The branch URI to which to push |
462 | + /// </param> |
463 | + /// <param name="localPath"> |
464 | + /// A <see cref="System.String"/>: The local path to push |
465 | + /// </param> |
466 | + /// <param name="remember"> |
467 | + /// A <see cref="System.Boolean"/>: Whether pushLocation should be remembered |
468 | + /// </param> |
469 | + /// <param name="monitor"> |
470 | + /// A <see cref="IProgressMonitor"/>: The progress monitor to be used |
471 | + /// </param> |
472 | + void DPush (string pushLocation, string localPath, bool remember, MonoDevelop.Core.IProgressMonitor monitor); |
473 | + |
474 | + /// <summary> |
475 | /// Performs a pull |
476 | /// </summary> |
477 | /// <param name="pullLocation"> |
478 | @@ -402,5 +425,10 @@ |
479 | /// A <see cref="System.Boolean"/>: Whether a merge is pending |
480 | /// </returns> |
481 | bool IsMergePending (string localPath); |
482 | + |
483 | + /// <summary> |
484 | + /// Whether the rebase plugin is installed |
485 | + /// </summary> |
486 | + bool CanRebase (); |
487 | } |
488 | } |
489 | |
490 | === modified file 'gtk-gui/MonoDevelop.VersionControl.Bazaar.Dialogs.BranchSelectionDialog.cs' |
491 | --- gtk-gui/MonoDevelop.VersionControl.Bazaar.Dialogs.BranchSelectionDialog.cs 2009-09-28 18:13:37 +0000 |
492 | +++ gtk-gui/MonoDevelop.VersionControl.Bazaar.Dialogs.BranchSelectionDialog.cs 2009-10-21 21:25:16 +0000 |
493 | @@ -10,7 +10,6 @@ |
494 | |
495 | namespace MonoDevelop.VersionControl.Bazaar.Dialogs { |
496 | |
497 | - |
498 | public partial class BranchSelectionDialog { |
499 | |
500 | private Gtk.VBox vbox2; |
501 | @@ -27,6 +26,8 @@ |
502 | |
503 | private Gtk.CheckButton overwriteCB; |
504 | |
505 | + private Gtk.CheckButton omitCB; |
506 | + |
507 | private Gtk.Button buttonCancel; |
508 | |
509 | private Gtk.Button buttonOk; |
510 | @@ -87,26 +88,36 @@ |
511 | this.overwriteCB = new Gtk.CheckButton(); |
512 | this.overwriteCB.CanFocus = true; |
513 | this.overwriteCB.Name = "overwriteCB"; |
514 | - this.overwriteCB.Label = Mono.Unix.Catalog.GetString("Overwrite"); |
515 | + this.overwriteCB.Label = Mono.Unix.Catalog.GetString("O_verwrite"); |
516 | this.overwriteCB.DrawIndicator = true; |
517 | this.overwriteCB.UseUnderline = true; |
518 | this.hbox1.Add(this.overwriteCB); |
519 | Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox1[this.overwriteCB])); |
520 | w6.Position = 1; |
521 | + // Container child hbox1.Gtk.Box+BoxChild |
522 | + this.omitCB = new Gtk.CheckButton(); |
523 | + this.omitCB.CanFocus = true; |
524 | + this.omitCB.Name = "omitCB"; |
525 | + this.omitCB.Label = Mono.Unix.Catalog.GetString("O_mit History"); |
526 | + this.omitCB.DrawIndicator = true; |
527 | + this.omitCB.UseUnderline = true; |
528 | + this.hbox1.Add(this.omitCB); |
529 | + Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox1[this.omitCB])); |
530 | + w7.Position = 2; |
531 | this.vbox2.Add(this.hbox1); |
532 | - Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox1])); |
533 | - w7.Position = 2; |
534 | - w7.Expand = false; |
535 | - w7.Fill = false; |
536 | + Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox1])); |
537 | + w8.Position = 2; |
538 | + w8.Expand = false; |
539 | + w8.Fill = false; |
540 | w1.Add(this.vbox2); |
541 | - Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(w1[this.vbox2])); |
542 | - w8.Position = 0; |
543 | + Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(w1[this.vbox2])); |
544 | + w9.Position = 0; |
545 | // Internal child MonoDevelop.VersionControl.Bazaar.Dialogs.BranchSelectionDialog.ActionArea |
546 | - Gtk.HButtonBox w9 = this.ActionArea; |
547 | - w9.Name = "dialog1_ActionArea"; |
548 | - w9.Spacing = 6; |
549 | - w9.BorderWidth = ((uint)(5)); |
550 | - w9.LayoutStyle = ((Gtk.ButtonBoxStyle)(4)); |
551 | + Gtk.HButtonBox w10 = this.ActionArea; |
552 | + w10.Name = "dialog1_ActionArea"; |
553 | + w10.Spacing = 6; |
554 | + w10.BorderWidth = ((uint)(5)); |
555 | + w10.LayoutStyle = ((Gtk.ButtonBoxStyle)(4)); |
556 | // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild |
557 | this.buttonCancel = new Gtk.Button(); |
558 | this.buttonCancel.CanDefault = true; |
559 | @@ -116,9 +127,9 @@ |
560 | this.buttonCancel.UseUnderline = true; |
561 | this.buttonCancel.Label = "gtk-cancel"; |
562 | this.AddActionWidget(this.buttonCancel, -6); |
563 | - Gtk.ButtonBox.ButtonBoxChild w10 = ((Gtk.ButtonBox.ButtonBoxChild)(w9[this.buttonCancel])); |
564 | - w10.Expand = false; |
565 | - w10.Fill = false; |
566 | + Gtk.ButtonBox.ButtonBoxChild w11 = ((Gtk.ButtonBox.ButtonBoxChild)(w10[this.buttonCancel])); |
567 | + w11.Expand = false; |
568 | + w11.Fill = false; |
569 | // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild |
570 | this.buttonOk = new Gtk.Button(); |
571 | this.buttonOk.CanDefault = true; |
572 | @@ -128,16 +139,17 @@ |
573 | this.buttonOk.UseUnderline = true; |
574 | this.buttonOk.Label = "gtk-ok"; |
575 | this.AddActionWidget(this.buttonOk, -5); |
576 | - Gtk.ButtonBox.ButtonBoxChild w11 = ((Gtk.ButtonBox.ButtonBoxChild)(w9[this.buttonOk])); |
577 | - w11.Position = 1; |
578 | - w11.Expand = false; |
579 | - w11.Fill = false; |
580 | + Gtk.ButtonBox.ButtonBoxChild w12 = ((Gtk.ButtonBox.ButtonBoxChild)(w10[this.buttonOk])); |
581 | + w12.Position = 1; |
582 | + w12.Expand = false; |
583 | + w12.Fill = false; |
584 | if ((this.Child != null)) { |
585 | this.Child.ShowAll(); |
586 | } |
587 | this.DefaultWidth = 400; |
588 | this.DefaultHeight = 257; |
589 | this.Show(); |
590 | + this.omitCB.Toggled += new System.EventHandler(this.OnOmitCBToggled); |
591 | } |
592 | } |
593 | } |
594 | |
595 | === modified file 'gtk-gui/MonoDevelop.VersionControl.Bazaar.Dialogs.PasswordPromptDialog.cs' |
596 | --- gtk-gui/MonoDevelop.VersionControl.Bazaar.Dialogs.PasswordPromptDialog.cs 2009-09-28 18:13:37 +0000 |
597 | +++ gtk-gui/MonoDevelop.VersionControl.Bazaar.Dialogs.PasswordPromptDialog.cs 2009-10-21 21:25:16 +0000 |
598 | @@ -10,7 +10,6 @@ |
599 | |
600 | namespace MonoDevelop.VersionControl.Bazaar.Dialogs { |
601 | |
602 | - |
603 | public partial class PasswordPromptDialog { |
604 | |
605 | private Gtk.VBox vbox2; |
606 | |
607 | === modified file 'gtk-gui/generated.cs' |
608 | --- gtk-gui/generated.cs 2009-09-28 18:13:37 +0000 |
609 | +++ gtk-gui/generated.cs 2009-10-21 21:25:16 +0000 |
610 | @@ -10,7 +10,6 @@ |
611 | |
612 | namespace Stetic { |
613 | |
614 | - |
615 | internal class Gui { |
616 | |
617 | private static bool initialized; |
618 | |
619 | === modified file 'gtk-gui/gui.stetic' |
620 | --- gtk-gui/gui.stetic 2009-08-18 10:25:32 +0000 |
621 | +++ gtk-gui/gui.stetic 2009-10-21 21:25:16 +0000 |
622 | @@ -1,4 +1,4 @@ |
623 | -<?xml version="1.0" encoding="utf-8"?> |
624 | +<?xml version="1.0" encoding="utf-8"?> |
625 | <stetic-interface> |
626 | <configuration> |
627 | <images-root-path>..</images-root-path> |
628 | @@ -81,7 +81,7 @@ |
629 | <widget class="Gtk.CheckButton" id="overwriteCB"> |
630 | <property name="MemberName">overwriteCB</property> |
631 | <property name="CanFocus">True</property> |
632 | - <property name="Label" translatable="yes">Overwrite</property> |
633 | + <property name="Label" translatable="yes">O_verwrite</property> |
634 | <property name="DrawIndicator">True</property> |
635 | <property name="HasLabel">True</property> |
636 | <property name="UseUnderline">True</property> |
637 | @@ -91,6 +91,21 @@ |
638 | <property name="AutoSize">True</property> |
639 | </packing> |
640 | </child> |
641 | + <child> |
642 | + <widget class="Gtk.CheckButton" id="omitCB"> |
643 | + <property name="MemberName">omitCB</property> |
644 | + <property name="CanFocus">True</property> |
645 | + <property name="Label" translatable="yes">O_mit History</property> |
646 | + <property name="DrawIndicator">True</property> |
647 | + <property name="HasLabel">True</property> |
648 | + <property name="UseUnderline">True</property> |
649 | + <signal name="Toggled" handler="OnOmitCBToggled" /> |
650 | + </widget> |
651 | + <packing> |
652 | + <property name="Position">2</property> |
653 | + <property name="AutoSize">True</property> |
654 | + </packing> |
655 | + </child> |
656 | </widget> |
657 | <packing> |
658 | <property name="Position">2</property> |
659 | @@ -248,4 +263,4 @@ |
660 | </widget> |
661 | </child> |
662 | </widget> |
663 | -</stetic-interface> |
664 | \ No newline at end of file |
665 | +</stetic-interface> |
Reduced errors when working with bzr-svn branches. Extra shininess.