Parent Directory | Revision Log
|Links to HEAD:||(view) (annotate)|
|Links to mcvs-1-0-6:||(view) (annotate)|
* code/mapping.lisp (mapping-read): Provide a restart for file errors, which lets the user interactively substitute an empty map if the file can't be read. This is intended to handle the case when MCVS/MAP is missing; for example, the user updated to a sticky date for which no revision of the MAP exists. The effect of continuing will be that all files will disappear.
Revamped the synchronization logic. Synchronization now happens in a specific direction. For example, if we are doing a diff, we just need to push changes from the tree to the MCVS directory, not the other way around. Or: before an update or commit, we push from the tree to MCVS, then after the update, in the other direction. * code/update.lisp (mcvs-update): The before update is done in the :left direction only, and the after update in the :right. * code/move.lisp (mcvs-move): The just-in-case sync is done in the :left direction only. * code/link.lisp (mcvs-link): Likewise. * code/remove.lisp (mcvs-remove): Likewise. * code/add.lisp (mcvs-add): Get rid of mapping-synchronize call; it's completely unnecessary, since the new files are not even in the MAP-LOCAL, and the add logic explicitly links them into the MCVS directory. * code/generic.lisp (mcvs-generic): New keyword parameter, need-sync-before. Before-synchronization done in :left direction, after-synchronization in :right direction. Before-synchronization is now not done by default; need-sync-before must be specified. (mcvs-commit-wrapper): Specify before and after sync. (mcvs-diff-wrapper, mcvs-status-wrapper, mcvs-edit-wrapper): Explicitly specify before sync. (mcvs-tag-wrapper, mcvs-annotate-wrapper): Implicitly specify no sync. (mcvs-unedit-wrapper): Add before sync. * code/sync.lisp (synchronize-files): New key parameter :direction, values can be :left, :right or :either. Default is :either. If the value is :left or :right, then a sync is done only in that direction, otherwise the value :no-sync is returned. Behavior change: if the left file is missing (F- file in MCVS directory) it is not re-created, but rather :no-sync is returned. Also, if both files exist, have the same timestamp, and are distinct objects, if the direction is :left or :right, then the appropriate restart is automatically chosen. So this will do the right thing on filesystems where link() is performed by copying, without bothering the user with the error. * code/mapping.lisp (mapping-synchronize): New :direction key parameter, passed down to synchronize-filed. The new :no-sync return value from synchronize-files is handled. (mapping-update): Select the :right direction for synchronizing moves, adds or rollbacks.
* code/mapping.lisp (mapping-update): Rewrite restart-bind block using super-restart-case.
New --up option added for escaping out of nested sandboxes. * code/mcvs-main.lisp (*cvs-options*): Added "up" 1 arg option. * code/options.lisp (*nesting-escape-option*): New global, default value 0. (filter-mcvs-options): Filter new option, parse out and validate integer argument. * code/mapping.lisp (mcvs-locate): When searching for MCVS directory, skip N matches, where N is the value of *nesting-escape-option*.
* code/posix.lisp: Move some (declaim inline) to the correct location, before the function to be inlined. * code/clisp-unix.lisp: Likewise. * code/cmucl-unix.lisp: Likewise. * code/mapping.lisp: Likewise.
Hard link sync optimization. * code/mapping.lisp (mapping-synchronize): New optional parameter, specifies map to use instead of reading *map-local*. * code/mcvs-generic.lisp (mcvs-generic): Pass extra parameter to mapping-synchronize to only sync the selected subset of files.
Some security fixes. Funny I didn't think of this sooner! * code/types.lisp (types-read): Make sure *read-eval* is bound to nil when calling READ. * code/mapping.lisp (mapping-read-raw-map, displaced-path-read): Likewise.
More support for -n option. * code/mcvs-main.lisp (*usage*): Document -n option. * code/move.lisp (mcvs-move-wrapper): Remove bogus error check for presence of global options. * code/options.lisp (honor-dry-run): New macro for conditionally not executing some forms if it's a dry run, and logging some debugging information. * code/sync.lisp (synchronize-files): Honor dry run. * code/mapping.lisp (mapping-synchronize, mapping-update): Likewise.
Start of support for global option -n (dry run). * code/options.lisp (*dry-run-option*): New boolean variable. (process-cvs-options): Look for -n and set *dry-run-option*. * code/types.lisp (types-write): Do not write file if *dry-run-option* is true. * code/types.lisp (mapping-write): Likewise. * code/add.lisp (mcvs-add): When calling types-let-user-edit, temporarily disable the dry run option, so that TYPES-NEW can be written. When the dry run option is in effect, do not try to cvs add the TYPES file.
Bugfix to the directory restructuring code. A clobbering file add was not actually removing the clobbered file, but leaving it up to the synchronization algorithm, so the time-stamp would decide whether the local file gets clobbered by the repository one, or whether it wins. * code/mapping.lisp (mapping-update): Logic for handling added file ensures that a clobbered local file is removed first.
* code/mapping.lisp (mapping-removed-files): Skip over the MCVS/CVS directory, which can contain CVS-generated files with F- names and a ,t suffix. These trip up the algorithm.
Fix broken ``filt -r''. * code/mapping.lisp (mapping-read-raw-map): New function; reads map from stream and does sanity check. (mapping-read): Argument can be a filename or stream. Call to mapping-read-raw-map to factor out common code for both cases. * code/filt.lisp (filt-select-map): This was still just reading the raw structure from the cvs coprocess, which worked under the old map format, when the internal and external representations were the same. Now it calls mapping-read on the stream.
* code/remap.lisp (mcvs-remap): Preserve property lists of mapping entries, and pick up changes in execute permission. * code/mapping.lisp (mapping-convert-out): If the mapping entry's executable flag is nil, then remove the :exec entry from the property list.
* code/mapping.lisp (equal-filemaps): Repair completely broken function. * code/move.lisp (mcvs-move): Added little hack for turning no-op moves into errors. Without this the behavior is confusing, since the program appears to do nothing.
* code/error.lisp (mcvs-error-handler): Simplify roundabout way of printing error message. * code/mapping.lisp (mapping-write): Incorporate the low level error message into the more informative error message.
Error messages no longer specify prefixes like "mcvs:" or "mcvs-remove:". When no restarts are available, the error handler now adds the "mcvs:" prefix when dumping the error text to the standard error stream, and also adds a terminating newline. The inability to write to the MAP file is converted to a more informative error message. New --debug option is supported to set the chatter level to 3.
New prop command for manipulating property lists. * code/mcvs-main.lisp (*prop-options*): New constant. (*mcvs-command-table*): New entry. (*usage*): Update. * code/mapping.lisp (mapping-entry-parse-plist): Just unconditionally set execute slot based on :exec property. * code/prop.lisp: New file.
Be transparent with respect to mapping entry property lists: preserve unrecognized indicators and values. * code/mapping.lisp (mapping-entry): New slot, raw-plist, records raw property list from external mapping representation. (mapping-entry-parse-attributes): Renamed to mapping-entry-parse-plist. Argument dropped; parses raw-plist slot instead. (mapping-convert-in): Set raw-plist slot to value of fourth list element of :FILE entry, or fifth list element of :SYMLINK entry. (mapping-convert-out): Unify any slot values that are represented as properties into raw-plist, and insert any non-empty plists into external representation.
Low level support for versioning executable bit. * code/unix-bindings/unix.lisp (unix-funcs:chmod): New callout function. * code/clisp-unix.lisp (executable-p, make-executable, make-non-executable): New generic functions. (executable-p (file-info), make-executable (file-info), make-executable (string), make-non-executable (file-info), make-non-executable (string)): New methods. * code/add.lisp (mcvs-add): Record whether new file is executable or not, by setting executable slot in mapping-entry. * code/create.lisp (mcvs-create): Likewise. * code/sync.lisp (synchronize-files): New parameter, should-be-executable, tells function which way to set permissions after synchronizing files. * code/mapping.lisp (mapping-entry): New slot, executable. (mapping-entry-parse-attributes): New function, parses new optional property list from :FILE entries in a mapping. (mapping-convert-in): Parse property list that may be present in fourth list element of a :FILE entry. (mapping-convert-out): Write out executable flag as :EXEC property, if true. (mapping-synchronize): Pass executable flag down to synchronize-files.
Merging symlink-branch to main trunk.
* mapping.lisp (mapping-update): Bugfix in logic which prints clobbering moves. The functions abstract-to-real-path and second were applied in the wrong order.
Use getcwd to to implement mcvs-locate. * code/unix-bindings/unix.lisp (getcwd): New call out, invokes impl_getcwd. * code/unix-bindings/impl.c (impl_getcwd): New function, use getcwd() to obtain current working directory, resizing dynamic buffer if necessary to get the entire path. * code/clisp-unix.lisp (getcwd): New wrapper function. * code/dirwalk.lisp (go-up): Function removed. * code/mapping.lisp (mcvs-locate): Rewritten to obtain path using getcwd, then try looking for MCVS directory in successively shorter prefixes of that path.
* seqfuncs.lisp (intersection-difference): Support a new keyword parameter :squash-nil. * mapping.lisp (mapping-difference): Filter non-moved pairs directly in intersection-difference call using :squash-nil, eliminating the need to do a second remove-if pass.
* mapping.lisp (mapping-difference): Rewrite using intersection-difference.
Merging from partial-sandbox-branch.
* purge.lisp (mcvs-purge): Factor out code for computing deleted files. * mapping.lisp (mapping-removed-files): New function, contains code factored from mcvs-purge. * restore.lisp: New file. (mcvs-restore, mcvs-restore-wrapper): New functions.
Grab no longer synchronizes to recreate deleted files immediately before blowing them away. * grab.lisp (mcvs-grab): Specify :no-sync t when calling mcvs-remove. * remove.lisp (mcvs-remove): Support new no-sync keyword. This tells mcvs-remove that the files being removed from the mapping, don't exist in the sandbox. So it's not necessary to call mapping-synchronize, and mapping-update can be told via :no-delete-removed t not to try to remove deleted files. * mapping.lisp (mapping-update): New no-delete-removed keyword parameter.
* grab.lisp (read-word-hash): Use #'equalp test for case-insensitive string comparisons. (added-removed): Use string< instead of string-lessp for comparing paths. (determine-common-words, eliminate-common-words): New functions. (move-candidates): Acceptance threshold reduced to 50%, since elimination of common words reduces the similarity correlation. (mcvs-grab): Use string< instead of string-lessp when sorting paths. Do the common words computation. * mapping.lisp (mapping-dupe-check, mapping-write, mapping-difference): Use string< instead of string-lessp.
* mapping.lisp (in-sandbox-root-dir): Fix symbol macro sandbox-down-path; it was referring to the (quote #:DOWNPATH-NNN) rather than #:DOWNPATH-NNN.
* mapping.lisp (mapping-update): Provide restart that allows user to ignore file removal error.
Porting to CMUCL. * system.lisp: Conditionally load new module cmucl-unix. * mapping.lisp (mapping-dupe-check, mapping-write, mapping-difference): Fixes related to sort function; we were relying on CLISP's preservation of the cons cell order. * cmucl-unix.lisp: New file.
Absolute paths resolved against sandbox root. * posix.lisp (path-absolute-p): New function. Predicate to test whether a path is absolute. * mapping.lisp (in-sandbox-root-dir): sandbox-translate-paths function detects absolute path, and treats it as relative to sandbox root.
* mapping.lisp (malformed-map): New function. (mapping-dupe-check): Perform extra error checks when reading mapping, and turn them into a condition with a ``nice'' error message.
Minor adjustment to chatter level.
* mapping.lisp (mapping-update): Messages related to moving, adding or removing files promoted to terse level, so only -Q can suppress them.
* update.lisp (mcvs-update): Changing level of chatter messages. * move.lisp (mcvs-move): Likewise. * add.lisp (mcvs-add): Likewise. * remove.lisp (mcvs-remove): Likewise. * checkout.lisp (mcvs-checkout): Likewise. * generic.lisp (mcvs-generic): Likewise. * import.lisp (mcvs-import): Likewise. * mapping.lisp (mapping-dupe-check): Likewise. (mapping-update): Likewise.
Support for filetypes in import. * posix.lisp (suffix): Separator character parameter is optional; multiple occurences of character lead to one big suffix like ".tar.gz" instead of ".gz". A leading dot means it's not a suffix but a hidden file like ".exrc". (edit-file): New function, brings up text editor for specified file. * clisp-linux.lisp (env-lookup): New function for environment variable lookup. * types.lisp: New source file. (*mcvs-types-name*, *mcvs-types*): New constants for TYPES filename. (types-read, types-write, types-sanity-check, types-to-import-wrapper-args): New functions. * import.lisp (*types-comments*): New constant. (mcvs-import): Restructured to build up list of file suffixes, allow the user to edit the file which determines how they are treated, filter out ignored files and pass -W options to cvs import to handle the rest. Failed cvs import is turned into restartable condition. * mapping.lisp (mapping-generate-name): Takes a suffix parameter. The F-files now carry a suffix obtained from the original file, because I have concluded that this was the only reasonable way to integrate with CVS.
* move.lisp (mcvs-move): If the mapping-update operation returns nil, or terminates by a non-local jump, restore the filemap. * mapping.lisp (mapping-update): When returning normally, return t. When returning after doing a rollback, return nil.
* error.lisp (mcvs-error-handler): Bugfix. We were closing over a binding of the iteration variable of a dolist, which has only one binding over the entire loop. * mapping.lisp (mapping-update): Gathers up info all local clobbered files, and then throw the error. Provides restart which allows user to print the list of clobbered files, and a restart which allows the user to have those files clobbered. * checkout.lisp (mcvs-checkout-wrapper): Bugfix for last bugfix.
* mapping.lisp (mapping-difference): Reformatted documentation string. (mapping-update): Implemented a continue restart which rolls back the changes done to the local filesystem.
Remove spurious newlines from error messages.
* convert.lisp: New file. Contains conversion utility to make an Meta-CVS repository from an ordinary CVS repository, while preserving all history, tags and branches. (remove-attic-component, classify-tags, read-tags, mcvs-convert): New functions. * posix.lisp (suffix): New function. Computes suffix of file. (execute-program-xargs): New optional parameter, for specifying fixed part added at the end of each generated command line. * mapping.lisp (*mcvs-map-name*, *mcvs-local-map-name*): New constants. (*mcvs-map*, *mcvs-map-local*): Redefined in terms of new constants. (mapping-generate-name): New key parameter no-dir for not adding the directory prefix.
* sync.lisp (synchronize-files): Return :dir symbol when either argument is a directory. * mapping.lisp (mapping-synchronize): Chatter output messages are shorter. Handles :dir return value from synchronize-files. (mapping-update): New sanity checks for moved and added files, to avoid clobbering local files. Removed redundant call to ensure-directories-exit in move logic, because synchronize-files will do it anyway. Chatter messages reordered to occur before their corresponding action is done. * mcvs-main.lisp (*mcvs-error-treatment*): Special variable can have new domain value, namely :decline. (mcvs-top-error-handler): Print error message when terminating non-restartable error. Handle new :decline treatment by simply returning. (mcvs-debug-shell): Set *mcvs-error-treatment* to :decline so that errors are caught by debugger.
* mapping.lisp (mapping-sort): Removed function. (mapping-write): Sort written map by F- file names, not by path names. This is far better for merging, because files stay in the same place when they are renamed.
Algorithmic efficiency improvements. No longer using abstract set operations to update file structure or find duplicates in the maps. Could still streamline the sorting. * mapping.lisp (mapping-sort): Express more succinctly using key. (mapping-dupe-check): Rewrite using loop over sorted lists. (mapping-difference): New function for computing mapping change. (mapping-update): Modify to use mapping-difference.
* mapping.lisp (mapping-update): When moving files, ensure that the target is unlinked if it exists. * move.lisp (simple-rename): No longer do target unlinking here. Also bugfix: it wasn't handling renames of directories containing just one file.
Error message change.
Oops, correcting little function name mismatch.
* mapping.lisp (mapping-dupe-check): New function for detecting duplicate objects or paths in a mapping. (mapping-sane-p): Function removed. (mapping-read): Use mapping-dupe-check to verify a map when asked by the sanity-check keyword. (mapping-update): Specify sanity check when reading MCVS/MAP.
Renamed all ``filemap-'' functions to ``mapping-'' prefix. * mapping.lisp (filemap-generate-name, filemap-sort, filemap-extract-paths, filemap-lookup, filemap-prefix-lookup, filemap-prefix-matches, filemap-object-lookup, filemap-same-object-p, filemap-same-path-p, filemap-moved-p, filemap-rename-files, filemap-sane-p): Old names removed. (mapping-generate-name, mapping-sort, mapping-extract-paths, mapping-lookup, mapping-prefix-lookup, mapping-prefix-matches, mapping-object-lookup, mapping-same-object-p, mapping-same-path-p, mapping-moved-p, mapping-rename-files, mapping-sane-p): New names created. (mapping-read, mapping-write, mapping-synchronize, mapping-update): Edit calls to renamed functions. * add.lisp (mcvs-add): Likewise. * diff.lisp (mcvs-diff): Likewise. * filt.lisp (mcvs-filt): Likewise. * import.lisp (mcvs-import): Likewise. * move.lisp (simple-rename, simple-move-to-dir, move-guts): Likewise. * remove.lisp (mcvs-remove): Likewise.
Factored out repeated code for reading and writing of the MAP and MAP-LOCAL files. * mapping.lisp (mapping-read, mapping-write): New functions. (mapping-synchronize, mapping-update): Use new functions. * move.lisp (mcvs-move): Likewise. * filt.lisp (mcvs-filt): Likewise. * add.lisp (mcvs-add): Likewise. * remove.lisp (mcvs-remove): Likewise. * checkout.lisp (mcvs-checkout): Likewise. * diff.lisp (mcvs-diff): Likewise. * import.lisp (mcvs-import): Likewise.
MCVS is being renamed to Meta-CVS.
Fixing compiler errors.
Oops, removed forgotten (break).
Moving closer toward delivery.
Removing debugging diagnostic.
A bit of refactoring. Added mcvs-move.
Sort map in mcvs-remove before writing it out. New routines in mapping, in preparation for file deletion.
Adding all existing source files.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.
|Powered by ViewVC 1.1.5|