Fossil SCM

Backout [1aef260f4c0a0fc74f45f624eb0cbe92b98bf6e8|1aef260f4c]: "Honor timezones in imports from git", per ML thread

jan.nijtmans 2014-05-02 08:23 trunk
Commit 77f53423aec1d2ebe8d2912822224aef2d664215
-15
--- src/import.c
+++ src/import.c
@@ -575,37 +575,22 @@
575575
fossil_free(gg.zMark);
576576
gg.zMark = fossil_strdup(&zLine[5]);
577577
}else
578578
if( memcmp(zLine, "tagger ", 7)==0 || memcmp(zLine, "committer ",10)==0 ){
579579
sqlite3_int64 secSince1970;
580
- int hastz;
581
- char tzdir;
582
- int tz;
583580
for(i=0; zLine[i] && zLine[i]!='<'; i++){}
584581
if( zLine[i]==0 ) goto malformed_line;
585582
z = &zLine[i+1];
586583
for(i=i+1; zLine[i] && zLine[i]!='>'; i++){}
587584
if( zLine[i]==0 ) goto malformed_line;
588585
zLine[i] = 0;
589586
fossil_free(gg.zUser);
590587
gg.zUser = fossil_strdup(z);
591588
secSince1970 = 0;
592
-
593
- /* We don't use sscanf here because of int64 portability issues. */
594589
for(i=i+2; fossil_isdigit(zLine[i]); i++){
595590
secSince1970 = secSince1970*10 + zLine[i] - '0';
596591
}
597
-
598
- /* Read in optional timezone modifier (we don't know if it's strictly
599
- * optional, but better to be sure). */
600
- tzdir = '+';
601
- tz = 0;
602
- hastz = sscanf(&zLine[i], " %c%d", &tzdir, &tz);
603
- if ((hastz == 1) || (hastz > 2)) goto malformed_line;
604
- secSince1970 += ((tzdir == '-') ? -1 : 1) *
605
- ((tz/100)*3600 + (tz%100)*60);
606
-
607592
fossil_free(gg.zDate);
608593
gg.zDate = db_text(0, "SELECT datetime(%lld, 'unixepoch')", secSince1970);
609594
gg.zDate[10] = 'T';
610595
}else
611596
if( memcmp(zLine, "from ", 5)==0 ){
612597
--- src/import.c
+++ src/import.c
@@ -575,37 +575,22 @@
575 fossil_free(gg.zMark);
576 gg.zMark = fossil_strdup(&zLine[5]);
577 }else
578 if( memcmp(zLine, "tagger ", 7)==0 || memcmp(zLine, "committer ",10)==0 ){
579 sqlite3_int64 secSince1970;
580 int hastz;
581 char tzdir;
582 int tz;
583 for(i=0; zLine[i] && zLine[i]!='<'; i++){}
584 if( zLine[i]==0 ) goto malformed_line;
585 z = &zLine[i+1];
586 for(i=i+1; zLine[i] && zLine[i]!='>'; i++){}
587 if( zLine[i]==0 ) goto malformed_line;
588 zLine[i] = 0;
589 fossil_free(gg.zUser);
590 gg.zUser = fossil_strdup(z);
591 secSince1970 = 0;
592
593 /* We don't use sscanf here because of int64 portability issues. */
594 for(i=i+2; fossil_isdigit(zLine[i]); i++){
595 secSince1970 = secSince1970*10 + zLine[i] - '0';
596 }
597
598 /* Read in optional timezone modifier (we don't know if it's strictly
599 * optional, but better to be sure). */
600 tzdir = '+';
601 tz = 0;
602 hastz = sscanf(&zLine[i], " %c%d", &tzdir, &tz);
603 if ((hastz == 1) || (hastz > 2)) goto malformed_line;
604 secSince1970 += ((tzdir == '-') ? -1 : 1) *
605 ((tz/100)*3600 + (tz%100)*60);
606
607 fossil_free(gg.zDate);
608 gg.zDate = db_text(0, "SELECT datetime(%lld, 'unixepoch')", secSince1970);
609 gg.zDate[10] = 'T';
610 }else
611 if( memcmp(zLine, "from ", 5)==0 ){
612
--- src/import.c
+++ src/import.c
@@ -575,37 +575,22 @@
575 fossil_free(gg.zMark);
576 gg.zMark = fossil_strdup(&zLine[5]);
577 }else
578 if( memcmp(zLine, "tagger ", 7)==0 || memcmp(zLine, "committer ",10)==0 ){
579 sqlite3_int64 secSince1970;
 
 
 
580 for(i=0; zLine[i] && zLine[i]!='<'; i++){}
581 if( zLine[i]==0 ) goto malformed_line;
582 z = &zLine[i+1];
583 for(i=i+1; zLine[i] && zLine[i]!='>'; i++){}
584 if( zLine[i]==0 ) goto malformed_line;
585 zLine[i] = 0;
586 fossil_free(gg.zUser);
587 gg.zUser = fossil_strdup(z);
588 secSince1970 = 0;
 
 
589 for(i=i+2; fossil_isdigit(zLine[i]); i++){
590 secSince1970 = secSince1970*10 + zLine[i] - '0';
591 }
 
 
 
 
 
 
 
 
 
 
592 fossil_free(gg.zDate);
593 gg.zDate = db_text(0, "SELECT datetime(%lld, 'unixepoch')", secSince1970);
594 gg.zDate[10] = 'T';
595 }else
596 if( memcmp(zLine, "from ", 5)==0 ){
597
--- www/changes.wiki
+++ www/changes.wiki
@@ -4,11 +4,10 @@
44
* Add the ability to display content, diffs and annotations for UTF16
55
text files in the web interface.
66
* Add the "SaveAs..." and "Invert" buttons
77
to the graphical diff display that results
88
from using the --tk option with the [/help/diff | fossil diff] command.
9
- * Honor timezones in imports from git.
109
* The [/reports] page now requires Read ("o") permissions. The "byweek"
1110
report now properly propagates the selected year through the event type
1211
filter links.
1312
* The [/help/info | info command] now shows leaf status of the checkout.
1413
* Add support for tunneling https through a http proxy (Ticket [e854101c4f]).
1514
--- www/changes.wiki
+++ www/changes.wiki
@@ -4,11 +4,10 @@
4 * Add the ability to display content, diffs and annotations for UTF16
5 text files in the web interface.
6 * Add the "SaveAs..." and "Invert" buttons
7 to the graphical diff display that results
8 from using the --tk option with the [/help/diff | fossil diff] command.
9 * Honor timezones in imports from git.
10 * The [/reports] page now requires Read ("o") permissions. The "byweek"
11 report now properly propagates the selected year through the event type
12 filter links.
13 * The [/help/info | info command] now shows leaf status of the checkout.
14 * Add support for tunneling https through a http proxy (Ticket [e854101c4f]).
15
--- www/changes.wiki
+++ www/changes.wiki
@@ -4,11 +4,10 @@
4 * Add the ability to display content, diffs and annotations for UTF16
5 text files in the web interface.
6 * Add the "SaveAs..." and "Invert" buttons
7 to the graphical diff display that results
8 from using the --tk option with the [/help/diff | fossil diff] command.
 
9 * The [/reports] page now requires Read ("o") permissions. The "byweek"
10 report now properly propagates the selected year through the event type
11 filter links.
12 * The [/help/info | info command] now shows leaf status of the checkout.
13 * Add support for tunneling https through a http proxy (Ticket [e854101c4f]).
14

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button