[Bug 4422] New: histedit: commit hook errors

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Tue Oct 28 00:25:47 CDT 2014


http://bz.selenic.com/show_bug.cgi?id=4422

          Priority: normal
            Bug ID: 4422
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: histedit: commit hook errors
          Severity: bug
    Classification: Unclassified
                OS: Linux
          Reporter: al.drozdov at gmail.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: 3.2-rc
         Component: histedit
           Product: Mercurial

I have a commit hook named showrev:

from mercurial.node import short

def print_commit(ui, repo, node=None, **kwargs):
  ctx = repo[node]
  ui.write("Committed revision %s:%s %s by %s\n" %
           (ctx.rev(), short(ctx.node()), ctx.branch(), ctx.user()))

When I use histedit to fold any revisions I get errors like:

error: commit.showrev hook raised an exception: unknown revision
'e4ddc3643fb10c110659f30b37759caac521cd08'

bisect shows that the bad revision is 4778f398ec83

Script to reproduce:

#!/bin/sh

rm -rf hg-temp
mkdir hg-temp
cd hg-temp
hg init
touch file1 && hg add file1
hg commit -m file1
touch file2 && hg add file2
hg commit -m file2
hg histedit 0
# fold two revisions

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list