]> Savannah Git Hosting - gnulib.git/commitdiff
gnu-web-doc-update: fix addition of new files
authorPádraig Brady <P@draigBrady.com>
Wed, 20 Jan 2016 14:10:30 +0000 (14:10 +0000)
committerPádraig Brady <P@draigBrady.com>
Wed, 20 Jan 2016 14:14:13 +0000 (14:14 +0000)
If there were already added (emnpty) dirs,
then cvs aborts the add with the message:
  cvs [add aborted]: there is a version in <./dirname> already

* build-aux/gnu-web-doc-update: Add directories separately
to the addition of files, to avoid the above issue
impacting the addition of files.

ChangeLog
build-aux/gnu-web-doc-update

index 9614d580b0759591d1b7e8eedf16398a84c4e356..1bdf766eac78d38ab965c303ccfb4df752e807e0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2016-01-20  Pádraig Brady  <P@draigBrady.com>
+
+       gnu-web-doc-update: fix addition of new files
+       If there were already added (emnpty) dirs,
+       then cvs aborts the add with the message:
+         cvs [add aborted]: there is a version in <./dirname> already
+       * build-aux/gnu-web-doc-update: Add directories separately
+       to the addition of files, to avoid the above issue
+       impacting the addition of files.
+
 2016-01-19  Daiki Ueno  <ueno@gnu.org>
 
        utimens-tests: avoid pulling gettext .m4 files
index ec2116852c77876870684b85aa9ed4416b26466e..271e693700999a69d2c3757fbe99561913b22995 100755 (executable)
@@ -179,11 +179,12 @@ $RSYNC -avP "$builddir"/doc/manual/ $tmp/$pkg/manual
   cd $tmp/$pkg/manual
 
   # Add all the files.  This is simpler than trying to add only the
-  # new ones because of new directories: it would require iterating on
-  # adding the outer directories, and then their contents.
-  #
-  # find guarantees that we add outer directories first.
-  find . -name CVS -prune -o -print             \
+  # new ones because of new directories
+  # First add non empty dirs individually
+  find . -name CVS -prune -o -type d \! -empty -print             \
+    | $XARGS -n1 --no-run-if-empty -- $dryrun $CVS add -ko
+  # Now add all files
+  find . -name CVS -prune -o -type f -print             \
     | $XARGS --no-run-if-empty -- $dryrun $CVS add -ko
 
   # Report/Remove stale files