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

Diff for /src/usr.bin/cvs/server.c between version 1.48 and 1.49

version 1.48, 2007/01/13 15:29:34 version 1.49, 2007/01/17 17:54:50
Line 299 
Line 299 
 {  {
         int l;          int l;
         CVSENTRIES *entlist;          CVSENTRIES *entlist;
         char *dir, *repo, *parent, *entry, *dirn;          char *dir, *repo, *parent, *entry, *dirn, *p;
   
         dir = cvs_remote_input();          dir = cvs_remote_input();
         if (strlen(dir) < strlen(current_cvsroot->cr_dir) + 1)          STRIP_SLASH(dir);
   
           if (strlen(dir) < strlen(current_cvsroot->cr_dir))
                 fatal("cvs_server_directory: bad Directory request");                  fatal("cvs_server_directory: bad Directory request");
   
         repo = dir + strlen(current_cvsroot->cr_dir) + 1;          repo = dir + strlen(current_cvsroot->cr_dir);
         cvs_mkpath(repo);  
   
         if ((dirn = basename(repo)) == NULL)          /*
            * This is somewhat required for checkout, as the
            * directory request will be:
            *
            * Directory .
            * /path/to/cvs/root
            */
           if (repo[0] == '\0')
                   p = xstrdup(".");
           else
                   p = xstrdup(repo + 1);
   
           cvs_mkpath(p);
   
           if ((dirn = basename(p)) == NULL)
                 fatal("cvs_server_directory: %s", strerror(errno));                  fatal("cvs_server_directory: %s", strerror(errno));
   
         if ((parent = dirname(repo)) == NULL)          if ((parent = dirname(p)) == NULL)
                 fatal("cvs_server_directory: %s", strerror(errno));                  fatal("cvs_server_directory: %s", strerror(errno));
   
         if (strcmp(parent, ".")) {          if (strcmp(parent, ".")) {
Line 328 
Line 343 
   
         if (server_currentdir != NULL)          if (server_currentdir != NULL)
                 xfree(server_currentdir);                  xfree(server_currentdir);
         server_currentdir = xstrdup(repo);          server_currentdir = xstrdup(p);
   
           xfree(p);
         xfree(dir);          xfree(dir);
 }  }
   
Line 495 
Line 511 
   
         cvs_cmdop = CVS_OP_COMMIT;          cvs_cmdop = CVS_OP_COMMIT;
         cvs_commit(server_argc, server_argv);          cvs_commit(server_argc, server_argv);
           cvs_server_send_response("ok");
   }
   
   void
   cvs_server_checkout(char *data)
   {       if (chdir(server_currentdir) == -1)
                   fatal("cvs_server_checkout: %s", strerror(errno));
   
           cvs_cmdop = CVS_OP_CHECKOUT;
           cvs_checkout(server_argc, server_argv);
         cvs_server_send_response("ok");          cvs_server_send_response("ok");
 }  }
   

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49