qadd inadvertantly adds all my ignored files

Bug #526933 reported by Craig Hewetson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QBzr
Fix Released
Critical
Alexander Belchenko

Bug Description

version... latest version in trunk as of today.

When I run qadd on my branch the qadd dialog takes atleast minute to display widgets.
After that it displays all the information correctly, I then select one or two files. Then hit "ok"

The result is that all my ignored files and directories now get added...

Log file:
0.042 bazaar version: 2.1.0
0.042 bzr arguments: [u'qadd']
0.058 looking for plugins in /home/craig/.bazaar/plugins
160.110 Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 853, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1055, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 661, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 665, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/home/craig/.bazaar/plugins/qbzr/lib/commands.py", line 788, in run
    return run_subprocess_command(cmd, bencoded)
  File "/home/craig/.bazaar/plugins/qbzr/lib/subprocess.py", line 813, in run_subprocess_command
    return commands.run_bzr(argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1055, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 661, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 665, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 4153, in run
    self._revert_tree_to_revision(tree, revision, file_list, no_backup)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 4161, in _revert_tree_to_revision
    report_changes=True)
  File "/usr/lib/python2.6/dist-packages/bzrlib/mutabletree.py", line 49, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree.py", line 2084, in revert
    report_changes)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transform.py", line 2599, in revert
    working_tree, target_tree, tt, filenames, backups, pp)
  File "/usr/lib/python2.6/dist-packages/bzrlib/transform.py", line 2633, in _prepare_revert_transform
    lambda t, c: conflict_pass(t, c, target_tree))
  File "/usr/lib/python2.6/dist-packages/bzrlib/transform.py", line 2769, in resolve_conflicts
    raise MalformedTransform(conflicts=conflicts)
MalformedTransform: Tree transform is malformed [('missing parent', 'new-28908')]

Running qrevert complains about a MalformedTransform: Tree transform is malformed [('missing parent', 'new-28908')].

Basically my branch is buggered.

Tags: qadd

Related branches

Changed in qbzr:
importance: Undecided → Critical
tags: added: qadd
Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote :

There might be two problems where ... 1) qadd doing something i didn't ask it to do and 2) bzrlib causing the tree to get malformed.

Revision history for this message
Gary van der Merwe (garyvdm) wrote :

Lets take this bug as point 1.

Alex: this was caused by the code you commented out in add.py in rev 1205 from 0.18. I review the change, but I could not remember what the code did. Now I do :-)

I think we should revert you change to fix this bug, and then look at the problem in more detail.

Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote : Re: [Bug 526933] Re: qadd inadvertantly adds all my ignored files

Sounds right, I've rolled back to the official 0.18.1 release and the
problem is gone.

problem 2 scares the hell out of me, though.

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

Gary van der Merwe пишет:
> Lets take this bug as point 1.
>
> Alex: this was caused by the code you commented out in add.py in rev
> 1205 from 0.18. I review the change, but I could not remember what the
> code did. Now I do :-)
>
> I think we should revert you change to fix this bug, and then look at
> the problem in more detail.
>

Gary, you can revert my change but it does not help.

Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote :

>
> Oh yes: will there be a unit test for this problem? :)

Changed in qbzr:
status: New → Confirmed
Revision history for this message
Alexander Belchenko (bialix) wrote :

Gary van der Merwe пишет:
> Lets take this bug as point 1.
>
> Alex: this was caused by the code you commented out in add.py in rev
> 1205 from 0.18. I review the change, but I could not remember what the
> code did. Now I do :-)
>
> I think we should revert you change to fix this bug, and then look at
> the problem in more detail.

I agree, though we can revert only the change to qadd. It seems qrevert
is fine as is. Gary, what do you think?

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

Craig, please test lp:~bialix/qbzr/bug-526933

Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote :

tested and it works

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

Craig, I don't understand how you run qrevert from qadd? I'd like to close this bug report because I'm merging my rollback fix to 0.18. So if there is separate issue with qrevert, please file new bug. Thanks.

Changed in qbzr:
milestone: none → 0.18.3
assignee: nobody → Alexander Belchenko (bialix)
status: Confirmed → Fix Released
Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote :

Hi Alexander

I meant to say that: After running qadd, all my ignored files where added to
the repository.
So my next step was to revert the incorrectly added files. (hundreds of
them, *.class files etc) And this was done by closing qadd and then opening
qrevert.
After running qrevert I got the above stackstrace and any future operation
on my repository didn't work.

So to clarify: I didn't run qrevert from qadd.

I'm not sure if i should log a bug for the revert problem since it probably
only happens if qadd misbehaves in the way it did and since that is fixed
then it shouldn't happen again...
I prefer logging bugs that can be reproduced.

But if you want me to log a new bug for it I will.

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

Craig Hewetson пишет:
> Hi Alexander
>
> I meant to say that: After running qadd, all my ignored files where added to
> the repository.
> So my next step was to revert the incorrectly added files. (hundreds of
> them, *.class files etc) And this was done by closing qadd and then opening
> qrevert.
> After running qrevert I got the above stackstrace and any future operation
> on my repository didn't work.
>
> So to clarify: I didn't run qrevert from qadd.
>
> I'm not sure if i should log a bug for the revert problem since it probably
> only happens if qadd misbehaves in the way it did and since that is fixed
> then it shouldn't happen again...
> I prefer logging bugs that can be reproduced.
>
> But if you want me to log a new bug for it I will.

Please do. I'm not quite understand why you got that error. Maybe some
help from bzr core devs will be needed.

Revision history for this message
Craig Hewetson (craighewetson-deactivatedaccount) wrote :
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.