From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6303 invoked by alias); 8 Oct 2014 22:38:57 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33394 Received: (qmail 9199 invoked from network); 8 Oct 2014 22:38:45 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=QVWxbaxEchLKU7fpDWtCnDHt9hI/GtlfQluLtUk4FLs=; b=rXIaoek8DOp4ZVG0YcxoFiu5B+p8hS2Fn2M2QcwEfdxSASk+voeKHL+JtjC1Pd9TQ0 oS0utwvuRWeqxS/C8fcW+RntwO8cfNni5ZlPnHPabhjLjnw/boRZ4jTea3GVxr4qsngy YBYvziJP39ukWRXJrymg1b5RgdOn8xWe/00nKpIlfEGQN632YDaah8RAUBp+uPEBB5Hk y4/xJsQ12XNxJ4+aTXn7+1NN1N5l5qWVeLb1NXEdstYLWksyRk88sAvAf/Mq5ijWpHbT JHO7EjXFILPrq0WTXO7lM6dGDvE7I47chSakRpsDOmYJnZiwxeloXX0Rjs4TVJu3cY3L ztZQ== X-Received: by 10.180.72.45 with SMTP id a13mr557362wiv.50.1412807923122; Wed, 08 Oct 2014 15:38:43 -0700 (PDT) Date: Thu, 9 Oct 2014 00:36:19 +0200 From: Marc Finet To: Frank Terbeck Cc: zsh-workers@zsh.org Subject: Re: [PATCH 6/9] vcs_info quilt: fix unapplied detection on sub-directory Message-ID: <20141009003619.00001016@mlap.lactee> In-Reply-To: <87lhpm7ctw.fsf@ft.bewatermyfriend.org> References: <1410557443-24178-1-git-send-email-m.dreadlock@gmail.com> <1410557443-24178-7-git-send-email-m.dreadlock@gmail.com> <87lhpm7ctw.fsf@ft.bewatermyfriend.org> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.24; i586-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, Sep 14, 2014 at 11:47:55AM +0200, Frank Terbeck wrote: > Marc Finet wrote: > > When being in a subdirectory of a "repo" being handled with quilt, > > the `quilt unapplied` command returns all the patches because > > QUILT_PATCHES is an absolute path (which exists and is a dir) and > > quilt considers that .pc should in current directory. > > Changing quilt might be overkill and it seems that QUILT_PATCHES > > should just be a name, not an absolute path. > [...] > > - unapplied=3D( ${(f)"$(QUILT_PATCHES=3D$patches $quiltcommand -= -quiltrc /dev/null unapplied 2> /dev/null)"} ) > > + unapplied=3D( ${(f)"$(QUILT_PATCHES=3D$(basename $patches) $qu= iltcommand --quiltrc /dev/null unapplied 2> /dev/null)"} ) >=20 >=20 > You can't do it like this. With debian-packages for example, quilt > patches live in =E2=80=98debian/patches=E2=80=99, which the =E2=80=98base= name=E2=80=99 call would trim > down to =E2=80=98patches=E2=80=99. >=20 > If you do need special QUILT_PATCHES treatment, you can set a > =E2=80=98quit-patches-dir=E2=80=99 style; if the treatment needs to be fa= ncy, you can > also set the style to a function, which opens up the door to whatever > you like. Hum, in fact this commit was intented to 'fix' such the debian/ behavior but miserably failed. I tested different settings and here are my results; for debian patches, the working tree is as follows: work/ =E2=94=9C=E2=94=80=E2=94=80 debian/ =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 patches/ =E2=94=82 =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 series (li= st of patches to apply) =E2=94=82 =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 patch1.diff (on= e particular patch) =E2=94=82 =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 patch2.diff =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 ... =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 ... =E2=94=9C=E2=94=80=E2=94=80 .pc/ =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 .quilt_patches (content of QUILT= _PATCHES) =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 .quilt_series (content of QUILT= _SERIES) =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 patch1.diff/ (copy of patched = files) =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 ... =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 patch2.diff/ =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 ... =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 ... =E2=94=94=E2=94=80=E2=94=80 ... But: - 1) without setting QUILT_PATCHES nor quilt-patch-dir: - quilt is not detected in work/ - quilt is detected in work/anything/ but reports all patches as both applied and unapplied (%a/%p gives x/2x) - `quilt` does not work if no .pc/ exists - 2) with QUILT_PATCHES set to "debian": - quilt is detected everywhere and reports correct patches numbers - but `quilt` stops to work (e.g. `quilt series` shows only latest patch, `quilt pop` fails) - 3) with QUILT_PATCHES set to "debian/patches": - quilt is detected in work/ - quilt is detected in work/anything/ but reports all patches as both applied and unapplied (%a/%p gives x/2x) - `quilt` works when no .pc/ exists - 4) with quilt-patch-dir set to "debian" - quilt is correctly detected everywhere - but unapplied patches are not detected (due to missing /patches when setting QUILT_PATCHES on quilt unapplied invocation) - but `quilt` does not work if no .pc/ exists - 5) with quilt-patch-dir set to "debian/patches": - quilt is detected in work/ - quilt is detect in work/anything/ but reports all patches as both applied and unapplied (%a/%p gives x/2x) So I do not understand the role of quilt-patch-dir as for me it takes the role of QUILT_PATCHES except the missing '/patches'. Moreover changing to sub-directory in cases 1, 3 and 5 makes applied patch detection failing because: - applied is patch1.diff patch2.diff ... - unapplied is /path/to/work/debian/patches/patch1.diff ... For me $patches should have the QUILT_PATCHES semantic, i.e. include the /patches at end (as said in man page). If you agree with this analysis, i might find a patch to make cases 3 and 5 working (even if it breaks the quite-working case 4). And re-reading the man page gives me a hint for the quilt-patch-dir usage: configure QUILT_PATCHES (with hook) per repository with zstyle ? Marc