You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by ju...@apache.org on 2002/02/27 21:17:56 UTC
cvs commit: jakarta-turbine-maven/src/java/org/apache/maven/jrcs/rcs BranchNode.java Node.java TrunkNode.java
juanco 02/02/27 12:17:56
Modified: src/java/org/apache/maven/jrcs/rcs BranchNode.java Node.java
TrunkNode.java
Log:
renamed Node._next to Node._child to better reflect its purpose and avoid confusions with Node._rcsnext
Revision Changes Path
1.7 +23 -10 jakarta-turbine-maven/src/java/org/apache/maven/jrcs/rcs/BranchNode.java
Index: BranchNode.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jrcs/rcs/BranchNode.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- BranchNode.java 27 Feb 2002 20:05:00 -0000 1.6
+++ BranchNode.java 27 Feb 2002 20:17:56 -0000 1.7
@@ -70,14 +70,17 @@
* @see Archive
*
* @author <a href="mailto:juanco@suigeneris.org">Juanco Anez</a>
- * @version $Id: BranchNode.java,v 1.6 2002/02/27 20:05:00 juanco Exp $
+ * @version $Id: BranchNode.java,v 1.7 2002/02/27 20:17:56 juanco Exp $
*/
class BranchNode
extends Node
{
/**
- * the next field in a Branch node points to the next higher
- * revision on the same branch
+ * Create a BranchNode with the given version number.
+ * The next field in a Branch node points to the next higher
+ * revision on the same branch.
+ * @param vernum the version number for the node
+ * @param next the next node in the logical RCS hierarchy.
*/
BranchNode(Version vernum, BranchNode next)
{
@@ -88,6 +91,11 @@
}
}
+
+ /**
+ * Return the last (leaf) node in the branch this node belongs to.
+ * @return The leaf node.
+ */
public BranchNode getLeafNode()
{
BranchNode result = this;
@@ -98,17 +106,22 @@
return result;
}
+
+ /**
+ * Set the next node in the RCS logical hierarcy. Update the parent
+ * and _child node accordingly.
+ */
protected void setRCSNext(Node node)
{
super.setRCSNext(node);
- if (this._next != null)
+ if (this._child != null)
{
- this._next._parent = null;
+ this._child._parent = null;
}
- this._next = node;
- if (this._next != null)
+ this._child = node;
+ if (this._child != null)
{
- this._next._parent = this;
+ this._child._parent = this;
}
}
@@ -133,13 +146,13 @@
}
else if (this.version.isLessThan(branchPoint))
{
- return _next;
+ return _child;
}
else if (vernum.size() <= this.version.size())
{
if (vernum.size() < this.version.size() || branchPoint.last() == 0)
{
- return _next;
+ return _child;
} // keep going
else
{
1.7 +2 -2 jakarta-turbine-maven/src/java/org/apache/maven/jrcs/rcs/Node.java
Index: Node.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jrcs/rcs/Node.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Node.java 27 Feb 2002 20:05:00 -0000 1.6
+++ Node.java 27 Feb 2002 20:17:56 -0000 1.7
@@ -88,7 +88,7 @@
* @see Archive
*
* @author <a href="mailto:juanco@suigeneris.org">Juanco Anez</a>
- * @version $Id: Node.java,v 1.6 2002/02/27 20:05:00 juanco Exp $
+ * @version $Id: Node.java,v 1.7 2002/02/27 20:17:56 juanco Exp $
*/
abstract class Node
extends ToString
@@ -107,7 +107,7 @@
protected Object[] _text;
protected Node _rcsnext;
protected Node _parent;
- protected Node _next;
+ protected Node _child;
protected TreeMap _branches = null;
protected Phrases _phrases = null;
1.7 +4 -4 jakarta-turbine-maven/src/java/org/apache/maven/jrcs/rcs/TrunkNode.java
Index: TrunkNode.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jrcs/rcs/TrunkNode.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- TrunkNode.java 27 Feb 2002 20:05:00 -0000 1.6
+++ TrunkNode.java 27 Feb 2002 20:17:56 -0000 1.7
@@ -72,7 +72,7 @@
* @see Archive
*
* @author <a href="mailto:juanco@suigeneris.org">Juanco Anez</a>
- * @version $Id: TrunkNode.java,v 1.6 2002/02/27 20:05:00 juanco Exp $
+ * @version $Id: TrunkNode.java,v 1.7 2002/02/27 20:17:56 juanco Exp $
*/
class TrunkNode
extends Node
@@ -102,19 +102,19 @@
super.setRCSNext(node);
if (this._parent != null)
{
- this._parent._next = null;
+ this._parent._child = null;
}
this._parent = node;
if (this._parent != null)
{
- this._parent._next = this;
+ this._parent._child = this;
}
}
protected Node deltaRevision()
{
- return (_next != null ? _next : this);
+ return (_child != null ? _child : this);
}
protected Node nextInPathTo(Version vernum, boolean soft)
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>