Last Update: 2022-03-31 21:18 Created at: 2022-02-10 04:36 RSS
git qimport -P <patch> does not correctly apply the named patch

Estado
Priority
Hito
Tags
No Tags

Starting from:

$ git qseries -sv
0 A amend-timestamp.patch: Update commit timestamp on "git qrefresh" or "git qfold".
1 A alias-commands.patch: Install aliases for "git qdelete" and "git qrename".
2 A generate-changelog.patch: Generate ChangeLog to include in source distribution.
if I run the git qimport command, with its -P option, I see something like:
$ git qimport -P ../../git-mq-hg/.hg/patches/hg-changelog.patch
git qimport: adding 'hg-changelog.patch' to the patch series
git qimport: applying patch 'hg-changelog.patch'
Skipped patch 'Makefile.in'.
git qimport: 'hg-changelog.patch' is now the topmost applied patch.
The patch file is imported into the appropriate patch directory, added to the patch series, and registered as "applied"; however, the application of the patch has no effect.

To work around the issue, if I subsequently run:

$ git qpop
git qpop: popping patch 'hg-changelog.patch'
git qpop: 'generate-changelog.patch' is now the topmost applied patch.
$ git qpush
git qpush: applying patch 'hg-changelog.patch'
git qpush: 'hg-changelog.patch' is now the topmost applied patch.
the patch does take effect.

2022-03-31
21:18 Estado: Close ha sido actualizado (keith)
2022-02-11
23:29 Comment posted by keith

Investigation reveals two fundamental flaws, in the current git qimport implementation:

  • Invocation of git qimport -P ..., with an initially empty patch series, (with no pre-existing series file), will initially map a series file reference to /dev/null; subsequently, the series file will created, to record the patch import, and application of the imported patch, (or patches), will be delegated to the git qpush back-end handler.will be requested to apply the imported patch, (or patches). However, the initial series file mapping to /dev/null is not updated, before invoking the git qpush back-end, which is thus unable to locate the required patch references, so is unable to apply any patches.
  • When the git qpush back-end is invoked, to apply patches, the current working directory must have been set to the top-level directory of the git working tree; the current git qimport implementation neglects this requirement, resulting in potential failure to apply patches.


Both of these defects are corrected by commit #b0667eb; the corrections will be incorporated into the next package release.

2022-02-10
04:36 Crear nuevo incidencia(#51061): git qimport -P <patch> does not correctly apply the named patch (keith)