Changeset 510
- Timestamp:
- 05/30/08 12:30:05
(7 months ago)
- Author:
- jmowery
- Message:
incremental update to storage test cases
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r509 |
r510 |
|
| 3 | 3 | * add |
|---|
| 4 | 4 | - add a file |
|---|
| | 5 | + copy of the file exists in .__storage__/ with a timestamp appended to the name |
|---|
| 5 | 6 | - add a directory |
|---|
| | 7 | + the control file .__status__ exists as do the .__nodes__/, .__storage__/, and (if root) .__logs__/ directories exist |
|---|
| 6 | 8 | - add a directory recursively |
|---|
| | 9 | + as above the control files and directories for the directory exist as does a copy of each file |
|---|
| 7 | 10 | * remove |
|---|
| 8 | 11 | - remove a file |
|---|
| | 12 | + all copies of the file in .__storage__/ are gone; the file itself is not |
|---|
| 9 | 13 | - remove a directory (always recursive) |
|---|
| | 14 | + no control files or directories (see above) exist in the directory or any of its sub-directories |
|---|
| 10 | 15 | * check-in |
|---|
| 11 | 16 | - no-op if no modified files |
|---|
| | 17 | + no new files exist in .__storage__/ |
|---|
| 12 | 18 | - adds each modified file |
|---|
| | 19 | + for each file with an applied time newer than the directory's applied time a new copy exists in .__storage__/ |
|---|
| 13 | 20 | - if directory is locked should raise an exception |
|---|
| | 21 | + raises a RuntimeError stating that the file (or directory) is locked |
|---|
| 14 | 22 | * lock |
|---|
| 15 | 23 | - lock a file |
|---|
| … | … | |
| 60 | 68 | - no-op if unmodified or uncontrolled |
|---|
| 61 | 69 | - updates on disk data with all changes made |
|---|
| 62 | | - the modified flag should be cleared after all calls |
|---|
| | 70 | + the modified flag should be cleared after all calls |
|---|
| 63 | 71 | * write |
|---|
| 64 | 72 | - no-op if uncontrolled |
|---|
| 65 | 73 | - write the current status to disk |
|---|
| 66 | | - the modified flag should be cleared after all calls |
|---|
| | 74 | + the modified flag should be cleared after all calls |
|---|
| 67 | 75 | * rollback |
|---|
| 68 | 76 | - no-op if current directory is not controlled |
|---|
| … | … | |
| 112 | 120 | * status_prefix |
|---|
| 113 | 121 | - return status prefix for a file |
|---|
| | 122 | - return status prefix for an uncontrolled file |
|---|
| | 123 | - return status prefix for current directory |
|---|
| | 124 | - return status prefix for a sub-directory |
|---|
| 114 | 125 | * version_suffix |
|---|
| 115 | 126 | - return version time(s) for a controlled file or current directory |
|---|
| 116 | 127 | - return empty string for an uncontrolled file or a sub-directory |
|---|
| 117 | 128 | * status |
|---|
| | 129 | - return status for a file |
|---|
| | 130 | - return status for a directory (and its files) |
|---|
| | 131 | - return status for a directory recursively |
|---|
| | 132 | - raise an exception if file does not exist |
|---|
| 118 | 133 | * revisions |
|---|
| | 134 | - return empty dictionary for uncontrolled current directory or uncontrolled file |
|---|
| | 135 | - return dictionary with name and revisions list for a file |
|---|
| | 136 | - return dictionary with name and revisions list for each file in a directory |
|---|
| 119 | 137 | * list_controlled_files |
|---|
| | 138 | - return list of files under revision control |
|---|
| | 139 | - return empty list if current directory is uncontrolled |
|---|
| 120 | 140 | * list_local_newer |
|---|
| | 141 | - return a list of files with applied times later than the directory |
|---|
| 121 | 142 | * list_controlled_dirs |
|---|
| | 143 | - return a list of controlled sub-directories |
|---|
| 122 | 144 | * list_controlled |
|---|
| | 145 | - return a list of all controlled files and directories |
|---|
| 123 | 146 | * lock |
|---|
| | 147 | - no-op if file or directory is already locked |
|---|
| | 148 | - lock a file |
|---|
| | 149 | - lock a directory |
|---|
| | 150 | - raise an exception if attempting to lock a file in a locked directory |
|---|
| 124 | 151 | * unlock |
|---|
| | 152 | - no-op if file or directory is not locked |
|---|
| | 153 | - unlock a locked file |
|---|
| | 154 | - unlock a locked directory |
|---|
| | 155 | - raise an exception if attempting to unlock a locked file in a locked directory |
|---|
| 125 | 156 | * is_locked |
|---|
| 126 | | * add_node |
|---|
| | 157 | - return true if file or directory is locked |
|---|
| | 158 | - return true if any file under a directory is locked when called recursively |
|---|
| | 159 | * add_node //NOTE: this is an internal function |
|---|
| | 160 | - add a node |
|---|
| | 161 | + adds the appropriate file (named by node IP) to a layer's .__nodes__/ directory |
|---|
| 127 | 162 | * list_nodes |
|---|
| | 163 | - list nodes in a directory |
|---|
| 128 | 164 | * get_node |
|---|
| | 165 | - get a Node object for a node in the current directory |
|---|
| 129 | 166 | * append_log_messages |
|---|
| | 167 | - applied a list of messages to the log for a given node |
|---|
| 130 | 168 | * get_log_messages |
|---|
| | 169 | - get a list of all messages recorded for a single node |
|---|
| 131 | 170 | * clear_log |
|---|
| | 171 | - clear the list of messages for a single node |
|---|
| 132 | 172 | * get_entry |
|---|
| | 173 | - get the entry for a controlled file or sub-directory |
|---|
| | 174 | - return none for uncontrolled files or sub-directories |
|---|
| 133 | 175 | |
|---|
| 134 | 176 | Node Class |
|---|
| 135 | 177 | |
|---|
| 136 | 178 | * creation |
|---|
| | 179 | - given an id and the root of storage, return an existing node object |
|---|
| | 180 | - given a new id and the root of storage, return a new unclassified node object |
|---|
| | 181 | - given a new id and the root of storage and a classification, return a new node classified as requested |
|---|
| 137 | 182 | * deletion |
|---|
| | 183 | - asserts the deleted node is unmodified since last sync to disk |
|---|
| 138 | 184 | * list_layers |
|---|
| | 185 | - return an ordered list of the paths of all layers containing the node |
|---|
| 139 | 186 | * check_updates |
|---|
| | 187 | - return a dictionary of names to be updated and the file to be sent (empty for deletion) |
|---|
| 140 | 188 | * write |
|---|
| | 189 | - write the data to disk |
|---|
| 141 | 190 | * set_file_status |
|---|
| | 191 | - set the status of a file sent to a node |
|---|
| | 192 | - raise an exception if file does not exist or is uncontrolled |
|---|
| | 193 | - raise an exception if attempting to add local customizations to directories other than the local customization directory for that node |
|---|
| 142 | 194 | * set_bool_status |
|---|
| | 195 | - record the state of a boolean |
|---|
| 143 | 196 | * update |
|---|
| | 197 | - no-op if unmodified |
|---|
| | 198 | - updates on disk data with all changes made |
|---|
| | 199 | + the modified flag should be cleared after all calls |
|---|
| 144 | 200 | * classify |
|---|
| | 201 | - with no argument, calculate the classification of a node |
|---|
| | 202 | - with a group name, reclassify the node so that the leaf in the hierarchy is under group's layer |
|---|
Download in other formats:
* Generating other formats may take time.