monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] What _if_ the hash for two manifests happens to be


From: graydon hoare
Subject: Re: [Monotone-devel] What _if_ the hash for two manifests happens to be the same?
Date: 22 Nov 2003 14:28:59 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Magnus Therning <address@hidden> writes:

> Could I have prevented this in some way?
> How do I resolve this? ('monotone co c2b .' gives me the first version)

I don't mean to sound dismissive, but I would guess that
c2b074a72152abe1b1c21b3e1fbb0d1d69ec8d5f is both the ancestor *and*
merged version, that they are bit for bit identical trees. in other
words, I would guess that your sentence:
  
  'monotone co c2b .' gives me the first version

could just as readily say

  'monotone co c2b .' gives me the merged version

and be true. I suspect those versions are the same; else you have
managed to collide SHA1 on your first outing, which would be quite a
feat (you would be famous, if not rich, from the result).

> If there is a solution to this I think it should be mentioned in the
> FAQ or the documentation.

true, we don't mention much about cycles in the documentation. in
general, this is because the cycle-handling is pretty conservative
(possibly too much so) at the moment, and also possibly incorrect. so
it's something we mean to revisit.

the last time I discussed this sort of thing with tromey, I believe we
agreed that it is only really an issue when dealing with the ancestry
graph (which is a secondary data structure, not related to storage or
networking), so the only real requirement is that
ancestry-graph-walking algorithms do something sensible when they see
a cycle. I think what we settled on is a DFS variant which culls edges
from a cycle it's walking, back to its last choice-point, which will
eliminate full cycles from consideration but preserve children which
branch off a cycle part way through the cycle path.

this is not currently implemented. currently I think the decision is
to accept cycles when receiving packets, commits and merges; elide
them when importing a CVS repository; and skip the cycle-causing edge
(or enter an infinite loop and crash) during a recursive tree walk. it 
still needs work in this regard.

-graydon





reply via email to

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