Fossil

Check-in [081a29c0]
Login

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

Overview
Comment:Fix indentation and tabs to style guide
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | venks-emacs
Files: files | file ages | folders
SHA1: 081a29c0b7689c4bfe33889389a95f3f0915ed81
User & Date: venkat 2011-06-06 17:59:05
References
2011-06-23
13:45 New ticket [53ed5284] Bad href in tkthistory_page. artifact: 23d0a9a5 user: anonymous
Context
2011-06-07
00:48
Pull the latest trunk changes into the venks-emacs branch. check-in: 690ba8cb user: drh tags: venks-emacs
2011-06-06
17:59
Fix indentation and tabs to style guide check-in: 081a29c0 user: venkat tags: venks-emacs
2011-06-05
00:09
Fix minor typo in comment check-in: ac7be7fd user: venkat tags: venks-emacs
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/tkt.c.

1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
....
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
....
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
        }
        getAllTicketFields();
        /* read commandline and assign fields in the azValue array */
        while( i<g.argc ){
          char *zFName;
          char *zFValue;
          int j;
	  int append = 0;

          zFName = g.argv[i++];
          if( i==g.argc ){
            fossil_fatal("missing value for '%s'!",zFName);
          }
          zFValue = g.argv[i++];
          if( tktEncoding == tktFossilize ){
            zFValue=mprintf("%s",zFValue);
            defossilize(zFValue);
          }
	  append = (zFName[0] == '+');
	  if (append){
	      zFName++;
	  }
          j = fieldId(zFName);
          if( j == -1 ){
            fossil_fatal("unknown field name '%s'!",zFName);
          }else{
	      if (append) {
		  azAppend[j] = zFValue;
	      } else {
		  azValue[j] = zFValue;
	      }
          }
        }

        /* now add the needed artifacts to the repository */
        blob_zero(&tktchng);
        { /* add the time to the ticket manifest */
          char *zDate;
................................................................................
          zDate = date_in_standard_format("now");
          blob_appendf(&tktchng, "D %s\n", zDate);
          free(zDate);
        }
        /* append defined elements */
        for(i=0; i<nField; i++){
          char *zValue = 0;
	  char *zPfx;

	  if (azAppend[i] && azAppend[i][0] ){
	    zPfx = " +";
	    zValue = azAppend[i];
	  } else if( azValue[i] && azValue[i][0] ){
	    zPfx = " ";
	    zValue = azValue[i];
	  } else {
	    continue;
	  }
          if( strncmp(azField[i], "private_", 8)==0 ){
            zValue = db_conceal(zValue, strlen(zValue));
            blob_appendf(&tktchng, "J%s%s %s\n", zPfx, azField[i], zValue);
          }else{
	    blob_appendf(&tktchng, "J%s%s %#F\n", zPfx,
                         azField[i], strlen(zValue), zValue);
          }
          if( tktEncoding == tktFossilize ){
            free(azValue[i]);
          }
        }
        blob_appendf(&tktchng, "K %s\n", zTktUuid);
................................................................................
        if( rid==0 ){
          fossil_panic("trouble committing ticket: %s", g.zErrMsg);
        }
        manifest_crosslink_begin();
        manifest_crosslink(rid, &tktchng);
        manifest_crosslink_end();
        assert( blob_is_reset(&tktchng) );
	printf("ticket %s succeeded for UID %s\n",
	       (eCmd==set?"set":"add"),zTktUuid);
      }
    }
  }
}







|










|
|
|
|




|
|
|
|
|







 







|

|
|
|
|
|
|
|
|
|




|







 







|
|




1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
....
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
....
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
        }
        getAllTicketFields();
        /* read commandline and assign fields in the azValue array */
        while( i<g.argc ){
          char *zFName;
          char *zFValue;
          int j;
          int append = 0;

          zFName = g.argv[i++];
          if( i==g.argc ){
            fossil_fatal("missing value for '%s'!",zFName);
          }
          zFValue = g.argv[i++];
          if( tktEncoding == tktFossilize ){
            zFValue=mprintf("%s",zFValue);
            defossilize(zFValue);
          }
          append = (zFName[0] == '+');
          if (append){
            zFName++;
          }
          j = fieldId(zFName);
          if( j == -1 ){
            fossil_fatal("unknown field name '%s'!",zFName);
          }else{
            if (append) {
              azAppend[j] = zFValue;
            } else {
              azValue[j] = zFValue;
            }
          }
        }

        /* now add the needed artifacts to the repository */
        blob_zero(&tktchng);
        { /* add the time to the ticket manifest */
          char *zDate;
................................................................................
          zDate = date_in_standard_format("now");
          blob_appendf(&tktchng, "D %s\n", zDate);
          free(zDate);
        }
        /* append defined elements */
        for(i=0; i<nField; i++){
          char *zValue = 0;
          char *zPfx;

          if (azAppend[i] && azAppend[i][0] ){
            zPfx = " +";
            zValue = azAppend[i];
          } else if( azValue[i] && azValue[i][0] ){
            zPfx = " ";
            zValue = azValue[i];
          } else {
            continue;
          }
          if( strncmp(azField[i], "private_", 8)==0 ){
            zValue = db_conceal(zValue, strlen(zValue));
            blob_appendf(&tktchng, "J%s%s %s\n", zPfx, azField[i], zValue);
          }else{
            blob_appendf(&tktchng, "J%s%s %#F\n", zPfx,
                         azField[i], strlen(zValue), zValue);
          }
          if( tktEncoding == tktFossilize ){
            free(azValue[i]);
          }
        }
        blob_appendf(&tktchng, "K %s\n", zTktUuid);
................................................................................
        if( rid==0 ){
          fossil_panic("trouble committing ticket: %s", g.zErrMsg);
        }
        manifest_crosslink_begin();
        manifest_crosslink(rid, &tktchng);
        manifest_crosslink_end();
        assert( blob_is_reset(&tktchng) );
        printf("ticket %s succeeded for UID %s\n",
               (eCmd==set?"set":"add"),zTktUuid);
      }
    }
  }
}