// The FileLogCache is the object that constructs branching history for a // file - it consists of a number of FileHead objects arranged in two rows, // "from" and "into", which each fork off a central "main" FileHead. class FileLogCache { public: // Constructor takes the path to the file, and ClientApi and Error // pointers. The invoking function can therefore set up connection // parameters in the ClientApi, and be informed of connection errors // through the Error. // Last parameter: name of a file to read cached filelog output from. FileLogCache ( StrBuf file, ClientApi* c, Error* e, const char* cs, const char* ds, const char* f, bool a, char* cf ); virtual ~FileLogCache(); // AddFrom creates a new FileHead at the end of the "from" row. FileHead* AddFrom( StrBuf file ); // AddInto does the same for the "into" row. FileHead* AddInto( StrBuf file ); // Add the new FileHead "after" the given one, ie, away from "main" FileHead* AddAfter( StrBuf file, FileHead* fh ); // Get returns a pointer to the FileHead whose name is given as a StrBuf. // If it can't find such a FileHead, it creates a new one and returns a // pointer to that. The "from" bool arg indicates whether the new // FileHead (if one has to be created) should be made "from" or "into". FileHead* Get( StrBuf& filepath, bool from, FileHead* caller ); void SetArrows(); // run through and mark arrowed revs and changes FileHead* from; // The pointer to the first "from" FileHead. FileHead* into; // The first "into" FileHead. FileHead* main; // The "main" FileHead. // "head" is the most "fromwards" of the files. FileHead* head; // "tail" is the most "intowards". FileHead* tail; ChangeSorter* changes; // A sorted list of change numbers. ClientApi* client; Error* errors; int size; // Number of FileHeads in this FileLogCache. int numarrows; // Number of FileRevArrows in this FLC. char* cachefile; //Text file of filelogs, if any. bool showall; //Use indiscriminate "show all" logic? // These three get read by FileHead; FLC doesn't really touch them. const char* dstart; //Start date, NULL if unset const char* cstart; //Start change, NULL if unset const char* end; //End change/date, NULL if unset private: // Case insensitive version of Get for use with NT servers. FileHead* GetI( StrBuf& filepath, bool exfrom, FileHead* caller ); };
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#5 | 2947 | Sam Stafford |
Give P4QTree the ability to read filelog data from a supplied text file. The syntax is: P4QTree [g-opts] [-F cachefile] depotfile The data in the supplied file will be read before the server is queried for a given filelog. If a required filelog is not found in the file, the server will be queried instead. The most handy application for this that I can see is quickly graphing integ scenarios based on customer-supplied (or even manually-generated) filelogs, when for whatever reason it's not feasible to access the server directly. |
||
#4 | 2946 | Sam Stafford |
Pull in read-filelogs-from-file capabilities. No functional change yet. |
||
#3 | 2945 | Sam Stafford | These changes are all already reflected in P4QTree. | ||
#2 | 2398 | Sam Stafford |
Support for PB's "show all" feature. Still needs the UI bits to turn it on. Infrastructure change. |
||
#1 | 2377 | Sam Stafford | P4QTree. |