First of all, I'm not used to quote the whole msg, but maybe someone on the tailor ML may want to try this out ;)

Brian May wrote:
On Tue, 2006-12-26 at 18:25 +0100, Vincent Danjean wrote:
  Can you try if the 0.9.27 version of tailor fixes the bug you reported ?
If you do not use the unstable distribution, you can download the package
in my repository[1] and install it with :
dpkg -i tailor_0.9.3-1_i386.deb
(the package should be fine for the testing distribution too)

I just tried it with a straight package import, and it seemed to work
fine.

Unfortunately, a number of file changes seem to have been "forgotten".
This is despite the fact tailor appears to be doing the right thing, eg:

[EMAIL PROTECTED]:~/vacation$ svn update -r 57
At revision 57.
[EMAIL PROTECTED]:~/vacation$ svn update -r 58
U    vacation.c
U    ChangeLog
Updated to revision 58.
[EMAIL PROTECTED]:~/vacation$ svn diff -r 57:58
Index: vacation.c
===================================================================
--- vacation.c  (revision 57)
+++ vacation.c  (revision 58)
@@ -69,6 +69,8 @@
  * contributed by Roberto Piola, [EMAIL PROTECTED] - 2006/12/03
  */
+#define _GNU_SOURCE
+
 #include <sys/param.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -405,6 +407,8 @@
  */
 int nsearch(register char *name, register char *str)
 {
+#if 0
+  /* This is the old code */
   register int len;
   register char c;
   c=tolower(*name);
@@ -413,6 +417,13 @@
     if (tolower(*str) == c && !strncasecmp(name, str, len))
       return(1);
   return(0);
+#else
+  /* New code */
+  if (strcasestr(str, name))
+      return(1);
+  else
+      return(0);
+#endif
 }
/*
Index: ChangeLog
===================================================================
--- ChangeLog   (revision 57)
+++ ChangeLog   (revision 58)
@@ -7,6 +7,7 @@
 - Changed Makefile to build with OpenBSD string functions.
 - Changed "make clean" to remove vacation in source directory.
 - Added a dependancy on vacation.h to the various build options.
+- Replaced the old nsearch() code with simpler code based using strnstr()
2006/12/28
 - Tagged 1.2.7.0 beta 1 !


11:00:48 [I] -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
11:00:48 [I] Changeset "58"
11:00:48 [I] Log message: Replaced the old nsearch() code with simpler code 
based using strnstr()
11:00:48 [I] /home/brian/monotone/vacation $ svn update --ignore-externals 
--revision 58 .
11:00:52 [I] [Ok]
11:00:52 [I] /home/brian/monotone/vacation $ mtn commit --author chrissamuel 
--date 2007-01-07T12:14:33.184305 --message-file /tmp/brian
/tailor-mLDnGmtn .
11:00:52 [W] [Status 1]
11:00:52 [I] No changes to commit - changeset ignored
11:00:52 [I] -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

This might be a problem with svn or mtn too, but I am going to have to
investigate more.

Is there anyway I can see the output of svn and mtn? In particular, I
want to see what that error from mtn is.

If it does not appear in the project.log, it's a bug as well, of the respective backend.


Also, tailor really should not keep going if an error is detected, this
just hides problems.

Yes, it probably should not skip the exit status 1 in monotone.


According to the man page this should work:

[EMAIL PROTECTED]:~/monotone$ tailor --debug old/vacation.tailor
Traceback (most recent call last):
  File "/usr/bin/tailor", line 35, in ?
    main()
  File "/var/lib/python-support/python2.4/vcpx/tailor.py", line 363, in main
    config.set(source, 'repository', options.source_repository)
  File "/usr/lib/python2.4/ConfigParser.py", line 639, in set
    raise TypeError("option values must be strings")
TypeError: option values must be strings
[EMAIL PROTECTED]:~/monotone$ tailor -D old/vacation.tailor
Traceback (most recent call last):
  File "/usr/bin/tailor", line 35, in ?
    main()
  File "/var/lib/python-support/python2.4/vcpx/tailor.py", line 363, in main
    config.set(source, 'repository', options.source_repository)
  File "/usr/lib/python2.4/ConfigParser.py", line 639, in set
    raise TypeError("option values must be strings")
TypeError: option values must be strings

Uhm, no, at least, I cannot see where the man page fails: the configuration file is introduced by an option (now by the -c shortcut too). To support shebang, tailor catch the case of only one argument, and assume it to be a configuration file, but that's an exception (and maybe undocumented).

Anyway, I fixed the bad traceback and raised a proper exception instead.

Thanks for reporting,
ciao, lele.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to