[BACK]Return to rcsprog.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / rcs

Diff for /src/usr.bin/rcs/rcsprog.c between version 1.97 and 1.98

version 1.97, 2006/04/12 08:23:30 version 1.98, 2006/04/12 22:54:23
Line 682 
Line 682 
                 if (rcsflags & RCSPROG_LFLAG) {                  if (rcsflags & RCSPROG_LFLAG) {
                         RCSNUM *rev;                          RCSNUM *rev;
                         const char *username;                          const char *username;
                           char rev_str[16];
   
                         if ((username = getlogin()) == NULL)                          if ((username = getlogin()) == NULL)
                                 fatal("could not get username");                                  fatal("could not get username");
Line 693 
Line 694 
                                 rcs_close(file);                                  rcs_close(file);
                                 continue;                                  continue;
                         }                          }
                           rcsnum_tostr(rev, rev_str, sizeof(rev_str));
                         /* Make sure revision exists. */                          /* Make sure revision exists. */
                         if (rcs_findrev(file, rev) == NULL)                          if (rcs_findrev(file, rev) == NULL)
                                 fatal("revision does not exist");                                  fatal("%s: can't lock nonexisting revision %s",
                         if (rcs_lock_add(file, username, rev) == -1)                                      fpath, rev_str);
                                 fatal("unable to lock file");                          if (rcs_lock_add(file, username, rev) != -1 &&
                               verbose == 1)
                                   printf("%s locked\n", rev_str);
                         rcsnum_free(rev);                          rcsnum_free(rev);
                 }                  }
   
                 if (rcsflags & RCSPROG_UFLAG) {                  if (rcsflags & RCSPROG_UFLAG) {
                         RCSNUM *rev;                          RCSNUM *rev;
                         const char *username;                          const char *username;
                           char rev_str[16];
   
                         if ((username = getlogin()) == NULL)                          if ((username = getlogin()) == NULL)
                                 fatal("could not get username");                                  fatal("could not get username");
Line 715 
Line 720 
                                 rcs_close(file);                                  rcs_close(file);
                                 continue;                                  continue;
                         }                          }
                           rcsnum_tostr(rev, rev_str, sizeof(rev_str));
                         /* Make sure revision exists. */                          /* Make sure revision exists. */
                         if (rcs_findrev(file, rev) == NULL)                          if (rcs_findrev(file, rev) == NULL)
                                 fatal("revision does not exist");                                  fatal("%s: can't unlock nonexisting revision %s",
                         if (rcs_lock_remove(file, username, rev) == -1)                                      fpath, rev_str);
                                 fatal("unable to unlock file");                          if (rcs_lock_remove(file, username, rev) == -1 &&
                               verbose == 1)
                                   cvs_log(LP_ERR,
                                       "%s: warning: No locks are set.", fpath);
                         rcsnum_free(rev);                          rcsnum_free(rev);
                 }                  }
   

Legend:
Removed from v.1.97  
changed lines
  Added in v.1.98