On Thu, Jan 10, 2013 at 07:23:36PM -0500, Wietse Venema wrote:

> The "backup before edit" feature does not work with revision control
> systems that error out when the current version is already checked
> in. For example, git and hg returns status 1 when a file has not
> changed since it was checked in. Because of the exit status, postconf
> would refuse to edit the file. That is undesirable.
> 
> Changing this feature into "do something after edit" would run into
> similar problems when the edit did not change the file.
> 
> By the way I notice that "ci -u" leaves the file read-only, and
> that the next "ci -u" errors out with "no lock set".
> 
> If it takes a ton of scripting to make this work with revision
> control systems, then maybe we should not encourage such usage.

Indeed "ci -u" is not quite right. One needs:

    backup_command = rcs -l $file; ci -u -m"Automatic backup" $file

This fails when the file is already locked, which seems reasonable
at first blush.

IMHO revision control systems more complex than RCS are not
appropriate in this context. They typically control a collection
of files in a coherent state, and "postconf" is just updating a
single file.

-- 
        Viktor.

Reply via email to