monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] Merging an ancestor with one of its grandchildren


From: Tom Koelman
Subject: [Monotone-devel] Merging an ancestor with one of its grandchildren
Date: Wed, 22 Jun 2005 22:26:30 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (windows-nt)

Hi,

today I was developing and decided to branch off to implement a new
feature for my project. In a moment of inspiration I called the branch
I split off "NewFeature" while I left the main branch called "Main"
alone. After several commits on NewFeature I decided I wanted to merge
back to Main. However, in the mean time, no one had committed
something on Main so I was in something like this situation:

A (Main)
|
|
B (Main)
|
|
+---- C (NewFeature)
      |
      |
     ... lots of commits
      |
      |
      Z (NewFeature)

And I essentially wanted to merge Z and B to branch Main. 

> monotone explicit_merge Z B Main

However monotone complained that B was an ancestor of Z. Is there a
fundamental reason why this isn't allowed?

A solution that came to my mind was to just give Z a branch
certificate called "Main", but if I remember correctly monotone
requires branches to be in consecutive commits, otherwise someone
still having revision B checked out might think she is at head of
Main.

Another solution that I thought of was doing an empty commit on main,
creating B2 and merging Z with B2. However, monotone doesn't allow me
to do an empty commit. Is there a way around this? BTW, why isn't an
empty commit allowed?

So I ended up committing a trivial change to B, creating B3 and then
merged Z to B3. This felt really hacky and I don't like this
solution. Was there a better one?

Regards,
Tom Koelman





reply via email to

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