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

Diff for /src/usr.bin/cvs/client.c between version 1.53 and 1.54

version 1.53, 2007/01/26 21:48:17 version 1.54, 2007/01/26 21:59:11
Line 142 
Line 142 
 {  {
         int l;          int l;
         CVSENTRIES *entlist;          CVSENTRIES *entlist;
         char *entry, *parent, *base;          char entry[CVS_ENT_MAXLINELEN], *parent, *base;
   
         STRIP_SLASH(data);          STRIP_SLASH(data);
   
Line 157 
Line 157 
         if (!strcmp(parent, "."))          if (!strcmp(parent, "."))
                 return;                  return;
   
         entry = xmalloc(CVS_ENT_MAXLINELEN);  
         l = snprintf(entry, CVS_ENT_MAXLINELEN, "D/%s////", base);          l = snprintf(entry, CVS_ENT_MAXLINELEN, "D/%s////", base);
         if (l == -1 || l >= CVS_ENT_MAXLINELEN)          if (l == -1 || l >= CVS_ENT_MAXLINELEN)
                 fatal("client_check_directory: overflow");                  fatal("client_check_directory: overflow");
Line 165 
Line 164 
         entlist = cvs_ent_open(parent);          entlist = cvs_ent_open(parent);
         cvs_ent_add(entlist, entry);          cvs_ent_add(entlist, entry);
         cvs_ent_close(entlist, ENT_SYNC);          cvs_ent_close(entlist, ENT_SYNC);
   
         xfree(entry);  
 }  }
   
 void  void
Line 564 
Line 561 
         int l;          int l;
         CVSENTRIES *entlist;          CVSENTRIES *entlist;
         struct cvs_ent *ent, *newent;          struct cvs_ent *ent, *newent;
         char *dir, *entry, rev[16], timebuf[64], sticky[16];          char *dir, *e, entry[CVS_ENT_MAXLINELEN], rev[16], timebuf[64];
           char sticky[16];
   
         dir = cvs_remote_input();          dir = cvs_remote_input();
         entry = cvs_remote_input();          e = cvs_remote_input();
         xfree(dir);          xfree(dir);
   
         entlist = cvs_ent_open(data);          entlist = cvs_ent_open(data);
         newent = cvs_ent_parse(entry);          newent = cvs_ent_parse(e);
         ent = cvs_ent_get(entlist, newent->ce_name);          ent = cvs_ent_get(entlist, newent->ce_name);
         xfree(entry);          xfree(e);
   
         entry = xmalloc(CVS_ENT_MAXLINELEN);  
   
         rcsnum_tostr(newent->ce_rev, rev, sizeof(rev));          rcsnum_tostr(newent->ce_rev, rev, sizeof(rev));
         ctime_r(&ent->ce_mtime, timebuf);          ctime_r(&ent->ce_mtime, timebuf);
         if (timebuf[strlen(timebuf) - 1] == '\n')          if (timebuf[strlen(timebuf) - 1] == '\n')
Line 599 
Line 595 
         cvs_ent_free(newent);          cvs_ent_free(newent);
         cvs_ent_add(entlist, entry);          cvs_ent_add(entlist, entry);
         cvs_ent_close(entlist, ENT_SYNC);          cvs_ent_close(entlist, ENT_SYNC);
   
         xfree(entry);  
 }  }
   
 void  void
Line 614 
Line 608 
         struct cvs_ent *e;          struct cvs_ent *e;
         const char *errstr;          const char *errstr;
         struct timeval tv[2];          struct timeval tv[2];
         char timebuf[32], repo[MAXPATHLEN], *rpath, *entry, *mode;          char timebuf[32], repo[MAXPATHLEN], *rpath, entry[CVS_ENT_MAXLINELEN];
         char revbuf[32], *len, *fpath, *wdir;          char *en, *mode, revbuf[32], *len, *fpath, *wdir;
   
         client_check_directory(data);          client_check_directory(data);
   
         rpath = cvs_remote_input();          rpath = cvs_remote_input();
         entry = cvs_remote_input();          en = cvs_remote_input();
         mode = cvs_remote_input();          mode = cvs_remote_input();
         len = cvs_remote_input();          len = cvs_remote_input();
   
Line 651 
Line 645 
         if (timebuf[strlen(timebuf) - 1] == '\n')          if (timebuf[strlen(timebuf) - 1] == '\n')
                 timebuf[strlen(timebuf) - 1] = '\0';                  timebuf[strlen(timebuf) - 1] = '\0';
   
         e = cvs_ent_parse(entry);          e = cvs_ent_parse(en);
         xfree(entry);          xfree(en);
         rcsnum_tostr(e->ce_rev, revbuf, sizeof(revbuf));          rcsnum_tostr(e->ce_rev, revbuf, sizeof(revbuf));
         entry = xmalloc(CVS_ENT_MAXLINELEN);  
         l = snprintf(entry, CVS_ENT_MAXLINELEN, "/%s/%s/%s//", e->ce_name,          l = snprintf(entry, CVS_ENT_MAXLINELEN, "/%s/%s/%s//", e->ce_name,
             revbuf, timebuf);              revbuf, timebuf);
         if (l == -1 || l >= CVS_ENT_MAXLINELEN)          if (l == -1 || l >= CVS_ENT_MAXLINELEN)
Line 664 
Line 657 
         ent = cvs_ent_open(wdir);          ent = cvs_ent_open(wdir);
         cvs_ent_add(ent, entry);          cvs_ent_add(ent, entry);
         cvs_ent_close(ent, ENT_SYNC);          cvs_ent_close(ent, ENT_SYNC);
         xfree(entry);  
   
         if ((fd = open(fpath, O_CREAT | O_WRONLY | O_TRUNC)) == -1)          if ((fd = open(fpath, O_CREAT | O_WRONLY | O_TRUNC)) == -1)
                 fatal("cvs_client_updated: open: %s: %s",                  fatal("cvs_client_updated: open: %s: %s",

Legend:
Removed from v.1.53  
changed lines
  Added in v.1.54