test_directive_cherrypick fails in 2a format

Bug #409684 reported by Martin Pool
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Martin Pool

Bug Description

This might be due to root id conflicts...

----
FAIL: test_directive_cherrypick (bzrlib.tests.blackbox.test_merge.TestMerge)

vvvv[log from bzrlib.tests.blackbox.test_merge.TestMerge.test_directive_cherrypick]
69.288 creating repository in file:///tmp/testbzr-WdeIRQ.tmp/bzrlib.tests.blackbox.test_merge.TestMerge.test_directive_cherrypick/work/source/.bzr/.
69.291 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0x7583690> in file:///tmp/testbzr-WdeIRQ.tmp/bzrlib.tests.blackbox.test_merge.TestMerge.test_directive_cherrypick/work/source/.bzr/
69.300 trying to create missing lock '/tmp/testbzr-WdeIRQ.tmp/bzrlib.tests.blackbox.test_merge.TestMerge.test_directive_cherrypick/work/source/.bzr/checkout/dirstate'
69.300 opening working tree '/tmp/testbzr-WdeIRQ.tmp/bzrlib.tests.blackbox.test_merge.TestMerge.test_directive_cherrypick/work/source'
69.311 preparing to commit
    INFO Committing to: /tmp/testbzr-WdeIRQ.tmp/bzrlib.tests.blackbox.test_merge.TestMerge.test_directive_cherrypick/work/source/
69.313 Selecting files for commit with filter []
    INFO added a
    INFO Committed revision 1.
69.330 preparing to commit
    INFO Committing to: /tmp/testbzr-WdeIRQ.tmp/bzrlib.tests.blackbox.test_merge.TestMerge.test_directive_cherrypick/work/source/
69.332 Selecting files for commit with filter []
    INFO added b
    INFO Committed revision 2.
69.347 creating repository in file:///tmp/testbzr-WdeIRQ.tmp/bzrlib.tests.blackbox.test_merge.TestMerge.test_directive_cherrypick/work/target/.bzr/.
69.350 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0x8013450> in file:///tmp/testbzr-WdeIRQ.tmp/bzrlib.tests.blackbox.test_merge.TestMerge.test_directive_cherrypick/work/target/.bzr/
69.359 trying to create missing lock '/tmp/testbzr-WdeIRQ.tmp/bzrlib.tests.blackbox.test_merge.TestMerge.test_directive_cherrypick/work/target/.bzr/checkout/dirstate'
69.359 opening working tree '/tmp/testbzr-WdeIRQ.tmp/bzrlib.tests.blackbox.test_merge.TestMerge.test_directive_cherrypick/work/target'
69.366 preparing to commit
    INFO Committing to: /tmp/testbzr-WdeIRQ.tmp/bzrlib.tests.blackbox.test_merge.TestMerge.test_directive_cherrypick/work/target/
69.369 Selecting files for commit with filter []
    INFO Committed revision 1.
69.386 Using fetch logic to copy between CHKInventoryRepository('file:///tmp/testbzr-WdeIRQ.tmp/bzrlib.tests.blackbox.test_merge.TestMerge.test_directive_cherrypick/work/target/.bzr/repository/')(<RepositoryFormat2a>) and CHKInventoryRepository('file:///tmp/testbzr-WdeIRQ.tmp/bzrlib.tests.blackbox.test_merge.TestMerge.test_directive_cherrypick/work/source/.bzr/repository/')(<RepositoryFormat2a>)
69.386 fetch up to rev {mbp@grace-20090806051736-0xh5vfskumzqhd9y}
    INFO Bundling 2 revision(s).
69.405 run bzr: ['merge', '-d', 'target', 'directive']
69.405 bzr arguments: ['merge', '-d', 'target', 'directive']
69.411 opening working tree '/tmp/testbzr-WdeIRQ.tmp/bzrlib.tests.blackbox.test_merge.TestMerge.test_directive_cherrypick/work/target'
 WARNING Performing cherrypick
    INFO +N b
 WARNING Conflict adding files to a. Moved to root.
 WARNING Conflict adding files to b. Moved to root.
    INFO 2 conflicts encountered.
69.446 errors:
'Performing cherrypick\n+N b\nConflict adding files to a. Moved to root.\nConflict adding files to b. Moved to root.\n2 conflicts encountered.\n'
69.453 opening working tree '/tmp/testbzr-WdeIRQ.tmp'

^^^^[log from bzrlib.tests.blackbox.test_merge.TestMerge.test_directive_cherrypick]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mbp/bzr/398668-2a-default/bzrlib/tests/blackbox/test_merge.py", line 387, in test_directive_cherrypick
    out, err = self.run_bzr('merge -d target directive')
AssertionError: Unexpected return code
not equal:
a = 0
b = 1

Martin Pool (mbp)
Changed in bzr:
status: Confirmed → In Progress
Revision history for this message
Martin Pool (mbp) wrote :

I think the problem here is that they have different root ids therefore the cherrypick fails.

It's a reasonable thing to want to do, so should probably be handled better, but that requires a larger look at path tokens or something.

https://code.edge.launchpad.net/~mbp/bzr/409684-cherrypick/+merge/9744

Revision history for this message
Robert Collins (lifeless) wrote :

Fixed in 1.18

Changed in bzr:
status: In Progress → Fix Released
milestone: 2.0 → 1.18
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.