~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/LockCommand.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
ImportĀ upstreamĀ versionĀ 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
//
27
27
 
28
28
using System;
 
29
using System.Linq;
29
30
using MonoDevelop.Core;
30
31
using System.IO;
31
32
 
35
36
        {
36
37
                public static bool Lock (VersionControlItemList items, bool test)
37
38
                {
38
 
                        foreach (VersionControlItem it in items)
39
 
                                if (!it.Repository.CanLock (it.Path))
40
 
                                        return false;
 
39
                        if (!items.All (i => i.VersionInfo.CanLock))
 
40
                                return false;
41
41
                        if (test)
42
42
                                return true;
43
43
                        
65
65
                                Monitor.ReportSuccess (GettextCatalog.GetString ("Lock operation completed."));
66
66
                                
67
67
                                Gtk.Application.Invoke (delegate {
68
 
                                        foreach (VersionControlItem item in items)
69
 
                                                VersionControlService.NotifyFileStatusChanged (item.Repository, item.Path, item.IsDirectory);
 
68
                                        VersionControlService.NotifyFileStatusChanged (items);
70
69
                                });
71
70
                        }
72
71
                }