Fossil

Check-in [afef5fb5]
Login

Check-in [afef5fb5]

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

Overview
Comment:Restore the ability to use amend outside an open check-out disabled by [8c22e1bbcd8ec048]. Only allow interactive edits within an open check-out. Perhaps unixTempFileDir() could be used to locate a suitable TMP location for the edit in the event that there is not an open-checkout.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | amend-regress
Files: files | file ages | folders
SHA3-256: afef5fb5fc49fdd92fa497a3394153a2c3a36c029cd685062951af074d620290
User & Date: andybradford 2017-05-26 03:46:44
Context
2017-05-26
05:55
Remove the restriction entirely for editing a comment only in the working check-out directory and choose an appropriate temporary file if no working check-out is available instead. (check-in: 74df777e user: andybradford tags: amend-regress)
03:46
Restore the ability to use amend outside an open check-out disabled by [8c22e1bbcd8ec048]. Only allow interactive edits within an open check-out. Perhaps unixTempFileDir() could be used to locate a suitable TMP location for the edit in the event that there is not an open-checkout. (check-in: afef5fb5 user: andybradford tags: amend-regress)
02:27
Fix minor grammar bug in open check-out required error message. (check-in: 55e24875 user: andybradford tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/checkin.c.

1200
1201
1202
1203
1204
1205
1206


1207
1208
1209
1210
1211
1212
1213
       "# and because no comment was specified using the \"-m\" or \"-M\"\n"
       "# command-line options, you will need to enter the comment below.\n"
       "# Type \".\" on a line by itself when you are done:\n", -1);
    zFile = mprintf("-");
  }else{
    Blob fname;
    blob_zero(&fname);


    assert( g.zLocalRoot!=0 );
    file_relative_name(g.zLocalRoot, &fname, 1);
    zFile = db_text(0, "SELECT '%qci-comment-'||hex(randomblob(6))||'.txt'",
                    blob_str(&fname));
    blob_reset(&fname);
  }
#if defined(_WIN32)







>
>







1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
       "# and because no comment was specified using the \"-m\" or \"-M\"\n"
       "# command-line options, you will need to enter the comment below.\n"
       "# Type \".\" on a line by itself when you are done:\n", -1);
    zFile = mprintf("-");
  }else{
    Blob fname;
    blob_zero(&fname);
    if ( g.zRepositoryOption )
      fossil_fatal("interactive edits must be done within an open check-out");
    assert( g.zLocalRoot!=0 );
    file_relative_name(g.zLocalRoot, &fname, 1);
    zFile = db_text(0, "SELECT '%qci-comment-'||hex(randomblob(6))||'.txt'",
                    blob_str(&fname));
    blob_reset(&fname);
  }
#if defined(_WIN32)

Changes to src/info.c.

2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
  zNewDate = find_option("date",0,1);
  zNewUser = find_option("author",0,1);
  pzNewTags = find_repeatable_option("tag",0,&nTags);
  pzCancelTags = find_repeatable_option("cancel",0,&nCancels);
  fClose = find_option("close",0,0)!=0;
  fHide = find_option("hide",0,0)!=0;
  zChngTime = find_option("chngtime",0,1);
  db_must_be_within_tree();
  user_select();
  verify_all_options();
  if( g.argc<3 || g.argc>=4 ) usage(AMEND_USAGE_STMT);
  rid = name_to_typed_rid(g.argv[2], "ci");
  if( rid==0 && !is_a_version(rid) ) fossil_fatal("no such check-in");
  zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
  if( zUuid==0 ) fossil_fatal("Unable to find UUID");







|







2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
  zNewDate = find_option("date",0,1);
  zNewUser = find_option("author",0,1);
  pzNewTags = find_repeatable_option("tag",0,&nTags);
  pzCancelTags = find_repeatable_option("cancel",0,&nCancels);
  fClose = find_option("close",0,0)!=0;
  fHide = find_option("hide",0,0)!=0;
  zChngTime = find_option("chngtime",0,1);
  db_find_and_open_repository(0,0);
  user_select();
  verify_all_options();
  if( g.argc<3 || g.argc>=4 ) usage(AMEND_USAGE_STMT);
  rid = name_to_typed_rid(g.argv[2], "ci");
  if( rid==0 && !is_a_version(rid) ) fossil_fatal("no such check-in");
  zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
  if( zUuid==0 ) fossil_fatal("Unable to find UUID");