R3 DevBase File Sharing
Return to r3/devbase/index.html
This section describes the design of file sharing.
Organization of files
Just like messages, files are stored to headings. This keeps files and their related discussion messages together.
For example, the official file collection for the REBOL 3.0 mezzanine functions is in r3/mezzanines. That's where you'll find mezz-funcs.r and mezz-help.r, etc.
However, during development, you may want to work on files outside of the primary file collections. For example, if you and others are working together on LOAD, you would want to share your changes in r3/mezzanines/load until you've concluded your work, tested it, and are ready to submit it back to r3/mezzanines as a contributed improvement to the system.
Here is the example structure:
r3/ <-- don't put files here mezzanines/ <-- for official mezzanine files (releases) load/ <-- for development work, experiments, etc. save/ <-- for development work, experiments, etc.
To reduce the load on the submissions acceptance process, it is advised that you develop code like this. It also takes less space and network bandwidth.
Mechanism of submission
File sharing uses a name, submit, status mechanism.
- Name is a file name. It is not a file; it has no contents, it is only a label to which one or more file submissions are attached.
- Submit is the file contents. It is attached to a name, as its "parent". As changes to a file are made, they are submitted to the same name. This is how versioning is done.
- Status tags that a previous submit was accepted or denied. It is only a tag, attached to a submit (as it's parent), and should include a comment (a reason for it).
Note that all names, submissions, and status records are marked with a date, user id, and comment field.
File listing commands:
|nf, new-files||list all new file changes (similar to n for messages)|
|lf, list-files||list files in current heading (detailed format)|
|ls||list file names in short format|
Most other file commands use the id number for the file. Use of the id avoids problems when there are multiple versions of the same filename. However, some commands, such as get and put will also accept a file name or (for all files).
|get||fetch files in current heading|
|put||submit one or more files with a comment|
|more||view contents of a file|
|edit||open editor with given file (external app)|
|diff, df||show differences in file (uses external app)|
These commands currently require high ranking:
|accept||accepts a submission, requires comment|
|deny||deny a submission, requires comment|
|rename||rename a file (note: changes name, not location)|
First, goto a topic section that has files.
>> 26 R3/Mezzanines:
To list files in column view, or:
To list files in detail, showing the status of each submission and comment. Note that a single file can have multiple entries in the list, one for each change submitted.
Use commands like:
lf submit lf accept lf deny
To see files with specific status.
To download all the files for a topic section into a work dir. Go to the topic section, then
The files will download into a directory that matches the path name of the section. So, r3/mezzanine files are in a different location than r2/mezzanine files.
To get just the most recently accepted files:
get * accept
To download a specific file submission, use:
Or you can get it by name, but it's always the most recent submission (accepted or not):
Once files have been downloaded you can use:
to view the local listing.
You can submit a specific file from your work dir:
Or you can open a requestor to select a file:
To submit an entire directory (but with care!):
The files will be listed first, and you can add a comment for all of them.
Open work folder
To open the current topic work folder (on your local system):
To diff a file
To see file differences between a given submission (accepted or not) and change you've made in your local work dir:
The first time, you will be requested to specify the diff application (for example WinMerge).