Changes On Branch ticket-711d04b6d8
Not logged in

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

Changes In Branch ticket-711d04b6d8 Excluding Merge-Ins

This is equivalent to a diff from 1048bccf14 to 94e2deef6d

2012-09-27
13:02
Merge the fix for [711d04b6d8577] into trunk. Only bail out of a commit if none of the selected files have changed, rather than if any selected file is unchanged. check-in: 3a5e81cedb user: drh tags: trunk
11:51
Alternative fix for ticket [711d04b6d8577]. Closed-Leaf check-in: 94e2deef6d user: drh tags: ticket-711d04b6d8
08:43
Candidate fix for ticket [711d04b6d8] check-in: eab9f88e7f user: jan.nijtmans tags: ticket-711d04b6d8
01:38
Fixes to the --tk diff option to support unified diff on Windows. check-in: 1048bccf14 user: mistachkin tags: trunk
00:37
Allow unified diff for the --tk diff option. check-in: 5be507df71 user: mistachkin tags: trunk

Changes to src/checkin.c.

  1082   1082     hasChanges = unsaved_changes();
  1083   1083     db_begin_transaction();
  1084   1084     db_record_repository_filename(0);
  1085   1085     if( hasChanges==0 && !isAMerge && !forceFlag ){
  1086   1086       fossil_fatal("nothing has changed");
  1087   1087     }
  1088   1088   
  1089         -  /* If one or more files that were named on the command line have not
  1090         -  ** been modified, bail out now.
         1089  +  /* If none of the files that were named on the command line have
         1090  +  ** been modified, bail out now unless the --force flag is used.
  1091   1091     */
  1092         -  if( g.aCommitFile ){
  1093         -    Blob unmodified;
  1094         -    memset(&unmodified, 0, sizeof(Blob));
  1095         -    blob_init(&unmodified, 0, 0);
  1096         -    db_blob(&unmodified, 
  1097         -      "SELECT pathname FROM vfile"
  1098         -      " WHERE chnged = 0 AND origname IS NULL AND is_selected(id)"
  1099         -    );
  1100         -    if( strlen(blob_str(&unmodified)) ){
  1101         -      fossil_fatal("file %s has not changed", blob_str(&unmodified));
  1102         -    }
         1092  +  if( g.aCommitFile
         1093  +   && !forceFlag
         1094  +   && !db_exists(
         1095  +        "SELECT 1 FROM vfile "
         1096  +        " WHERE is_selected(id)"
         1097  +        "   AND (chnged OR deleted OR rid=0 OR pathname!=origname)")
         1098  +  ){
         1099  +    fossil_fatal("none of the selected files have changed; use -f"
         1100  +                 " or --force.");
  1103   1101     }
  1104   1102   
  1105   1103     /*
  1106   1104     ** Do not allow a commit that will cause a fork unless the --force flag
  1107   1105     ** is used or unless this is a private check-in.
  1108   1106     */
  1109   1107     if( zBranch==0 && forceFlag==0 && g.markPrivate==0 && !is_a_leaf(vid) ){