# CheckInActive - Check the active window in # # Usage: Called by a userÐdefined menu item # # CheckInActive uses the Request command to allow the user to # type in a short comment to catalog the changes that were # made to the file since it was last checked out. Once the # comment is entered, the file open as the Active window is # checked in to its parent project and a readÐonly copy is left # in its place. # # © Apple Computer, Inc. 1988 # All rights reserved. Set Exit 0 Set error 0 Begin # First see if the active window belongs to a project. (Set info "`ProjectInfo "{Active}"`" || Set error 1) Evaluate "{info}" =~ /Å,[0-9a-z.]+([¶+¶*])¨1ÅOwnerÅ/ Evaluate "{info}" =~ /ÅProject: (ź)¨2 +Checked outÅ/ If {error} ­ 0 || "{info}" == "" Alert "¶"{Active}¶" canÕt be checked in because ¶ it doesnÕt belong to a project." Exit 0 End # Find out if the active window is checked out for modification. If "'{¨1}'" ­ "'+'" && "'{¨1}'" ­ "'*'" Alert "¶"{Active}¶" canÕt be checked in because ¶ it wasnÕt checked out for modification." Exit 0 End # Is the right project mounted? (Set info "`ProjectInfo "{¨2}"`" || Set error 1) If "{info}" == "" Alert "¶"{Active}¶" canÕt be checked in because the project ¶ ¶"{¨2}¶" is not mounted." Exit 0 End # Now request the comment and check the file in. set echo 1 (Set comment "`Request "What changes did you make?" || Set error {Status}`") If {error} == 0 If "{comment}" ­ "" CheckIn -cs "{comment}" "{Active}" Else CheckIn "{Active}" End If {Status} ­ 0 Alert "There was a problem checking in ¶"{Active}¶". ¶ You need to check it in on a branch." End End End · dev:null