On Saturday 29 July 2006 04:09 Brett Neumeier wrote:
> OK, I am once again trying to get ignore patterns to work the way I
> expect them to.
>
> The way I am experimenting with this is that I am maintaining the list
> of ignores in a file called ~/ignores, and for each iteration of my
> test I am doing:
>
> cat ~/ignores | fsvs ignore load
> fsvs status | less
>
> I've also had a great deal of success with "fsvs -d status" to get
> more insight into what fsvs is doing. At this point I have got fsvs to
> do pretty much exactly what I want! It's very exciting.
Fine!

> With that said, I am currently having two problems.
>
> First problem. It looks as though "take" patterns -- maybe "ignore"
> patterns as well -- only do a prefix comparison. For example, I have
> the following ignores:
Yes, that's true.

> t./etc/X11/xorg.conf
> ./etc/X11/*
>
> This does almost what I want, but it actually takes both
> /etc/X11/xorg.conf and /etc/X11/xorg.conf.ORIG, which is counted as a
> match for the take pattern. It seems as though the file name
> comparison should be a full comparison match, with shell globbing
> applied, rather than a prefix match.
There are *currently* only two ways: use a perl regular expression (with $ at 
the end, like
        'tPCRE:\./etc/X11/xorg\.conf$'
or use a ignore pattern with a ? (a single character), like
        ./etc/X11/xorg.conf?*
        t./etc/X11/xorg.conf
Or see below.

> Second problem. I have a directory /opt/apache that contains a full
> apache httpd install. The only thing I want to back up is
> /opt/apache/conf/httpd.conf. I don't want anything else from /opt to
> be versioned. The only way I seem to be able to get this to work is to
> have the following ignores:
>
> t./opt/apache/conf/httpd.conf
> ./opt/apache/conf/*
> t./opt/apache/conf
> ./opt/apache/*
> t./opt/apache
> ./opt/*
>
> If anything is different, including the order of these lines, I get
> the wrong results.
>
> It seems like it would be much more natural to do this:
>
> t./opt/apache/conf/httpd.conf
> ./opt
>
> In other words, "take file /opt/apache/conf/httpd.conf, and ignore the
> rest of /opt". But this doesn't work -- I think this is because fsvs
> doesn't consider anything under ./opt (including ./opt/apache) as it's
> doing a recursive descent of the directory tree.
There's a much simpler way: ignore the tree, and add the single file.
        fsvs ignore ./opt
        fsvs add opt/apache/conf/httpd.conf
Please mind these two things:
1) The add path *must* currently be without "./". Bug in fsvs.
2) The released 1.0.11 has a small bug, which prevents the add command from 
working if the working copy has never been committed. Please use the attached 
patch.


> Would it be reasonable to expect fsvs to check for the existence of
> "take" pattern files irrespective of the ignore-status of their parent
> directories?
I believe that I don't understand this the way you meant it.
If fsvs should ignore a directory (with everything below it), why should it 
descend the hierarchy?
If I understand you correctly, the "add" command is what you need :-)


If you've got further problems or questions, don't hesitate to ask.


Regards,

Phil

-- 
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!
=== test/016_add_unversion
==================================================================
--- test/016_add_unversion	(revision 376)
+++ test/016_add_unversion	(revision 377)
@@ -27,8 +27,27 @@
 	exit 1
 fi
 
-$BINq add $file1 $file2
+# The prepare_clean does a commit.
+# Remove the filelist, to test with a clean state, too.
+p=`$PATH2SPOOL .`/dir
+# For better security
+if [[ "$p" == "" ]]
+then
+  echo "NOK - PATH2SPOOL doesn't work!"
+  exit 1
+fi
 
+mv "$p" "$p.bak"
+
+#$BINdflt -d -d -v  add $file1  > /tmp/asdf
+$BINq add $file1 
+# Then move back, and try again.
+# The added file is un-added by this operation, so add it again.
+mv "$p.bak" "$p"
+# We cannot do a commit, because that would make the added file permanent.
+$BINq add $file2 $file1
+
+
 if [[ `$BINdflt st | egrep "^n\.\.\." | wc -l` -eq 2 ]]
 then
 	echo "OK, 2 added"
=== add_unvers.c
==================================================================
--- add_unvers.c	(revision 376)
+++ add_unvers.c	(revision 377)
@@ -42,7 +42,7 @@
 	{
 		DEBUGP("There are no (old) entries");
 		/* Update at least the wc root directory entry */
-		STOPIF( ops__update_single_entry(sts, NULL), NULL);
+		STOPIF( ops__update_single_entry(root, NULL), NULL);
 	}
 	else STOPIF( status, NULL);
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to