monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] Re: monotone disapprove does not give correct branch ce


From: Wim Oudshoorn
Subject: [Monotone-devel] Re: monotone disapprove does not give correct branch cert
Date: Wed, 26 Oct 2005 09:04:29 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/22.0.50 (darwin)

Nathaniel Smith <address@hidden> writes:


[Some interesting pointer ommitted, which I will
 read when I am online again]

> On Wed, Oct 26, 2005 at 12:34:54AM +0200, Wim Oudshoorn wrote:
>> 
>> rev A        ......................   XXX 
>> branch main 
>>          \                            /
>>            rev B         rev C       /  propagate back to main
>>            branch fix    branch fix
>> 
>> 
>> now if you try the above you don't get a nice new node rev D
>> with branch certificate, you get just a branch certificate
>> 
>> branch main 
>> 
>> added to rev C.   This in itself is not bad, but very unfortantely
>> monotone does not even add an edge between rev A and rev C to 
>> indicate that a propagate has taken place.  
>
> Adding an edge is, of course, physically impossible.  (Given current
> understanding of the physics of computation.)

At first I completely failed to understand why this is impossible.
However it took me while to realize that this indeed meant adding
an edge later.

I was more aiming for the behaviour described below, which would
be my ideal.  The somewhat less satisfactory solution of adding
an edge, which I implicitly proposed, is indeed not feasible.

So the perfect behaviour for me would be 
that from the situation:

 Rev A
 branch main                      
          \                      
          Rev B      --->   Rev C
          branch fix        branch fix


After giving the command

monotone propagate fix main

you end up with:

  Rev A                         Rev D
  branch main ----------------> branch main
         \                      /
         Rev B       ---->  Rev C
         branch fix         branch fix


I would even go so far that I would expect

  Rev A      --> Rev C
  branch main    branch main
       \       / 
       Rev B      
       branch fix

should happen.

>> Suppose you want to disapprove the propagate from branch fix
>> to branch main because the fix was faulty and need some more development.
>> How to do this cleanly?
>
> I'd love to know -- this is exactly the "Rollback" case discussed on
> that wiki page above.  Bram and I and maybe some others on #revctrl
> used to mumble about various ad-hoc solutions for this, but all I
> really know about it is on that page.

I can't read the references you have given.  But what about
disapproving a change.  That is, you have to give two
revisions and it tries to apply the inverse
of the difference between those two revisions?

So:

  A ---> B ---> C 

disapprove B-->C gives:

  A ---> B ---> C ---> D    (content of D = content of B)
          \___________/


now a more complicated situation:

  A---> B
    __/ 
  C

and now you can disapprove A -->B and get
    _________
   /         \
  A --> B --> D    (content of D = content of A)
   ____/
  C

Oh and the rationale for adding the edges:
- If looking at anacestors you can ignore
  edges coming in from the disapprove node
  and end up with a very sensible graph 
  structure.
- So seem them as repair edges.  
  program like modot or graphvis could colour
  the edge coming in to a disapprove in a
  different colour to signify that 
  that one is disapproved.

Finally disapproving the disapprove above would
mean disapproving A-->D and you end up with
    ________
   /         \
  A--> B --> D -->E  (content E = content B)
   __/  \_________/
  C


Now all these examples are done on a simple edge, but
you can extend it to arbitrary revisions, so for example

monotone disapprove rev1 rev2

  disapprove of all changes made between rev1 and rev2

  * This will create a new node revD which, contains
  the same files in the same state as rev1.
  * revD wil be a child of rev1 and rev2
  * revD will contain a certificate indiciting it
    disapproves of rev2 and goes back to rev1

  So:

   rev1 ..(potential path but not needed)...> rev2  ---> RevD  [rev2 is bad, 
     \_________________________________________________/       rev1 is good!]

  Oh and when rev1 and rev2 contain different branch certificates
  it will ask the user.

Wim Oudshoorn.


P.S.: Most likely you already thought of all this in IRC
      So I will read up on your discussion and com back to it.





reply via email to

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