monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] Re: rfc on h: selector behavior


From: Wim Oudshoorn
Subject: [Monotone-devel] Re: rfc on h: selector behavior
Date: Thu, 13 Oct 2005 10:22:04 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/22.0.50 (darwin)

Emile Snyder <address@hidden> writes:

> Hi all,
>
> Do people think that an h:branch selector to find the heads of a branch
> should accept globbing wildcard characters like the b: selector?  So if
> you said 
>
> a:bozo/h:com.circus.*
>
> it would select any head of a branch in the com.circus.* set authored by
> bozo.  There has been concern expressed on IRC that globbing needlessly
> complicates things.  Also, that it's not clear whether h:* should mean

>From a quick look in the manual I get the impression that:

* All selectors accept globbing except:
  - date related selectors
  - ID selector

This seems reasonable to me, dates and IDs have a very restricted
format.  So for consistency sake, I would accept globbing.


> erase_ancestors(b:*)
> or
> union (erase_ancestors(b:b1), erase_ancestors(b:b2), ...)

Hm, difficult.  I think I might lean towards the second case.
The reason is that I might want to use the argument of h: 
to save me typing.

So I could say h:foo.bar*

as a shortcut to, h:foo.bar.main, assuming I have only one branch
starting with foo.bar.

Now if, for whatever reason, there is another branch starting with
foo.bar.  The second scenario will always give me at least two heads.
So monotone will most likely barf when I am using h:foo.bar* syntax
(asssuming I use a command that only accepts one revision.)

If the first proposal is implemented it could happen that if the
branches are related as:

  foo.bar.main
        \
         foo.bar.main.bugfix

I still get one head, but on the main.bugfixbranch, and I might
end up doing something I do not want.

But I will admit that this is a very weak reason to
take the second alternative.

> Any opinions?

So at the moment, but without a very good reason, I go for
the second alternative.



Head selector, how I would like to use it
-----------------------------------------

On a related note,  I imagine myself using a head selector
most often in a situation after monotone sync.
If after sync I get the message that I am not based on head
I would like to be able to do some comparision.  

Scenario I:
...........
I have a checked out copy, without local changes,
after synchronization I get a new head:


   Working copy ------> Newly received head

I would like to type something like:

  monotone diff --revision=h:  

So somehow you need to be able to specify the head
of the branch of the current working copy. 



Scenario II:
............
I have checked out a copy and made local changes, which
are not commited yet.

   Working copy  -------> Newly received head
        .
         .... working copy is changed on disk!!

I would like to see the differences between 
the working copy revision in the DB and the new head.

   monotone diff --revision=i:$(cat MT/revision) --revision=h:

Hm, is there a selector matching the current working copy?


Scenario III:
.............
I have a working copy and have commited local changes, which
are commited:


    Ancestor      -------> Newly received head
          \
           \---> Working copy

I would like to be able to do something like, [fantasy syntax follows]

   monotone diff --revision=lca:(h:|i:$(cat MT/revision)) --revision=h:

for the differences between ancestor and newly received head.



Wim Oudshoorn.





reply via email to

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