monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] invariant failure on propagate


From: Matt Johnston
Subject: Re: [Monotone-devel] invariant failure on propagate
Date: Tue, 30 Nov 2004 01:28:22 +0800
User-agent: Mutt/1.4i

On Tue, Nov 23, 2004 at 03:12:48PM +1100, Neil Conway wrote:
> I get the following with 0.15 (plus njs' fixes -- using the binary he
> linked to a few days ago):
> 
> % monotone --debug propagate mainline index_work
> monotone: concatenating change sets
> monotone: change_set.cc:297: invariant 'I(path_item_type(item) ==
> ptype_directory)' violated
> monotone: db.execute("ROLLBACK")
> monotone: discarding debug log
> monotone: fatal: std::logic_error: change_set.cc:297: invariant
> 'I(path_item_type(item) == ptype_directory)' violated

I think I've found the cause, I've pushed a fix to the
monotone.ucc.asn.au repository [1]. The cause is that tids
(which are meant to be unique IDs) are repeated between
path_states when a new tid_source is instantiated. The diff
is included below.

Matt


[1] server key
[pubkey address@hidden
MIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQC/dRZWvY+2lqLif3ERTeGukh2p404emqou
5wCXr9bCHg0CcE532xZGVWvBqI39Q6YJGuDf/U56ZoFYjgliCdxxLayFdyU9SP0cSHz9DSbj
kPolVF/65hZTWs5t7vC/PqG644Ntzrnkk2/bGXO6mqP4LfUPM4bh0VCBmPYWJtF3UQIBEQ==
[end]



#
# patch "change_set.cc"
#  from [d4e7c04b57795441aac1d85ab43fb22fc6d895cc]
#    to [de47a7fc3465234dffc5f25951c3798a32d5b9d9]
# 
--- change_set.cc
+++ change_set.cc
@@ -1464,10 +1464,9 @@
                        path_analysis & b_renumbered,
                        path_analysis & a_merged,
                        path_analysis & b_merged,
+                       tid_source & ts,
                        app_state & app)
 {
-  tid_source ts;
-
   // we have anc->a and anc->b and we want to construct a->merged and
   // b->merged, leading to the eventual identity concatenate(a,a_merged) ==
   // concatenate(b,b_merged).  
@@ -1500,7 +1499,7 @@
   {
     directory_map a_second_map, b_second_map;
     build_directory_map(a_tmp.second, a_second_map);
-    build_directory_map(a_tmp.second, b_second_map);
+    build_directory_map(b_tmp.second, b_second_map);
     ensure_entries_exist(a_tmp.first, a_second_map, a_tmp.second, ts);
     ensure_entries_exist(b_tmp.first, b_second_map, b_tmp.second, ts);
   }
@@ -1721,7 +1720,7 @@
   merge_disjoint_analyses(a_analysis, b_analysis,
                          a_renumbered, b_renumbered,
                          a_merged_analysis, b_merged_analysis, 
-                         app);
+                         ts, app);
 
   compose_rearrangement(a_merged_analysis, 
                        a_merged.rearrangement);





reply via email to

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