Skip to content

Commit 6b0ddf6

Browse files
learn-moreColinFinck
authored andcommitted
[LOG2LINES] Remove SVN leftovers
1 parent 754e175 commit 6b0ddf6

File tree

10 files changed

+1
-482
lines changed

10 files changed

+1
-482
lines changed

sdk/tools/log2lines/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ list(APPEND SOURCE
88
log2lines.c
99
match.c
1010
options.c
11-
revision.c
1211
stat.c
1312
util.c)
1413

sdk/tools/log2lines/cmd.c

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -101,48 +101,6 @@ handle_switch_str(FILE *outFile, char *sw, char *arg, char *desc)
101101
return changed;
102102
}
103103

104-
static int
105-
handle_switch_pstr(FILE *outFile, char **psw, char *arg, char *desc)
106-
{
107-
int changed =0;
108-
109-
if (arg)
110-
{
111-
if (strcmp(arg,"") != 0)
112-
{
113-
if (strcmp(arg,KDBG_ESC_OFF) == 0)
114-
{
115-
if (*psw)
116-
changed = 1;
117-
free(*psw);
118-
*psw = NULL;
119-
}
120-
else
121-
{
122-
if (!*psw)
123-
{
124-
*psw = malloc(LINESIZE);
125-
**psw = '\0';
126-
}
127-
128-
if (strcmp(arg, *psw) != 0)
129-
{
130-
strcpy(*psw, arg);
131-
changed = 1;
132-
}
133-
}
134-
}
135-
}
136-
if (desc)
137-
{
138-
esclog(outFile, "%s is \"%s\" (%s)\n", desc, *psw, changed ? "changed":"unchanged");
139-
if (!arg)
140-
esclog(outFile, "(readonly)\n");
141-
}
142-
143-
return changed;
144-
}
145-
146104
static int
147105
handle_address_cmd(FILE *outFile, char *arg)
148106
{
@@ -257,36 +215,6 @@ handle_escape_cmd(FILE *outFile, char *Line)
257215
case 'r':
258216
handle_switch(outFile, &opt_raw, arg, "-r Raw");
259217
break;
260-
case 'R':
261-
changed = handle_switch_pstr(outFile, &opt_Revision, arg, NULL);
262-
opt_Revision_check = 0;
263-
if (opt_Revision)
264-
{
265-
opt_Revision_check = 1;
266-
if (strstr(opt_Revision, "check") == opt_Revision)
267-
{
268-
esclog(outFile, "-R is \"%s\" (%s)\n", opt_Revision, changed ? "changed":"unchanged");
269-
}
270-
else if (strstr(opt_Revision, "regscan") == opt_Revision)
271-
{
272-
char *s = strchr(opt_Revision, ',');
273-
274-
revinfo.range = DEF_RANGE;
275-
if (s)
276-
{
277-
*s++ = '\0';
278-
revinfo.range = atoi(s);
279-
}
280-
regscan(outFile);
281-
}
282-
else if (strstr(opt_Revision, "regclear") == opt_Revision)
283-
{
284-
list_clear(&sources);
285-
summ.regfound = 0;
286-
esclog(outFile, "cleared regression scan results\n");
287-
}
288-
}
289-
break;
290218
case 's':
291219
if (strcmp(arg,"clear") == 0)
292220
{
@@ -302,7 +230,6 @@ handle_escape_cmd(FILE *outFile, char *Line)
302230
{
303231
handle_switch(outFile, &opt_undo, "1", "-u Undo");
304232
handle_switch(outFile, &opt_redo, "1", "-U Undo and reprocess");
305-
opt_Revision_check = 1;
306233
}
307234
esclog(outFile, "-S Sources option is %d+%d,\"%s\"\n", opt_Source, opt_SrcPlus, opt_SourcesPath);
308235
esclog(outFile, "(Setting source tree not implemented)\n");

sdk/tools/log2lines/config.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
#define INVALID_BASE 0xFFFFFFFFL
66

77
#define LOGBOTTOM "--------"
8-
#define SVNDB "svndb.log"
9-
#define SVNDB_INX "svndb.inx"
10-
#define DEF_RANGE 500
11-
#define MAGIC_INX 0x494E585F //'INX_'
128
#define DEF_OPT_DIR "output-i386"
139
#define SOURCES_ENV "_ROSBE_ROSSOURCEDIR"
1410
#define CACHEFILE "log2lines.cache"

sdk/tools/log2lines/help.c

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -64,35 +64,6 @@ char *verboseUsage =
6464
" - Input file redirection.\n"
6565
" - Pipelining byte streams, needed for the -c option.\n\n"
6666
" -r Raw output without translation.\n\n"
67-
" -R <cmd>\n"
68-
" Revision commands interfacing with SVN. <cmd> is one of:\n"
69-
" - check:\n"
70-
" To be combined with -S. Check each source file in the log and issue\n"
71-
" a warning if its revision is higher than that of the tested build.\n"
72-
" Also when the revison of the source tree is lower than that of the\n"
73-
" tested build (for every source file).\n"
74-
" In both cases the source file's -S output would be unreliable.\n"
75-
" - update:\n"
76-
" Updates the SVN log file. Currently only generates the index file\n"
77-
" The SVN log file itself must be generated by hand in the sources\n"
78-
" directory like this (-v is mandatory here):\n"
79-
" svn log -v > svndb.log ('svn log' accepts also a range)\n"
80-
" 'svndb.log' and its index are needed for '-R regscan'\n"
81-
" - regscan[,<range>]:\n"
82-
" Scan for regression candidates. Essentially it tries to find\n"
83-
" matches between the SVN log entries and the sources hit by\n"
84-
" a backtrace (bt) command.\n"
85-
" <range> is the amount of revisions to look back from the build\n"
86-
" revision (default 500)\n"
87-
" The output of '-R regscan' is printed after EOF. The 'Changed path'\n"
88-
" lists will contain only matched files.\n"
89-
" Limitations:\n"
90-
" - The bug should really be a regression.\n"
91-
" - Expect a number of false positives.\n"
92-
" - The offending change must be in the sources hit by the backtrace.\n"
93-
" This mostly excludes changes in headerfiles for example.\n"
94-
" - Must be combined with -S.\n"
95-
" Can be combined with -tTS.\n\n"
9667
" -s Statistics. A summary with the following info is printed after EOF:\n"
9768
" *** LOG2LINES SUMMARY ***\n"
9869
" - Translated: Translated lines.\n"
@@ -149,8 +120,6 @@ char *verboseUsage =
149120
" - Do a 'mod' first to retrieve relocation info.\n"
150121
" - `h : shows this helptext (without exiting)\n"
151122
" - `q : quits log2lines\n"
152-
" - `R regscan : the output is printed immediately (do a 'bt' first)\n"
153-
" - `R regclear : clears previous regscan matches\n"
154123
" - `s : the output is printed immediately\n"
155124
" - `s clear : clears all statistics.\n"
156125
" - `S : only <context> and <add> can be set.\n"

sdk/tools/log2lines/log2lines.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ LINEINFO lastLine;
3434
FILE *logFile = NULL;
3535
LIST cache;
3636
SUMM summ;
37-
REVINFO revinfo;
3837

3938

4039
static void
@@ -99,7 +98,6 @@ reportSource(FILE *outFile)
9998
static void
10099
report(FILE *outFile)
101100
{
102-
reportRevision(outFile);
103101
reportSource(outFile);
104102
clearLastLine();
105103
}
@@ -535,17 +533,6 @@ translate_files(FILE *inFile, FILE *outFile)
535533
}
536534
}
537535

