Hello,

On Thursday 15 September 2005 11:58, Gary V. Vaughan wrote:
> Jean Delvare wrote:
> > Hi Gary,
>
> Salut Jean!
>
> > [Gary V. Vaughan]
> >
> >>Actually, I'd be even happier if the dependency on tac was dropped in
> >>favour of always using the perl snippet (or equivalent portable work
> >>alike).

I've removed tac from the cvs, so the problem doesn't exist anymore.

The relevant issue here was process startup time though, especially when files 
were not in the cache. Perl starts relatively slow compared to something as 
simple as tac.

-- Andreas.
--- quilt/pop.in
+++ quilt/pop.in
@@ -50,30 +50,17 @@
 
 list_patches()
 {
-	local n=0 patch
-	applied_patches \
-	| tac \
-	| if [ -n "$opt_all" ]
-	then
-		cat
-	else
-		while read patch
-		do
-			if [ -n "$number" ]
-			then
-				if [ $n -eq $number ]
-				then
-					break
-				fi
-				n=$[$n+1]
-			fi
-			if [ $patch = "$stop_at_patch" ]
-			then
-				break
-			fi
-			echo $patch
-		done
-	fi
+	local n patches
+	patches=( $(applied_patches) )
+	for (([EMAIL PROTECTED]; n>0; n--))
+	do
+		if [ -n "$number" ]
+		then
+			(( number-- > 0 )) || break
+		fi
+		[ ${patches[n]} = "$stop_at_patch" ] && break
+		echo ${patches[n]}
+	done
 }
 
 files_may_have_changed()
_______________________________________________
Quilt-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to