On Fri, Jan 21, 2022 at 07:47:44PM +0100, Stefan Sperling wrote:

> cvsdo can do it by faking new directories entries in CVS/Entries files.
> This does not require adding directories to the repository (see below).
> I am not suggesting this is a great solution, but it can be done.

For those playing at home, cvsdo is in the super-useful cvsutils package.

--Kurt

> $ ls /tmp/repo/
> CVSROOT/ test/
> $ cvs -d /tmp/repo co -P test
> cvs checkout: Updating test
> U test/alpha
> $ cd test
> $ mkdir foo
> $ cvsdo add foo
> $ echo 'hello world' > foo/new
> $ cvsdo add foo/new
> $ cvs -R diff -uNp foo
> cvs diff: Diffing foo
> Index: foo/new
> ===================================================================
> RCS file: foo/new
> diff -N foo/new
> --- /dev/null   1 Jan 1970 00:00:00 -0000
> +++ foo/new     21 Jan 2022 18:38:57 -0000
> @@ -0,0 +1 @@
> +hello world
> $ mkdir foo/patches
> $ echo new patch > foo/patches/patch1
> $ cvsdo add foo/patches/patch1
> $ cvs -R diff -uNp foo foo/patches
> cvs diff: Diffing foo
> Index: foo/new
> ===================================================================
> RCS file: foo/new
> diff -N foo/new
> --- /dev/null   1 Jan 1970 00:00:00 -0000
> +++ foo/new     21 Jan 2022 18:38:57 -0000
> @@ -0,0 +1 @@
> +hello world
> cvs diff: Diffing foo/patches
> Index: foo/patches/patch1
> ===================================================================
> RCS file: foo/patches/patch1
> diff -N foo/patches/patch1
> --- /dev/null   1 Jan 1970 00:00:00 -0000
> +++ foo/patches/patch1  21 Jan 2022 18:41:50 -0000
> @@ -0,0 +1 @@
> +new patch
> $ ls /tmp/repo/test/
> alpha,v
> $
> 

Reply via email to