zsh-workers
 help / color / mirror / code / Atom feed
From: Frank Terbeck <ft@bewatermyfriend.org>
To: Marc Finet <m.dreadlock@gmail.com>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH 6/9] vcs_info quilt: fix unapplied detection on sub-directory
Date: Thu, 09 Oct 2014 18:03:44 +0200	[thread overview]
Message-ID: <8761ft44db.fsf@ft.bewatermyfriend.org> (raw)
In-Reply-To: <20141009003619.00001016@mlap.lactee> (Marc Finet's message of "Thu, 9 Oct 2014 00:36:19 +0200")

Hi Marc,

Disclaimer: I don't use quilt much anymore, so I'm rusty about its
            behaviours in many cases.

One thing off the bat, although it probably doesn't make much of a
difference: Are you using "quilt" in "standalone mode" or is the
directory controlled by a real VCS as well?

I am unsure about what's going on precisely. Could you do this:

    functions -t vcs_info

And retry your test cases? That will produce long traces of what's going
on, and might give ideas as to what's amiss.

Marc Finet wrote:
[...]
> 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/
>   ├── debian/
>   │    ├── patches/
>   │    │     ├── series         (list of patches to apply)
>   │    │     ├── patch1.diff    (one particular patch)
>   │    │     ├── patch2.diff
>   │    │     └── ...
>   │    └── ...
>   ├── .pc/
>   │    ├── .quilt_patches (content of QUILT_PATCHES)
>   │    ├── .quilt_series  (content of QUILT_SERIES)
>   │    ├── patch1.diff/   (copy of patched files)
>   │    │    └── ...
>   │    ├── patch2.diff/
>   │    │    └── ...
>   │    └── ...
>   └── ...
> 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

No idea why this happens. The default if everything is unset is
"patches", which shouldn't be found in any case.

>   - 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)

See below.

>   - 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

I don't know why the patches are reported applied and unapplied.

>   - 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)

I think $QUILT_PATCHES needs to be set to the correct directory
including "patches/". Without, it only works, because the directory is
searched recursively.

I don't know why the patches are reported as applied and unapplied off
hand. :-/

The applied patches are read from .pc/applied-patches, the list of
unapplied patches is retrieved by calling "quilt unapplied".

> 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:

The ‘quilt-patch-dir’ style *sets* QUILT_PATCHES if set. The system
also sets QUILT_PATCHES to an absolute path-name, which should make it
work in subdirectories as well.

But like I said, I don't use quilt much anymore.

>  - 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 ?

As I said above, $patches get assigned to $QUILT_PATCHES. So it should
behave exactly the same.


Regards, Frank


  reply	other threads:[~2014-10-09 16:15 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12 21:30 Misc patches for git completion and vcs_info Marc Finet
2014-09-12 21:30 ` [PATCH 1/9] vcs_info examples: fix typo Marc Finet
2014-09-14  9:33   ` Frank Terbeck
2014-09-12 21:30 ` [PATCH 2/9] completion git: support aliases when \n exist Marc Finet
2014-09-12 21:30 ` [PATCH 3/9] vcs_info git: detect revert or cherry-pick with multiple commits Marc Finet
2014-09-14  9:36   ` Frank Terbeck
2014-09-15  6:22     ` Phil Pennock
2014-09-12 21:30 ` [PATCH 4/9] vcs_info git: set rrn before using it Marc Finet
2014-09-14  9:33   ` Frank Terbeck
2014-09-16 20:07     ` Marc Finet
2014-09-16 20:41       ` Frank Terbeck
2014-09-16 20:57         ` Marc Finet
2014-09-16 21:23           ` Frank Terbeck
2014-09-12 21:30 ` [PATCH 5/9] vcs_info quilt: fix standalone detection Marc Finet
2014-09-14  9:42   ` Frank Terbeck
2014-09-16 20:19     ` Marc Finet
2014-09-12 21:30 ` [PATCH 6/9] vcs_info quilt: fix unapplied detection on sub-directory Marc Finet
2014-09-14  9:47   ` Frank Terbeck
2014-09-16 20:25     ` Marc Finet
2014-10-08 22:36     ` Marc Finet
2014-10-09 16:03       ` Frank Terbeck [this message]
2014-10-16  4:59         ` Marc Finet
2014-10-16  8:17           ` Frank Terbeck
2014-11-08 10:46             ` Marc Finet
2014-11-11 10:07             ` Marc Finet
2015-01-02 11:03               ` Frank Terbeck
2014-09-12 21:30 ` [PATCH 7/9] vcs_info git: fix applied-string name Marc Finet
2014-09-14  9:49   ` Frank Terbeck
2014-09-12 21:30 ` [PATCH 8/9] vcs_info git: consider patches for rebase Marc Finet
2014-09-14 10:08   ` Frank Terbeck
2014-09-14 10:13     ` Frank Terbeck
2014-09-16 20:07       ` Marc Finet
2014-09-12 21:30 ` [PATCH 9/9] completion git: fix send-email --confirm values Marc Finet
2014-09-14 10:11   ` Frank Terbeck
2014-09-12 23:50 ` Misc patches for git completion and vcs_info Bart Schaefer
2014-09-13  7:35   ` Marc Finet
2014-09-13 12:23 ` Frank Terbeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8761ft44db.fsf@ft.bewatermyfriend.org \
    --to=ft@bewatermyfriend.org \
    --cc=m.dreadlock@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).