monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Re: change_set.cc:526: invariant 'I(j != p2.end())'


From: Nathaniel Smith
Subject: Re: [Monotone-devel] Re: change_set.cc:526: invariant 'I(j != p2.end())' violated
Date: Wed, 26 Jan 2005 01:05:11 -0800
User-agent: Mutt/1.5.6+20040907i

On Wed, Jan 26, 2005 at 12:10:54AM +0100, Peter Simons wrote:
> Nathaniel Smith writes:
> 
>  >   rename_file "installed_packages/bnv_have_qt.m4"
>  >            to "bnv_have_qt.m4"
> 
>  > however, the previous revision [id] already has a file
>  > named bnv_have_qt.m4, which does not get deleted or
>  > renamed or anything. Which is invalid; you can't have two
>  > files with the same name, you have to say what happened
>  > to the one that had that name originally...
> 
> Oh? Why is that?
> 
> I was using Monotone to track _exactly_ this kind of thing.
> I was assuming there would be a conflict between the two
> files now and that during the merge, I would be able to
> resolve it. Actually, most of the files are even identical.
> When I move one (in branch A or head A) in the location of
> the other (in B), then I'd like to see that merge that they
> are identical.

That isn't )quite) what you did, though.  You checked out a revision
that had file A and file B, renamed A to B without doing anything to
the original file B (and they weren't identical, FWIW), and checked
that back in.  (AFAICT.)

What you describe actually works, but only if you give them the same
name _before_ merging.  I'm not entirely certain ATM whether this is
actually a good idea; it seems to add some weird corner cases to the
merge algorithm, if two separate files can become the same.  But it
does work.  (Maybe if it really works, your case should be made to
work too.  But that would require hacking.)

> My problem is this: Two CVS repositories distribute the same
> set of files, with only minor modifications here and there,
> but they have two different directory layouts! So what I was
> trying to do is to move them both in a flat hierarchy in
> branches, merge that, and then I hope to be able to join
> both repositories in one -- and continue to modify that
> myself while tracking the others.

Makes sense.  Renaming-before-merge should work.

>  > So the root cause seems to be that you renamed one file
>  > on top of another one, and we somehow forgot to put in a
>  > check for this so it went into your database.
> 
> Maybe I do misunderstand you ... I thought that this would
> be just another conflict that the user could resolve? Why is
> it fundamentally impossible to rename one file over another?
> Especially if they are identical?

"Conflict"s only apply to merges.  This wasn't a merge, like I said
:-)

>  > In the mean time, you have a few options...
> 
> Thanks a lot for explaining that. Even if the database were
> lost entirely, it wouldn't be that bad because there is no
> original data of mine in there, so nothing is lost really.

Oh, good.

>  > Very sorry for the inconvenience :-(
> 
> On the contrary, I'm happy I've helped finding another bug,
> which will be gone soon. :-)
>
> I may as well use the chance and say that I have used
> _every_ version control system there is, even helped a

Hmm, really? http://www.linuxmafia.com/faq/Apps/scm.html ;-)

> little with the development of Darcs for quite a while (I
> love Haskell), but Monotone is definitely the best of them
> all. You guys are doing a great job.

Thank you!

Would you mind saying a little about why you think that?  People keep
asking me what makes Monotone better than, say, Darcs, or Arch, or
whatever, and while I have some answers, I'm never quite sure what to
say... and I have a pretty different perspective on what's going on
than the average user, anyway.  I'd be curious to hear what other
people perceive to be Monotone's relative strengths (and, for that
matter, weaknesses :-)).

-- Nathaniel

-- 
In mathematics, it's not enough to read the words
you have to hear the music




reply via email to

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