Bugs Everywhere Bug List

Bug: bea/5fb

ID : 5fb11e65-68a0-4015-b404-737238299cdc
Short name : bea/5fb
Status : open
Severity : minor
Assigned :
Reporter : W. Trevor King <wking@drexel.edu>
Creator : W. Trevor King <wking@drexel.edu>
Created : Sat, 23 Jan 2010 19:08:40 +0000
Summary : Add change hooks to Storage class

Comment: --------- Comment ---------
ID: f3e90a7e-b8c4-4a7c-8609-6a783ae59762
Short name: bea/5fb/f3e
From: W. Trevor King <wking@drexel.edu>
Date: Sat, 23 Jan 2010 19:17:10 +0000

Provide hooks so users can easily setup auto-commits, subscriber
notification, etc.  Probably either Darcs-style options:
  $ be COMMAND --help
  ...
    --posthook=COMMAND   Specify command to run after this command.
    --no-posthook        Do not run posthook command.
    --prompt-posthook    Prompt before running posthook. [DEFAULT]
    --run-posthook       Run posthook command without prompting.
  ...
or a Git-style hooks directory:
  $ tree .be
  .be/
  |-- version
  |-- hooks
  .   |-- post-commit.sh
  .   |-- pre-commit.sh
      `-- update.sh


Comment: --------- Comment ---------
ID: 628a050a-f969-4290-8468-f5e991528f40
Short name: bea/5fb/628
From: W. Trevor King <wking@drexel.edu>
Date: Sun, 31 Jan 2010 18:04:49 +0000

Either of these could be added at the
  libbe.command.base.Command.run
level.

The Git hooks would be 'pre-<command-name>' and 'post-<command-name>'.

Oh, and the hooks are therefore command-level hooks, not storage-level
hooks.  We still want storage-level hooks for notification emails, etc,
and they would definately have to follow the Git directory approach.
Hmm.  Storage level hooks will be awkward...


Comment: --------- Comment ---------
ID: 89d53fa4-635d-4562-adaa-cd04b6c80fcf
Short name: bea/5fb/89d
From: "W. Trevor King" <wking@drexel.edu>
Date: Sun, 17 Apr 2011 02:05:09 +0000

> We still want storage-level hooks for notification emails, etc,

The new `be serve --notify ...` is effectively a command-specific
storage-level hook (for storage actions that change the repository).
If it seems to be working out well, we can move the logic down into
the base storage classes.