[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 4e112f8 04/36: Updated add-tree method
From: |
Alexey Veretennikov |
Subject: |
[elpa] master 4e112f8 04/36: Updated add-tree method |
Date: |
Wed, 27 Jan 2016 23:50:49 +0000 |
branch: master
commit 4e112f84b9ea5b25ce6be0093e0485ac2ab70ffb
Author: Alexey Veretennikov <address@hidden>
Commit: Alexey Veretennikov <address@hidden>
Updated add-tree method
---
ztree-diff-model.el | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/ztree-diff-model.el b/ztree-diff-model.el
index 96b6ce3..f48a785 100644
--- a/ztree-diff-model.el
+++ b/ztree-diff-model.el
@@ -171,7 +171,7 @@ Filters out . and .."
nil
'diff))))))
-(defun ztree-diff-model-subtree (parent path side)
+(defun ztree-diff-model-subtree (parent path side diff)
"Create a subtree with given PARENT for the given PATH.
Argument SIDE either 'left or 'right side."
(let ((files (ztree-directory-files path))
@@ -185,8 +185,8 @@ Argument SIDE either 'left or 'right side."
(ztree-file-short-name file)
(ztree-file-short-name file)
nil
- 'new))
- (children (ztree-diff-model-subtree node file side)))
+ diff))
+ (children (ztree-diff-model-subtree node file side diff)))
(ztree-diff-node-set-children node children)
(push node result))
(push (ztree-diff-node-create
@@ -196,7 +196,7 @@ Argument SIDE either 'left or 'right side."
(ztree-file-short-name file)
(ztree-file-short-name file)
nil
- 'new)
+ diff)
result)))
result))
@@ -266,7 +266,7 @@ the rest is the combined list of nodes."
;; when exist just on a left side and is a directory, add all
((and (file-directory-p file1) (not file2))
(ztree-diff-node-set-children node
- (ztree-diff-model-subtree node file1
'left)))
+ (ztree-diff-model-subtree node file1
'left 'new)))
;; if exists on both sides and it is a file, compare
((and file2 (not (file-directory-p file1)))
(ztree-diff-node-set-different node
@@ -298,7 +298,8 @@ the rest is the combined list of nodes."
(unless file1
;; if it is a directory, set the whole subtree to children
(when (file-directory-p file2)
- (ztree-diff-node-set-children node (ztree-diff-model-subtree node
file2 'right)))
+ (ztree-diff-node-set-children node
+ (ztree-diff-model-subtree node file2
'right 'new)))
;; update the different status for the whole comparison
;; depending if the node should participate in overall result
(unless (ztree-diff-model-ignore-p node)
- [elpa] master updated (e7f3aa4 -> a136ff8), Alexey Veretennikov, 2016/01/27
- [elpa] master 4e112f8 04/36: Updated add-tree method,
Alexey Veretennikov <=
- [elpa] master ac0834d 05/36: Updated readme: added information about contributing, Alexey Veretennikov, 2016/01/27
- [elpa] master 5603c70 02/36: Updated README to include new variable introduced in issue #23, Alexey Veretennikov, 2016/01/27
- [elpa] master c6c9257 01/36: Implemented issue #23: Add optional unicode tree drawing facility, Alexey Veretennikov, 2016/01/27
- [elpa] master c75719f 10/36: Replaced hardcoded diff with diff-command from diff.el, Alexey Veretennikov, 2016/01/27
- [elpa] master 418af99 08/36: Added face for ignored files, Alexey Veretennikov, 2016/01/27
- [elpa] master 45b6921 09/36: Updated print function, Alexey Veretennikov, 2016/01/27
- [elpa] master 04b29c8 06/36: Updated readme, Alexey Veretennikov, 2016/01/27
- [elpa] master 67b9b4b 03/36: Issue #24: updated traverse function, Alexey Veretennikov, 2016/01/27
- [elpa] master 4a935ee 07/36: Reshuffled readme, Alexey Veretennikov, 2016/01/27
- [elpa] master 6018029 11/36: Started updating diff logic to include ignored files, Alexey Veretennikov, 2016/01/27