monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] [BUG] merge_into_workspace fails on second merge at


From: Ralf S. Engelschall
Subject: Re: [Monotone-devel] [BUG] merge_into_workspace fails on second merge attempt
Date: Fri, 12 Oct 2007 12:59:18 +0200
User-agent: Mutt/1.5.16 OpenPKG/CURRENT (2007-06-09)

On Thu, Sep 27, 2007, Ralf S. Engelschall wrote:

> With the appended tiny test repository (which contains just two branches
> "test" and "test.2"), when I perform a initial "merge_into_workspace"
> from test.2 to test everything works fine. But if I repeat this once
> "test.2" was already merged to "test" (e.g. even with propagate) the
> "merge_into_workspace" aborts because an invariant in roster.cc is
> not fulfilled (the ~/prj/monotone/src/mtn is the latest Monotone from
> h:n.v.m as of today and the "diffutils" is just used for full batch
> operation):
>
> | $ export MTN_MERGE=diffutils; export MTN_MERGE_DIFFUTILS=partial; \
> |   cp test.db.bak test.db; ~/prj/monotone/src/mtn --db=/tmp/test.db \
> |   propagate test.2 test; (rm -rf test; ~/prj/monotone/src/mtn \
> |   --db=/tmp/test.dbco -b test test; cd test; ~/prj/monotone/src/mtn \
> |   merge_into_workspace b:test.2)
> | mtn: propagating test.2 -> test
> | mtn: [source] fa031b9e25421817806d8388559c9fb430128913
> | mtn: [target] e363b9f348f4e1da9849c1e8b9ed12bbb893f505
> | mtn: help required for 3-way merge
> | mtn: [ancestor] test
> | mtn: [    left] test
> | mtn: [   right] test
> | mtn: [  merged] test
> | executing external 3-way merge command
> | performing 3-way merge, adding conflict markers
> | mtn: [merged] df773bab0a43d69c1b7f8db06538f3c1cab108f8
> | mtn: expanding selection 'b:test.2'
> | mtn: expanded to 'fa031b9e25421817806d8388559c9fb430128913'
> | mtn: fatal: std::logic_error: roster.cc:1810: invariant 
> 'I(right_uncommon_ancestors.find(right_rid) != 
> right_uncommon_ancestors.end())' violated
> | mtn: this is almost certainly a bug in monotone.
> | mtn: please send this error message, the output of 'mtn version --full',
> | mtn: and a description of what you were doing to address@hidden
> | mtn: wrote debugging log to /tmp/test/_MTN/debug
> | mtn: if reporting a bug, please include this file
>
> Can anybody with a deeper understanding of the code base help?

Ok, I was able to reduce this problem to the following simple test case
which allows anybody of us to repeat the bug from scratch:

| # use h:n.v.m as of 2007-10-12 12:53 
(d4d8e25c9c0b7d47e4d9f4c17876f28f09b00126)
| $ mtn=/u/rse/prj/monotone/src/mtn
|
| # create a fresh test repository and a corresponding workspace
| $ $mtn --db=/tmp/test.db db init
| $ mkdir test
| $ cd test
| $ $mtn --db=/tmp/test.db setup -b test
|
| # commit something
| $ echo "foo" >test.txt
| $ $mtn add test.txt
| mtn: adding test.txt to workspace manifest
| $ $mtn ci -m "commit 1 (foo)"
| mtn: beginning commit on branch 'test'
| mtn: committed revision 7fc72e11b673943cd53a85402c095c9fb00bf91e
|
| # commit something again
| $ echo "bar" >test.txt
| $ $mtn ci -m "commit 2 (bar)"
| mtn: beginning commit on branch 'test'
| mtn: committed revision 3b0093ee368e6e34ca2485dbaacc96eaec6a069b
|
| # commit something to a temporary branch
| $ echo "baz" >test.txt
| $ $mtn ci -m "commit 3 (baz)" -b test.tmp
| mtn: beginning commit on branch 'test.tmp'
| mtn: committed revision a79ce292a282d372a6c6a1266d6baaf35dd86724
|
| # switch back the workspace to the main branch
| $ $mtn up -r h:test
| mtn: expanding selection 'h:test'
| mtn: expanded to '3b0093ee368e6e34ca2485dbaacc96eaec6a069b'
| mtn: selected update target 3b0093ee368e6e34ca2485dbaacc96eaec6a069b
| mtn: target revision is not in current branch
| mtn: switching to branch test
| mtn: modifying test.txt
| mtn: switched branch; next commit will use branch test
| mtn: updated to base revision 3b0093ee368e6e34ca2485dbaacc96eaec6a069b
|
| # try to merge in the temporary branch
| $ MTN_MERGE=diffutils MTN_MERGE_DIFFUTILS=partial \
|   $mtn merge_into_workspace a79ce292a282d372a6c6a1266d6baaf35dd86724
| mtn: modifying test.txt
| mtn: fatal: std::logic_error: roster.cc:1808: invariant 
'I(left_uncommon_ancestors.find(left_rid) != left_uncommon_ancestors.end())' 
violated
| mtn: this is almost certainly a bug in monotone.
| mtn: please send this error message, the output of 'mtn version --full',
| mtn: and a description of what you were doing to address@hidden
| mtn: wrote debugging log to /tmp/test/_MTN/debug
| mtn: if reporting a bug, please include this file

The bug is deterministically repeatable. Unfortunately, my current
understanding of the Monotone codebase is still not sufficient to fix
this bug myself. So, can please somebody help out and let us finally fix
the "merge_into_workspace" command?

                                       Ralf S. Engelschall
                                       address@hidden
                                       www.engelschall.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]