darcs

Issue 524 posthook should be aware of which patches are affected

Title posthook should be aware of which patches are affected
Priority wishlist Status resolved
Milestone Resolved in
Superseder wish: new hook to support automatic commit e-mails
View: 639
Nosy List darcs-devel, dmitry.kurochkin, kolibrie, kowey, markstos, thorkilnaur, tommy, vmiklos
Assigned To
Topics

Created on 2007-08-23.14:41:04 by kolibrie, last changed 2009-08-27.14:07:23 by admin.

Files
File name Uploaded Type Edit Remove
applied_patches.pl kolibrie, 2007-08-23.14:41:04 text/x-perl
Messages
msg2094 (view) Author: kolibrie Date: 2007-08-23.14:41:04
There has been discussion from time-to-time about how to pass patch
and/or file information to a posthook command.  If I recall correctly,
the dominant opinion is that this information could be supplied in an
environment variable.

My workaround is currently to run a perl script to find patches with a
recent update time, and write those to a file:

  apply posthook /usr/local/bin/applied_patches.pl 15 > _darcs/prefs/applied_patches; /usr/local/bin/applied_patches.pl --files 15 > _darcs/prefs/applied_files
  apply run-posthook

I would love to have the hashes of each affected patch in one
environment variable, and the names of each affected file in another
environment variable.  They could be called something simple like:
DARCS_PATCHES and DARCS_FILES, or have HOOK or POSTHOOK in there
somewhere if we want to get fancy.

I am attaching my perl script 'applied_patches.pl' as an example of
what I am doing.  It is barely sufficient for what I am currently
doing, but can very easily give incorrect results.

-kolibrie
Attachments
msg2096 (view) Author: vmiklos Date: 2007-08-24.11:12:52
or you can just alwasy store the hash of the last patch. this is what we use in
darcs-hooks (a generic framework, currently contains 3 patches):

http://ftp.frugalware.org/pub/other/darcs-hooks/

(sorry for changing the priority, i had to do so to be able to answer)
msg3259 (view) Author: markstos Date: 2008-02-09.05:37:29
kolibrie,

This issue sounds like a dupe of issue639, which you reported more recently, so
I'm marking it as such. Please re-open it if I'm wrong.
msg3449 (view) Author: kolibrie Date: 2008-02-15.17:44:02
On Sat, Feb 09, 2008 at 05:37:30AM -0000, Mark Stosberg wrote:
> This issue sounds like a dupe of issue639, which you reported more recently, so
> I'm marking it as such. Please re-open it if I'm wrong.

I did not report issue639, but it does appear to be talking
about the same solution, so we can say they are duplicates.

-kolibrie
msg3450 (view) Author: markstos Date: 2008-02-15.17:50:21
This is now considered "resolved-in-unstable", since the dupe of it is:

http://bugs.darcs.net/issue639

DARCS_PATCHES and DARCS_PATCHES_XML are now exported to address this. The manual
was updated accordingly.
History
Date User Action Args
2007-08-23 14:41:05kolibriecreate
2007-08-24 11:12:56vmiklossetstatus: unread -> unknown
nosy: + vmiklos
messages: + msg2096
2008-02-09 05:37:30markstossetstatus: unknown -> duplicate
nosy: + markstos
superseder: + wish: new hook to support automatic commit e-mails
messages: + msg3259
2008-02-15 17:44:04kolibriesetnosy: droundy, tommy, beschmi, kowey, markstos, vmiklos, kolibrie
messages: + msg3449
2008-02-15 17:50:22markstossetstatus: duplicate -> resolved-in-unstable
nosy: droundy, tommy, beschmi, kowey, markstos, vmiklos, kolibrie
messages: + msg3450
2008-09-04 21:31:26adminsetstatus: resolved-in-unstable -> resolved
nosy: + dagit
2009-08-06 17:38:01adminsetnosy: + jast, Serware, dmitry.kurochkin, darcs-devel, zooko, mornfall, simon, thorkilnaur, - droundy, vmiklos, kolibrie
2009-08-06 20:34:49adminsetnosy: - beschmi
2009-08-10 22:07:46adminsetnosy: + vmiklos, kolibrie, - darcs-devel, zooko, jast, Serware, mornfall
2009-08-11 00:02:10adminsetnosy: - dagit
2009-08-25 17:51:38adminsetnosy: + darcs-devel, - simon
2009-08-27 14:07:23adminsetnosy: tommy, kowey, markstos, vmiklos, darcs-devel, thorkilnaur, kolibrie, dmitry.kurochkin