Merge lp:~taktaktaktaktaktaktaktaktaktak/monodevelop-bzr/2.4 into lp:monodevelop-bzr

Proposed by Levi Bard
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 147
Merge reported by: Jelmer Vernooij
Merged at revision: not available
Proposed branch: lp:~taktaktaktaktaktaktaktaktaktak/monodevelop-bzr/2.4
Merge into: lp:monodevelop-bzr
Diff against target: 823 lines (+336/-59) (has conflicts)
14 files modified
BazaarCLibClient.cs (+75/-50)
BazaarClient.cs (+2/-1)
BazaarCommands.cs (+17/-4)
BazaarRepository.cs (+61/-0)
BazaarVersionControl.cs (+6/-1)
Dialogs/BranchSelectionDialog.cs (+5/-1)
IBazaarClient.cs (+17/-0)
MonoDevelop.VersionControl.Bazaar.addin.xml (+11/-0)
MonoDevelop.VersionControl.Bazaar.dll.config (+1/-1)
addin-project.xml (+8/-0)
gtk-gui/MonoDevelop.VersionControl.Bazaar.Dialogs.PasswordPromptDialog.cs (+1/-1)
monodevelop-bzr.csproj (+102/-0)
monodevelop-bzr.mdp (+6/-0)
monodevelop-bzr.sln (+24/-0)
Text conflict in BazaarCLibClient.cs
Text conflict in BazaarRepository.cs
Text conflict in MonoDevelop.VersionControl.Bazaar.addin.xml
Text conflict in monodevelop-bzr.mdp
To merge this branch: bzr merge lp:~taktaktaktaktaktaktaktaktaktak/monodevelop-bzr/2.4
Reviewer Review Type Date Requested Status
Jelmer Vernooij Pending
Review via email: mp+39136@code.launchpad.net

Description of the change

Lots of updates - I haven't been good about merging them back. :-/

To post a comment you must log in.
146. By Levi Bard

Remove obsolete cleanup_now calls.

147. By Levi Bard

Bump addin version.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This now has conflicts :-/ I'll have a look at reviewing it soon, sorry for the delay.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Is there any reason we shouldn't just overwrite trunk with your branch?

Revision history for this message
Levi Bard (taktaktaktaktaktaktaktaktaktak) wrote :

> Is there any reason we shouldn't just overwrite trunk with your branch?

