# include <clientapi.h> # include <debug.h> # include <mapapi.h> # include <options.h> # include "joincheck.h" int main( int argc, char** argv ) { ClientApi client; Error e; JoinCheck check( &client, &e ); Options opts; argc--; argv++; ErrorId usage = { E_FAILED, "Usage: joincheck [ -b branch -c client -u user -v ] [ path ]" }; opts.Parse( argc, argv, "u:b:c:v", OPT_OPT, usage, &e ); client.SetProtocol( "tag", "" ); client.Init( &e ); if ( e.Test() ) { check.Message( &e ); return 1; } check.LoadProtect( opts['u'] ); check.LoadBranch( opts['b'] ); check.LoadClient( opts['c'] ); client.Final( &e ); if ( e.Test() ) { check.Message( &e ); return 1; } // Set joinmax tunables way high before doing any joins. p4debug.SetLevel( "map.joinmax1=999999999" ); p4debug.SetLevel( "map.joinmax2=999999999" ); check.LoadPath( argc ? argv[0] : 0 ); check.DoJoins(); MapApi *j = check.Join(); printf( "Joined map size: %d lines\n", j->Count() ); printf( "Most wild line: %d wildcards\n", check.MaxWild( j ) ); if ( opts['v'] ) { printf( "\nJoined map:\n" ); check.DumpView( j ); } return 0; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#4 | 7800 | Stephen Moon | .Text() was appended to the Get*() calls | ||
#3 | 7789 | Stephen Moon | Integrating the changes that Sam made to my changes | ||
#2 | 7783 | Stephen Moon | Added -k charset -p port options to the program | ||
#1 | 7782 | Stephen Moon | Integrating the latest joincheck code from Sam's branch | ||
//guest/sam_stafford/joincheck/main.cpp | |||||
#4 | 7730 | Sam Stafford | Raise joinmax tunables, and update the build. | ||
#3 | 7729 | Sam Stafford | Whoops, forgot to update the usage string. | ||
#2 | 7728 | Sam Stafford |
Add an option for a file path, and another join of the protect table after the branch map. |
||
#1 | 7727 | Sam Stafford |
MapApi-based tool for displaying joins of protects, client, and optionally a branch view. |