monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] new include/exclude commands?


From: Thomas Keller
Subject: Re: [Monotone-devel] new include/exclude commands?
Date: Sun, 12 Oct 2008 19:54:11 +0200
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

Derek Scherger schrieb:
> I had an idea the other day, where I was continually having to provide a
> bunch of --exclude optons in a workspace with some (intentionally) missing
> files, that it might be useful to be able to specify a set of includes or
> excludes that persist across several commands. This would avoid the need to
> repeatedly specify the set of paths to include or exclude. It turns out to
> be very simple to implement and I have a the basics working so I thought I'd
> check and see if people would generally find this good, bad or ugly.
> 
> The basic idea is:
> 
> $ mtn include aaa bbb ccc
> $ mtn exclude ddd eee fff
> $ mtn status
> Including:
>   aaa
>   bbb
>   ccc
> Excluding:
>   ddd
>   eee
>   fff
> Current branch: ...
> Changes against parent ...

The question is probably where and how long these things should persist.

Since 0.40 there is a new hook `get_default_command_options` which could
be used for that as well (you could easily put this into the per-project
_MTN/monotonerc):

function get_default_command_options(command)
    local default_opts = {}
    if (command[1] == "diff" or command[1] == "status") then
        table.insert(default_opts, "--include=foo")
        table.insert(default_opts, "--exclude=bar")
    end
    return default_opts
end

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]