monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] question about how a selective log displays head no


From: Thomas Keller
Subject: Re: [Monotone-devel] question about how a selective log displays head nodes
Date: Tue, 08 Feb 2011 00:57:14 +0100
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; de; rv:1.9.2.13) Gecko/20101129 Lightning/1.0b3pre Thunderbird/3.1.7

Hi Hugo!

Am 06.02.11 10:44, schrieb Hugo Cornelis:
> We are maintaining documentation in a monotone repository.  In the
> workspace on my laptop I invoke:
> 
> $ mtn automate heads
> 970f659a5173b3b0183ab4a70986a033ce107cf1
> 
> So I assume the branch (name: 0) has only one head.
> 
> There is a document I am working on, it is called
> cbi-scripting/cbi-scripting.tex and it is under monotone control.
> 
> Within xemacs I invoke the following shell command from the root
> directory of the local workspace:
> 
> mtn log --last 100 cbi-scripting/
> 
> which gives (abbreviated output of the first N revisions, removed the
> ChangeLog entries, a fixed width font should show the bars lined up) :
> 
> o-.-.-.-.-.-.-.-.-.-.-.-.     (Revision:
> 970f659a5173b3b0183ab4a70986a033ce107cf1)
> |\ \ \ \ \ \ \ \ \ \ \ \ \
> | | | | | | | o | | | | | |
> ----------------------------------------------------------------------
> | | | | | | | | | | | | | |   Revision: 
> 5b43131aa22834ed673de98d76f6d02c5534ef8c
> | | | | | | | | | | | | | |   Parent:   
> 37aae4e7b9dbfa330887fe347d9dd7b08e52935a
> | | | | | | | | | | | | | |   Author:   address@hidden
> | | | | | | | | | | | | | |   Date:     02/04/11 19:07:29
> | | | | | | | | | | | | | |   Branch:   0
> | | | | | | | | | | | | | |
> | .-.-.-.-.-.-o-.-.-.-.-. |   (Revision:
> 37aae4e7b9dbfa330887fe347d9dd7b08e52935a)
> |/|/|/|/|/|/|/ \|\|\|\|\|\|
> | | | | o | |   | | | | | |
> ----------------------------------------------------------------------
> | | | | | | |  / / / / / /    Revision: 
> 3e989d56fd4c6d57ebc072c5e7a0553d42a3ab7c
> | | | | | | | | | | | | |     Parent:   
> bedcaca085c7ef926f6639c7e996446bdd30f0fb
> | | | | | | | | | | | | |     Author:   address@hidden
> | | | | | | | | | | | | |     Date:     02/04/11 18:55:12
> | | | | | | | | | | | | |     Branch:   0
> | | | | | | | | | | | | |
> | .-.-.-o-.-.-.-.-.-.-. |   (Revision: 
> bedcaca085c7ef926f6639c7e996446bdd30f0fb)
> |/|/|/|/|\|\|\|\|\|\|\|\|
> | | o | | | | | | | | | |
> ----------------------------------------------------------------------
> | | | | | | | | | | | | |   Revision: 2990057caa0ee1ce90aeb46e19c2065654d49108
> | | | | | | | | | | | | |   Parent:   9fbbed811348bea34687d3acb12d155ce0bc3b55
> | | | | | | | | | | | | |   Author:
> address@hidden
> | | | | | | | | | | | | |   Date:     02/03/11 07:51:03
> | | | | | | | | | | | | |   Branch:   0
> | | | | | | | | | | | | |
> | | o | | | | | | | | | |
> ----------------------------------------------------------------------
> | | | | | | | | | | | | |   Revision: 9fbbed811348bea34687d3acb12d155ce0bc3b55
> | | | | | | | | | | | | |   Parent:   54d833b5c9b9e7e649096fa6ee52be3b724836e1
> | | | | | | | | | | | | |   Author:   address@hidden
> | | | | | | | | | | | | |   Date:     02/02/11 23:33:48
> | | | | | | | | | | | | |   Branch:   0
> | | | | | | | | | | | | |
> | | | | | | | | | | | | | o
> ----------------------------------------------------------------------
> | | | | | | | | | | | | | |   Revision: 
> cd3ecf3fc142b98b457aba8df5795c884e74147e
> | | | | | | | | | | | | | |   Parent:   
> 7cce4fde1c40c4252d24488c7f2171a7c259e3fc
> | | | | | | | | | | | | | |   Author:   address@hidden
> | | | | | | | | | | | | | |   Date:     02/02/11 00:47:06
> | | | | | | | | | | | | | |   Branch:   0
> | | | | | | | | | | | | | |
> | | | | | | | | | | | | | o
> ----------------------------------------------------------------------
> | | | | | | | | | | | | | |   Revision: 
> 7cce4fde1c40c4252d24488c7f2171a7c259e3fc
> | | | | | | | | | | | | | |   Parent:   
> 9a2816511d9ce21cb246affbbd4f7156a567fa63
> | | | | | | | | | | | | | |   Author:   address@hidden
> | | | | | | | | | | | | | |   Date:     02/01/11 20:30:52
> | | | | | | | | | | | | | |   Branch:   0
> | | | | | | | | | | | | | |
> | .-----.-.-.-.-.-.-.-.-.-o-.     (Revision:
> 9a2816511d9ce21cb246affbbd4f7156a567fa63)
> 
> etc...
> 
> In this output both Revision: 970f659a5173b3b0183ab4a70986a033ce107cf1
> and Revision: cd3ecf3fc142b98b457aba8df5795c884e74147e are listed as
> heads.
> 
> I then invoke:
> 
> 
> $ mtn log --revision 54d833b5c9b9e7e649096fa6ee52be3b724836e1
> o   ----------------------------------------------------------------------
> |   Revision: 54d833b5c9b9e7e649096fa6ee52be3b724836e1
> |   Parent:   cd3ecf3fc142b98b457aba8df5795c884e74147e
> |   Author:   address@hidden
> |   Date:     02/02/2011 09:35:10 PM
> |   Branch:   0
> |
> 
> which lists cd3ecf... as its parent revision.  So clearly cd3ecf... is
> not a head.
> 
> I would have expected that the selective log format would insert
> additional revision records between parenthesis when needed to prevent
> confusion about ancestry of the displayed revisions.  So I am
> surprised that the selective log format displays cd3ecf... as a head
> node.
> 
> Is this to be expected?

