On Wed, Mar 07, 2018 at 05:42:53PM -0800, Rodrigo Vivi wrote:
> When working with wiggle to easily solve rebasing
> conflicts we also need to be able to easily continue,
> easily see the impacted files and easily clean the
> repo to avoid ending up with many .rej and .porig files.
> 
> v2: Remove -r from rm. (Lucas)
>     Use -z instead of '== ""' comparison. (Lucas)
>     Add documentation to the helpers. (Required by make check).
> 
> Cc: Paulo Zanoni <paulo.r.zan...@intel.com>
> Cc: Michel Thierry <michel.thie...@intel.com>
> Cc: James Ausmus <james.aus...@intel.com>
> Cc: Lucas De Marchi <lucas.demar...@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.v...@intel.com>
> Reviewed-by: Lucas De Marchi <lucas.demar...@intel.com>

LGTM

Lucas De Marchi

> ---
>  qf     | 33 +++++++++++++++++++++++++++++++++
>  qf.rst | 16 ++++++++++++++++
>  2 files changed, 49 insertions(+)
> 
> diff --git a/qf b/qf
> index 140305fef9f3..270bcf53000a 100755
> --- a/qf
> +++ b/qf
> @@ -421,6 +421,39 @@ function qf_stage
>       echo All applied patches successfully staged
>  }
>  
> +function qf_wiggle_clean
> +{
> +     cd_toplevel
> +     conflict_files=$(git status -u --porcelain=2 -- '*.rej' | grep -E "^?" 
> | cut -d' ' -f2)
> +
> +     for file in $conflict_files ; do
> +             echo cleaning $file ${file%.rej}.porig
> +             rm -f $file ${file%.rej}.porig
> +     done
> +}
> +
> +function qf_conflict_files
> +{
> +     cd_toplevel
> +     conflict_files=$(git status -u --porcelain=2 -- '*.rej' | grep -E "^?" 
> | cut -d' ' -f2)
> +
> +     if [[ -z $conflict_files ]] ; then
> +             echo No conflicted files found!
> +     else
> +             echo Conflict found on:
> +             for file in $conflict_files ; do
> +                     echo ${file%.rej}
> +             done
> +     fi
> +}
> +
> +function qf_continue
> +{
> +     cd_toplevel
> +     qf_wiggle_clean
> +     quilt push -a
> +}
> +
>  qf_alias_wp=wiggle_push
>  function qf_wiggle_push
>  {
> diff --git a/qf.rst b/qf.rst
> index 98c17c2390c1..9d5ac528e4b7 100644
> --- a/qf.rst
> +++ b/qf.rst
> @@ -200,6 +200,22 @@ Resets the git index and then (re-)applies all currently 
> applied
>  quilt patches to it. Useful to use git tools like git diff to
>  compare changes against the quilt patch state.
>  
> +conflict-files
> +--------------
> +List the files that are probably in a unresolved stage of conflict.
> +Wiggle push will leave .rej and .porig files behind.
> +This is useful for manual conflict solving during the quilt rebase.
> +
> +continue
> +--------
> +Clean up after wiggle and continue with quilt push -a to continue
> +applying and rebasing all the following patches.
> +
> +wiggle-clean
> +------------
> +Clean up all .rej and .porig files that wiggle probably
> +left behind.
> +
>  wiggle-push|wp
>  --------------
>  Force-push the next patch and then wiggle in any conflicts. Does
> -- 
> 2.13.6
> 
> _______________________________________________
> dim-tools mailing list
> dim-tools@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dim-tools
_______________________________________________
dim-tools mailing list
dim-tools@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dim-tools

Reply via email to