Esempio n. 1
0
 internal static bool CanBrowse(SVNPath path)
 {
     if (path == null)
     {
         return false;
     }
     return (path.Source.IsURL || FileSystemHelper.IsUrl(path.FilePath));
 }
Esempio n. 2
0
 internal static bool CanCopyFullName(SVNPath path)
 {
     if (path == null)
     {
         return false;
     }
     return true;
 }
Esempio n. 3
0
 internal static bool CanDiff(SVNPath path)
 {
     if (path == null)
     {
         return false;
     }
     if ((path.Action != SVNAction.Modified) && (path.Action != SVNAction.Replaced))
     {
         return false;
     }
     return true;
 }
Esempio n. 4
0
 internal static bool CanCommit(SVNPath path)
 {
     if (path == null)
     {
         return false;
     }
     if (!ApplicationSettingsManager.Settings.CommitIsAlwaysEnabled && !path.Modified)
     {
         return false;
     }
     return true;
 }
Esempio n. 5
0
 internal static bool CanBlame(SVNPath path)
 {
     if (path == null)
     {
         return false;
     }
     if (path.Action == SVNAction.Deleted)
     {
         return false;
     }
     return true;
 }
Esempio n. 6
0
 private static SVNLog SharpSVNToSVNLog(Source source, Collection<SvnLogEventArgs> collection, SVNInfo info, Collection<SvnStatusEventArgs> statusCollection)
 {
     SVNLog log = new SVNLog();
     Dictionary<string, SvnStatusEventArgs> statusMap = GetStatusMap(statusCollection);
     foreach (SvnLogEventArgs logItem in collection)
     {
         DateTime localTime = logItem.Time.ToLocalTime();
         SVNLogEntry entry = new SVNLogEntry(source, logItem.Revision, logItem.Author, localTime, logItem.LogMessage);
         SvnChangeItemCollection items = logItem.ChangedPaths;
         if (items != null)
         {
             List<SVNPath> paths = new List<SVNPath>();
             foreach (SvnChangeItem item in items)
             {
                 SVNPath path = new SVNPath(entry, SVNActionConverter.ToSVNAction(item.Action), item.Path);
                 string pathName = item.Path;
                 if (pathName.StartsWith("/"))
                 {
                     pathName = pathName.Substring(1);
                 }
                 string pathUri = info.RepositoryRoot + pathName;
                 path.Uri = pathUri;
                 if (statusMap.ContainsKey(pathUri))
                 {
                     SvnStatusEventArgs statusItem = statusMap[pathUri];
                     path.FilePath = statusItem.FullPath;
                 }
                 else
                 {
                     string filePath = SVNPath.GuessFilePath(entry, path.Name, info);
                     if (FileSystemHelper.Exists(filePath))
                     {
                         path.FilePath = filePath;
                     }
                     else
                     {
                         path.FilePath = pathUri;
                     }
                 }
                 paths.Add(path);
             }
             entry.Paths = paths;
             log.LogEntries.Add(entry);
         }
     }
     return log;
 }
Esempio n. 7
0
 internal static bool CanEdit(SVNPath path)
 {
     if (path == null)
     {
         return false;
     }
     if (!path.Source.PathExists)
     {
         return false;
     }
     if (!FileSystemHelper.FileExists(path.FilePath))
     {
         return false;
     }
     return true;
 }
Esempio n. 8
0
 internal static bool CanCopyURL(SVNPath path)
 {
     return (path != null);
 }
Esempio n. 9
0
 internal static bool CanCopyToClipboard(SVNPath path)
 {
     return (path != null);
 }
Esempio n. 10
0
 internal static bool CanSVNUpdate(SVNPath path)
 {
     if (path == null)
     {
         return false;
     }
     if (path.Source.IsURL)
     {
         return false;
     }
     return true;
 }
Esempio n. 11
0
 internal static bool CanRunPathWizard(SVNPath path)
 {
     return (path != null);
 }
Esempio n. 12
0
 internal static bool CanRollback(SVNPath path)
 {
     if (path == null)
     {
         return false;
     }
     return (!path.Source.IsURL && !path.Unread);
 }
Esempio n. 13
0
 internal static bool CanRevert(SVNPath path)
 {
     if (path == null)
     {
         return false;
     }
     return path.Modified;
 }
Esempio n. 14
0
 internal static bool CanOpenSVNLog(SVNPath path)
 {
     return (path != null);
 }
Esempio n. 15
0
 internal static bool CanExport(SVNPath path)
 {
     if (path == null)
     {
         return false;
     }
     if (path.ExistsLocally)
     {
         return FileSystemHelper.FileExists(path.FilePath);
     }
     return true;
 }
 private void CreateTipTextForSinglePath(SVNPath path)
 {
     StringBuilder sb = new StringBuilder();
     SVNLogEntry logEntry = path.LogEntry;
     sb.AppendFormat("{0} has updated {1}:{2}", logEntry.Author, logEntry.SourceName, Environment.NewLine);
     sb.AppendLine(logEntry.Message);
     sb.AppendLine(path.FilePath);
     TipText = sb.ToString();
 }