#ifndef FS_H #define FS_H #include <string> #include <vector> // So as not to interfere with normal p4 exit codes (which, as far as I can tell are undocumented), // we start our error codes at 1000. Success is still signaled by FS_OK (=0) enum EResult { FS_BUSY = -1, FS_OK = 0, FS_HELP, FS_ABORTED = 1000, FS_ERROR_ARGUMENT, FS_ERROR_NO_SYNC, FS_ERROR_MEMORY, FS_ERROR_INIT, FS_ERROR_SYNC, FS_ERROR_IO, FS_ERROR_P4, FS_ERROR_RESYNC }; const char* cFileType[]; typedef void (*SyncStatCallbackFunc) (int inFileCount, long long inSyncSize); typedef void (*FileStatCallbackFunc) (const char* inDepotFile, const char* inClientFile, const char* inAction, int inRev, long long inFileSize); typedef void (*BufferCallbackFunc) (long long inWriteSize); typedef void (*ClobberCallbackFunc) (const std::string& inClobberFile); EResult Sync(int argc, char **argv, const char* inToolName, SyncStatCallbackFunc inSyncStatCallback = NULL, FileStatCallbackFunc inFileStatCallback = NULL, BufferCallbackFunc inReadCallback = NULL, BufferCallbackFunc inWriteCallback = NULL, ClobberCallbackFunc inClobberCallback = NULL); void AbortSync(); void Finalize(); // Helper function to force-sync writeable files that couldn't be clobbered. Can only be called after Sync() has been called first EResult ForceSync(const std::vector<std::string>& inFiles, const char* inToolName, SyncStatCallbackFunc inSyncStatCallback = NULL, FileStatCallbackFunc inFileStatCallback = NULL, BufferCallbackFunc inReadCallback = NULL, BufferCallbackFunc inWriteCallback = NULL, ClobberCallbackFunc inClobberCallback = NULL); int GetFileSpecCount(); const char* GetErrorMessage(); const char* GetExtendedErrorMessage(); bool DoScriptedOutput(); int GetNewlinesDecoded(); void Print(const char* inFormat, ...); void Log(const char* inFormat, ...); #endif
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 6451 | Frank Compagner |
- Now fully support unicode & utf-16 files - Improved accuracy of P4fsV progress bar - Added logging to help in remote debugging |
||
#2 | 6420 | Frank Compagner |
A number of improvements: - p4fs now supports the global -s (scripted output) option. - p4fs and P4fsV now support the modtime client option. - P4CHARSET is now correctly handled (though no full Unicode support yet). - Increased the maximum command line length for p4fs to the Windows maximum 32768. - Improved error handling. - Fixed a crash when cancelling a sync using the async or multithreaded writers. - P4fsV progressbar now behaves well when passing more than one filespec - P4fsV will now offer the option to overwrite any locally changed (but not checked out) files when it finds these during a sync (cannot clobber ...). - Made the P4fsV error dialog resizeable. - P4fsV Windows layout fixed so it works properly with all Windows style setings. - Ooh, and prettier icons too. |
||
#1 | 6187 | Frank Compagner | Added p4fs project |