On Mon, Sep 14, 2009 at 6:27 PM, nathan binkert <[email protected]> wrote:

> > You are right and that's probably more my mistake than Dereks. What
> happens
> > is that mercurial crashes whenever it would detect a white-space issue.
> So,
> > for me to make a patch or commit I hacked the style file, and these
> changes
> > made it into the patch.
> Send me the error message and I'll fix it.  I can also make style.py
> ignore ruby files until such time we decide to do something about it.
>
>
Hi Nate,

Here's what happens:


(a)bort, (i)gnore, or (f)ix? i
error: pretxncommit.style hook raised an exception: substring not found
transaction abort!
rollback completed
** unknown exception encountered, details follow
** report bug details to http://mercurial.selenic.com/bts/
** or [email protected]
** Mercurial Distributed SCM (version 1.3.1)
** Extensions loaded: mq, patchbomb, extdiff, fetch, style
Traceback (most recent call last):
  File "/u/p/d/pdudnik/bin/hg", line 20, in ?
    mercurial.dispatch.run()
  File "/usr/lib64/python2.4/site-packages/mercurial/dispatch.py", line 16,
in run
    sys.exit(dispatch(sys.argv[1:]))
  File "/usr/lib64/python2.4/site-packages/mercurial/dispatch.py", line 27,
in dispatch
    return _runcatch(u, args)
  File "/usr/lib64/python2.4/site-packages/mercurial/dispatch.py", line 43,
in _runcatch
    return _dispatch(ui, args)
  File "/usr/lib64/python2.4/site-packages/mercurial/dispatch.py", line 449,
in _dispatch
    return runcommand(lui, repo, cmd, fullargs, ui, options, d)
  File "/usr/lib64/python2.4/site-packages/mercurial/dispatch.py", line 317,
in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib64/python2.4/site-packages/mercurial/dispatch.py", line 501,
in _runcommand
    return checkargs()
  File "/usr/lib64/python2.4/site-packages/mercurial/dispatch.py", line 454,
in checkargs
    return cmdfunc()
  File "/usr/lib64/python2.4/site-packages/mercurial/dispatch.py", line 448,
in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib64/python2.4/site-packages/mercurial/util.py", line 402, in
check
    return func(*args, **kwargs)
  File "/usr/lib64/python2.4/site-packages/hgext/mq.py", line 1888, in new
    q.new(repo, patch, *args, **opts)
  File "/usr/lib64/python2.4/site-packages/hgext/mq.py", line 762, in new
    n = repo.commit(commitmsg, user, date, match=match, force=True)
  File "/usr/lib64/python2.4/site-packages/hgext/mq.py", line 2418, in
commit
    editor, extra)
  File "/usr/lib64/python2.4/site-packages/mercurial/localrepo.py", line
886, in commit
    ret = self.commitctx(cctx, True)
  File "/usr/lib64/python2.4/site-packages/mercurial/localrepo.py", line
956, in commitctx
    parent2=xp2, pending=p)
  File "/usr/lib64/python2.4/site-packages/mercurial/localrepo.py", line
139, in hook
    return hook.hook(self.ui, self, name, throw, **args)
  File "/usr/lib64/python2.4/site-packages/mercurial/hook.py", line 119, in
hook
    r = _pythonhook(ui, repo, name, hname, hookfn, args, throw) or r
  File "/usr/lib64/python2.4/site-packages/mercurial/hook.py", line 52, in
_pythonhook
    r = obj(ui=ui, repo=repo, hooktype=name, **args)
  File "/afs/cs.wisc.edu/u/p/d/pdudnik/rocks/gem5/util/style.py", line 356,
in check_whitespace
    do_check_whitespace(ui, repo, **args)
  File "/afs/cs.wisc.edu/u/p/d/pdudnik/rocks/gem5/util/style.py", line 304,
in do_check_whitespace
    if prompt(fname):
  File "/afs/cs.wisc.edu/u/p/d/pdudnik/rocks/gem5/util/style.py", line 278,
in prompt
    result = ui.prompt("(a)bort, (i)gnore, or (f)ix?", "^[aif]$", "a")
  File "/usr/lib64/python2.4/site-packages/mercurial/ui.py", line 289, in
prompt
    resps = [s[s.index('&')+1].lower() for s in choices]
ValueError: substring not found



> > I don't know about Derek, but that is exactly what happened to me, and
> that
> > is mainly due to lack of experience with mercurial patch queue.
> > Unfortunately I learned about that after I made this mistake. I am sure
> > Derek also did the same thing.
> If you guys need help fixing things after the fact, I can help.  It's
> really not that scary to go into the .hg/patches directory (saving a
> copy) and muck with things.  Basically, you pop all of your patches,
> edit the series file, and move patch hunks between files if necessary.
>  It can be a bit tedious, but it's a major benefit to those that are
> reading your changes.  It also allows you to find and fix bugs.
>
>  Nate
> _______________________________________________
> m5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/m5-dev
>
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to