quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Quilt-dev] [patch] Quilt support for committing patches to CVS.


From: Dean Roehrich
Subject: Re: [Quilt-dev] [patch] Quilt support for committing patches to CVS.
Date: Mon, 16 Aug 2004 12:53:17 -0500

>From:  Joe Green <address@hidden>
>
>This is a multi-part message in MIME format.
>--------------070300040707060009040608
>Content-Type: text/plain; charset=us-ascii; format=flowed
>Content-Transfer-Encoding: 7bit
>
>Joe Green wrote:
>> I'll try to restructure my patch into "generic" hooks and post it as a 
>> strawman.
>
>I've replaced my integrated CVS support with generic hooks 
>"scm_modify_patch" and "scm_modify_series".  (See first attachment.) 
>Overridable dummy versions of these are provided.  Dean, perhaps a 
>similar "scm_modify_file" hook could be used to implement the support 
>you need?

I'll play with it.


>The hooks can be overridden from .quiltrc.  The second attachment shows 
>a set of .quiltrc functions that support CVS operations in the same way 
>as my previous integrated patch.

Should the realfile function be handled within quilt?  I'm not clear on why
this function is necessary.


>This also doesn't specifically address using different source control 
>systems for different trees, but the CVS implementation dynamically 
>detects whether patches and series file are in CVS source-controlled 
>directories.

It doesn't prevent the dynamic detection, either.  My own quiltrc functions,
which already handle two scm's, would probably fit right in with your hooks.
I have only a few code comments.



Dean


>Index: quilt-0.35/scripts/patchfns.in
>===================================================================
>--- quilt-0.35.orig/scripts/patchfns.in
>+++ quilt-0.35/scripts/patchfns.in
>@@ -187,8 +219,24 @@ insert_in_series()
>                       cat $SERIES >> $tmpfile
>               fi
>       fi
>+
>+      [ -e "$SERIES" ] || new_series=yes

I think that's a bit confusing.  Maybe new_series=yes should instead be
set here:

        else
                echo "$patch$patch_args" > $tmpfile
                if [ -e $SERIES ]
                then
                        cat $SERIES >> $tmpfile
                else
                        new_series=yes
                fi
        fi


>Index: quilt-0.35/quilt/delete.in
>===================================================================
>--- quilt-0.35.orig/quilt/delete.in
>+++ quilt-0.35/quilt/delete.in
>@@ -90,7 +90,16 @@ fi
> if ! remove_from_series $patch
> then
>       printf $"Failed to remove patch %s\n" "$patch" >&2
>+      exit 1
> fi
>+
>+patch_file=$(patch_file_name "$patch")
>+if [ -e "$patch_file" ]
>+then
>+      scm_modify_patch "delete" "$patch_file" || exit 1
>+fi
>+
>+exit 0

Nothing in delete.in actually unlinks the patchfile.  So it stays in the
patches directory.  By telling an scm to delete it we may be causing an unlink
to happen (depending on the scm), and that would lead to an unexpected side
effect.


Dean




reply via email to

[Prev in Thread] Current Thread [Next in Thread]