On Jan 27, 2008 9:14 PM, Dan Nicholson <[EMAIL PROTECTED]> wrote:
> Would you mind not setting -u0 when generating patches? I realize it
> cuts down on the size of the attachments, but I think the context is
> much more useful than the bandwidth savings. Especially for interdiffs
> like this, it can be vital to seeing what the change is doing. For
> Mozilla, they used to request 8 or 9 lines of context on patches!

Sorry -- -u0 was an artifact from when I was splitting my large patch
into this patch series (I ahve a script that I use to diff between git
mainline and my posix series).  I have fixed that change.
If it would make things easier, I have a git repo @
git://fnordovax.org/pm-utils/ that contains all my patches.

> Now it updates $elapsed, but it still suffers the problem where you
> always `sleep 1'. So, even for the case now where the timeout
> functionality is not being utilized, you still delay a second if the
> locking failed. Simply moving the sleep after the conditional would
> fix that.

Good point.  Patch attached (with -U 5).

> Thanks.
>
> --
> Dan
>
diff -U 5 -rNX /home/victor/pm-utils/trunk/diffignore pm-utils.updates/pm/functions working/pm/functions
--- pm-utils.updates/pm/functions	2008-01-27 21:01:05.000000000 -0600
+++ working/pm/functions	2008-01-27 21:26:03.000000000 -0600
@@ -53,13 +53,13 @@
 {
 	# $1 = directory to use as the lock directory
 	# $2 = optional timeout
 	local elapsed=0
 	while ! try_lock $1; do
-		sleep 1;
 		[ "x$2" != "x" ] && [ $(( $elapsed == $2 )) -ne 0 ] && return 1
 		elapsed=$(($elapsed + 1))
+		sleep 1;
 	done
 }
 
 # release the lock
 release_lock()
_______________________________________________
Pm-utils mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pm-utils

Reply via email to