vim & rcsclean on Cygwin

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

vim & rcsclean on Cygwin

Andrew Long
This PROBABLY isn't a VIM question, but what the hell...

At work I use vim under cygwin to edit files, and RCS to maintain an
audit trail of the editing. The files all reside on a Novel cluster
server.

I'm having problems with rcsclean, where it decides not to clean up
files that haven't actually changed since I checked them in. Say I've
been editing file fred.scl... I transfer the file to my mainframe for
compilation and test runs. When I have a clean test run I check the file
in from within vim with ':!ci -l -m"message" fred.scl', which updates
the repository file. However, the timestamp on the check in seems to be
associated with an earlier time than the actual check-in time, and so
rcslcean never considers the file as a candidate for cleaning (except
when it does... :( infrequently!)

I've tried doing this both within and outside vim, with mixed results.
I'm not sure if perhaps there's something that Vim is doing to the file
after the check-in but before the end of th editing session.

I'd appreciate any ideas for getting diagnostics on this one

Regards, Andy

--
Andrew Long
Newcastle upon Tyne, Great Britain
============================================================

Reply | Threaded
Open this post in threaded view
|

Re: vim & rcsclean on Cygwin

A.J.Mechelynck
Andrew Long wrote:

> This PROBABLY isn't a VIM question, but what the hell...
>
> At work I use vim under cygwin to edit files, and RCS to maintain an
> audit trail of the editing. The files all reside on a Novel cluster
> server.
>
> I'm having problems with rcsclean, where it decides not to clean up
> files that haven't actually changed since I checked them in. Say I've
> been editing file fred.scl... I transfer the file to my mainframe for
> compilation and test runs. When I have a clean test run I check the file
> in from within vim with ':!ci -l -m"message" fred.scl', which updates
> the repository file. However, the timestamp on the check in seems to be
> associated with an earlier time than the actual check-in time, and so
> rcslcean never considers the file as a candidate for cleaning (except
> when it does... :( infrequently!)
>
> I've tried doing this both within and outside vim, with mixed results.
> I'm not sure if perhaps there's something that Vim is doing to the file
> after the check-in but before the end of th editing session.
>
> I'd appreciate any ideas for getting diagnostics on this one
>
> Regards, Andy
>

To update the datestamp on a file even if the file contents haven't
changed, use the "touch" utility on Unix or cygwin.

From inside Vim:

        :exe '!touch' expand('%') | exe '!ci -l -m"message"' expand('%')

(all on a single line, notwithstanding how my browser or yours may have
"beautified" the above).

or even

        :map <F4> :exe '!touch' expand('%') <Bar> exe '!ci -l -m"message"'
expand('%')<CR>

(all on one line again) then just hit F4 to do it all.


HTH,
Tony.