[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.77 and 1.78

version 1.77, 2007/01/16 08:17:27 version 1.78, 2007/01/16 08:33:46
Line 32 
Line 32 
 extern int build_dirs;  extern int build_dirs;
 extern int reset_stickies;  extern int reset_stickies;
   
   static int flags = CR_REPO | CR_RECURSE_DIRS;
   
 struct cvs_cmd cvs_cmd_checkout = {  struct cvs_cmd cvs_cmd_checkout = {
         CVS_OP_CHECKOUT, 0, "checkout",          CVS_OP_CHECKOUT, 0, "checkout",
         { "co", "get" },          { "co", "get" },
Line 56 
Line 58 
 int  int
 cvs_checkout(int argc, char **argv)  cvs_checkout(int argc, char **argv)
 {  {
         int ch, flags;          int ch;
   
         flags = CR_RECURSE_DIRS;  
   
         while ((ch = getopt(argc, argv, cvs_cmd_checkout.cmd_opts)) != -1) {          while ((ch = getopt(argc, argv, cvs_cmd_checkout.cmd_opts)) != -1) {
                 switch (ch) {                  switch (ch) {
                 case 'A':                  case 'A':
Line 92 
Line 92 
 int  int
 cvs_export(int argc, char **argv)  cvs_export(int argc, char **argv)
 {  {
         int ch, flags;          int ch;
   
         prune_dirs = 1;          prune_dirs = 1;
         flags = CR_RECURSE_DIRS;  
   
         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) {
Line 157 
Line 156 
         cr.enterdir = cvs_update_enterdir;          cr.enterdir = cvs_update_enterdir;
         cr.leavedir = cvs_update_leavedir;          cr.leavedir = cvs_update_leavedir;
         cr.fileproc = cvs_update_local;          cr.fileproc = cvs_update_local;
         cr.flags = CR_REPO | CR_RECURSE_DIRS;          cr.flags = flags;
   
         cvs_repository_lock(repobase);          cvs_repository_lock(repobase);
         cvs_repository_getdir(repobase, wdbase, &fl, &dl, 1);          cvs_repository_getdir(repobase, wdbase, &fl, &dl, 1);
Line 172 
Line 171 
 }  }
   
 void  void
 cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, int flags)  cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, int co_flags)
 {  {
         int l, oflags, exists;          int l, oflags, exists;
         time_t rcstime;          time_t rcstime;
Line 184 
Line 183 
         rcsnum_tostr(rnum, rev, sizeof(rev));          rcsnum_tostr(rnum, rev, sizeof(rev));
   
         cvs_log(LP_TRACE, "cvs_checkout_file(%s, %s, %d) -> %s",          cvs_log(LP_TRACE, "cvs_checkout_file(%s, %s, %d) -> %s",
             cf->file_path, rev, flags,              cf->file_path, rev, co_flags,
             (cvs_server_active) ? "to client" : "to disk");              (cvs_server_active) ? "to client" : "to disk");
   
         if (flags & CO_DUMP) {          if (co_flags & CO_DUMP) {
                 if (cvs_server_active) {                  if (cvs_server_active) {
                         cvs_printf("dump file %s to client\n", cf->file_path);                          cvs_printf("dump file %s to client\n", cf->file_path);
                 } else {                  } else {
Line 240 
Line 239 
         if (tbuf[strlen(tbuf) - 1] == '\n')          if (tbuf[strlen(tbuf) - 1] == '\n')
                 tbuf[strlen(tbuf) - 1] = '\0';                  tbuf[strlen(tbuf) - 1] = '\0';
   
         if (flags & CO_MERGE) {          if (co_flags & CO_MERGE) {
                 l = snprintf(timebuf, sizeof(timebuf), "Result of merge+%s",                  l = snprintf(timebuf, sizeof(timebuf), "Result of merge+%s",
                     tbuf);                      tbuf);
                 if (l == -1 || l >= (int)sizeof(timebuf))                  if (l == -1 || l >= (int)sizeof(timebuf))
Line 249 
Line 248 
                 strlcpy(timebuf, tbuf, sizeof(timebuf));                  strlcpy(timebuf, tbuf, sizeof(timebuf));
         }          }
   
         if (flags & CO_SETSTICKY) {          if (co_flags & CO_SETSTICKY) {
                 l = snprintf(stickytag, sizeof(stickytag), "T%s", rev);                  l = snprintf(stickytag, sizeof(stickytag), "T%s", rev);
                 if (l == -1 || l >= (int)sizeof(stickytag))                  if (l == -1 || l >= (int)sizeof(stickytag))
                         fatal("cvs_checkout_file: overflow");                          fatal("cvs_checkout_file: overflow");
Line 269 
Line 268 
                 if ((p = strrchr(cf->file_rpath, ',')) != NULL)                  if ((p = strrchr(cf->file_rpath, ',')) != NULL)
                         *p = '\0';                          *p = '\0';
   
                 if (flags & CO_COMMIT)                  if (co_flags & CO_COMMIT)
                         cvs_server_update_entry("Checked-in", cf);                          cvs_server_update_entry("Checked-in", cf);
                 else                  else
                         cvs_server_update_entry("Updated", cf);                          cvs_server_update_entry("Updated", cf);
   
                 cvs_remote_output(entry);                  cvs_remote_output(entry);
   
                 if (!(flags & CO_COMMIT)) {                  if (!(co_flags & CO_COMMIT)) {
                         (void)xasprintf(&template,                          (void)xasprintf(&template,
                             "%s/checkout.XXXXXXXXXX", cvs_tmpdir);                              "%s/checkout.XXXXXXXXXX", cvs_tmpdir);
   

Legend:
Removed from v.1.77  
changed lines
  Added in v.1.78