Yes, it is since 0.99. 0.48 had a couple of bugs concerning path
restrictions especially within mtn log - basically the other way you're
heading to: Previously parent revisions have always been included in the
output (as fully logged revisions) and confused people who restricted
the log on a particular sub directory.

Derek added a notion of "explicit" and "implicit" includes in the
restriction code and I implemented that for mtn log in
b0327e6eb8d1617b46a335111ef1677ad23287ae, so that - by default - mtn log
uses explicit includes for log output and implicit includes for diff
output (to keep the diffs for a single revision complete).

I'd rather not make the usage of "explicit" vs. "implicit" configurable,
as the code is complex enough there already and also wouldn't help you
greatly as an implicit include would pull in too many "outside" changes
(namely everything underknees ".").

Basically there are two ways out of this dilemma:

- You (as the user) have to provide a slightly extended inclusion mask,
  e.g. `mtn log --last 100 cbi-scripting system-administration-log`
  would have worked. Of course this is not easy to accomplish without
  knowing beforehand what files have been changed in which (skipped)
  revision.

- We find some way to add more revisions to the set of logged revisions
  based on ancestry (and not restriction alone) and minimize the output
  of these "uninteresting" revisions later on so they don't get fully
  logged.
  I cannot say how easy or hard this is - I simply haven't looked at it
  in detail - but one could possibly add some hack nearby
  cmd_diff_log.cc:907ff for it and some magic before.

Thomas.

-- 
GPG-Key 0x160D1092 | address@hidden | http://thomaskeller.biz
Please note that according to the EU law on data retention, information
on every electronic information exchange might be retained for a period
of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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