# # # patch "NEWS" # from [629cedfc5e6164fc8ea78616061d4712d557ce2a] # to [a552479773f4a0de26f6656074ba186228026bb3] # # patch "work.cc" # from [6862807a01614c6ccbe156337ea740b4db4529be] # to [c04b94b1c7d1e2687bcf4a3a1806f3d4bf1e4877] # ============================================================ --- NEWS 629cedfc5e6164fc8ea78616061d4712d557ce2a +++ NEWS a552479773f4a0de26f6656074ba186228026bb3 @@ -21,7 +21,14 @@ - The 'diff' and 'automate content_diff' commands take a '--reverse' option when one revision is specified, to control the order of the diff with the workspace. - + + - The 'update', 'checkout', 'pluck', and 'pivot_root' commands + take an option '--move-conflicting-paths', to handle + unversioned files that are blocking the action. The + unversioned files are moved to + _MTN/resolutions/, so the action can + succeed, and the user can recover the files if necessary. + Bugs fixed - Monotone now sanely skips paths with invalid characters ============================================================ --- work.cc 6862807a01614c6ccbe156337ea740b4db4529be +++ work.cc c04b94b1c7d1e2687bcf4a3a1806f3d4bf1e4877 @@ -1327,6 +1327,23 @@ move_conflicting_paths_into_bookkeeping( { I(leftover_paths.size() > 0); + // There is some concern that this fixed bookkeeping path will cause + // problems, if a user forgets to clean up, and then does something that + // involves the same name again. However, I can't think of a reasonable + // use case that does that, so I can't think of a reasonable solution. One + // solution is to generate a random directory name, another is to use the + // current time in some format to generate a directory name. + // + // now().as_iso_8601_extended doesn't work on Windows, because it has + // colons in it. + // + // Random or time based directory names significantly complicate testing, + // since you can't predict the directory name. + // + // If this turns out to be a problem, a modification of + // now().as_iso_8601_extended to eliminate the colons, or some appropriate + // format for now().as_formatted_localtime would be simple and + // probably adequate. bookkeeping_path leftover_path = bookkeeping_root / "resolutions"; require_path_is_nonexistent(leftover_path, F("cannot move conflicting paths - "