1832280 Members
1819 Online
110041 Solutions
New Discussion

RCS check-in by mistake

 
Shahril M
Frequent Advisor

RCS check-in by mistake

Hi folks,

I was quite surprised that my search for similar threads on this was futile - I thought there must have been at least somebody else easily mis-typed a "c" instead of the adjacent "v"

Anyway, I entered ci instead of vi.

I tried using co but I knew it would not undo what I accidentally did.

So, appreciate if someone could assist.


TIA,
Shahril
6 REPLIES 6
Mark Grant
Honored Contributor

Re: RCS check-in by mistake

"co filename" should work (don't include the ,v when doing the co)

Failing that, try using "vi" on the "filename,v" and just deleeting all the rubbish at the begining.
Never preceed any demonstration with anything more predictive than "watch this"
Naveej.K.A
Honored Contributor

Re: RCS check-in by mistake

shahril,
terminate with ^D or a simple dot(.)

with best wishes
naveej
practice makes a man perfect!!!
Shahril M
Frequent Advisor

Re: RCS check-in by mistake

Hi folks,

Perhaps I was not clear enough.

I would like to know how to neatly undo the ci command, such that the file would revert to its originals permissions, the ,v file would be automatically deleted, and any RCS files/databases be cleaned records of such a file.

Hope that was clear enough ......


TIA,
Shahril
Procnus
Frequent Advisor

Re: RCS check-in by mistake

I'm assuming that this is the first check-in of the file. First check out the file so that you don't lose it, then copy it somewhere else. Next use the command "rcs -o1.1 " where is the file accidentally checked in. This will delete (obselete) the revision of the file, which in this case would be all revisions of the file.

Cheers
Steven
Shahril M
Frequent Advisor

Re: RCS check-in by mistake

Hi Steven,

It does not work. Firstly, I entered "co " to check out. Is this correct? Or should I use ,v?

In any case, after following your instructions, the ,v file remained, and the permissions on the original file did not revert to its original settings.


Rgds,
Shahril
Procnus
Frequent Advisor

Re: RCS check-in by mistake

First off, while the ,v file still exists it is empty. Doing a rcs -o will remove the contents but leave an empty header, this can be deleted.

According to the man page a checked in file will inherit the read and execute permissions of the source file, ci will remove whatever write permissions existed on the file.

I wish I could've been more help

Cheers
Steven