qconflicts fails to list conflicts when there are 50+ of type "Conflict adding file"

Bug #338765 reported by Craig Hewetson
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
QBzr
Incomplete
Undecided
Unassigned

Bug Description

When trying to open qconflicts with 50+ conflicts (of type "Conflict adding file")
I get the following exception in dialog. The result is that the conflicts table is empty.

Here is the stack trace from the dialog:

bzr: ERROR: exceptions.TypeError: argument 1 of QVariant() has an invalid type

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/qbzr/lib/conflicts.py", line 157, in load
    item.setData(0, QtCore.Qt.UserRole, QtCore.QVariant(conflict.file_id))
TypeError: argument 1 of QVariant() has an invalid type

...

Is this type of conflict supported or is it just the number of conflicts.

Revision history for this message
Alexander Belchenko (bialix) wrote :

Can you provide more info about this issue? What type of conflict exactly?

If this conflict about adding file when there is already such filename exists and non-versioned, I suspect conflict.file_id will be None and this can explain why qbzr fails.

Possible fix is:

item.setData(0, QtCore.Qt.UserRole, QtCore.QVariant(conflict.file_id or ""))

Changed in qbzr:
status: New → Incomplete
Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote : Re: [Bug 338765] Re: qconflicts fails to list conflicts when there are 50+ of type "Conflict adding file"

Hi

On Wed, Mar 25, 2009 at 2:14 AM, Alexander Belchenko <email address hidden> wrote:

> Can you provide more info about this issue? What type of conflict
> exactly?

The type of conflicts where all of the type described below:
(http://doc.bazaar-vcs.org/bzr.0.92/en/user-guide/conflicts.html)
Duplicate Paths

Typical message:

Conflict adding file FILE. Moved existing file to FILE.moved.

Sometimes Bazaar will attempt to create a file using a pathname that has
already been used. The existing file will be renamed to "FILE.moved". If you
wish, you can rename either one of these files, or combine their contents.
When you are satisfied, you can run "bzr resolve FILE" to mark the conflict
as resolved.

>
>
> If this conflict about adding file when there is already such filename
> exists and non-versioned, I suspect conflict.file_id will be None and
> this can explain why qbzr fails.

I think this might be the problem.

>
> Possible fix is:
>
> item.setData(0, QtCore.Qt.UserRole, QtCore.QVariant(conflict.file_id or
> ""))

Will this fix still show the conflicts? And will the user be able to
"resolve" them?

>
>
> ** Changed in: qbzr
> Status: New => Incomplete
>
>
>

> --
> qconflicts fails to list conflicts when there are 50+ of type "Conflict
> adding file"
> https://bugs.launchpad.net/bugs/338765
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 338765] Re: qconflicts fails to list conflicts when there are 50+ of type "Conflict adding file"

Craig Hewetson пишет:
>> If this conflict about adding file when there is already such filename
>> exists and non-versioned, I suspect conflict.file_id will be None and
>> this can explain why qbzr fails.
>
> I think this might be the problem.

It's my best guess. Scenario to reproduce will help to check this assumption.

>> Possible fix is:
>>
>> item.setData(0, QtCore.Qt.UserRole, QtCore.QVariant(conflict.file_id or
>> ""))
>
>
> Will this fix still show the conflicts?

Yes.

> And will the user be able to
> "resolve" them?

I hope so.

We need simple example branch with conflicts to test this fix.

Revision history for this message
André Bachmann (andrebachmann-dd) wrote :
Download full text (3.1 KiB)

I also have this error. I'm currently using bzr 2.3.3-3 with Bazaar Explorer 1.1.4 on WinXP (and Win7 32 Bit also tested).

What happened was this: I created a new checkout from within Bazaar Explorer in a directory which wasn't empty. This directory contains some similar named files, and so there are conflicts with adding files, which gave me 13 of this messages:

...
Conflict adding file changelog.txt. Moved existing file to changelog.txt.moved.
...

When I click on the resolve icon, I got this error message:

==========================================================
bzr: ERROR: exceptions.TypeError: argument 1 of PyQt4.QtCore.QVariant() has an invalid type

Traceback (most recent call last):
  File "C:/Program Files/Bazaar/plugins\qbzr\lib\conflicts.py", line 171, in load
TypeError: argument 1 of PyQt4.QtCore.QVariant() has an invalid type

