[Top][All Lists]

[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 14:32:19 +0200
User-agent: Mutt/1.5.16 OpenPKG/CURRENT (2007-06-09)

On Fri, Oct 12, 2007, Ralf S. Engelschall wrote:

> On Thu, Sep 27, 2007, Ralf S. Engelschall wrote:
> [...]
> | mtn: fatal: std::logic_error: invariant 
> 'I(left_uncommon_ancestors.find(left_rid) != left_uncommon_ancestors.end())' 
> violated
> [...]

Ok, with the following small script...

#!/bin/sh -x
cd /tmp
rm -f /tmp/test.db
$mtn --db=/tmp/test.db db init
rm -rf test
mkdir test
cd test
$mtn --db=/tmp/test.db setup -b test
echo "foo" >test.txt
$mtn add test.txt
$mtn ci -m "commit 1 (foo)"
echo "bar" >test.txt
$mtn ci -m "commit 2 (bar)"
echo "baz" >test.txt
$mtn ci -m "commit 3 (baz)" -b test.tmp
echo "baz2" >test.txt
$mtn ci -m "commit 4 (baz2)"
$mtn up -r h:test
$mtn merge_into_workspace h:test.tmp
------------------------------------------------------ can repeat the problem. After removing the firing assertion in

---   e36b1e83bf7a5a3538f0a882feaccb9f32250118
+++   e4338d04a283dc68fdb9ede159aa486f6a92bd1d
@@ -1805,7 +1805,7 @@ namespace {
                         node_id_source & nis)
     I(!null_id(left_rid) && !null_id(right_rid));
-    I(left_uncommon_ancestors.find(left_rid) != left_uncommon_ancestors.end());
+    // I(left_uncommon_ancestors.find(left_rid) != 
     I(left_uncommon_ancestors.find(right_rid) == 
     I(right_uncommon_ancestors.find(right_rid) != 
     I(right_uncommon_ancestors.find(left_rid) == 

...the "merge_into_workspace" command works just fine. I've reviewed
even the results and everything looks just fine. Unfortunately, I still
do not _understand_ why this assertion exists and why it is false only
for "merge_into_workspace". But I guess this assertion is from times
before "merge_into_workspace" was invented and the workflow in the
implementation of "merge_into_workspace" results in a special case which
triggers the assertion. I don't know whether one can really _safely_
remove the assertion or not. Can somebody shed some light on us here?

                                       Ralf S. Engelschall

reply via email to

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