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

Diff for /src/usr.bin/cvs/checkout.c between version 1.124 and 1.125

version 1.124, 2008/02/03 23:34:41 version 1.125, 2008/02/04 15:07:32
Line 40 
Line 40 
   
 static int flags = CR_REPO | CR_RECURSE_DIRS;  static int flags = CR_REPO | CR_RECURSE_DIRS;
 static char *dflag = NULL;  static char *dflag = NULL;
   static char *koptstr = NULL;
   
 struct cvs_cmd cvs_cmd_checkout = {  struct cvs_cmd cvs_cmd_checkout = {
         CVS_OP_CHECKOUT, CVS_USE_WDIR, "checkout",          CVS_OP_CHECKOUT, CVS_USE_WDIR, "checkout",
Line 77 
Line 78 
                                 fatal("-d specified two or more times");                                  fatal("-d specified two or more times");
                         dflag = optarg;                          dflag = optarg;
                         break;                          break;
                   case 'k':
                           koptstr = optarg;
                           kflag = rcs_kflag_get(koptstr);
                           if (RCS_KWEXP_INVAL(kflag)) {
                                   cvs_log(LP_ERR,
                                       "invalid RCS keyword expension mode");
                                   fatal("%s", cvs_cmd_add.cmd_synopsis);
                           }
                           break;
                 case 'l':                  case 'l':
                         flags &= ~CR_RECURSE_DIRS;                          flags &= ~CR_RECURSE_DIRS;
                         break;                          break;
Line 121 
Line 131 
   
         while ((ch = getopt(argc, argv, cvs_cmd_export.cmd_opts)) != -1) {          while ((ch = getopt(argc, argv, cvs_cmd_export.cmd_opts)) != -1) {
                 switch (ch) {                  switch (ch) {
                   case 'k':
                           koptstr = optarg;
                           kflag = rcs_kflag_get(koptstr);
                           if (RCS_KWEXP_INVAL(kflag)) {
                                   cvs_log(LP_ERR,
                                       "invalid RCS keyword expension mode");
                                   fatal("%s", cvs_cmd_add.cmd_synopsis);
                           }
                           break;
                 case 'l':                  case 'l':
                         flags &= ~CR_RECURSE_DIRS;                          flags &= ~CR_RECURSE_DIRS;
                         break;                          break;
Line 171 
Line 190 
                 if (reset_stickies == 1)                  if (reset_stickies == 1)
                         cvs_client_send_request("Argument -A");                          cvs_client_send_request("Argument -A");
   
                   if (kflag)
                           cvs_client_send_request("Argument -k%s", koptstr);
   
                 if (dflag != NULL)                  if (dflag != NULL)
                         cvs_client_send_request("Argument -d%s", dflag);                          cvs_client_send_request("Argument -d%s", dflag);
   
Line 361 
Line 383 
 void  void
 cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, char *tag, int co_flags)  cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, char *tag, int co_flags)
 {  {
         int kflag, oflags, exists;          int cf_kflag, oflags, exists;
         time_t rcstime;          time_t rcstime;
         CVSENTRIES *ent;          CVSENTRIES *ent;
         struct timeval tv[2];          struct timeval tv[2];
Line 447 
Line 469 
                 sticky[0] = '\0';                  sticky[0] = '\0';
   
         kbuf[0] = '\0';          kbuf[0] = '\0';
         if (cf->file_ent != NULL) {          if (cf->file_rcs->rf_expand != NULL) {
                 if (cf->file_ent->ce_opts != NULL)                  cf_kflag = rcs_kflag_get(cf->file_rcs->rf_expand);
                         strlcpy(kbuf, cf->file_ent->ce_opts, sizeof(kbuf));                  if (kflag || cf_kflag != RCS_KWEXP_DEFAULT)
         } else if (cf->file_rcs->rf_expand != NULL) {  
                 kflag = rcs_kflag_get(cf->file_rcs->rf_expand);  
                 if (!(kflag & RCS_KWEXP_DEFAULT))  
                         (void)xsnprintf(kbuf, sizeof(kbuf),                          (void)xsnprintf(kbuf, sizeof(kbuf),
                             "-k%s", cf->file_rcs->rf_expand);                              "-k%s", cf->file_rcs->rf_expand);
           } else if (!reset_stickies && cf->file_ent != NULL) {
                   if (cf->file_ent->ce_opts != NULL)
                           strlcpy(kbuf, cf->file_ent->ce_opts, sizeof(kbuf));
         }          }
   
         (void)xsnprintf(entry, CVS_ENT_MAXLINELEN, "/%s/%s/%s/%s/%s",          (void)xsnprintf(entry, CVS_ENT_MAXLINELEN, "/%s/%s/%s/%s/%s",

Legend:
Removed from v.1.124  
changed lines
  Added in v.1.125