bzr 2.3.3 on python 2.6.6 (win32)
arguments: ['C:\\Program Files\\Bazaar\\bzrw.exe', 'qconflicts']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [2.3.1]
  colo C:\Program Files\Bazaar\plugins\colo [0.2.1]
  explorer C:\Program Files\Bazaar\plugins\explorer [1.1.4]
  fastimport C:\Program Files\Bazaar\plugins\fastimport [0.10.0]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [2.3.3]
  loom C:\Program Files\Bazaar\plugins\loom [2.2.1dev]
  netrc_credential_store C:\Program Files\Bazaar\plugins\netrc_credential_store [2.3.3]
  news_merge C:\Program Files\Bazaar\plugins\news_merge [2.3.3]
  pipeline C:\Program Files\Bazaar\plugins\pipeline [1.1.0]
  qbzr C:\Program Files\Bazaar\plugins\qbzr [0.20.1]
  rewrite C:\Program Files\Bazaar\plugins\rewrite [0.6.2dev]
  svn C:\Program Files\Bazaar\plugins\svn [1.0.5dev]
  upload C:\Program Files\Bazaar\plugins\upload [1.0.0]
  xmloutput C:\Program Files\Bazaar\plugins\xmloutput [0.8.7.dev]
==========================================================

This is in my .bzr.log:

==========================================================
Tue 2011-07-19 08:42:46 +0200
0.073 bazaar version: 2.3.3
0.073 bzr arguments: [u'qconflicts']
0.103 looking for plugins in C:/Users/abachmann/AppData/Roaming/bazaar/2.0/plugins
0.103 looking for plugins in C:/Program Files/Bazaar/plugins
0.292 encoding stdout as osutils.get_user_encoding() 'cp1252'
0.536 opening working tree 'C:/Freigabe/FUS_EXCT_3AC'
0.542 None

0.545 couldn't find apport bug-reporting library: No module named apport
0.553 Traceback (most recent call last):
  File "bzrlib\plugin.pyo", line 553, in _get__version__
  File "bzrlib\__init__.pyo", line 101, in _format_version_tuple
IndexError: tuple index out of range

0.554 Traceback (most recent call last):
  File "bzrlib\plugin.pyo", line 553, in _get__version__
  File "bzrlib\__init__.pyo", line 101, in _format_version_tuple
IndexError: tuple index out of range
==========================================================

I have attached a sample. If you try to do a checkout from testrepo-fb\trunk to testrepo-fb-checkout, you wi...

Read more...

Revision history for this message
Alexander Belchenko (bialix) wrote :

Andre, your traceback looks like the bug 655451. So, I'm marking this one as duplicate of 655451. Please, test the latest (unreleased) version of qbzr to check that bug is already fixed. If it's not, please say so.

Revision history for this message
André Bachmann (andrebachmann-dd) wrote :

You are right, it is fixed in qbzr trunk. However, I don't want my co-workers to use a unreleased version of qbzr trunk, so I simply added your fix in comment #1 to their conflicts.py, and this helped a lot.

So this little fix hasn't made it into a qbzr stable since march of 2009, for more then two years? Are there really so few people who use Bazaar Explorer with qbzr? :(

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 338765] Re: qconflicts fails to list conflicts when there are 50+ of type "Conflict adding file"

André Bachmann пишет:
> *** This bug is a duplicate of bug 655451 ***
> https://bugs.launchpad.net/bugs/655451
>
> You are right, it is fixed in qbzr trunk. However, I don't want my co-
> workers to use a unreleased version of qbzr trunk, so I simply added
> your fix in comment #1 to their conflicts.py, and this helped a lot.

I'm going to release new qbzr versions withing next few days because I
leave on vacation very soon.

> So this little fix hasn't made it into a qbzr stable since march of
> 2009, for more then two years?

It's not true. I have fixed the bug 655451 less than 3 months ago.

> Are there really so few people who use
> Bazaar Explorer with qbzr? :(

Maybe, I suspect the number of people using Bazaar is not very big by
itself. But the bug is not very common, you can't trigger this bug with
a plain text conflict (which is the biggest part of conflicts in my
opinion).

Revision history for this message
André Bachmann (andrebachmann-dd) wrote :

Yes, but your first guess of the solution for this bug was two years ago in this bug report. ;)

And even with the yesterday's release of bzr 2.3.4-1, the old bug isn't fixed, because it still comes with qbzr 0.20.1. :(

Revision history for this message
Alexander Belchenko (bialix) wrote :

André Bachmann пишет:
> *** This bug is a duplicate of bug 655451 ***
> https://bugs.launchpad.net/bugs/655451
>
> Yes, but your first guess of the solution for this bug was two years ago
> in this bug report. ;)

Because I had no evidence the fix is correct before this day. And I
haven't understood the underlying problem until I fixed bug 655451. It's
kinda complicated to fix a bug by stabbing into darkness.

> And even with the yesterday's release of bzr 2.3.4-1, the old bug isn't
> fixed, because it still comes with qbzr 0.20.1. :(

Yes, I understand, sorry about that.

Revision history for this message
André Bachmann (andrebachmann-dd) wrote :

Sorry, I didn't want to offend you. I really appreciate what you do for this project! :)

And I wish you a good vacation!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.