[statcvs] 04/43: patch to take in account new cvs log format
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Wed Apr 18 20:47:43 BST 2018
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository statcvs.
commit d5c5c0b5268ab36311211ee6515d61df6451cb23
Author: Christian Bayle <bayle at debian.org>
Date: Sun Sep 5 20:11:17 2004 +0000
patch to take in account new cvs log format
---
cvslognewformat.patch | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/cvslognewformat.patch b/cvslognewformat.patch
new file mode 100644
index 0000000..5d6cd87
--- /dev/null
+++ b/cvslognewformat.patch
@@ -0,0 +1,33 @@
+--- statcvs-20030713/src/net/sf/statcvs/util/DateUtils.java 2003-04-13 17:04:49.000000000 -0600
++++ statcvs-20030713/src/net/sf/statcvs/util/DateUtils.java 2004-08-16 13:16:33.000000000 -0600
+@@ -38,10 +38,14 @@
+ public class DateUtils {
+ private static final String LOG_TIMESTAMP_FORMAT =
+ "yyyy/MM/dd HH:mm:ss zzz";
++ private static final String LOG_TIMESTAMP_FORMAT_NEW =
++ "yyyy-MM-dd HH:mm:ss Z zzz";
+ private static final Locale LOG_TIMESTAMP_LOCALE = Locale.US;
+
+ private static SimpleDateFormat logTimeFormat =
+ new SimpleDateFormat(LOG_TIMESTAMP_FORMAT, LOG_TIMESTAMP_LOCALE);
++ private static SimpleDateFormat logTimeFormatNew =
++ new SimpleDateFormat(LOG_TIMESTAMP_FORMAT_NEW, LOG_TIMESTAMP_LOCALE);
+ private static SimpleDateFormat outputDateFormat =
+ new SimpleDateFormat(Messages.getString("DATE_FORMAT"));
+ private static SimpleDateFormat outputDateTimeFormat =
+@@ -81,10 +85,13 @@
+ */
+ public static Date convertFromLogTime(String modTime) {
+ try {
++ if (modTime.indexOf('-') > 0)
++ return logTimeFormatNew.parse(modTime);
++
+ return logTimeFormat.parse(modTime);
+ } catch (ParseException e) {
+ // fallback is to return null
+ return null;
+ }
+ }
+-}
+\ No newline at end of file
++}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/statcvs.git
More information about the pkg-java-commits
mailing list