Fossil

Check-in [e9954e58]
Login

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

Overview
Comment:During commit, instead of using the '--force' option to bypass file type warnings, add a new option '--no-warnings'.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bellon-unicode
Files: files | file ages | folders
SHA1: e9954e588bccc79836192ce559f448c119c59e95
User & Date: mistachkin 2012-11-25 22:31:28
Context
2012-11-26
18:55
Merge commit warning enhancements (i.e. the 'unicode-glob' setting and the '--no-warnings' option to commit). check-in: cb856ccd user: mistachkin tags: trunk
12:23
- Make --force imply --no-warnings - Add --no-warnings to "fossil scrub" and "fossil clean" - Remove "--conflict" option for "fossil merge", use --force for that. Closed-Leaf check-in: 06e1b672 user: jan.nijtmans tags: bellon-unicode-v2
2012-11-25
22:58
Merge commit warning enhancements (i.e. the 'unicode-glob' setting and the '--no-warnings' option to commit). Not yet approved for trunk. Closed-Leaf check-in: 02062c2b user: mistachkin tags: mistake
22:31
During commit, instead of using the '--force' option to bypass file type warnings, add a new option '--no-warnings'. Closed-Leaf check-in: e9954e58 user: mistachkin tags: bellon-unicode
22:01
Adjust check for bypassing Unicode/CR/NL warning. check-in: be15485a user: mistachkin tags: bellon-unicode
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/checkin.c.

1021
1022
1023
1024
1025
1026
1027

1028
1029
1030
1031
1032
1033
1034
....
1059
1060
1061
1062
1063
1064
1065

1066
1067
1068
1069
1070
1071
1072
....
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
  int nvid;              /* Blob-id of the new check-in */
  Blob comment;          /* Check-in comment */
  const char *zComment;  /* Check-in comment */
  Stmt q;                /* Query to find files that have been modified */
  char *zUuid;           /* UUID of the new check-in */
  int noSign = 0;        /* True to omit signing the manifest using GPG */
  int isAMerge = 0;      /* True if checking in a merge */

  int forceFlag = 0;     /* Force a fork */
  int forceDelta = 0;    /* Force a delta-manifest */
  int forceBaseline = 0; /* Force a baseline-manifest */
  int allowConflict = 0; /* Allow unresolve merge conflicts */
  int binaryOk = 0;      /* The --binary-ok flag */
  char *zManifestFile;   /* Name of the manifest file */
  int useCksum;          /* True if checksums should be computed and verified */
................................................................................
  forceBaseline = find_option("baseline",0,0)!=0;
  if( forceDelta && forceBaseline ){
    fossil_fatal("cannot use --delta and --baseline together");
  }
  testRun = find_option("test",0,0)!=0;
  zComment = find_option("comment","m",1);
  forceFlag = find_option("force", "f", 0)!=0;

  zBranch = find_option("branch","b",1);
  zColor = find_option("bgcolor",0,1);
  zBrClr = find_option("branchcolor",0,1);
  binaryOk = find_option("binary-ok",0,0)!=0;
  while( (zTag = find_option("tag",0,1))!=0 ){
    if( zTag[0]==0 ) continue;
    azTag = fossil_realloc((void *)azTag, sizeof(char*)*(nTag+2));
................................................................................
    blob_zero(&content);
    if( file_wd_islink(zFullname) ){
      /* Instead of file content, put link destination path */
      blob_read_link(&content, zFullname);
    }else{
      blob_read_from_file(&content, zFullname);
    }
    if( !forceFlag ){
      /* Do not emit any warnings in force mode. */
      commit_warning(&content, crnlOk, binOk, unicodeOk, zFullname);
    }
    if( chnged==1 && contains_merge_marker(&content) ){
      Blob fname; /* Relative pathname of the file */

      nConflict++;
      file_relative_name(zFullname, &fname, 0);







>







 







>







 







|
|







1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
....
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
....
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
  int nvid;              /* Blob-id of the new check-in */
  Blob comment;          /* Check-in comment */
  const char *zComment;  /* Check-in comment */
  Stmt q;                /* Query to find files that have been modified */
  char *zUuid;           /* UUID of the new check-in */
  int noSign = 0;        /* True to omit signing the manifest using GPG */
  int isAMerge = 0;      /* True if checking in a merge */
  int noWarningFlag = 0; /* True if skipping all warnings */
  int forceFlag = 0;     /* Force a fork */
  int forceDelta = 0;    /* Force a delta-manifest */
  int forceBaseline = 0; /* Force a baseline-manifest */
  int allowConflict = 0; /* Allow unresolve merge conflicts */
  int binaryOk = 0;      /* The --binary-ok flag */
  char *zManifestFile;   /* Name of the manifest file */
  int useCksum;          /* True if checksums should be computed and verified */
................................................................................
  forceBaseline = find_option("baseline",0,0)!=0;
  if( forceDelta && forceBaseline ){
    fossil_fatal("cannot use --delta and --baseline together");
  }
  testRun = find_option("test",0,0)!=0;
  zComment = find_option("comment","m",1);
  forceFlag = find_option("force", "f", 0)!=0;
  noWarningFlag = find_option("no-warnings", 0, 0)!=0;
  zBranch = find_option("branch","b",1);
  zColor = find_option("bgcolor",0,1);
  zBrClr = find_option("branchcolor",0,1);
  binaryOk = find_option("binary-ok",0,0)!=0;
  while( (zTag = find_option("tag",0,1))!=0 ){
    if( zTag[0]==0 ) continue;
    azTag = fossil_realloc((void *)azTag, sizeof(char*)*(nTag+2));
................................................................................
    blob_zero(&content);
    if( file_wd_islink(zFullname) ){
      /* Instead of file content, put link destination path */
      blob_read_link(&content, zFullname);
    }else{
      blob_read_from_file(&content, zFullname);
    }
    /* Do not emit any warnings when they are disabled. */
    if( !noWarningFlag ){
      commit_warning(&content, crnlOk, binOk, unicodeOk, zFullname);
    }
    if( chnged==1 && contains_merge_marker(&content) ){
      Blob fname; /* Relative pathname of the file */

      nConflict++;
      file_relative_name(zFullname, &fname, 0);