@MinDoc(copyright="Copyright 1997 - 2003, 2014, 2016 A. Weinert", author="Albrecht Weinert", version="V.44", lastModified="6.05.2021", usage="start as Java application (-? for help)", purpose="search files, sort and list; search doublets") public class FS extends App
targetName = repairDates4SVN
beforeDateName = firstCommit
buildFileName = build.xml
projectName = repair SVN's file modification time bug
antCompareTimeFormat = m/d/Y h:i a
afterFirstCeckInTime (null defaults to 10 minutes after generation)
antXMLencoding = ISO-8859-1
The property afterFirstCeckInTime
is the criterion for changes and
further check ins. For those (only) the modification time delivered by SVN
can be considered as non-nonsense. This property may be set by the option
-addTime "yesterday noon"
(e.g.)
java FS -relateToDir -omitDirs .svn;build -antTime |\
grep "m " | \
gawk '{print "svn propset mtime \"" $1 " " $2 " " $3 " \" " $5 }'\
> saveTheDate.bat
call saveTheDate.bat
Restore example:
svn propget mtime -R | \
gawk '{print "touch -m --date=\"" $3 " " $4 " " $5 "\" " $1 }'\
> rescueTheDate.bat
call rescueTheDate.bat
java FS .\+.class -r
java FS C: -omitDirs WINNT -r
java FS D:\weinert\+.doc -e
java FS +.java;+.asm -oneDay -d -r
java FS .\+.class P:\+.class -since
10.06.09 -til 12.06.09_13:00
App
,
Prop
,
FileHelper
ComVar.Impl
Modifier and Type | Field and Description |
---|---|
String |
afterFirstCeckInTime
The compare time.
|
String |
antCompareTimeFormat
Format of the compare time.
|
boolean |
antTime
No file attributes in listing except the time in ugly ANT format.
|
String |
antXMLencoding
Encoding of the output file.
|
String |
beforeDateName
Name of the time property when to repair file dates.
|
String |
buildFileDir
Directory of the output (build) file.
|
String |
buildFileName
Name of the output file.
|
boolean |
contentCompare
Regard also the content as criterion for file equality.
|
boolean |
dateCompare
Regard also the date as criterion for file equality.
|
String |
directory
First directory to be listed.
|
boolean |
doSort
Sort listing by names.
|
boolean |
equalsOnly
Regard only files with doublets.
|
boolean |
keepOne
Comment out one file out of every group of doublets.
|
boolean |
listDirs
List also sub-directories (like files).
|
String |
projectName
Name of the SVN bug repair project.
|
boolean |
pureName
Omit file attributes from listing.
|
boolean |
quoteSpace
Use / list quotes for filenames with spaces.
|
boolean |
recursion
List also files in sub-directories.
|
String |
relateTo
Make filenames relative to this directory specification.
|
boolean |
relateToDir
Make filenames relative to (first) directory to be listed.
|
boolean |
svnRepair
Repair the SVN bug to forget file modification time on add.
|
String |
targetName
Name of the generated ANT task.
|
ano, appBase, appIO, appStartTime, appStartTimeMS, args, argsOrig, bgColor, err, fullClassName, help, icon, log, mainThread, myClass, myFrame, name, out, outMode, packName, prop, retCode, runFlag, shortClassName, title, verbose, verbosity
AUTHOR, BLANK_STRING, cons, CONSOL_ENCODING, COPYRIGHT, D, D_NaN, D_NegInf, D_PosInf, EMPTY_INT_A, EMPTY_STRING, FILE_ENCODING, FRW_CLLD, FS, FSS, H, hasCons, HOST_IP, HOST_IPv4, HOST_NAME, INIT_ERROR, JAR_ENCODING, JH, JOB_DONE_OK, JRL, LOG_OUT_ERROR, M, MAIN_THREAD_EXC, NO_BYTES, NO_CLASSES, NO_DOUBLES, NO_OBJECTS, NO_PARS_ERROR, NO_STRINGS, NOT_WINDOWS, ON_PI, ONE_DAY, ONE_HOUR, ONE_LEAP_YEAR, ONE_MINUTE, ONE_SECOND, ONE_WEEK, ONE_YEAR, OS, PROG_NAME, PROG_SHORT, PS, RUNTIME, S, SHY, UD, UL, UL_UR_da, UR
ILLEGAL_TYPE, ILLEGAL_VALUE, NO_ATTRIBUTE, NO_KNOWN_ATTRIBUTE, NO_VALUE, OK, retVtext
Constructor and Description |
---|
FS() |
Modifier and Type | Method and Description |
---|---|
int |
doIt()
Working method of FS.
|
static void |
main(String[] args)
Start method of FS.
|
boolean |
parsePartial()
FS wants just only partial parameter parsing by Prop.
|
protected int |
setAttribute(String name,
char name0,
Object value,
Class<?> vClass,
boolean isNull,
boolean isStringVal)
Overridable implementation of setAtttibute(String, Object).
|
static StringBuilder |
touchTask(StringBuilder bastel,
CharSequence fileName,
CharSequence uglyAntTime,
CharSequence antCompTime)
Make an ANT touch task, optionally conditional.
|
actionPerformed, allowNoPropertiesFile, clientOrder, condHelpLog, connect, errMeld, errMeld, errorExit, errorExit, errorText, extraPropertiesFile, formMessage, formMessage, formMessage, getAbout, getAboutText, getActTime, getAppLogger, getAppStartTime, getArgs, getAuthor, getCopyright, getDbLogger, getExecTimeMs, getExecTimeMsL, getExecTimeString, getHelp, getHelpText, getIcon, getLanguage, getLogHandler, getMessageComponent, getMessageComponentsLength, getMyFrame, getName, getNameWithVersDate, getOutMode, getProp, getPurpose, getStartTime, getStateString, getTheCloser, getTitle, getUsage, getVerbose, getVerbosity, getVersDate, go, go, go, haveIcon, isDebug, isHelp, isHelpLog, isNormal, isRunFlag, isSilent, isTest, isVerbose, logVerbose, logVerbose, makeStatusTextEnd, makeStatusTextStart, messageFormat, normalExit, performeAction, queueAction, regAsStdMBean, repExc, setAboutText, setAttribute, setAuthor, setBgColor, setCodePages, setCopyright, setHelp, setLogOut2, setName, setOutMode, setOutMode, setPurpose, setTitle, setUsage, setVerbose, setVerbose, setVerbosity, setVerbosity, setVersDate, stop, threeLineEndMsg, toString, twoLineEndMsg, twoLineStartMsg, valueLang, valueLang, wakeMainThread
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
retVtext
public String directory
..\tmp\+.j+ (+ used instead of *)
..\tmp\class;bak;tmp;obj;map
ComVar.UD
) is assumed.public boolean listDirs
recursion
) descend to
sub-directories and the with directory criteria used to select the
sub-directories to be visited.public boolean recursion
public boolean equalsOnly
recursion
will be set true.svnRepair
is true and more than one directory is specified
this property equalsOnly
will be set true. ANT touch entries will
only generated (relative to and) only for files of the first directory,
if that file (same name and size) has a sibling in another directory. The
oldest date of all those equal files will be taken as the set date.public boolean quoteSpace
public boolean dateCompare
equalsOnly
,
svnRepair
public boolean contentCompare
dateCompare
= false.public boolean keepOne
public boolean pureName
public String relateTo
ComVar.FS
(to make the kind clear).relateTo
.relateToDir
is true.public boolean relateToDir
relateTo
will be set to directory
.svnRepair
public boolean antTime
pureName
in the said sense and sets quoteSpace
false.public boolean doSort
public boolean svnRepair
equalsOnly
public String targetName
svnRepair
,
projectName
public String beforeDateName
svnRepair
,
antCompareTimeFormat
public String buildFileName
svnRepair
,
projectName
,
antXMLencoding
,
buildFileDir
public String buildFileDir
svnRepair
,
buildFileName
public String antXMLencoding
svnRepair
,
buildFileName
public String projectName
svnRepair
,
targetName
public String antCompareTimeFormat
public String afterFirstCeckInTime
svnRepair
,
beforeDateName
,
antCompareTimeFormat
public boolean parsePartial()
parsePartial
in class App
App.App(String[])
public static void main(String[] args)
args
- command line parameterprotected int setAttribute(String name, char name0, Object value, Class<?> vClass, boolean isNull, boolean isStringVal)
App
App
.setAttribute(name, value)
for all name value pairs not clearly handled or rejected by said
App's method. In this call all parameters are correct and the parameter
value
is converted to String
if it was (only) of type
CharSequence
.App.setAttribute(String, Object)
) are superfluous here. setAttribute
in class App
name
- name of the property (never empty)name0
- first character of name (>= a)value
- the (new) value of the propertyvClass
- the (original) class of value (or null if isNull)isNull
- true if value is nullisStringVal
- true if value is of type StringAttrSettable.NO_KNOWN_ATTRIBUTE
AttrSettable
,
AttrSettable.ILLEGAL_TYPE
,
AttrSettable.ILLEGAL_VALUE
,
AttrSettable.NO_VALUE
,
AttrSettable.OK
public int doIt()
doIt
in class App
Prop
,
App.go(String[])
,
App.go(String[], String, CharSequence)
,
App.mainThread
public static StringBuilder touchTask(StringBuilder bastel, CharSequence fileName, CharSequence uglyAntTime, CharSequence antCompTime)
bastel
- the StringBuilder to append to, if null one is madefileName
- the name / designation of the file to touchuglyAntTime
- the time to set to in ANT / American formatantCompTime
- the optional compare time (same ugly w/o seconds)