CVSTrac Legacy Code

Check-in [0991d26569]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:(#800) end transaction when no GIT repo defined
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:0991d26569ed5298e0ef7f80f0acf8abddf02336
User & Date: cpb 2009-06-04 16:42:32
Context
2009-06-19
13:56
(#802) oops, we don't use that yet, if ever. check-in: 4277e77c9b user: cpb tags: trunk
2009-06-04
16:42
(#800) end transaction when no GIT repo defined check-in: 0991d26569 user: cpb tags: trunk
2009-05-15
21:59
(#39) diff coloring using DIVs and stylesheets classes =diffx= where =x= is *h*eader, *c*hunk, *t*ext, *a*dded, *r*emoved check-in: 864223dd4b user: ono tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to git.c.

593
594
595
596
597
598
599
600



601
602
603
604
605
606
607
...
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746

  db_execute("BEGIN");

  /* Get the path to local repository and last revision number we have in db
   * If there's no repository defined, bail and wait until the admin sets one.
  */
  zRoot = db_config("cvsroot","");
  if( zRoot[0]==0 ) return 0;




  nOldSize = atoi(db_config("historysize","0"));

  /* git has multiple "heads", each representing a different
  ** branch. We need to follow the tree from each head back to either the
  ** root or something we've already seen. We use a couple of temp tables
  ** for records keeping.
................................................................................
  FILE *in;
  char zLine[PATH_MAX*2];
  char *zCmd;

  if( zTreeish==0 || zTreeish[0]==0 || zPath==0 || zPath[0]==0 ) return 0;
    
  zCmd = mprintf("GIT_DIR='%s' git ls-tree -r '%s' '%s'", zGitDir,
                 quotable_string(zTreeish), quotable_string(zPath));
  in = popen(zCmd,"r");
  if( in==0 ){
    err_pipe("Reading tree",zCmd);
    return 0;
  }
  free(zCmd);








|
>
>
>







 







|







593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
...
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749

  db_execute("BEGIN");

  /* Get the path to local repository and last revision number we have in db
   * If there's no repository defined, bail and wait until the admin sets one.
  */
  zRoot = db_config("cvsroot","");
  if( zRoot[0]==0 ) {
    db_execute("COMMIT");
    return 0;
  }

  nOldSize = atoi(db_config("historysize","0"));

  /* git has multiple "heads", each representing a different
  ** branch. We need to follow the tree from each head back to either the
  ** root or something we've already seen. We use a couple of temp tables
  ** for records keeping.
................................................................................
  FILE *in;
  char zLine[PATH_MAX*2];
  char *zCmd;

  if( zTreeish==0 || zTreeish[0]==0 || zPath==0 || zPath[0]==0 ) return 0;
    
  zCmd = mprintf("GIT_DIR='%s' git ls-tree -r '%s' '%s'", zGitDir,
                 quotable_string(zTreeish), shellable_string(zPath));
  in = popen(zCmd,"r");
  if( in==0 ){
    err_pipe("Reading tree",zCmd);
    return 0;
  }
  free(zCmd);