/[cvs]/ccvs/src/server.c
ViewVC logotype

Diff of /ccvs/src/server.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.452.2.14 by dprice, Tue Dec 6 17:46:58 2005 UTC revision 1.452.2.15 by dprice, Thu Dec 8 15:02:37 2005 UTC
# Line 5233  server_updated ( Line 5233  server_updated (
5233       */       */
5234      assert (!(filebuf && file_gzip_level));      assert (!(filebuf && file_gzip_level));
5235    
5236      TRACE (TRACE_FUNCTION, "server_updated (%s, %s, %s)",      TRACE (TRACE_FUNCTION, "server_updated (%s, %s, %s, %d)",
5237             finfo->fullname, vers ? vers->vn_rcs : "(null)",             finfo->fullname, vers ? vers->vn_rcs : "(null)",
5238             vers ? vers->options : "(null)");             vers ? vers->options : "(null)", updated);
5239    
5240      if (noexec)      if (noexec)
5241      {      {
# Line 8153  cvs_output_tagged (const char *tag, cons Line 8153  cvs_output_tagged (const char *tag, cons
8153   * NOTES   * NOTES
8154   *   Processes PREV == NULL, PREV == REV, and PREV == "0", for convenience.   *   Processes PREV == NULL, PREV == REV, and PREV == "0", for convenience.
8155   */   */
8156  void  static void
8157  server_base_checkout (RCSNode *rcs, struct file_info *finfo, const char *prev,  iserver_base_checkout (RCSNode *rcs, struct file_info *finfo, const char *prev,
8158                        const char *rev, const char *ptag, const char *tag,                         const char *rev, const char *ptag, const char *tag,
8159                        const char *poptions, const char *options)                         const char *poptions, const char *options,
8160                           const char *basefile, const char *fullbase, bool istemp)
8161  {  {
     char *basefile;  
     char *fullbase;  
8162      char *tmpfile = NULL;      char *tmpfile = NULL;
8163      bool senddiff;      bool senddiff;
8164    
8165      assert (rev);      assert (rev);
8166    
8167      TRACE (TRACE_FUNCTION, "server_base_checkout (%s, %s, %s, %s, %s, %s, %s)",      TRACE (TRACE_FUNCTION,
8168             finfo->fullname, prev, rev, ptag, tag, poptions, options);             "iserver_base_checkout (%s, %s, %s, %s, %s, %s, %s, %s)",
8169               finfo->fullname, prev, rev, ptag, tag, poptions, options,
8170               istemp ? "true" : "false");
8171    
8172      if (!supported_response ("Base-checkout")) return;      if (!supported_response (istemp ? "Temp-checkout" : "Base-checkout"))
8173            return;
8174    
8175      if (/* Entry rev and new rev are the same...  */      if (/* Entry rev and new rev are the same...  */
8176          prev && !strcmp (prev, rev)          prev && !strcmp (prev, rev)
# Line 8187  server_base_checkout (RCSNode *rcs, stru Line 8189  server_base_checkout (RCSNode *rcs, stru
8189           */           */
8190          return;          return;
8191    
     basefile = make_base_file_name (finfo->file, rev);  
     fullbase = Xasprintf ("%s/%s",  
                           *(finfo->update_dir) ? finfo->update_dir : ".",  
                           basefile);  
   
8192      /* FIXME: It would be more efficient if diffs could be sent when the      /* FIXME: It would be more efficient if diffs could be sent when the
8193       * revision numbers haven't changed but the keywords have.       * revision numbers haven't changed but the keywords have.
8194       */       */
# Line 8203  server_base_checkout (RCSNode *rcs, stru Line 8200  server_base_checkout (RCSNode *rcs, stru
8200          char **dargv = NULL;          char **dargv = NULL;
8201          int status;          int status;
8202          char *pbasefile;          char *pbasefile;
8203            bool save_noexec = noexec;
8204    
8205          pbasefile = cvs_temp_name ();          pbasefile = cvs_temp_name ();
8206            noexec = false;
8207          status = RCS_checkout (rcs, pbasefile, prev, ptag, poptions,          status = RCS_checkout (rcs, pbasefile, prev, ptag, poptions,
8208                                 NULL, NULL, NULL);                                 NULL, NULL, NULL);
8209            noexec = save_noexec;
8210    
8211          if (status)          if (status)
8212              error (1, 0, "Failed to checkout revision %s of `%s'",              error (1, 0, "Failed to checkout revision %s of `%s'",
# Line 8243  server_base_checkout (RCSNode *rcs, stru Line 8243  server_base_checkout (RCSNode *rcs, stru
8243              senddiff = false;              senddiff = false;
8244      }      }
8245    
8246      buf_output0 (protocol, "Base-checkout ");      buf_output0 (protocol, istemp ? "Temp-checkout " : "Base-checkout ");
8247      output_dir (finfo->update_dir, finfo->repository);      output_dir (finfo->update_dir, finfo->repository);
8248      buf_output0 (protocol, finfo->file);      buf_output0 (protocol, finfo->file);
8249      buf_output (protocol, "\n", 1);      buf_output (protocol, "\n", 1);
# Line 8274  server_base_checkout (RCSNode *rcs, stru Line 8274  server_base_checkout (RCSNode *rcs, stru
8274              error (0, errno, "cannot remove `%s'", tmpfile);              error (0, errno, "cannot remove `%s'", tmpfile);
8275          free (tmpfile);          free (tmpfile);
8276      }      }
8277    }
8278    
8279    
8280    
8281    void
8282    server_base_checkout (RCSNode *rcs, struct file_info *finfo, const char *prev,
8283                          const char *rev, const char *ptag, const char *tag,
8284                          const char *poptions, const char *options)
8285    {
8286        char *basefile;
8287        char *fullbase;
8288    
8289        basefile = make_base_file_name (finfo->file, rev);
8290        fullbase = Xasprintf ("%s/%s",
8291                              *(finfo->update_dir) ? finfo->update_dir : ".",
8292                              basefile);
8293    
8294        iserver_base_checkout (rcs, finfo, prev, rev, ptag, tag, poptions, options,
8295                               basefile, fullbase, false);
8296    
8297      free (fullbase);      free (fullbase);
8298      free (basefile);      free (basefile);
8299  }  }
8300    
8301    
8302    
8303    void
8304    server_temp_checkout (RCSNode *rcs, struct file_info *finfo, const char *prev,
8305                          const char *rev, const char *ptag, const char *tag,
8306                          const char *poptions, const char *options,
8307                          const char *tempfile)
8308    {
8309        iserver_base_checkout (rcs, finfo, prev, rev, ptag, tag, poptions, options,
8310                               tempfile, tempfile, true);
8311    }
8312    
8313    
8314    
8315  void  void
8316  server_base_copy (struct file_info *finfo, const char *rev, const char *flags)  server_base_copy (struct file_info *finfo, const char *rev, const char *flags)

Legend:
Removed from v.1.452.2.14  
changed lines
  Added in v.1.452.2.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26