[Intel-gfx] [maintainer-tools PATCH 30/30] qf: Use .dimrc to config and extend qf.

Rodrigo Vivi rodrigo.vivi at gmail.com
Tue Aug 22 18:16:35 UTC 2017


On Tue, Aug 22, 2017 at 12:33 AM, Jani Nikula <jani.nikula at intel.com> wrote:
> On Mon, 21 Aug 2017, Rodrigo Vivi <rodrigo.vivi at intel.com> wrote:
>> Soon we will need to extend qf for very specific
>> usages of our internal maintenance and rebase bot.
>>
>> So instead of creating yet another config file
>> let's use the existent one.
>
> I think I'd prefer a separate config file for qf.

hm.. I was here accepting this suggestion, but then I noticed our qf_help
already referrence $DIM_PREFIX

so, if we change to .qfrc we will have to redefine this prefix while re-using
dimrc we don't need any duplication.

what do you think?

>
> BR,
> Jani.
>
>>
>> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
>> Cc: Jani Nikula <jani.nikula at intel.com>
>> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
>> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
>> ---
>>  dimrc.sample |  9 ++++++++-
>>  qf           | 18 +++++++++++++++---
>>  2 files changed, 23 insertions(+), 4 deletions(-)
>>
>> diff --git a/dimrc.sample b/dimrc.sample
>> index be7b99cb6b76..bbddecabd519 100644
>> --- a/dimrc.sample
>> +++ b/dimrc.sample
>> @@ -1,4 +1,4 @@
>> -# Sample configuration file for dim. Place this at $HOME/.dimrc or point
>> +# Sample configuration file for dim and qf. Place this at $HOME/.dimrc or point
>>  # DIM_CONFIG environment variable to it.
>>  #
>>  # Defaults are in the comments below.
>> @@ -20,3 +20,10 @@
>>
>>  # Command to run after dim apply
>>  #DIM_POST_APPLY_ACTION=
>> +
>> +#
>> +# qf
>> +#
>> +
>> +# Quilt branch prefix
>> +#QUILT_PREFIX=
>> \ No newline at end of file
>> diff --git a/qf b/qf
>> index be234e72fa15..befdb2c15b5f 100755
>> --- a/qf
>> +++ b/qf
>> @@ -26,12 +26,24 @@
>>
>>  # quilt git flow script
>>
>> -# config
>> -QUILT_PREFIX=quilt/
>> -
>>  # fail on any goof-up
>>  set -e
>>
>> +#
>> +# User configuration. Set in environment or configuration file. See
>> +# dimrc.sample for an example.
>> +#
>> +
>> +# dim configuration file
>> +DIM_CONFIG=${DIM_CONFIG:-$HOME/.dimrc}
>> +if [ -r $DIM_CONFIG ]; then
>> +     # shellcheck source=/dev/null
>> +     . $DIM_CONFIG
>> +fi
>> +
>> +# prefix for quilt branch
>> +QUILT_PREFIX=${QUILT_PREFIX:-quilt/}
>> +
>>  function cd_toplevel
>>  {
>>       cd $(git rev-parse --show-toplevel)
>
> --
> Jani Nikula, Intel Open Source Technology Center
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br


More information about the Intel-gfx mailing list