惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
S
Securelist
MyScale Blog
MyScale Blog
Jina AI
Jina AI
罗磊的独立博客
The Cloudflare Blog
美团技术团队
博客园 - 叶小钗
阮一峰的网络日志
阮一峰的网络日志
博客园 - 三生石上(FineUI控件)
月光博客
月光博客
雷峰网
雷峰网
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
博客园 - Franky
博客园 - 聂微东
Y
Y Combinator Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
T
Tailwind CSS Blog
Attack and Defense Labs
Attack and Defense Labs
博客园_首页
Latest news
Latest news
Apple Machine Learning Research
Apple Machine Learning Research
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Hacker News
The Hacker News
G
GRAHAM CLULEY
Simon Willison's Weblog
Simon Willison's Weblog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
U
Unit 42
D
Docker
Webroot Blog
Webroot Blog
N
Netflix TechBlog - Medium
T
Tor Project blog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LINUX DO - 最新话题
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
B
Blog
Recent Announcements
Recent Announcements
GbyAI
GbyAI
Microsoft Azure Blog
Microsoft Azure Blog
Security Latest
Security Latest
V2EX - 技术
V2EX - 技术
N
News | PayPal Newsroom
Microsoft Security Blog
Microsoft Security Blog

博客园 - 油纸伞

假如m是奇数,且m>=3,证明m(m² -1)能被8整除 GetRelativePath获取相对路径 Dictionary(支持 XML 序列化),注意C#中原生的Dictionary类是无法进行Xml序列化的 Winform中Checkbox与其他集合列表类型之间进行关联 Image(支持 XML 序列化),注意C#中原生的Image类是无法进行Xml序列化的 修复使用<code>XmlDocument</code>加载含有DOCTYPE的Xml时,加载后增加“[]”字符的错误 使用序列化来Clone对象 [转]PowerDesigner15生成Hibernate 用户自定义类型的隐式转换 Net3.5及以上版本INotifyPropertyChanged接口的友好用法 知识加油站 知识加油站 Top K算法详细解析 C#值类型和引用类型 Oracle分区技术 对Oracle表分区的一点认识 oracle创建分区表 数据库大表的优化:采用蔟表(clustered tables)及蔟索引(Clustered Index) 2008年.Net编程人员工具参照
SharpSvn操作 -- 获取Commit节点列表
油纸伞 · 2017-04-19 · via 博客园 - 油纸伞

 1         /// <summary>
 2         /// 获取工作目录的所有节点,包括子目录
 3         /// </summary>
 4         /// <param name="workingCopyDir"></param>
 5         /// <returns></returns>
 6         public List<LocalNode> FetchWorkingCopy(string workingCopyDir)
 7         {
 8             var nodes = new List<LocalNode>();
 9             var workingRoot = SvnClient.GetWorkingCopyRoot(workingCopyDir);
10             if (workingRoot == null)
11             {
12                 FetchNotVersionedDir(workingCopyDir, nodes);
13             }
14             else
15             {
16                 FetchWorkingCopyDir(workingCopyDir, nodes);
17             }
18             PrintLocalNodes(nodes);
19             return nodes;
20         }

View Code

 1         private void FetchWorkingCopyDir(string path, List<LocalNode> nodes)
 2         {
 3             var statusArgs = new SvnStatusArgs
 4             {
 5                 Depth = SvnDepth.Children,
 6                 RetrieveAllEntries = true,
 7                 ThrowOnError = false
 8             };
 9             Collection<SvnStatusEventArgs> list;
10             if (!SvnClient.GetStatus(path, statusArgs, out list))
11                 return;
12             for (var i = 1; i < list.Count; i++)
13             {
14                 var argse = list[i];
15                 if (argse.Versioned)
16                 {
17                     nodes.Add(new LocalNode { FullPath = argse.FullPath, NodeKind = argse.NodeKind, NodeStatus = argse.LocalNodeStatus });
18                     if (argse.NodeKind == SvnNodeKind.Directory)
19                         FetchWorkingCopyDir(argse.FullPath, nodes);
20                 }
21                 else
22                 {
23                     var nodeKind = File.Exists(argse.FullPath) ? SvnNodeKind.File : SvnNodeKind.Directory;
24                     nodes.Add(new LocalNode { FullPath = argse.FullPath, NodeKind = nodeKind, NodeStatus = argse.LocalNodeStatus });
25                     if (nodeKind == SvnNodeKind.Directory)
26                         FetchNotVersionedDir(argse.FullPath, nodes);
27                 }
28             }
29         }
30 
31         private void FetchNotVersionedDir(string path, List<LocalNode> nodes)
32         {
33             var files = Directory.GetFiles(path);
34             nodes.AddRange(files.Select(file => new LocalNode { FullPath = file, NodeKind = SvnNodeKind.File, NodeStatus = SvnStatus.NotVersioned }));
35             var dirs = Directory.GetDirectories(path);
36             foreach (var dir in dirs)
37             {
38                 nodes.Add(new LocalNode { FullPath = dir, NodeKind = SvnNodeKind.Directory, NodeStatus = SvnStatus.NotVersioned });
39                 FetchNotVersionedDir(dir, nodes);
40             }
41         }

View Code

1     public class LocalNode
2     {
3         public string FullPath { get; set; }
4         public SvnNodeKind NodeKind { get; set; }
5         public SvnStatus NodeStatus { get; set; }
6     }