[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-devel] fix for change_set.cc invariant bug, tests 54 55 56 57?
From: |
Emile Snyder |
Subject: |
[Monotone-devel] fix for change_set.cc invariant bug, tests 54 55 56 57? |
Date: |
16 Dec 2004 22:27:03 -0800 |
Hi all,
I spent some time trying to figure this one out, and I think I
understand. I've attached a patch that causes the tests to pass, and
looks right to me. It's a one line fix, but the patch has all the
logging I put in to convince myself of it.
In change_set.cc::concatenate_change_sets, during the fusing of changes,
we're walking over all the deltas in b's changeset. However, a file add
shows up as both an add for the filename, and then a delta from an empty
file_id to the file_id of the added file.
I believe the invariant line should be switched to
if (b.rearrangement.added_files.find(delta_entry_path(del)) ==
b.rearrangement.added_files.end()) {
I(delta_entry_dst(existing) == delta_entry_src(del));
}
Seem right?
thanks,
-emile
+----------------------------------------------------------------------
"Usenet is like a herd of performing elephants with diarrhea -- massive,
dif- ficult to redirect, awe-inspiring, entertaining, and a source of
mindboggling amounts of excrement when you least expect it." -- Gene
Spafford (1992)
+----------------------------------------------------------------------
change_set.patch
Description: Text document
signature.asc
Description: This is a digitally signed message part
- [Monotone-devel] fix for change_set.cc invariant bug, tests 54 55 56 57?,
Emile Snyder <=