monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] log options and staying on the current branch


From: Derek Scherger
Subject: [Monotone-devel] log options and staying on the current branch
Date: Sun, 22 Feb 2009 19:58:45 -0700

I've often found it mildly irritating that log doesn't normally stay on the current branch and that there's no nice way to specify this other than something like:

$ mtn automate select b:net.venge.monotone.library-build |mtn automate toposort address@hidden | xargs -n 1 mtn log --last 1 --diffs --from

I've "fixed" this on the branch net.venge.monotone.experiment.log-options which does this and a few other things:

1. adds --author --branch --date and --message options to log and allows them all to take globs that will select interesting revisions
2. since --branch is a workspace option, this has the consequence that the default branch glob is the current workspace branch and so log now stays on that branch by default
3. logging all branches can be done by specifying --branch='' (the empty branch) or --branch='*' (an inclusive glob); the former will not bother attempting to match anything and will simply include any branch; the latter goes through the globish machinery to achieve the same thing, in a very slightly more expensive way
4. changes workspace::get_options slightly, to allow --branch='' to work; previously if the specified branch option was empty and the workspace branch was not the workspace option was used. I think this is incorrect, if --branch='' is specified on the command line then that should override whatever is in the workspace

There are a couple of failing tests with this that I still need to look into but it's a pretty simple change and I think it would be very nice to have. I'm curious what other people think though.

Cheers,
Derek


reply via email to

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