monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] Re: [patch]--depth for monotone ls


From: Bruno Hertz
Subject: [Monotone-devel] Re: [patch]--depth for monotone ls
Date: Wed, 18 May 2005 19:27:38 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux)

Derek Scherger <address@hidden> writes:

> my vote would be for all restrictable commands to take the option. so
> status, diff, commit, revert, ls unknown/ignored/missing and any others.
> it appears that all you need to do is enable the option for them so it
> seems easy enough to add.

I agree. My first idea was to have some non recursive mode for all
commands which take files/directories as parameters, where the list
commands would obey ls semantics, but the 'restriction' approach seems
to provide pretty much the same functionality.

More specifically, what I've been thinking of is that in this mode,
commands like add/commit/etc would do

* nothing on directory parameters
* apply the commands on file parameters as given

while with list commands would

* list the content of directories according to list spec (unknown etc)
* list files as given, according to list spec.

This would enable the whole file specification machinery commonly used
in shells resp. scripting, i.e. contructs like

  commit *
  add include/*.h
  diff `find whatever`

would work as expected.

This together with options for recursive/nonrecursive mode and
configuration parms for which mode should be default would have given
users all the flexibility they are accustomed to.

The next and presumably final step would have been to add the list
commands themselves to that machinery, so that constructs like

  add `monotone list unknown include/*.h`

would make sense, maybe with an additional cut/sed or something.

As said, while the above approach looks pretty standard and comes from
the bottom end (i.e. act only on objects I give and extend the set if
requested via recursion), the other way (take the whole set obtained
via recursion and restrict as specified) does pretty much the same.

Good work, thanks.

Regards, Bruno.






reply via email to

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