combining file lists: a logic problem

Ian Petersen ispeters-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Tue Jul 24 17:46:28 UTC 2007


On 7/24/07, Neil Watson <tlug-neil-8agRmHhQ+n2CxnSzwYWP7Q at public.gmane.org> wrote:
> Not that both sources produce a commond file, x5.  Both sources are
> generated by other means that I do not trust to produce a file manifest.
> I combine the lists into single hierarchy and import them into a
> Subversion repository.

What do you mean by "I combine the lists into a single hierarchy"?
You run the build tool, which outputs to /build_output, then you run
the CMS, which outputs to /cms_output, and then you copy the contents
from /build_output and /cms_output to /combined_output?

> These files are copied to a working copy of the repository, except r4
> which was removed from the CMS files.  However, r4 still exists in the
> repository.  A Subversion status will report the modifications and the
> added files but, the removed file will show as unchanged.  How can I
> have the file r4 removed automatically?

This makes it sound like my guess about /build_output and /cms_output
might be right.  It sounds like you update the CMS content using some
opaque tool and then copy the results to your working copy.  If you do
that (and also run the build tool in a directory separate from your
working copy), then why not something like this:

#! /bin/bash

CMS_DIR=...
BUILD_DIR=...
WORKING_COPY=...

(cd "${CMS_DIR}"; find; cd "${BUILD_DIR}; find) | sort | uniq >
/tmp/live_file_list.tmp
(cd "${WORKING_COPY}"; find) | fgrep -v '/.svn/' | sort >
/tmp/working_copy_list.tmp

diff -u /tmp/working_copy_list.tmp /tmp/live_file_list.tmp

The above should (I haven't tested it) produce a list of new files
marked with + and deleted files marked with -.  That information, plus
the output from svn status (after copying the relevant files into the
working copy) should produce new, deleted, and modified lists.

Ian

-- 
Tired of pop-ups, security holes, and spyware?
Try Firefox: http://www.getfirefox.com
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list