Changes On Branch bellon-unicode-v2
Not logged in

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

Changes In Branch bellon-unicode-v2 Excluding Merge-Ins

This is equivalent to a diff from e9954e588b to 06e1b67270

2012-11-26
18:55
Merge commit warning enhancements (i.e. the 'unicode-glob' setting and the '--no-warnings' option to commit). check-in: cb856ccdb1 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: 06e1b67270 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: 02062c2b6a 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: e9954e588b user: mistachkin tags: bellon-unicode
22:01
Adjust check for bypassing Unicode/CR/NL warning. check-in: be15485aa6 user: mistachkin tags: bellon-unicode

Changes to src/checkin.c.

   391    391   **
   392    392   ** The GLOBPATTERN is a comma-separated list of GLOB expressions for
   393    393   ** files that are ignored.  The GLOBPATTERN specified by the "ignore-glob"
   394    394   ** is used if the --ignore option is omitted.
   395    395   **
   396    396   ** Options:
   397    397   **    --dotfiles       include files beginning with a dot (".")
   398         -**    --force          Remove files without prompting
          398  +**    --no-warnings    Remove files without prompting
   399    399   **    --ignore <CSG>   ignore files matching patterns from the
   400    400   **                     comma separated list of glob patterns.
   401    401   **    --temp           Remove only Fossil-generated temporary files
   402    402   **
   403    403   ** See also: addremove, extra, status
   404    404   */
   405    405   void clean_cmd(void){
   406         -  int allFlag;
          406  +  int allFlag, bForce;
   407    407     unsigned scanFlags = 0;
   408    408     const char *zIgnoreFlag;
   409    409     Blob path, repo;
   410    410     Stmt q;
   411    411     int n;
   412    412     Glob *pIgnore;
   413    413     int testFlag = 0;
   414    414   
   415         -  allFlag = find_option("force","f",0)!=0;
          415  +  bForce = find_option("force","f",0)!=0;
          416  +  allFlag = find_option("no-warnings", 0, 0)!=0 || bForce;
   416    417     if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL;
   417    418     if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP;
   418    419     zIgnoreFlag = find_option("ignore",0,1);
   419    420     testFlag = find_option("test",0,0)!=0;
   420    421     db_must_be_within_tree();
   421    422     if( zIgnoreFlag==0 ){
   422    423       zIgnoreFlag = db_get("ignore-glob", 0);
................................................................................
  1000   1001   ** Options:
  1001   1002   **    --baseline                 use a baseline manifest in the commit process
  1002   1003   **    --bgcolor COLOR            apply COLOR to this one check-in only
  1003   1004   **    --branch NEW-BRANCH-NAME   check in to this new branch
  1004   1005   **    --branchcolor COLOR        apply given COLOR to the branch
  1005   1006   **    --comment|-m COMMENT-TEXT  use COMMENT-TEXT as commit comment
  1006   1007   **    --delta                    use a delta manifest in the commit process
  1007         -**    --force|-f                 allow forking with this commit
         1008  +**    --force|-f                 allow forking/unresolved merge conflicts with this commit
  1008   1009   **    --message-file|-M FILE     read the commit comment from given file
  1009   1010   **    --nosign                   do not attempt to sign this commit with gpg
         1011  +**    --no-warnings              do not warn about anything
  1010   1012   **    --private                  do not sync changes and their descendants
  1011   1013   **    --tag TAG-NAME             assign given tag TAG-NAME to the checkin
  1012         -**    --conflict                 allow unresolved merge conflicts
  1013   1014   **    --binary-ok                do not warn about committing binary files
  1014   1015   **
  1015   1016   ** See also: branch, changes, checkout, extra, sync
  1016   1017   */
  1017   1018   void commit_cmd(void){
  1018   1019     int hasChanges;        /* True if unsaved changes exist */
  1019   1020     int vid;               /* blob-id of parent version */
................................................................................
  1022   1023     Blob comment;          /* Check-in comment */
  1023   1024     const char *zComment;  /* Check-in comment */
  1024   1025     Stmt q;                /* Query to find files that have been modified */
  1025   1026     char *zUuid;           /* UUID of the new check-in */
  1026   1027     int noSign = 0;        /* True to omit signing the manifest using GPG */
  1027   1028     int isAMerge = 0;      /* True if checking in a merge */
  1028   1029     int noWarningFlag = 0; /* True if skipping all warnings */
  1029         -  int forceFlag = 0;     /* Force a fork */
         1030  +  int forceFlag = 0;     /* Force a fork/commit with unresolved merge conflicts */
  1030   1031     int forceDelta = 0;    /* Force a delta-manifest */
  1031   1032     int forceBaseline = 0; /* Force a baseline-manifest */
  1032         -  int allowConflict = 0; /* Allow unresolve merge conflicts */
  1033   1033     int binaryOk = 0;      /* The --binary-ok flag */
  1034   1034     char *zManifestFile;   /* Name of the manifest file */
  1035   1035     int useCksum;          /* True if checksums should be computed and verified */
  1036   1036     int outputManifest;    /* True to output "manifest" and "manifest.uuid" */
  1037   1037     int testRun;           /* True for a test run.  Debugging only */
  1038   1038     const char *zBranch;   /* Create a new branch with this name */
  1039   1039     const char *zBrClr;    /* Set background color when branching */
................................................................................
  1060   1060     forceBaseline = find_option("baseline",0,0)!=0;
  1061   1061     if( forceDelta && forceBaseline ){
  1062   1062       fossil_fatal("cannot use --delta and --baseline together");
  1063   1063     }
  1064   1064     testRun = find_option("test",0,0)!=0;
  1065   1065     zComment = find_option("comment","m",1);
  1066   1066     forceFlag = find_option("force", "f", 0)!=0;
  1067         -  noWarningFlag = find_option("no-warnings", 0, 0)!=0;
         1067  +  noWarningFlag = find_option("no-warnings", 0, 0)!=0 || forceFlag;
  1068   1068     zBranch = find_option("branch","b",1);
  1069   1069     zColor = find_option("bgcolor",0,1);
  1070   1070     zBrClr = find_option("branchcolor",0,1);
  1071   1071     binaryOk = find_option("binary-ok",0,0)!=0;
  1072   1072     while( (zTag = find_option("tag",0,1))!=0 ){
  1073   1073       if( zTag[0]==0 ) continue;
  1074   1074       azTag = fossil_realloc((void *)azTag, sizeof(char*)*(nTag+2));
................................................................................
  1079   1079     if( find_option("private",0,0) ){
  1080   1080       g.markPrivate = 1;
  1081   1081       if( zBranch==0 ) zBranch = "private";
  1082   1082       if( zBrClr==0 && zColor==0 ) zBrClr = "#fec084";  /* Orange */
  1083   1083     }
  1084   1084     zDateOvrd = find_option("date-override",0,1);
  1085   1085     zUserOvrd = find_option("user-override",0,1);
  1086         -  allowConflict = find_option("conflict",0,0)!=0;
  1087   1086     db_must_be_within_tree();
  1088   1087     noSign = db_get_boolean("omitsign", 0)|noSign;
  1089   1088     if( db_get_boolean("clearsign", 0)==0 ){ noSign = 1; }
  1090   1089     useCksum = db_get_boolean("repo-cksum", 1);
  1091   1090     outputManifest = db_get_boolean("manifest", 0);
  1092   1091     verify_all_options();
  1093   1092   
................................................................................
  1187   1186       fossil_fatal("no such user: %s", g.zLogin);
  1188   1187     }
  1189   1188   
  1190   1189     hasChanges = unsaved_changes();
  1191   1190     db_begin_transaction();
  1192   1191     db_record_repository_filename(0);
  1193   1192     if( hasChanges==0 && !isAMerge && !forceFlag ){
  1194         -    fossil_fatal("nothing has changed");
         1193  +    fossil_fatal("nothing has changed; use -f or --force.");
  1195   1194     }
  1196   1195   
  1197   1196     /* If none of the files that were named on the command line have
  1198   1197     ** been modified, bail out now unless the --force flag is used.
  1199   1198     */
  1200   1199     if( g.aCommitFile
  1201   1200      && !forceFlag
................................................................................
  1308   1307       if( rid>0 ){
  1309   1308         content_deltify(rid, nrid, 0);
  1310   1309       }
  1311   1310       db_multi_exec("UPDATE vfile SET mrid=%d, rid=%d WHERE id=%d", nrid,nrid,id);
  1312   1311       db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nrid);
  1313   1312     }
  1314   1313     db_finalize(&q);
  1315         -  if( nConflict && !allowConflict ){
  1316         -    fossil_fatal("abort due to unresolve merge conflicts");
         1314  +  if( nConflict && !forceFlag ){
         1315  +    fossil_fatal("abort due to unresolved merge conflicts; use -f"
         1316  +                 " or --force.");
  1317   1317     }
  1318   1318   
  1319   1319     /* Create the new manifest */
  1320   1320     if( blob_size(&comment)==0 ){
  1321   1321       blob_append(&comment, "(no comment)", -1);
  1322   1322     }
  1323   1323     if( forceDelta ){

Changes to src/rebuild.c.

   580    580     db_multi_exec(
   581    581       "REPLACE INTO config(name,value,mtime) VALUES('content-schema','%s',now());"
   582    582       "REPLACE INTO config(name,value,mtime) VALUES('aux-schema','%s',now());",
   583    583       CONTENT_SCHEMA, AUX_SCHEMA
   584    584     );
   585    585     if( errCnt && !forceFlag ){
   586    586       fossil_print(
   587         -      "%d errors. Rolling back changes. Use --force to force a commit.\n",
          587  +      "%d errors. Rolling back changes. Use -f or --force to force a commit.\n",
   588    588         errCnt
   589    589       );
   590    590       db_end_transaction(1);
   591    591     }else{
   592    592       if( runCompress ){
   593    593         fossil_print("Extra delta compression... "); fflush(stdout);
   594    594         extra_deltification();
................................................................................
   765    765   ** This command permanently deletes the scrubbed information. THE EFFECTS
   766    766   ** OF THIS COMMAND ARE IRREVERSIBLE. USE WITH CAUTION!
   767    767   **
   768    768   ** The user is prompted to confirm the scrub unless the --force option
   769    769   ** is used.
   770    770   **
   771    771   ** Options:
   772         -**   --force     do not prompt for confirmation
   773         -**   --private   only private branches are removed from the repository
   774         -**   --verily    scrub real thoroughly (see above)
          772  +**   --no-warnings do not prompt for confirmation
          773  +**   --private     only private branches are removed from the repository
          774  +**   --verily      scrub real thoroughly (see above)
   775    775   */
   776    776   void scrub_cmd(void){
   777    777     int bVerily = find_option("verily",0,0)!=0;
   778    778     int bForce = find_option("force", "f", 0)!=0;
          779  +  int bNoWarning = find_option("no-warnings", 0, 0)!=0 || bForce;
   779    780     int privateOnly = find_option("private",0,0)!=0;
   780    781     int bNeedRebuild = 0;
   781    782     db_find_and_open_repository(OPEN_ANY_SCHEMA, 2);
   782         -  if( !bForce ){
          783  +  if( !bNoWarning ){
   783    784       Blob ans;
   784    785       char cReply;
   785    786       blob_zero(&ans);
   786    787       prompt_user(
   787    788            "Scrubbing the repository will permanently delete information.\n"
   788    789            "Changes cannot be undone.  Continue (y/N)? ", &ans);
   789    790       cReply = blob_str(&ans)[0];