You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by gi...@apache.org on 2018/03/13 10:12:35 UTC

ant-ivy git commit: Refine asciidoc styling

Repository: ant-ivy
Updated Branches:
  refs/heads/master a11454b5f -> e536c35a9


Refine asciidoc styling

Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/e536c35a
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/e536c35a
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/e536c35a

Branch: refs/heads/master
Commit: e536c35a9a53f65e1b4b50734a05322f448d30ad
Parents: a11454b
Author: Gintas Grigelionis <gi...@apache.org>
Authored: Tue Mar 13 11:12:21 2018 +0100
Committer: Gintas Grigelionis <gi...@apache.org>
Committed: Tue Mar 13 11:12:21 2018 +0100

----------------------------------------------------------------------
 asciidoc/dev/conflict-solving-algo.adoc | 108 +++++++++++++--------------
 1 file changed, 54 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/e536c35a/asciidoc/dev/conflict-solving-algo.adoc
----------------------------------------------------------------------
diff --git a/asciidoc/dev/conflict-solving-algo.adoc b/asciidoc/dev/conflict-solving-algo.adoc
index e144f1f..51437cb 100644
--- a/asciidoc/dev/conflict-solving-algo.adoc
+++ b/asciidoc/dev/conflict-solving-algo.adoc
@@ -51,62 +51,62 @@ It is presented in a very simplified description language, far away from the who
 but giving a good understanding of how it works. In particular, it completely hides some complexity due
 to configurations management.
 
-```
+[source,java,subs="verbatim,quotes"]
+----
 resolve(node) {
-	node.resolved(node.mid) = <i>collection</i>(node);
-	resolveConflict(node, node.parent, empty);
-	if (!node.evicted && !node.alreadyResolved) {
-		node.loadData();
-		resolveConflict(node, node.parent, empty);
-		if (!node.evicted) {
-			// actually do resolve
-			foreach (dep in node.dependencies) {
-				resolve(dep);
-			}
-		}
-	}
+    node.resolved(node.mid) = _collection_(node);
+    resolveConflict(node, node.parent, empty);
+    if (!node.evicted && !node.alreadyResolved) {
+        node.loadData();
+        resolveConflict(node, node.parent, empty);
+        if (!node.evicted) {
+            // actually do resolve
+            foreach (dep in node.dependencies) {
+                resolve(dep);
+            }
+        }
+    }
 }
 
 resolveConflict(node, parent, toevict) {
-	if (node.revision.exact && parent.resolved(node.mid).revision.contains(node.revision)) { 
-		// exact revision already in resolved
-		// => job already done
-		return;
-	}
-	if (parent.resolved(node.mid).containsAny(toevict)) {
-		// parent.resolved(node.mid) is not up to date:
-		// recompute resolved from all sub nodes
-		resolved = parent.cm(node.mid).resolveConflicts(
-		                                 parent.dependencies.resolved(node.mid));
-	} else {
-		resolved = parent.cm(node.mid).resolveConflicts(<i>collection</i>(node, parent.resolved(node.mid)));
-	}
-	if (resolved.contains(node)) {
-		// node has been selected for the current parent
-		// we update its eviction... but it can still be evicted by parent !
-		node.evicted = false;
-		
-		// handle previously selected nodes that are now evicted by this new node
-		toevict = parent.resolved(node.mid) - resolved;
-		foreach (te in toevict) {
-			te.evicted = true;
-		}
-		
-		// it's very important to update resolved BEFORE recompute parent call
-		// to allow it to recompute its resolved collection with correct data
-		// if necessary
-		parent.resolved(node.mid) = resolved; 
-		if (parent.parent != null) {
-			resolveConflict(node, parent.parent, toevict);
-		}
-	} else {
-		// node has been evicted for the current parent
-		
-		// it's time to update parent resolved with found resolved...
-		// if they have not been recomputed, it does not change anything
-		parent.resolved(node.mid) = resolved; 
-		
-		node.evicted = true;
-	}
+    if (node.revision.exact && parent.resolved(node.mid).revision.contains(node.revision)) {
+        // exact revision already in resolved
+        // => job already done
+        return;
+    }
+    if (parent.resolved(node.mid).containsAny(toevict)) {
+        // parent.resolved(node.mid) is not up to date:
+        // recompute resolved from all sub nodes
+        resolved = parent.cm(node.mid).resolveConflicts(parent.dependencies.resolved(node.mid));
+    } else {
+        resolved = parent.cm(node.mid).resolveConflicts(_collection_(node, parent.resolved(node.mid)));
+    }
+    if (resolved.contains(node)) {
+        // node has been selected for the current parent
+        // we update its eviction... but it can still be evicted by parent !
+        node.evicted = false;
+
+        // handle previously selected nodes that are now evicted by this new node
+        toevict = parent.resolved(node.mid) - resolved;
+        foreach (te in toevict) {
+            te.evicted = true;
+        }
+
+        // it's very important to update resolved BEFORE recompute parent call
+        // to allow it to recompute its resolved collection with correct data
+        // if necessary
+        parent.resolved(node.mid) = resolved;
+        if (parent.parent != null) {
+            resolveConflict(node, parent.parent, toevict);
+        }
+    } else {
+        // node has been evicted for the current parent
+
+        // it's time to update parent resolved with found resolved...
+        // if they have not been recomputed, it does not change anything
+        parent.resolved(node.mid) = resolved;
+
+        node.evicted = true;
+    }
 }
-```
+----