Date: Wed, 19 Dec 2012 18:51:35 +0000 (UTC) From: Brooks Davis <brooks@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r244443 - projects/mtree/contrib/mtree Message-ID: <201212191851.qBJIpZG9061453@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brooks Date: Wed Dec 19 18:51:35 2012 New Revision: 244443 URL: http://svnweb.freebsd.org/changeset/base/244443 Log: Add a compatibility option to imply -j when -c and -i are given. Add a COMPATIBILITY section to document differences from FreeBSD's historic mtree. Not all are currently documented pending further discussion with NetBSD developers. Modified: projects/mtree/contrib/mtree/mtree.8 projects/mtree/contrib/mtree/mtree.c Modified: projects/mtree/contrib/mtree/mtree.8 ============================================================================== --- projects/mtree/contrib/mtree/mtree.8 Wed Dec 19 18:15:33 2012 (r244442) +++ projects/mtree/contrib/mtree/mtree.8 Wed Dec 19 18:51:35 2012 (r244443) @@ -166,6 +166,16 @@ and If no inclusion list is provided, the default is to display all files. .It Fl i If specified, set the schg and/or sappnd flags. +For compatiblity with +.Fx +if the +.Fl c +and +.Fl i +option are both passed, +then the +.Fl j +option is implied and a warning is emitted. .It Fl j Indent the output 4 spaces each time a directory level is descended when creating a specification with the @@ -690,6 +700,37 @@ option can be used in combination with or .Fl u to create directory hierarchies for, for example, distributions. +.Sh COMPATIBILITY +This version of the +.Nm utility differs from the version in +.Fx 9 +and earlier in several ways: +.Bl -bullet -compact +.It +When the +.Fl c +option is specified a final ``..'' is not emitted to match the top +directory. +Files made to match by appending ``..\\n\\n''. +.It +The +.Fl U +and +.Fl u +options do not set the modification time or the schg and/or sappnd +file flags unless the +.Fl t +and +.Fl i +options are also passed. +.It +The +.Fl j +option is equivalent to the +.Fx +.Fl i +option and should be used in its place. +.El .Sh SEE ALSO .Xr chflags 1 , .Xr chgrp 1 , Modified: projects/mtree/contrib/mtree/mtree.c ============================================================================== --- projects/mtree/contrib/mtree/mtree.c Wed Dec 19 18:15:33 2012 (r244442) +++ projects/mtree/contrib/mtree/mtree.c Wed Dec 19 18:51:35 2012 (r244443) @@ -236,6 +236,12 @@ main(int argc, char **argv) if ((cflag && Cflag) || (cflag && Dflag) || (Cflag && Dflag)) mtree_err("-c, -C and -D flags are mutually exclusive"); + if (cflag && iflag) { + warnx("-c and -i specified, setting -j and unsetting -i"); + iflag = 0; + jflag = 1; + } + if (iflag && mflag) mtree_err("-i and -m flags are mutually exclusive");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212191851.qBJIpZG9061453>