538-
if (opt_Revision && (strstr(opt_Revision, "regscan") == opt_Revision))
539-
{
540-
char *s = strchr(opt_Revision, ',');
541-
if (s)
542-
{
543-
*s++ = '\0';
544-
revinfo.range = atoi(s);
545-
}
546-
regscan(outFile);
547-
}
548-
549536
if (opt_stats)
550537
{
551538
stat_print(outFile, &summ);
@@ -571,7 +558,6 @@ main(int argc, const char **argv)
571558
memset(&cache, 0, sizeof(LIST));
572559
memset(&sources, 0, sizeof(LIST));
573560
stat_clear(&summ);
574-
memset(&revinfo, 0, sizeof(REVINFO));
575561
clearLastLine();
576562

577563
optInit = optionInit(argc, argv);
@@ -585,12 +571,6 @@ main(int argc, const char **argv)
585571

586572
argc -= optCount;
587573

588-
if (opt_Revision && (strcmp(opt_Revision, "update") == 0))
589-
{
590-
res = updateSvnlog();
591-
goto cleanup;
592-
}
593-
594574
if (check_directory(opt_force))
595575
{
596576
res = 3;
@@ -677,13 +657,6 @@ main(int argc, const char **argv)
677657
PCLOSE(dbgIn);
678658

679659
cleanup:
680-
// See optionParse().
681-
if (opt_Revision)
682-
{
683-
free(opt_Revision);
684-
opt_Revision = NULL;
685-
}
686-
687660
// See optionInit().
688661
if (opt_Pipe)
689662
{

sdk/tools/log2lines/log2lines.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include <rsym.h>
66

77
#include "config.h"
8-
#include "revision.h"
98
#include "stat.h"
109
#include "list.h"
1110

@@ -24,7 +23,6 @@ struct lineinfo_struct
2423
typedef struct lineinfo_struct LINEINFO;
2524

2625
extern SUMM summ;
27-
extern REVINFO revinfo;
2826
extern LIST cache;
2927
extern FILE *logFile;
3028
extern LINEINFO lastLine;

sdk/tools/log2lines/options.c

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "log2lines.h"
1818
#include "options.h"
1919

20-
char *optchars = "bcd:fFhl:L:mMP:rR:sS:tTuUvz:";
20+
char *optchars = "bcd:fFhl:L:mMP:rsS:tTuUvz:";
2121
int opt_buffered = 0; // -b
2222
int opt_help = 0; // -h
2323
int opt_force = 0; // -f
@@ -37,8 +37,6 @@ int opt_twice = 0; // -t
3737
int opt_Twice = 0; // -T
3838
int opt_undo = 0; // -u
3939
int opt_redo = 0; // -U
40-
char *opt_Revision = NULL; // -R
41-
int opt_Revision_check = 0; // -R check
4240
char opt_dir[PATH_MAX]; // -d <opt_dir>
4341
char opt_logFile[PATH_MAX]; // -l|L <opt_logFile>
4442
char *opt_mod = NULL; // -mod for opt_logFile
@@ -61,10 +59,6 @@ int optionInit(int argc, const char **argv)
6159
strcpy(opt_SourcesPath, "");
6260
if ((s = getenv(SOURCES_ENV)))
6361
strcpy(opt_SourcesPath, s);
64-
revinfo.rev = getRevision(NULL, 1);
65-
revinfo.range = DEF_RANGE;
66-
revinfo.buildrev = getTBRevision(opt_dir);
67-
l2l_dbg(1, "Trunk build revision: %d\n", revinfo.buildrev);
6862

6963
strcpy(opt_scanned, "");
7064

@@ -164,14 +158,6 @@ int optionParse(int argc, const char **argv)
164158
optCount++;
165159
//just count, see optionInit()
166160
break;
167-
case 'R':
168-
optCount++;
169-
if (!opt_Revision)
170-
opt_Revision = malloc(LINESIZE);
171-
sscanf(optarg, "%s", opt_Revision);
172-
if (strcmp(opt_Revision, "check") == 0)
173-
opt_Revision_check ++;
174-
break;
175161
case 's':
176162
opt_stats++;
177163
break;
@@ -186,7 +172,6 @@ int optionParse(int argc, const char **argv)
186172
/* need to retranslate for source info: */
187173
opt_undo++;
188174
opt_redo++;
189-
opt_Revision_check ++;
190175
}
191176
break;
192177
case 't':

sdk/tools/log2lines/options.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ extern int opt_twice; // -t
2727
extern int opt_Twice ; // -T
2828
extern int opt_undo ; // -u
2929
extern int opt_redo ; // -U
30-
extern char *opt_Revision; // -R
31-
extern int opt_Revision_check; // -R check
3230
extern char opt_dir[]; // -d <opt_dir>
3331
extern char opt_logFile[]; // -l <opt_logFile>
3432
extern char *opt_mod; // mod for opt_logFile

0 commit comments

Comments
 (0)