I'm not sure - I haven't been keeping up with your changes (bad me!).
If you think it's a good idea, go ahead.

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 2010-01-19 22:14:40 +0000
3+++ BazaarCLibClient.cs 2010-10-22 13:29:40 +0000
4@@ -23,6 +23,7 @@
5 using System.Runtime.InteropServices;
6 using System.Text.RegularExpressions;
7
8+using MonoDevelop.Ide;
9 using MonoDevelop.Core;
10 using MonoDevelop.Core.Execution;
11
12@@ -117,22 +118,24 @@
13 {
14 List<IntPtr> rv = new List<IntPtr> ();
15
16- if (0 != PyRun_SimpleString (string.Format (command, format))) {
17- string trace = "Unable to retrieve error data.";
18- if (0 == PyRun_SimpleString ("trace = ''.join(traceback.format_exception(sys.last_type, sys.last_value, sys.last_traceback))\n")) {
19- trace = StringFromPython (PyMapping_GetItemString (maindict, "trace"));
20+ DispatchService.GuiSyncDispatch (() => {
21+ if (0 != PyRun_SimpleString (string.Format (command, format))) {
22+ string trace = "Unable to retrieve error data.";
23+ if (0 == PyRun_SimpleString ("trace = ''.join(traceback.format_exception(sys.last_type, sys.last_value, sys.last_traceback))\n")) {
24+ trace = StringFromPython (PyMapping_GetItemString (maindict, "trace"));
25+ }
26+ PyErr_Clear ();
27+
28+ throw new BazaarClientException(string.Format ("Error running '{0}': {1}{2}", string.Format (command, format), Environment.NewLine, trace));
29+ }
30+
31+ if (null != variables) {
32+ rv = variables.ConvertAll<IntPtr> (delegate(string variable){
33+ return PyMapping_GetItemString (maindict, variable);
34+ });
35 }
36 PyErr_Clear ();
37-
38- throw new BazaarClientException(string.Format ("Error running '{0}': {1}{2}", string.Format (command, format), Environment.NewLine, trace));
39- }
40-
41- if (null != variables) {
42- rv = variables.ConvertAll<IntPtr> (delegate(string variable){
43- return PyMapping_GetItemString (maindict, variable);
44- });
45- }
46- PyErr_Clear ();
47+ });
48
49 return rv;
50 }// run
51@@ -183,6 +186,7 @@
52 string[] imports = new string[]{
53 "import sys",
54 "if('win32'==sys.platform): sys.path.append('C:/Program Files/Bazaar/lib/library.zip')",
55+ "if('win32'==sys.platform): sys.path.append('C:/Program Files (x86)/Bazaar/lib/library.zip')",
56 "import traceback",
57 "import StringIO",
58 "import bzrlib",
59@@ -228,7 +232,6 @@
60 StringBuilder command = new StringBuilder ();
61 command.AppendFormat ("tree = workingtree.WorkingTree.open_containing(path=ur\"{0}\")[0]\n", localPath);
62 command.AppendFormat (null, "tree.smart_add(file_list=[ur\"{0}\"], recurse={1})\n", localPath, recurse? "True": "False");
63- command.Append("del tree\n");
64
65 lock (lockme) {
66 run (null, command.ToString ());
67@@ -277,7 +280,7 @@
68 command.AppendFormat ("revspec = revisionspec.RevisionSpec.from_string(spec=\"{0}\")\n", rev.Rev);
69 pyrev = "revspec.in_history(branch=b).rev_id";
70 }
71- command.AppendFormat ("b.create_checkout(to_location=ur\"{1}\", revision_id={0})\ndel b\n", pyrev, NormalizePath (targetLocalPath));
72+ command.AppendFormat ("b.create_checkout(to_location=ur\"{1}\", revision_id={0})\n", pyrev, NormalizePath (targetLocalPath));
73
74 lock (lockme){ run (null, command.ToString ()); }
75 monitor.Log.WriteLine ("Checkout to {0} completed", targetLocalPath);
76@@ -306,13 +309,12 @@
77 StringBuilder command = new StringBuilder ();
78 command.AppendFormat ("tree = workingtree.WorkingTree.open_containing(path=ur\"{0}\")[0]\n", NormalizePath (basePath));
79 command.AppendFormat ("c = commit.Commit()\nc.commit(message=ur\"{0}\",specific_files={1},working_tree=tree)\n", escapedComment, pyfiles);
80- command.Append ("del tree\n");
81
82 lock (lockme) {
83 run (null, command.ToString ());
84 }
85 }
86-
87+
88 public override DiffInfo[] Diff (string basePath, string[] files)
89 {
90 List<DiffInfo> results = new List<DiffInfo> ();
91@@ -334,29 +336,65 @@
92 }
93
94 foreach (string file in files) {
95- string diffpath = Path.GetTempFileName ();
96 string fullPath = Path.Combine (basePath, file);
97 StringBuilder command = new StringBuilder ();
98 command.AppendFormat ("tree,relpath = workingtree.WorkingTree.open_containing(path=ur\"{0}\")\n", fullPath);
99- command.AppendFormat ("outfile = open(ur\"{0}\",\"w\")\n", diffpath);
100+ command.AppendFormat ("outfile = StringIO.StringIO()\n");
101 command.AppendFormat ("tree.lock_read()\ntry:\n");
102- command.AppendFormat (" mydiff = bzrlib.diff.DiffTree(old_tree=tree.basis_tree(), new_tree=tree, to_file=outfile)\n", diffpath);
103+ command.AppendFormat (" mydiff = bzrlib.diff.DiffTree(old_tree=tree.basis_tree(), new_tree=tree, to_file=outfile)\n");
104 command.AppendFormat (" mydiff.show_diff(specific_files=[relpath])\n");
105- command.AppendFormat ("finally:\n tree.unlock()\n outfile.close()\n del tree\n");
106+ command.AppendFormat (" output = outfile.getvalue()\n");
107+ command.AppendFormat ("finally:\n tree.unlock()\n outfile.close()\n");
108
109 lock (lockme) {
110+<<<<<<< TREE
111 try {
112 run (null, command.ToString ());
113 results.Add (new DiffInfo (file, File.ReadAllText (diffpath).Replace ("\r\n", Environment.NewLine)));
114 } finally {
115 File.Delete (diffpath);
116 }
117+=======
118+ string output = StringFromPython (run (new List<string>{"output"}, command.ToString ())[0]);
119+ results.Add (new DiffInfo (basePath, file, output.Replace ("\r\n", Environment.NewLine)));
120+>>>>>>> MERGE-SOURCE
121 }
122 }
123
124 return results.ToArray ();
125 }
126
127+ public override DiffInfo[] Diff (string path, BazaarRevision fromRevision, BazaarRevision toRevision)
128+ {
129+ List<DiffInfo> results = new List<DiffInfo> ();
130+ path = NormalizePath (Path.GetFullPath (path));
131+ StringBuilder command = new StringBuilder ();
132+
133+ command.AppendFormat ("outfile = StringIO.StringIO()\n");
134+ command.AppendFormat ("old_tree = None\n");
135+ command.AppendFormat ("new_tree = None\n");
136+ command.AppendFormat ("try:\n");
137+ command.AppendFormat (" old_tree,new_tree,old_branch,new_branch,specific_files,extra_trees = diff.get_trees_and_branches_to_diff(path_list=None, revision_specs=[revisionspec.RevisionSpec.from_string(ur\"{0}\"), revisionspec.RevisionSpec.from_string(ur\"{1}\")], old_url=ur\"{2}\", new_url=ur\"{2}\")\n",
138+ fromRevision, toRevision, path);
139+ command.AppendFormat (" mydiff = bzrlib.diff.DiffTree(old_tree=old_tree, new_tree=new_tree, to_file=outfile)\n");
140+ command.AppendFormat (" old_tree.lock_read()\n");
141+ command.AppendFormat (" new_tree.lock_read()\n");
142+ command.AppendFormat (" mydiff.show_diff(specific_files=specific_files, extra_trees=extra_trees)\n");
143+ command.AppendFormat (" output = outfile.getvalue()\n");
144+ command.AppendFormat ("finally:\n");
145+ command.AppendFormat (" outfile.close()\n");
146+ command.AppendFormat (" if(old_tree): old_tree.unlock()\n");
147+ command.AppendFormat (" if(new_tree): new_tree.unlock()\n");
148+
149+ lock (lockme) {
150+ string output = StringFromPython (run (new List<string>{"output"}, command.ToString ())[0]);
151+ results.Add (new DiffInfo (Path.GetDirectoryName (path), Path.GetFileName (path),
152+ output.Replace ("\r\n", Environment.NewLine)));
153+ }
154+
155+ return results.ToArray ();
156+ }
157+
158 static Regex revisionRegex = new Regex (@"^\s*(?<revision>[\d\.]+): (?<committer>.*) (?<date>\d{4}-\d{2}-\d{2}) (?<message>.*)", RegexOptions.Compiled);
159 public override BazaarRevision[] GetHistory (BazaarRepository repo, string localFile, BazaarRevision since)
160 {
161@@ -434,7 +472,6 @@
162 // Don't care, just means branch doesn't exist
163 }
164 }// invoke each getter
165- run (null, "del b\n");
166 }// lock
167
168 return branches;
169@@ -445,7 +482,7 @@
170 IntPtr branch = IntPtr.Zero;
171
172 lock (lockme) {
173- branch = run (new List<string>{"mybase"}, "mybranch = branch.Branch.open_containing(url=ur\"{0}\")[0]\nmybase=mybranch.base\ndel mybranch\n", NormalizePath (Path.GetFullPath (path)))[0];
174+ branch = run (new List<string>{"mybase"}, "mybranch = branch.Branch.open_containing(url=ur\"{0}\")[0]\nmybase=mybranch.base\n", NormalizePath (Path.GetFullPath (path)))[0];
175 string baseurl = StringFromPython (branch);
176 return baseurl.StartsWith ("file://", StringComparison.Ordinal)? baseurl.Substring (7): baseurl;
177 }
178@@ -463,8 +500,6 @@
179 command.AppendFormat (" diff = rev_tree.get_file_text(file_id=rev_tree.path2id(path=relpath))\n");
180 command.AppendFormat ("finally:\n");
181 command.AppendFormat (" rev_tree.unlock()\n");
182- command.AppendFormat (" del rev_tree\n");
183- command.AppendFormat (" del b\n");
184
185 lock (lockme) {
186 text = run (new List<string>{"diff"}, command.ToString ())[0];
187@@ -488,7 +523,7 @@
188 command.AppendFormat ("tree,relpath = workingtree.WorkingTree.open_containing(path=ur\"{0}\")\n", NormalizePath (path));
189 command.AppendFormat ("mylist = \"\"\ntree.lock_read()\n");
190 command.AppendFormat ("try:\n for entry in tree.list_files():\n mylist = mylist+entry[0]+\"|\"+entry[2]+\"\\n\"\n");
191- command.AppendFormat ("finally:\n tree.unlock()\n del tree\n");
192+ command.AppendFormat ("finally:\n tree.unlock()\n");
193
194 lock (lockme) {
195 try {
196@@ -558,7 +593,7 @@
197 command.AppendFormat ("mycmd = builtins.cmd_pull()\n");
198 command.AppendFormat ("mycmd.outf = StringIO.StringIO()\n");
199 command.AppendFormat ("try:\n");
200- command.AppendFormat (string.Format (" mycmd.run(location=ur'{0}',remember={1},overwrite={2},directory=ur'{3}')\n", pullLocation, remember? "True": "False", overwrite? "True": "False", localPath));
201+ command.AppendFormat (" mycmd.run(location=ur'{0}',remember={1},overwrite={2},directory=ur'{3}',verbose=True)\n", pullLocation, remember? "True": "False", overwrite? "True": "False", localPath);
202 command.AppendFormat (" output = mycmd.outf.getvalue()\n");
203 command.AppendFormat ("finally:\n");
204 command.AppendFormat (" mycmd.outf.close()\n");
205@@ -599,7 +634,7 @@
206 command.AppendFormat ("mycmd = foreign.cmd_dpush()\n");
207 command.AppendFormat ("mycmd.outf = StringIO.StringIO()\n");
208 command.AppendFormat ("try:\n");
209- command.AppendFormat (string.Format (" mycmd.run(location=ur'{0}',remember={1}, directory=ur'{2}')\n",
210+ command.AppendFormat (string.Format (" mycmd.run(location=ur'{0}',remember={1}, directory=ur'{2}', strict=False)\n",
211 pushLocation, remember? "True": "False",
212 localPath));
213 command.AppendFormat (" output = mycmd.outf.getvalue()\n");
214@@ -619,7 +654,6 @@
215 StringBuilder command = new StringBuilder ();
216 command.AppendFormat ("tree,relpath = workingtree.WorkingTree.open_containing(path=ur\"{0}\")\n", path);
217 command.AppendFormat ("tree.remove(files=[relpath], force={1})\n", path, force? "True": "False");
218- command.Append ("del tree\n");
219
220 lock (lockme){ run (null, command.ToString ()); }
221 }
222@@ -630,7 +664,6 @@
223 StringBuilder command = new StringBuilder ();
224 command.AppendFormat ("tree,relpath = workingtree.WorkingTree.open_containing(path=ur\"{0}\")\n", path);
225 command.AppendFormat ("conflicts.resolve(tree=tree, paths=[relpath], recursive={1})\n", Path.GetFullPath (path), recurse? "True": "False");
226- command.Append ("del tree\n");
227
228 lock (lockme){ run (null, command.ToString ()); }
229 }
230@@ -650,7 +683,7 @@
231 }
232 command.AppendFormat ("tree.lock_tree_write()\n");
233 command.AppendFormat ("try:\n tree.revert(filenames=[tree.relpath(ur\"{0}\")], old_tree=rev)\n", localPath);
234- command.AppendFormat ("finally:\n tree.unlock()\n del tree\n del rev\n");
235+ command.AppendFormat ("finally:\n tree.unlock()\n");
236 lock (lockme) {
237 run (null, command.ToString ());
238 }
239@@ -665,6 +698,7 @@
240 bool modified = false;
241 IntPtr tuple = IntPtr.Zero,
242 listlen = IntPtr.Zero;
243+
244 path = NormalizePath (Path.GetFullPath (path).Replace ("{", "{{").Replace ("}", "}}"));// escape for string.format
245 command.AppendFormat ("tree,relpath = workingtree.WorkingTree.open_containing(path=ur\"{0}\")\n", path);
246
247@@ -696,17 +730,12 @@
248 tuple = run (new List<string>{"astatus"}, "astatus = tree.abspath(filename=mylist[{0}][0])", i)[0];
249 filename = StringFromPython (tuple);
250 LocalStatus status = new LocalStatus (rev, filename, longStatuses[modtype]);
251- LoggingService.LogInfo ("{0}: {1} ({2})", modtype, filename, path);
252 if (path.Equals (filename, StringComparison.Ordinal)) {
253- LoggingService.LogInfo ("Using status {0} for {1}", modtype, filename);
254 mystatus = status;
255 }
256 if (filename.StartsWith (path, StringComparison.Ordinal)) {
257- LoggingService.LogInfo ("Using status {0} for child of {1}", modtype, path);
258 modified = (!"unversioned".Equals (modtype, StringComparison.Ordinal));
259 statuses.Add (status);
260- } else {
261- LoggingService.LogInfo ("No match for {0}", filename);
262 }
263 }// get each file status
264 } finally {
265@@ -714,11 +743,12 @@
266 }
267 }
268
269- string conflicts = string.Empty;
270+ command = new StringBuilder ();
271+ command.Append ("myconflicts = \"\"\n");
272+ command.Append ("for conflict in totree.conflicts():\n");
273+ command.Append (" myconflicts = myconflicts + totree.abspath (filename=conflict.path) + \"|\"\n");
274
275- conflicts = StringFromPython (run (new List<string>{"myconflicts"},
276- "myconflicts = \"\"\nfor conflict in totree.conflicts():\n myconflicts = myconflicts+totree.abspath(filename=conflict.path)+\"|\"\n")[0]);
277- run (null, "del tree\ndel totree\n");
278+ string conflicts = StringFromPython (run (new List<string>{"myconflicts"}, command.ToString ())[0]);
279
280 foreach (string conflict in conflicts.Split ('|')) {
281 if (!string.IsNullOrEmpty (conflict)) {
282@@ -752,7 +782,7 @@
283 public override void Update (string localPath, bool recurse, MonoDevelop.Core.IProgressMonitor monitor)
284 {
285 localPath = NormalizePath (Path.GetFullPath (localPath));
286- lock (lockme){ run (null, "tree = workingtree.WorkingTree.open_containing(path=ur\"{0}\")[0]\ntree.update()\ndel tree\n", localPath); }
287+ lock (lockme){ run (null, "tree = workingtree.WorkingTree.open_containing(path=ur\"{0}\")[0]\ntree.update()\n", localPath); }
288 }
289
290 public override void StoreCredentials (string url)
291@@ -791,7 +821,6 @@
292 command.AppendFormat ("to_transport = transport.get_transport(base=ur'{0}')\n", NormalizePath (path));
293 command.Append ("create_branch = bzrdir.BzrDir.create_branch_convenience\n");
294 command.Append ("mybranch = create_branch(base=to_transport.base, format=format, possible_transports=[to_transport])\n");
295- command.Append ("del mybranch\n");
296
297 run (null, command.ToString ());
298 }// Init
299@@ -801,7 +830,6 @@
300 StringBuilder command = new StringBuilder ();
301 command.AppendFormat ("tree,relpath = workingtree.WorkingTree.open_containing(path=ur'{0}')\n", NormalizePath (path));
302 command.AppendFormat ("ignores.tree_ignores_add_patterns(tree=tree, name_pattern_list=[relpath])\n");
303- command.Append ("del tree\n");
304
305 run (null, command.ToString ());
306 }// Ignore
307@@ -811,7 +839,6 @@
308 StringBuilder command = new StringBuilder ();
309 command.AppendFormat ("b = branch.Branch.open_containing(url=ur'{0}')[0]\n", NormalizePath (path));
310 command.AppendFormat ("bound = repr(b.get_bound_location())\n");
311- command.AppendFormat ("del b\n");
312
313 return ("None" != StringFromPython(run (new List<string>{"bound"}, command.ToString ())[0]));
314 }// IsBound
315@@ -824,7 +851,6 @@
316 StringBuilder command = new StringBuilder ();
317 command.AppendFormat ("b = branch.Branch.open_containing(url=ur'{0}')[0]\n", NormalizePath (path));
318 command.AppendFormat ("bound = repr(b.{0}())\n", method);
319- command.AppendFormat ("del b\n");
320
321 location = StringFromPython(run (new List<string>{"bound"}, command.ToString ())[0]);
322 return ("None" == location? string.Empty: location);
323@@ -838,7 +864,7 @@
324 run (null, "remoteb = branch.Branch.open_containing(url=ur'{0}')[0]\n", branchUrl);
325 monitor.Log.WriteLine ("Opened {0}", branchUrl);
326
327- run (null, "b.bind(other=remoteb)\ndel b\ndel remoteb");
328+ run (null, "b.bind(other=remoteb)\n");
329 monitor.Log.WriteLine ("Bound {0} to {1}", localPath, branchUrl);
330 }// Bind
331
332@@ -847,7 +873,7 @@
333 run (null, "b = branch.Branch.open_containing(url=ur'{0}')[0]\n", NormalizePath (localPath));
334 monitor.Log.WriteLine ("Opened {0}", localPath);
335
336- run (null, "b.unbind()\ndel b\n");
337+ run (null, "b.unbind()\n");
338 monitor.Log.WriteLine ("Unbound {0}", localPath);
339 }// Unbind
340
341@@ -856,7 +882,7 @@
342 run (null, "tree = workingtree.WorkingTree.open_containing(path=ur'{0}')[0]\nb = tree.branch\n", NormalizePath (localPath));
343 monitor.Log.WriteLine ("Opened {0}", localPath);
344
345- run (null, "uncommit.uncommit(branch=b, tree=tree)\ndel tree\n");
346+ run (null, "uncommit.uncommit(branch=b, tree=tree)\n");
347 monitor.Log.WriteLine ("Uncommit complete.");
348 }// Uncommit
349
350@@ -875,7 +901,6 @@
351 command.AppendFormat (" f.close()\n");
352 command.AppendFormat ("finally:\n");
353 command.AppendFormat (" tree.unlock()\n");
354- command.AppendFormat (" del tree\n");
355
356 string annotations = StringFromPython (run (new List<string>{"annotations"}, command.ToString ())[0]);
357
358
359=== modified file 'BazaarClient.cs'
360--- BazaarClient.cs 2009-10-09 20:44:01 +0000
361+++ BazaarClient.cs 2010-10-22 13:29:40 +0000
362@@ -62,7 +62,7 @@
363 string[] tokens = v.Split ('.');
364 int major = int.Parse (tokens[0]),
365 minor = int.Parse (tokens[1]);
366- return (1 < major || 16 <= minor);
367+ return (3 <= major || (2 == major && 1 <= minor));
368 }
369 }
370 catch { }
371@@ -105,6 +105,7 @@
372 public abstract void Pull (string pullLocation, string localPath, bool remember, bool overwrite, IProgressMonitor monitor);
373 public abstract void Commit (ChangeSet changeSet, IProgressMonitor monitor);
374 public abstract DiffInfo[] Diff (string basePath, string[] files);
375+ public abstract DiffInfo[] Diff (string path, BazaarRevision fromRevision, BazaarRevision toRevision);
376 public abstract void Remove (string path, bool force, IProgressMonitor monitor);
377 public abstract void Resolve (string path, bool recurse, IProgressMonitor monitor);
378 public abstract Dictionary<string, BranchType> GetKnownBranches (string path);
379
380=== modified file 'BazaarCommands.cs'
381--- BazaarCommands.cs 2010-01-19 22:14:40 +0000
382+++ BazaarCommands.cs 2010-10-22 13:29:40 +0000
383@@ -21,8 +21,8 @@
384
385 using Gtk;
386 using MonoDevelop.Core;
387-using MonoDevelop.Core.ProgressMonitoring;
388-using MonoDevelop.Core.Gui;
389+using MonoDevelop.Core.ProgressMonitoring;
390+using MonoDevelop.Ide;
391 using MonoDevelop.Ide.Gui;
392 using MonoDevelop.Ide.Gui.Pads;
393 using MonoDevelop.Ide.Gui.Pads.ProjectPad;
394@@ -179,6 +179,19 @@
395 string defaultBranch = string.Empty,
396 localPath = vcitem.IsDirectory? vcitem.Path: Path.GetDirectoryName (vcitem.Path);
397
398+ if (repo.IsModified (BazaarRepository.GetLocalBasePath (vcitem.Path.FullPath))) {
399+ MessageDialog md = new MessageDialog (null, DialogFlags.Modal,
400+ MessageType.Question, ButtonsType.YesNo,
401+ GettextCatalog.GetString ("You have uncommitted local changes. Merge anyway?"));
402+ try {
403+ if ((int)ResponseType.Yes != md.Run ()) {
404+ return;
405+ }
406+ } finally {
407+ md.Destroy ();
408+ }
409+ }// warn about uncommitted changes
410+
411 foreach (KeyValuePair<string, BranchType> branch in branches) {
412 if (BranchType.Parent == branch.Value) {
413 defaultBranch = branch.Key;
414@@ -186,12 +199,12 @@
415 }
416 }// check for parent branch
417
418- Dialogs.BranchSelectionDialog bsd = new Dialogs.BranchSelectionDialog (branches.Keys, defaultBranch, localPath, false, true, true, false);
419+ Dialogs.BranchSelectionDialog bsd = new Dialogs.BranchSelectionDialog (branches.Keys, defaultBranch, localPath, false, true, false, false);
420 try {
421 if ((int)Gtk.ResponseType.Ok == bsd.Run () && !string.IsNullOrEmpty (bsd.SelectedLocation)) {
422 BazaarTask worker = new BazaarTask ();
423 worker.Description = string.Format ("Merging from {0}", bsd.SelectedLocation);
424- worker.Operation = delegate{ repo.Merge (bsd.SelectedLocation, vcitem.Path, bsd.SaveDefault, bsd.Overwrite, worker.ProgressMonitor); };
425+ worker.Operation = delegate{ repo.Merge (bsd.SelectedLocation, vcitem.Path, bsd.SaveDefault, true, worker.ProgressMonitor); };
426 worker.Start ();
427 }
428 } finally {
429
430=== modified file 'BazaarRepository.cs'
431--- BazaarRepository.cs 2009-10-21 21:13:45 +0000
432+++ BazaarRepository.cs 2010-10-22 13:29:40 +0000
433@@ -20,6 +20,7 @@
434 using System.Collections;
435 using System.Threading;
436
437+using Gtk;
438 using MonoDevelop.Core;
439 using MonoDevelop.VersionControl;
440
441@@ -223,15 +224,46 @@
442
443 public override void RevertToRevision (string localPath, Revision revision, IProgressMonitor monitor)
444 {
445+ if (IsModified (BazaarRepository.GetLocalBasePath (localPath))) {
446+ MessageDialog md = new MessageDialog (null, DialogFlags.Modal,
447+ MessageType.Question, ButtonsType.YesNo,
448+ GettextCatalog.GetString ("You have uncommitted local changes. Revert anyway?"));
449+ try {
450+ if ((int)ResponseType.Yes != md.Run ()) {
451+ return;
452+ }
453+ } finally {
454+ md.Destroy ();
455+ }
456+ }// warn about uncommitted changes
457+
458 BazaarRevision brev = (null == revision)? new BazaarRevision (this, BazaarRevision.HEAD): (BazaarRevision)revision;
459 Bazaar.Revert (localPath, true, monitor, brev);
460 }
461
462 public override void RevertRevision (string localPath, Revision revision, IProgressMonitor monitor)
463 {
464+ if (IsModified (BazaarRepository.GetLocalBasePath (localPath))) {
465+ MessageDialog md = new MessageDialog (null, DialogFlags.Modal,
466+ MessageType.Question, ButtonsType.YesNo,
467+ GettextCatalog.GetString ("You have uncommitted local changes. Revert anyway?"));
468+ try {
469+ if ((int)ResponseType.Yes != md.Run ()) {
470+ return;
471+ }
472+ } finally {
473+ md.Destroy ();
474+ }
475+ }// warn about uncommitted changes
476+
477 BazaarRevision brev = (BazaarRevision)revision;
478+<<<<<<< TREE
479 localPath = Path.GetFullPath (localPath);
480 Bazaar.Merge (localPath, localPath, false, false, brev, (BazaarRevision)(brev.GetPrevious ()), monitor);
481+=======
482+ string localPathStr = localPath.FullPath;
483+ Bazaar.Merge (localPathStr, localPathStr, false, true, brev, (BazaarRevision)(brev.GetPrevious ()), monitor);
484+>>>>>>> MERGE-SOURCE
485 }
486
487 public override bool IsVersioned (string localPath)
488@@ -340,6 +372,7 @@
489 return Bazaar.Diff (baseLocalPath, localPaths);
490 }// PathDiff
491
492+<<<<<<< TREE
493 public override void DeleteFiles (string[] localPaths, bool force, IProgressMonitor monitor)
494 {
495 foreach (string localPath in localPaths)
496@@ -361,6 +394,34 @@
497 public virtual Dictionary<string, BranchType> GetKnownBranches (string localPath)
498 {
499 return Bazaar.GetKnownBranches (Path.GetFullPath(localPath));
500+=======
501+ public override DiffInfo[] PathDiff (FilePath localPath, Revision fromRevision, Revision toRevision)
502+ {
503+ return Bazaar.Diff (localPath, (BazaarRevision)fromRevision, (BazaarRevision)toRevision);
504+ }
505+
506+ public override void DeleteFiles (FilePath[] localPaths, bool force, IProgressMonitor monitor)
507+ {
508+ foreach (FilePath localPath in localPaths)
509+ Bazaar.Remove (localPath.FullPath, force, monitor);
510+ }// DeleteFiles
511+
512+ public override void DeleteDirectories (FilePath[] localPaths, bool force, IProgressMonitor monitor)
513+ {
514+ foreach (FilePath localPath in localPaths)
515+ Bazaar.Remove (localPath.FullPath, force, monitor);
516+ }// DeleteDirectories
517+
518+ public virtual void Resolve (FilePath[] localPaths, bool recurse, IProgressMonitor monitor)
519+ {
520+ foreach (FilePath localPath in localPaths)
521+ Bazaar.Resolve (localPath.FullPath, recurse, monitor);
522+ }// Resolve
523+
524+ public virtual Dictionary<string, BranchType> GetKnownBranches (FilePath localPath)
525+ {
526+ return Bazaar.GetKnownBranches (localPath.FullPath);
527+>>>>>>> MERGE-SOURCE
528 }// GetKnownBranches
529
530 public virtual void Ignore (string localPath)
531
532=== modified file 'BazaarVersionControl.cs'
533--- BazaarVersionControl.cs 2010-01-19 22:14:40 +0000
534+++ BazaarVersionControl.cs 2010-10-22 13:29:40 +0000
535@@ -249,7 +249,7 @@
536 public void Commit (ChangeSet changeSet, IProgressMonitor monitor) {
537 if (Client.IsMergePending (Path.GetFullPath (changeSet.BaseLocalPath))) {
538 int result = (int)ResponseType.Cancel;
539- MonoDevelop.Core.Gui.DispatchService.GuiSyncDispatch(delegate{
540+ MonoDevelop.Ide.DispatchService.GuiSyncDispatch(delegate{
541 MessageDialog warningDialog = new MessageDialog (null, DialogFlags.Modal, MessageType.Warning, ButtonsType.OkCancel,
542 GettextCatalog.GetString ("Because there are merges pending, all pending changes must be committed together. Proceed?"));
543 result = warningDialog.Run ();
544@@ -274,6 +274,11 @@
545 public DiffInfo[] Diff (string basePath, string[] files) {
546 return Client.Diff (basePath, files);
547 }// Diff
548+
549+ public DiffInfo[] Diff (string path, BazaarRevision fromRevision, BazaarRevision toRevision)
550+ {
551+ return Client.Diff (path, fromRevision, toRevision);
552+ }// Diff
553
554 public void Remove (string path, bool force, IProgressMonitor monitor) {
555 Client.Remove (path, force, monitor);
556
557=== modified file 'Dialogs/BranchSelectionDialog.cs'
558--- Dialogs/BranchSelectionDialog.cs 2009-10-23 17:46:24 +0000
559+++ Dialogs/BranchSelectionDialog.cs 2010-10-22 13:29:40 +0000
560@@ -96,7 +96,11 @@
561 }
562 }
563 iter = branchStore.AppendValues (string.Empty);
564-
565+
566+ if (1 == branchLocations.Count) {
567+ branchStore.GetIterFirst (out iter);
568+ }// when only one branch is known, default to it
569+
570 branchTreeView.Selection.SelectIter (found? defaultIter: iter);
571
572 if (!string.IsNullOrEmpty (localDirectory))
573
574=== modified file 'IBazaarClient.cs'
575--- IBazaarClient.cs 2009-10-09 20:44:01 +0000
576+++ IBazaarClient.cs 2010-10-22 13:29:40 +0000
577@@ -273,6 +273,23 @@
578 DiffInfo[] Diff (string basePath, string[] files);
579
580 /// <summary>
581+ /// Performs a recursive diff
582+ /// </summary>
583+ /// <param name="path">
584+ /// A <see cref="System.String"/>: The path to be diffed
585+ /// </param>
586+ /// <param name="fromRevision">
587+ /// A <see cref="BazaarRevision"/>: The beginning revision
588+ /// </param>
589+ /// <param name="toRevision">
590+ /// A <see cref="BazaarRevision"/>: The ending revision
591+ /// </param>
592+ /// <returns>
593+ /// A <see cref="DiffInfo[]"/>: The differences
594+ /// </returns>
595+ DiffInfo[] Diff (string path, BazaarRevision fromRevision, BazaarRevision toRevision);
596+
597+ /// <summary>
598 /// Removes a path
599 /// </summary>
600 /// <param name="path">
601
602=== modified file 'MonoDevelop.VersionControl.Bazaar.addin.xml'
603--- MonoDevelop.VersionControl.Bazaar.addin.xml 2009-12-25 11:01:50 +0000
604+++ MonoDevelop.VersionControl.Bazaar.addin.xml 2010-10-22 13:29:40 +0000
605@@ -6,18 +6,29 @@
606 url = "http://bazaar-vcs.org/MonoDevelop"
607 description = "Bazaar support for the Version Control Addin"
608 category = "Version Control"
609+<<<<<<< TREE
610 version = "2.0.0">
611+=======
612+ version = "2.4.1">
613+>>>>>>> MERGE-SOURCE
614
615 <Runtime>
616 <Import assembly="MonoDevelop.VersionControl.Bazaar.dll"/>
617+ <Import file="MonoDevelop.VersionControl.Bazaar.dll.config"/>
618 </Runtime>
619
620 <Dependencies>
621+<<<<<<< TREE
622 <Addin id="Core" version="2.0"/>
623 <Addin id="Core.Gui" version="2.0"/>
624 <Addin id="Projects" version="2.0"/>
625 <Addin id="Ide" version="2.0"/>
626 <Addin id="VersionControl" version="2.0"/>
627+=======
628+ <Addin id="Core" version="2.4"/>
629+ <Addin id="Ide" version="2.4"/>
630+ <Addin id="VersionControl" version="2.4"/>
631+>>>>>>> MERGE-SOURCE
632 </Dependencies>
633
634 <Extension path = "/MonoDevelop/VersionControl/VersionControlSystems">
635
636=== modified file 'MonoDevelop.VersionControl.Bazaar.dll.config'
637--- MonoDevelop.VersionControl.Bazaar.dll.config 2009-10-29 19:43:31 +0000
638+++ MonoDevelop.VersionControl.Bazaar.dll.config 2010-10-22 13:29:40 +0000
639@@ -1,3 +1,3 @@
640 <configuration>
641- <dllmap os="!windows" dll="python25" target="python2.5" />
642+ <dllmap os="!windows" dll="python25" target="python2.6" />
643 </configuration>
644\ No newline at end of file
645
646=== added file 'addin-project.xml'
647--- addin-project.xml 1970-01-01 00:00:00 +0000
648+++ addin-project.xml 2010-10-22 13:29:40 +0000
649@@ -0,0 +1,8 @@
650+<AddinProject appVersion="2.4">
651+ <Project platforms="Mac Linux">
652+ <AddinFile>bin/Debug/MonoDevelop.VersionControl.Bazaar.dll</AddinFile>
653+ <BuildFile>monodevelop-bzr.sln</BuildFile>
654+ <BuildConfiguration>Debug</BuildConfiguration>
655+ </Project>
656+</AddinProject>
657+
658
659=== modified file 'gtk-gui/MonoDevelop.VersionControl.Bazaar.Dialogs.PasswordPromptDialog.cs'
660--- gtk-gui/MonoDevelop.VersionControl.Bazaar.Dialogs.PasswordPromptDialog.cs 2009-10-21 21:13:45 +0000
661+++ gtk-gui/MonoDevelop.VersionControl.Bazaar.Dialogs.PasswordPromptDialog.cs 2010-10-22 13:29:40 +0000
662@@ -54,7 +54,7 @@
663 this.passwordEntry.IsEditable = true;
664 this.passwordEntry.ActivatesDefault = true;
665 this.passwordEntry.Visibility = false;
666- this.passwordEntry.InvisibleChar = '●';
667+ this.passwordEntry.InvisibleChar = '*';
668 this.vbox2.Add(this.passwordEntry);
669 Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox2[this.passwordEntry]));
670 w3.Position = 1;
671
672=== added file 'monodevelop-bzr.csproj'
673--- monodevelop-bzr.csproj 1970-01-01 00:00:00 +0000
674+++ monodevelop-bzr.csproj 2010-10-22 13:29:40 +0000
675@@ -0,0 +1,102 @@
676+<?xml version="1.0" encoding="utf-8"?>
677+<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
678+ <PropertyGroup>
679+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
680+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
681+ <ProductVersion>9.0.21022</ProductVersion>
682+ <SchemaVersion>2.0</SchemaVersion>
683+ <ProjectGuid>{2E2AA9EF-1D11-4E71-87BF-6CD48C0CF23F}</ProjectGuid>
684+ <OutputType>Library</OutputType>
685+ <RootNamespace>MonoDevelop.VersionControl.Bazaar</RootNamespace>
686+ <AssemblyName>MonoDevelop.VersionControl.Bazaar</AssemblyName>
687+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
688+ </PropertyGroup>
689+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
690+ <DebugSymbols>true</DebugSymbols>
691+ <DebugType>full</DebugType>
692+ <Optimize>true</Optimize>
693+ <OutputPath>bin\Debug</OutputPath>
694+ <ErrorReport>prompt</ErrorReport>
695+ <WarningLevel>4</WarningLevel>
696+ <ConsolePause>false</ConsolePause>
697+ <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
698+ <Execution>
699+ <Execution clr-version="Net_2_0" />
700+ </Execution>
701+ </PropertyGroup>
702+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
703+ <DebugType>none</DebugType>
704+ <Optimize>true</Optimize>
705+ <OutputPath>bin\Release</OutputPath>
706+ <ErrorReport>prompt</ErrorReport>
707+ <WarningLevel>4</WarningLevel>
708+ <ConsolePause>false</ConsolePause>
709+ <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
710+ <Execution>
711+ <Execution clr-version="Net_2_0" />
712+ </Execution>
713+ </PropertyGroup>
714+ <ItemGroup>
715+ <Compile Include="AssemblyInfo.cs" />
716+ <Compile Include="gtk-gui\generated.cs" />
717+ <Compile Include="BazaarVersionControl.cs" />
718+ <Compile Include="BazaarRepository.cs" />
719+ <Compile Include="IBazaarClient.cs" />
720+ <Compile Include="BazaarClient.cs" />
721+ <Compile Include="BazaarCommandException.cs" />
722+ <Compile Include="BazaarRevision.cs" />
723+ <Compile Include="BazaarClientException.cs" />
724+ <Compile Include="BazaarCommands.cs" />
725+ <Compile Include="Dialogs\BranchSelectionDialog.cs" />
726+ <Compile Include="gtk-gui\MonoDevelop.VersionControl.Bazaar.Dialogs.BranchSelectionDialog.cs" />
727+ <Compile Include="Dialogs\PasswordPromptDialog.cs" />
728+ <Compile Include="gtk-gui\MonoDevelop.VersionControl.Bazaar.Dialogs.PasswordPromptDialog.cs" />
729+ <Compile Include="BazaarCLibClient.cs" />
730+ </ItemGroup>
731+ <ItemGroup>
732+ <EmbeddedResource Include="gtk-gui\gui.stetic">
733+ <LogicalName>gui.stetic</LogicalName>
734+ </EmbeddedResource>
735+ <EmbeddedResource Include="MonoDevelop.VersionControl.Bazaar.addin.xml">
736+ <LogicalName>MonoDevelop.VersionControl.Bazaar.addin.xml</LogicalName>
737+ </EmbeddedResource>
738+ </ItemGroup>
739+ <ItemGroup>
740+ <None Include="BazaarCommandClient.cs" />
741+ <None Include="BazaarLibClient.cs" />
742+ <None Include="bazaarlibclient.py" />
743+ <None Include="MonoDevelop.VersionControl.Bazaar.dll.config">
744+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
745+ </None>
746+ </ItemGroup>
747+ <ItemGroup>
748+ <Folder Include="Dialogs\" />
749+ </ItemGroup>
750+ <ItemGroup>
751+ <Reference Include="System" />
752+ <Reference Include="Mono.Posix" />
753+ <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
754+ <Package>gtk-sharp-2.0</Package>
755+ </Reference>
756+ <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
757+ <Package>gtk-sharp-2.0</Package>
758+ </Reference>
759+ <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
760+ <Package>glib-sharp-2.0</Package>
761+ </Reference>
762+ <Reference Include="System.Xml" />
763+ <Reference Include="MonoDevelop.Core, Version=2.4.0.0, Culture=neutral, PublicKeyToken=null">
764+ <Package>monodevelop</Package>
765+ </Reference>
766+ <Reference Include="MonoDevelop.VersionControl, Version=2.4.0.0, Culture=neutral, PublicKeyToken=null">
767+ <Package>monodevelop-core-addins</Package>
768+ </Reference>
769+ <Reference Include="MonoDevelop.Ide, Version=2.4.0.0, Culture=neutral, PublicKeyToken=null">
770+ <Package>monodevelop</Package>
771+ </Reference>
772+ <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
773+ <Package>gtk-sharp-2.0</Package>
774+ </Reference>
775+ </ItemGroup>
776+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
777+</Project>
778
779=== modified file 'monodevelop-bzr.mdp'
780--- monodevelop-bzr.mdp 2009-12-25 11:01:50 +0000
781+++ monodevelop-bzr.mdp 2010-10-22 13:29:40 +0000
782@@ -44,6 +44,12 @@
783 <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
784 <ProjectReference type="Gac" localcopy="True" refto="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
785 <ProjectReference type="Gac" localcopy="True" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
786+<<<<<<< TREE
787+=======
788+ <ProjectReference type="Gac" localcopy="True" refto="MonoDevelop.Core, Version=2.1.0.0, Culture=neutral, PublicKeyToken=" />
789+ <ProjectReference type="Gac" localcopy="True" refto="MonoDevelop.VersionControl, Version=2.1.0.0, Culture=neutral, PublicKeyToken=" />
790+ <ProjectReference type="Gac" localcopy="True" refto="MonoDevelop.Ide, Version=2.1.0.0, Culture=neutral, PublicKeyToken=" />
791+>>>>>>> MERGE-SOURCE
792 <ProjectReference type="Gac" localcopy="True" refto="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
793 <ProjectReference type="Gac" localcopy="True" refto="MonoDevelop.Core, Version=2.0.0.0, Culture=neutral" />
794 <ProjectReference type="Gac" localcopy="True" refto="MonoDevelop.Ide, Version=2.0.0.0, Culture=neutral" />
795
796=== added file 'monodevelop-bzr.sln'
797--- monodevelop-bzr.sln 1970-01-01 00:00:00 +0000
798+++ monodevelop-bzr.sln 2010-10-22 13:29:40 +0000
799@@ -0,0 +1,24 @@
800+
801+Microsoft Visual Studio Solution File, Format Version 10.00
802+# Visual Studio 2008
803+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "monodevelop-bzr", "monodevelop-bzr.csproj", "{2E2AA9EF-1D11-4E71-87BF-6CD48C0CF23F}"
804+EndProject
805+Global
806+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
807+ Debug|Any CPU = Debug|Any CPU
808+ Release|Any CPU = Release|Any CPU
809+ EndGlobalSection
810+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
811+ {2E2AA9EF-1D11-4E71-87BF-6CD48C0CF23F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
812+ {2E2AA9EF-1D11-4E71-87BF-6CD48C0CF23F}.Debug|Any CPU.Build.0 = Debug|Any CPU
813+ {2E2AA9EF-1D11-4E71-87BF-6CD48C0CF23F}.Release|Any CPU.ActiveCfg = Release|Any CPU
814+ {2E2AA9EF-1D11-4E71-87BF-6CD48C0CF23F}.Release|Any CPU.Build.0 = Release|Any CPU
815+ EndGlobalSection
816+ GlobalSection(MonoDevelopProperties) = preSolution
817+ StartupItem = monodevelop-bzr.csproj
818+ Policies = $0
819+ $0.StandardHeader = $1
820+ $1.inheritsSet = GPLv2License
821+ name = monodevelop-bzr
822+ EndGlobalSection
823+EndGlobal

Subscribers

People subscribed via source and target branches