[Bug 6086] New: In-memory rebase still calls update hooks, but not preupdate hooks

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Bug 6086] New: In-memory rebase still calls update hooks, but not preupdate hooks

mercurial-bugs-2
https://bz.mercurial-scm.org/show_bug.cgi?id=6086

            Bug ID: 6086
           Summary: In-memory rebase still calls update hooks, but not
                    preupdate hooks
           Product: Mercurial
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: rebase
          Assignee: [hidden email]
          Reporter: [hidden email]
                CC: [hidden email]

Here's a .t file showing the issue; the in-memory rebase runs update hooks (not
sure why), but doesn't run preupdate hooks.  It should probably run both or
neither?

  $ cat > preupdate.sh <<EOF
  > #!/bin/bash
  > echo preupdate >> $TESTTMP/update_hooks.txt
  > EOF
  $ cat > update.sh <<EOF
  > #!/bin/bash
  > echo update >> $TESTTMP/update_hooks.txt
  > EOF
  $ chmod +x preupdate.sh update.sh

  $ cat >> $HGRCPATH <<EOF
  > [experimental]
  > evolution.createmarkers=True
  > evolution.allowunstable=True
  > [extensions]
  > rebase=
  > [hooks]
  > preupdate.does_it_work=$TESTTMP/preupdate.sh
  > update.does_it_work=$TESTTMP/update.sh
  > EOF
  $ hg init a
  $ cd a
  $ echo r0 > file.txt
  $ hg ci -qAm 'r0'
  $ echo r1 > file.txt
  $ hg ci -qAm 'r1'
  $ echo r2 > file.txt
  $ hg ci -qAm 'r2'
  $ hg co -qr 0

no inmemory rebase:
  $ hg commit -q --amend -m 'r0_amended' 're:^$'
  2 new orphan changesets
  $ rm $TESTTMP/update_hooks.txt
  $ hg rebase -qr 1::2 -d .
  $ cat $TESTTMP/update_hooks.txt
  preupdate
  update
  preupdate
  update
  preupdate
  update

with inmemory rebase:
  $ hg commit -q --amend -m 'r0_amended_again' 're:^$'
  2 new orphan changesets
  $ rm $TESTTMP/update_hooks.txt
  $ hg --config rebase.experimental.inmemory=1 rebase -qr 4::5 -d .
  $ cat $TESTTMP/update_hooks.txt
  update
  update

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel