// // Created by Tristan Juricek on 9/19/15. // #ifndef FSCLIENT_WORKSPACE_H #define FSCLIENT_WORKSPACE_H #include <string> class WorkspaceImpl; // Maintains information about where our backing p4 workspace is, and just // simplifies logic of path handling class Workspace { public: ~Workspace(); Workspace(); Workspace(const std::string & workspace); void setWorkspace(std::string & w) { _workspace = w; } const std::string & workspace() const { return _workspace; } std::string path(const std::string & p) const; int add(const char *path); // Marks the file for "edit". int edit(const char * path); int rename(const char * from, const char * to); //----------------------------------------------------------------------- // Failure codes //----------------------------------------------------------------------- static const int CONNECTION_FAILURE = -1; static const int COMMAND_FAILURE = -2; private: std::string _workspace; WorkspaceImpl* _impl; }; #endif //FSCLIENT_WORKSPACE_H
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 16236 | tjuricek |
Revise FUSE-client to call p4 reconcile intelligently. This uses the main FUSE callbacks like a loopback with a notification mechanism. After no real disk access after a short period of time (like 500ms) we'll trigger a call to p4 reconcile. The "interface" to this application is currently just a file handle: /.status - Lists "ok" if there's no errors, otherwise, outputs a list of messages |
||
#2 | 16208 | tjuricek |
Naive implementation that adds guesses at rename and unlink abilities. It's becoming *very* apparent that we need a different approach to handling file system events. We likely need to create a log of "here's what I've done" and then after a certain period of time trigger a system that allows you to possibly just reconcile the changes. Matching filesystem calls to p4 commands ends up with *a lot* of p4 commands. |
||
#1 | 16129 | tjuricek |
Rename/move files again... this time to the hyphenated-approach. |
||
//guest/tjuricek/file_system_client/main/Workspace.h | |||||
#1 | 16119 | tjuricek | Rename/move to meet workshop project conventions. | ||
//guest/tjuricek/fsclient/Workspace.h | |||||
#1 | 16118 | tjuricek |
FSClient initial version: handles add, edit This is a proof-of-concept app that mirrors an existing Perforce workspace to handle running commands like "p4 add" and "p4 edit" automatically when your apps add and write files. See the readme for more information. |