Fossil

Check-in [0cbdf058]
Login

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

Overview
Comment:Provide additional usage feedback when wrong arguments are supplied per suggestion on ML. Also provide minimal output showing amended checkin.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | check-in-edit
Files: files | file ages | folders
SHA1:0cbdf0586ddab83e7158750fc59ce9508c7f68fc
User & Date: andybradford 2015-07-17 02:44:11
Context
2015-07-18
02:29
Add --edit-commit to edit commit message in EDITOR. This option has precedence over --commit. check-in: fbf7b54e user: andybradford tags: check-in-edit
2015-07-17
02:44
Provide additional usage feedback when wrong arguments are supplied per suggestion on ML. Also provide minimal output showing amended checkin. check-in: 0cbdf058 user: andybradford tags: check-in-edit
2015-07-16
05:03
Merge in updates from trunk. check-in: 870c2088 user: andybradford tags: check-in-edit
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/info.c.

2702
2703
2704
2705
2706
2707
2708

2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
....
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
....
2764
2765
2766
2767
2768
2769
2770

2771
2772
2773
2774
2775
2776
2777
....
2807
2808
2809
2810
2811
2812
2813

2814
  @ <input type="submit" name="cancel" value="Cancel" />
  @ </td></tr>
  @ </table>
  @ </div></form>
  style_footer();
}


/*
** COMMAND: amend
**
** Usage: %fossil amend UUID ?OPTIONS?
**
** Amend the tags on check-in UUID to change how it displays in the timeline.
**
** Options:
**
**    --euser USER            Make USER the check-in user
**    --comment COMMENT       Make COMMENT the check-in comment
................................................................................
  int fPropagateColor;          /* True if color propagates before amend */
  int fNewPropagateColor = 0;   /* True if color propagates after amend */
  const char *zChngTime;        /* The change time on the control artifact */
  const char *zUuid;
  Blob ctrl;
  char *zNow;

  if( g.argc<3 ) usage("UUID ?OPTIONS?");
  zNewComment = find_option("comment",0,1);
  zNewBranch = find_option("branch",0,1);
  zNewColor = find_option("bgcolor",0,1);
  zNewBrColor = find_option("branchcolor",0,1);
  if( zNewBrColor ){
    zNewColor = zNewBrColor;
    fNewPropagateColor = 1;
................................................................................
  zCancelTag = find_option("cancel",0,1);
  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();

  rid = name_to_typed_rid(g.argv[2], "ci");
  zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
  zComment = db_text(0, "SELECT coalesce(ecomment,comment)"
                        "  FROM event WHERE objid=%d", rid);
  if( zComment==0 || zComment[0]==0 ) fossil_fatal("No comment on rid %d", rid);
  zUser = db_text(0, "SELECT coalesce(euser,user)"
                     "  FROM event WHERE objid=%d", rid);
................................................................................
  }
  if( zNewTag && zNewTag[0] ) add_tag(zNewTag);
  if( zCancelTag && zCancelTag[0] ) cancel_tag(rid,zCancelTag);
  if( fHide ) hide_branch();
  if( fClose ) close_leaf(rid);
  if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch);
  apply_newtags(&ctrl, rid, zUuid);

}







>



|







 







|







 







>







 







>

2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
....
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
....
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
....
2809
2810
2811
2812
2813
2814
2815
2816
2817
  @ <input type="submit" name="cancel" value="Cancel" />
  @ </td></tr>
  @ </table>
  @ </div></form>
  style_footer();
}

#define AMEND_USAGE_STMT "UUID OPTION ?OPTION ...?"
/*
** COMMAND: amend
**
** Usage: %fossil amend UUID OPTION ?OPTION ...?
**
** Amend the tags on check-in UUID to change how it displays in the timeline.
**
** Options:
**
**    --euser USER            Make USER the check-in user
**    --comment COMMENT       Make COMMENT the check-in comment
................................................................................
  int fPropagateColor;          /* True if color propagates before amend */
  int fNewPropagateColor = 0;   /* True if color propagates after amend */
  const char *zChngTime;        /* The change time on the control artifact */
  const char *zUuid;
  Blob ctrl;
  char *zNow;

  if( g.argc==3 ) usage(AMEND_USAGE_STMT);
  zNewComment = find_option("comment",0,1);
  zNewBranch = find_option("branch",0,1);
  zNewColor = find_option("bgcolor",0,1);
  zNewBrColor = find_option("branchcolor",0,1);
  if( zNewBrColor ){
    zNewColor = zNewBrColor;
    fNewPropagateColor = 1;
................................................................................
  zCancelTag = find_option("cancel",0,1);
  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");
  zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
  zComment = db_text(0, "SELECT coalesce(ecomment,comment)"
                        "  FROM event WHERE objid=%d", rid);
  if( zComment==0 || zComment[0]==0 ) fossil_fatal("No comment on rid %d", rid);
  zUser = db_text(0, "SELECT coalesce(euser,user)"
                     "  FROM event WHERE objid=%d", rid);
................................................................................
  }
  if( zNewTag && zNewTag[0] ) add_tag(zNewTag);
  if( zCancelTag && zCancelTag[0] ) cancel_tag(rid,zCancelTag);
  if( fHide ) hide_branch();
  if( fClose ) close_leaf(rid);
  if( zNewBranch && zNewBranch[0] ) change_branch(rid,zNewBranch);
  apply_newtags(&ctrl, rid, zUuid);
  show_common_info(rid, "uuid:", 1, 0);
}