Patch for suppressWhenNoRevisions for Log Command
Mark Chaimungkalanont <[email protected]> Tue, 29 Jan 2008 15:16:22 +1100
| Newsgroups | gmane.comp.java.netbeans.modules.javacvs.devel |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail-24--65316960
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=UTF-8;
delsp=yes;
format=flowed
Folks,
I have a patch for LogCommand to add a -S to "Suppress the header if =20
no revisions are selected."
http://www.network-theory.co.uk/docs/cvsmanual/logoptions.html
Are there any devs on this list who can apply this patch?
Cheers,
Mark C
=EF=BF=BC=
--Apple-Mail-24--65316960
Content-Type: multipart/mixed;
boundary=Apple-Mail-25--65316960
--Apple-Mail-25--65316960
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
charset=US-ASCII
<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Folks,
<div><br class="webkit-block-placeholder"></div><div>I have a patch for LogCommand to add a -S to "Suppress the header if no revisions are selected."</div><div><br class="webkit-block-placeholder"></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><a href="http://www.network-theory.co.uk/docs/cvsmanual/logoptions.html">http://www.network-theory.co.uk/docs/cvsmanual/logoptions.html</a></font></div></div><div><br class="webkit-block-placeholder"></div><div>Are there any devs on this list who can apply this patch?</div><div><br class="webkit-block-placeholder"></div><div>Cheers,</div><div><br class="webkit-block-placeholder"></div><div>Mark C</div><div><br class="webkit-block-placeho
lder"></div><div><span></span></div></body></html>
--Apple-Mail-25--65316960
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
x-unix-mode=0644;
name=suppressWhenNoRevisions.patch
Content-Disposition: attachment;
filename=suppressWhenNoRevisions.patch
Index: libsrc/org/netbeans/lib/cvsclient/command/log/LogCommand.java
===================================================================
--- libsrc/org/netbeans/lib/cvsclient/command/log/LogCommand.java (revision 1.26)
+++ libsrc/org/netbeans/lib/cvsclient/command/log/LogCommand.java Tue Sep 18 16:15:50 EST 2007
@@ -57,6 +57,11 @@
private boolean noTags;
/**
+ * Supress log output when no revisions are selected within a file
+ */
+ private boolean suppressWhenNoRevisions;
+
+ /**
* Holds value of property revisionFilter.
*/
private String revisionFilter;
@@ -119,6 +124,9 @@
if (noTags) {
requests.add(1, new ArgumentRequest("-N")); //NOI18N
}
+ if (suppressWhenNoRevisions) {
+ requests.add(1, new ArgumentRequest("-S")); //NOI18N
+ }
if (userFilter != null) {
requests.add(1, new ArgumentRequest("-w" + userFilter)); //NOI18N
}
@@ -222,6 +230,16 @@
this.noTags = noTags;
}
+ public boolean isSuppressWhenNoRevisions()
+ {
+ return suppressWhenNoRevisions;
+ }
+
+ public void setSuppressWhenNoRevisions(boolean suppressWhenNoRevisions)
+ {
+ this.suppressWhenNoRevisions = suppressWhenNoRevisions;
+ }
+
/** Getter for property revisionFilter, equals the command-line CVS switch "-r".
* @return Value of property revisionFilter.
*/
@@ -320,6 +338,9 @@
else if (opt == 'N') {
setNoTags(true);
}
+ else if (opt == 'S') {
+ setSuppressWhenNoRevisions(true);
+ }
else if (opt == 'd') {
setDateFilter(optArg);
}
@@ -345,6 +366,7 @@
setHeaderOnly(false);
setHeaderAndDescOnly(false);
setNoTags(false);
+ setSuppressWhenNoRevisions(false);
setDateFilter(null);
setRevisionFilter(null);
setStateFilter(null);
@@ -376,6 +398,9 @@
if (isNoTags()) {
toReturn.append("-N "); //NOI18N
}
+ if (isSuppressWhenNoRevisions()) {
+ toReturn.append("-S "); //NOI18N
+ }
if (!isRecursive()) {
toReturn.append("-l "); //NOI18N
}
--Apple-Mail-25--65316960
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
charset=US-ASCII
<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span></span></div></body></html>
--Apple-Mail-25--65316960--
--Apple-Mail-24--65316960--