[Top][All Lists]

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

[Monotone-devel] to be recursive or non-recursive that is the question

From: Derek Scherger
Subject: [Monotone-devel] to be recursive or non-recursive that is the question
Date: Sun, 9 May 2010 22:21:24 -0600

mtn add is non-recursive by default but allows for --recursive if you want it.
mtn revert is recursive by default and doesn't allow for an obvious way of being non-recursive (I believe --depth=N will stop the recursion at the specified depth).

So, which is more dangerous (1) accidentally adding some files you didn't mean to add, or (2) accidentally reverting a bunch of changes you didn't mean to revert?

Recovering from (1) is easy, just revert the additions you don't want. Since revert is recursive this is no problem! ;)
Recovering from (2) is ... not so easy. If you happen to have all the reverted files open in editor buffers you might be able to write them back out but any pending renames will be messed up badly.

There's an old branch net.venge.monotone.restrictions.wildcard-paths that once tried to add something like the foo/bar/... suffix that perforce uses to indicate recursive behaviour and perhaps we should consider doing this again. This might help clean up add, revert, status, diff, commit, etc. and allow the --depth option to be retired.

$ mtn add a # non-recursive
$ mtn add a/... # recusive

$ mtn revert a # non-recursive
$ mtn revert a/... # recursive

I'm not sure how we'd represent a recursive revert of the entire workspace, maybe 'mtn revert ...' or something.



reply via email to

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