Parent Directory | Revision Log
|Links to HEAD:||(view) (annotate)|
|Links to mcvs-1-0-10:||(view) (annotate)|
Improved error handling again in a flash of sanity. The whole idea of ``bail'' as a restart is gone. All code which must perform some complex cleanup action does so as part of normal unwinding. And so termination becomes safe. * code/update.lisp (mcvs-update): Change bail restart to continue. * code/mcvs-main.lisp (*global-options*): Remove "error-bail". (*usage*): Remove description of --error-bail. (mcvs-execute): Bind *mcvs-error-treatment* to :terminate rather than :bail if controlling TTY cannot be opened. * code/move.lisp (mcvs-move): Change "Undoing move" error message to "Undoing changes to map". * code/add.lisp (mcvs-add): Get rid of bail restart; move cleanup code into unwind-protect block. * code/error.lisp (*mcvs-error-treatment*): Touch up docstring. (mcvs-error-handler): Remove anything having to do with :bail. Change description of `T' command to suggest that it is safe. * code/options.lisp (filter-mcvs-options): Remove handling of "error-bail" option. * code/mapping.lisp (mapping-update): Get rid of outermost restart-case, which had just a bail restart. Replace it with unwind-protect block which does exactly the same restoration.
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.
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.
Add help to move command. * code/mcvs-main.lisp (*mcvs-command-table*): Added *move-help*. * code/move.lisp (*mcvs-help*): New constant.
* code/move.lisp (move-guts, mcvs-move): Canonicalize the destination path in mcvs-move, rather than mcvs-guts.
* code/move.lisp (move-guts): If an error occurs for each source in a multiple move, and the user skips each source, generate the error that all sources were skipped.
* code/move.lisp (source-check): Generate error if a move of the sandbox root is attempted.
* 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.
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.
* move.lisp (move-guts): When moving multiple sources to a target directory, provide a restart to skip a bad source.
Merging from partial-sandbox-branch.
Wording change in error message.
Additional fix: check for paths in MCVS/ area.
Error checking added to mcvs move: verifies that all sources exist and are known to Meta-CVS. * move.lisp (source-check): New function. (simple-rename, simple-move-to-dir): Use new function.
Fix trailing slash bug in mcvs mv. * move.lisp (simple-move-to-dir): Canonicalize path after catenating destination and file base name. This nukes a double slash if we move to a name with a trailing slash. (move-guts): Treat a destination name that has a trailing slash as a directory, unless it exists already as a non-directory.
* 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.
* 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.
* 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.
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.
* move.lisp (move-guts): test the actual filesystem as well as the map for existence of a directory or file. This makes the move operation behave better. Files can be moved to an existing directory that is not known to MCVS, and a file can properly clobber a target file that is not known to MCVS. * clisp-linux.lisp (directory-p, regular-p, symlink-p): define methods for these generic functions for a NIL argument, such that they return NIL.
* move.lisp (simple-move-to-dir): eliminated a bunch of code with the result that mcvs mv now works more like the Unix mv when moving a directory to another directory. * mcvs-main.lisp (mcvs-execute): fix bogus error message when options are given but no command. * README: don't use -z3 in example because this style of specifying an argument to an option doesn't work.
First cut at pass-through of CVS options.
Some argument passing cleanup.
Moving closer toward delivery.
A bit of refactoring. Added mcvs-move.
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|