1. TortoiseHg
  2. TortoiseHg
  3. thg
  4. Issues
Issue #157 resolved

Error with progressSignal in Merge dialog

Daniel Atallah
created an issue

When attempting to perform a cross-branch merge, I'm getting the following error: "UiSignal.progressSignal[QString, object, QString, QString, object].emit(): argument 3 has unexpected type 'NoneType'

I had immediately previously performed a successful cross-branch merge, so there must be something more specific about the situation that is causing the error.

This was running from source at the latest current THg revision(96d0577fea47) and Hg (9c5aae633d5f).

The attached file is a screenshot since I couldn't copy and paste the output.

Comments (7)

  1. Daniel Atallah reporter

    Yeah, was afraid that it wouldn't be a very helpful report.

    It is repeatable - if i try to re-merge the same two revisions, I get the same error.

    Running `hg merge -v --debug revID` in the Output Log doesn't seem to offer any useful output.

    Any ideas what i can do to help debug this?

  2. Steve Borho

    If you are running from source, you can try instrumenting thread.py at line 87. Check the item argument and if it's ever None dump a traceback (see the traceback.print_exc() call later in the file).

  3. Steve Borho

    And you could try this patch:

    @@ -85,9 +85,9 @@
             return self.responseq.get(True)
     
         def progress(self, topic, pos, item, unit, total):
    -        topic = hglib.tounicode(topic)
    -        item = hglib.tounicode(item)
    -        unit = hglib.tounicode(unit)
    +        topic = hglib.tounicode(topic or '')
    +        item = hglib.tounicode(item or '')
    +        unit = hglib.tounicode(unit or '')
             self.progressSignal.emit(topic, pos, item, unit, total)
     
     class QtUi(uimod.ui):
    
  4. Daniel Atallah reporter

    Aha! Here is the traceback

    Traceback (most recent call last):
      File "C:\export\spare\thg\thg\tortoisehg\hgqt\thread.py", line 280, in run
        self.ret = dispatch._dispatch(ui, self.cmdline) or 0
      File "C:\export\spare\thg\hg\mercurial\dispatch.py", line 601, in _dispatch
        cmdpats, cmdoptions)
      File "C:\export\spare\thg\hg\mercurial\dispatch.py", line 406, in runcommand
        ret = _runcommand(ui, options, cmd, d)
      File "C:\export\spare\thg\hg\mercurial\dispatch.py", line 655, in _runcommand
        return checkargs()
      File "C:\export\spare\thg\hg\mercurial\dispatch.py", line 609, in checkargs
        return cmdfunc()
      File "C:\export\spare\thg\hg\mercurial\dispatch.py", line 598, in <lambda>
        d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
      File "C:\export\spare\thg\hg\mercurial\util.py", line 433, in check
        return func(*args, **kwargs)
      File "C:\export\spare\thg\hg\mercurial\extensions.py", line 133, in wrap
        util.checksignature(origfn), *args, **kwargs)
      File "C:\export\spare\thg\hg\mercurial\util.py", line 433, in check
        return func(*args, **kwargs)
      File "C:\export\spare\thg\hg\hgext\mq.py", line 3038, in mqcommand
        return orig(ui, repo, *args, **kwargs)
      File "C:\export\spare\thg\hg\mercurial\util.py", line 433, in check
        return func(*args, **kwargs)
      File "C:\export\spare\thg\hg\mercurial\commands.py", line 2780, in merge
        return hg.merge(repo, node, force=opts.get('force'))
      File "C:\export\spare\thg\hg\mercurial\hg.py", line 400, in merge
        stats = mergemod.update(repo, node, True, force, False)
      File "C:\export\spare\thg\hg\mercurial\merge.py", line 545, in update
        stats = applyupdates(repo, action, wc, p2, pa, overwrite)
      File "C:\export\spare\thg\hg\mercurial\merge.py", line 309, in applyupdates
        unit=_('files'))
      File "C:\export\spare\thg\thg\tortoisehg\hgqt\thread.py", line 136, in progress
        return self.sig.progress(topic, pos, item, unit, total)
      File "C:\export\spare\thg\thg\tortoisehg\hgqt\thread.py", line 91, in progress
        self.progressSignal.emit(topic, pos, item, unit, total)
    TypeError: UiSignal.progressSignal[QString, object, QString, QString, object].emit(): argument 3 has
     unexpected type 'NoneType'
    

    The patch in comment 4 prevents the issue from happening.

  5. Log in to comment