1. TortoiseHg
  2. TortoiseHg
  3. thg
Issue #2478 open

AssertionError in committing

Hidetaka Iwata
created an issue

I saw this problem in default(ccad6e943229), not in released version.

Below AssersionError is raised when I try to commit.

    #!python
    ** Mercurial version (2.5.2).  TortoiseHg version (2.7.1+86-ccad6e943229)
    ** Command: 
    ** CWD: ***
    ** Encoding: cp932
    ** Extensions loaded: mq, record, graphlog, win32mbcs, histedit, rebase
    ** Python version: 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]
    ** Windows version: sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1')
    ** Processor architecture: x86
    ** Qt-4.7.4 PyQt-4.8.6 QScintilla-2.5.1
    Traceback (most recent call last):
      File "***\thg\tortoisehg\hgqt\commit.py", line 466, in mqPerformAction
        return self.commit()
      File "***\thg\tortoisehg\hgqt\commit.py", line 947, in commit
        assert not self.stwidget.partials
    AssertionError

To reproduce

  1. Modify one of versioned files.

  2. In the workbench, select modified file, but keep it unchecked.

  3. Open a new named branch. Now, no files are checked, and change hunks of changed file are shown in editor pane.

  4. Try Commit, and Create branch

Comments (10)

  1. Steve Borho

    The assert can safely be removed, except that the user may be disappointed to see their partial selections ignored during the commit (no files were selected) and then cleared afterward

  2. Igor Timoshenkov

    I have the same problem. Please see below for the trace:

        #!python
        ** Mercurial version (2.7).  TortoiseHg version (2.9)
        ** Command: 
        ** CWD: /home/wsm-timoshenkov
        ** Encoding: UTF-8
        ** Extensions loaded: 
        ** Python version: 2.7.3 (default, Apr 10 2013, 05:13:16) [GCC 4.7.2]
        ** System: Linux wsm-timoshenkov 3.5.0-37-generic #58-Ubuntu SMP Mon Jul 8 22:07:55 UTC 2013 x86_64
        ** Qt-4.8.2 PyQt-4.9.3 QScintilla-2.6.2
        Traceback (most recent call last):
          File "/usr/lib/python2.7/dist-packages/tortoisehg/hgqt/commit.py", line 470, in mqPerformAction
            return self.commit()
          File "/usr/lib/python2.7/dist-packages/tortoisehg/hgqt/commit.py", line 949, in commit
            assert not self.stwidget.partials
        AssertionError
    

    Steps to reproduce: the error occurs when trying to open a new named branch with no changes in files. I also had another repository tab opened in the same time, in case it helps.

    Any update on the issue?

  3. Log in to comment