[RFC] explicit selection of edited files

Martin Pool mbp at sourcefrog.net
Wed Oct 31 14:08:17 GMT 2007


On 10/30/07, Robert Collins <robertc at robertcollins.net> wrote:
> I've been thinking about doing a plugin for explicitly marking files to
> edit, for making things like converters faster, as well as in obscenely
> large tree situations.

For converters, I think they should just pass the full list to commit,
and we should make sure that if a list if given, commit does not read
anything else.  This may need special attention when eg a new
directory is added with only some files inside wanting to be
committed, so ci --no-recurse.  We might also need --files-from when
there is a long list.

But you could do this a bit more generally too, which would be a bit
like the 'must add file versions explicitly' of git or bk.

> Seems to me the basics are:
>  - we maintain a list of 'edited' files.
>  - a command to add/remove to that list.
>  - some commands like 'revert' will probably want to add to that list
>  - all tree operations like commit/diff/st will want to use that list as
> an automatic selected-paths criteria.
>  - commit resets the list
>  - revert to basis resets the list

Having an actual (rather than conceptual) list separate from the
working inventory seems somewhat redundant.  (Though, of course, there
is not quite enough space in the current working inventory to fit
this.)

Saving the file versions to the repository at the time they're added
may have better locality of reference.

revert to the basis revision would clear the list, and revert to some
other revision would make the list point to the previous revisions.

I think 'the list is empty' is not the same as 'I'm not using this mode'.

-- 
Martin



More information about the bazaar mailing list