Issue #30 open

(with patch) checkout with dirty working directory causes crash

created an issue

I assume this is another api change, but I haven't had time to really look. Here's the error text:



unknown exception encountered, details follow report bug details to or Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC 4.4.3] Mercurial Distributed SCM (version 1.6.4) Extensions loaded: task Traceback (most recent call last): File "/usr/bin/hg", line 27, in <module> File "/usr/lib/pymodules/python2.6/mercurial/", line 16, in run sys.exit(dispatch(sys.argv[1:])) File "/usr/lib/pymodules/python2.6/mercurial/", line 34, in dispatch return _runcatch(u, args) File "/usr/lib/pymodules/python2.6/mercurial/", line 54, in _runcatch return _dispatch(ui, args) File "/usr/lib/pymodules/python2.6/mercurial/", line 494, in _dispatch cmdpats, cmdoptions) File "/usr/lib/pymodules/python2.6/mercurial/", line 355, in runcommand ret = _runcommand(ui, options, cmd, d) File "/usr/lib/pymodules/python2.6/mercurial/", line 545, in _runcommand return checkargs() File "/usr/lib/pymodules/python2.6/mercurial/", line 499, in checkargs return cmdfunc() File "/usr/lib/pymodules/python2.6/mercurial/", line 492, in <lambda> d = lambda: util.checksignature(func)(ui, args, cmdoptions) File "/usr/lib/pymodules/python2.6/mercurial/", line 420, in check return func(*args, kwargs) File "/usr/lib/pymodules/python2.6/mercurial/", line 129, in wrap util.checksignature(origfn), args, kwargs) File "/usr/lib/pymodules/python2.6/mercurial/", line 420, in check return func(*args, kwargs) File "/home/paulk/.hgext/", line 897, in tasksupdate if stash(ui, repo, currenttask): File "/home/paulk/.hgext/", line 606, in stash repo.remove(st[3]) AttributeError: 'task_repo' object has no attribute 'remove'


Attached you'll find the steps to reproduce.

Comments (6)

  1. bobpaul reporter

    Checking out the mercurial 1.5.4 release, I see,, and all use repo.remove(), but this syntax is missing in 1.6.x. I'm only now investigating what needs to be changed on our end.

  2. bobpaul reporter

    Ok, fixed. Attached is a patch that fixes the issue. I just copied the procedure done in mercurial's

    This might not work on 1.4.x or 1.5.x

  3. alu repo owner
    • changed status to open

    I have some thoughts about how stash works/doesn't work. I have some tests that make it not behave the way I would hope.

    This crash should be fixed by killermonk's fork, but I am wondering if your lock is required.

  4. bobpaul reporter

    I actually have no idea whether the lock is required or not. Like I said, I just copied the procedure from used in for similar behavior. I can confirm killermonk's procedure seems to work equally well for at least the test case. I hadn't seen his repo until I'd done most of my work. :(

  5. Log in to comment