# # # patch "NEWS" # from [0ca6a4be4c4d8778468cb584963db8c98c1959b2] # to [b9e755040e970f186a27df7326cbab1f2c668b81] # # patch "monotone.texi" # from [b77d61e56958096acec3af24178c9022dbd75e95] # to [902cda7acbad85533de93919004da877b7e3f9ff] # ============================================================ --- NEWS 0ca6a4be4c4d8778468cb584963db8c98c1959b2 +++ NEWS b9e755040e970f186a27df7326cbab1f2c668b81 @@ -47,6 +47,11 @@ xxx xxx xx xx:xx:xx UTC 2010 interrupted (^C). This was broken in 0.47 when it was fixed to not throw an exception on being interrupted. + - Several bugs related to restrictions not including the required parent + directories of included files have been fixed. It is now possible to + say 'mtn add a/b/c' followed by 'mtn commit a/b/c' and have the commit + succeed. See the restrictions section in the manual for more details. + Other - Support for the diffuse merger (http://diffuse.sourceforge.net) ============================================================ --- monotone.texi b77d61e56958096acec3af24178c9022dbd75e95 +++ monotone.texi 902cda7acbad85533de93919004da877b7e3f9ff @@ -2921,9 +2921,15 @@ @section Restrictions restriction. Commands which support restrictions also support the address@hidden@var{n} } option, where @var{n} specifies the maximum -number of directories to descend. For example, @var{n}=0 disables -recursion, @var{n}=1 means descend at most one directory, and so on. address@hidden@var{n} } and @address@hidden +options. The value @var{n} given to @option{--depth} specifies the +maximum number of directories to descend. For example, @var{n}=0 +disables recursion, @var{n}=1 means descend at most one directory +below each specified path, and so on. The @option{--depth} value +applies individually to each path specified on the command line. The +value @var{path} given to @option{--exclude} specifies a path that +should be excluded from the restriction. Multiple @option{--exclude} +options may be specified to exclude several files or subdirectories. The @command{update} command does not allow for updates to a restricted set of files, which may be slightly different than other @@ -2932,20 +2938,36 @@ @section Restrictions doesn't exist in the database, starting an entirely new line of development. +In addition to including all of the explicitly specified paths and +excluding all of the paths specified with @option{--exclude} options a +restriction also implicitly includes the parent directories of all +included paths. This is done to allow commands operating on newly +added files to succeed. For example, if a new directory @file{a} is +added and a file @file{a/b} is added to this directory restricting to +exactly @file{a/b} will produce a meaningless state that doesn't +include the required parent directory @file{a}. + +The implicit inclusion of required parent directories is done for all +of the commands listed above with the exception of address@hidden This is done to allow reverting the addition of +files in newly added or renamed directories without reverting the +directories themselves. If the parent directories were implicitly +included their addition or name changes would also be reverted. + @heading Subdirectory restrictions -The restrictions facility also allows commands to operate from within a -subdirectory of the workspace. By default, the @i{entire workspace} is -always examined for changes. However, specifying an explicit "." -pathname to a command will restrict it to the current subdirectory. -Note that this is quite different from other version control systems and -may seem somewhat surprising. +The restrictions facility also allows commands to operate from within +a subdirectory of the workspace. By default, the @i{entire workspace} +is always examined for changes. However, specifying an explicit address@hidden pathname to a command will restrict it to the current +subdirectory. Note that this is quite different from other version +control systems and may seem somewhat surprising. -The expectation is that requiring a single "." to restrict to the +The expectation is that requiring a single @file{.} to restrict to the current subdirectory should be simple to use. While the alternative, defaulting to restricting to the current subdirectory, would require a -somewhat complicated ../../.. sequence to remove the restriction and -operate on the whole tree. +somewhat complicated @file{../../..} sequence to remove the +restriction and operate on the whole tree. This default was chosen because monotone versions whole project trees and generally expects to commit all changes in the workspace as a