Fossil

Check-in [5c420b16]
Login

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

Overview
Comment:The --force flag change should have been on trunk. DRH should follow his own checklists!
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:5c420b169076f5f1e9245d600cea2905f4d795f1
User & Date: drh 2012-08-29 23:34:18
Context
2012-08-30
01:56
Support setting the binary file/product versions in the Win32 resources. check-in: 6b8ef6a4 user: mistachkin tags: trunk
2012-08-29
23:34
The --force flag change should have been on trunk. DRH should follow his own checklists! check-in: 5c420b16 user: drh tags: trunk
23:33
Allow no-op merges with the --force flag. Closed-Leaf check-in: d787bcd4 user: drh tags: msvc-broken
23:17
Update file header comments for the TH1/Tcl integration source code. check-in: 5f22bc09 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/merge.c.

88
89
90
91
92
93
94


95
96
97
98
99
100
101
102
103

104
105
106
107
108
109
110
...
123
124
125
126
127
128
129

130
131
132
133
134
135
136
...
174
175
176
177
178
179
180
181
182

183
184
185
186
187
188
189
**
**   --nochange | -n         Dryrun:  do not actually make any changes; just
**                           show what would have happened.
**
**   --case-sensitive BOOL   Overwrite the case-sensitive setting.  If false,
**                           files whose names differ only in case are taken
**                           to be the same file.


*/
void merge_cmd(void){
  int vid;              /* Current version "V" */
  int mid;              /* Version we are merging from "M" */
  int pid;              /* The pivot version - most recent common ancestor P */
  int detailFlag;       /* True if the --detail option is present */
  int pickFlag;         /* True if the --cherrypick option is present */
  int backoutFlag;      /* True if the --backout option is present */
  int nochangeFlag;     /* True if the --nochange or -n option is present */

  const char *zBinGlob; /* The value of --binary */
  const char *zPivot;   /* The value of --baseline */
  int debugFlag;        /* True if --debug is present */
  int nChng;            /* Number of file name changes */
  int *aChng;           /* An array of file name changes */
  int i;                /* Loop counter */
  int nConflict = 0;    /* Number of conflicts seen */
................................................................................
  undo_capture_command_line();
  detailFlag = find_option("detail",0,0)!=0;
  pickFlag = find_option("cherrypick",0,0)!=0;
  backoutFlag = find_option("backout",0,0)!=0;
  debugFlag = find_option("debug",0,0)!=0;
  zBinGlob = find_option("binary",0,1);
  nochangeFlag = find_option("nochange","n",0)!=0;

  zPivot = find_option("baseline",0,1);
  capture_case_sensitive_option();
  if( g.argc!=3 ){
    usage("VERSION");
  }
  db_must_be_within_tree();
  caseSensitive = filenames_are_case_sensitive();
................................................................................
    int t = pid;
    pid = mid;
    mid = t;
  }
  if( !is_a_version(pid) ){
    fossil_fatal("not a version: record #%d", pid);
  }
  if( mid==pid ){
    fossil_print("This merge is a no-op.\n");

    return;
  }
  if( detailFlag ){
    print_checkin_description(mid, 12, "merge-from:");
    print_checkin_description(pid, 12, "baseline:");
  }
  vfile_check_signature(vid, 1, 0);







>
>









>







 







>







 







|
|
>







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
...
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
...
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
**
**   --nochange | -n         Dryrun:  do not actually make any changes; just
**                           show what would have happened.
**
**   --case-sensitive BOOL   Overwrite the case-sensitive setting.  If false,
**                           files whose names differ only in case are taken
**                           to be the same file.
**
**   --force | -f            Force the merge even if it would be a no-op.
*/
void merge_cmd(void){
  int vid;              /* Current version "V" */
  int mid;              /* Version we are merging from "M" */
  int pid;              /* The pivot version - most recent common ancestor P */
  int detailFlag;       /* True if the --detail option is present */
  int pickFlag;         /* True if the --cherrypick option is present */
  int backoutFlag;      /* True if the --backout option is present */
  int nochangeFlag;     /* True if the --nochange or -n option is present */
  int forceFlag;        /* True if the --force or -f option is present */
  const char *zBinGlob; /* The value of --binary */
  const char *zPivot;   /* The value of --baseline */
  int debugFlag;        /* True if --debug is present */
  int nChng;            /* Number of file name changes */
  int *aChng;           /* An array of file name changes */
  int i;                /* Loop counter */
  int nConflict = 0;    /* Number of conflicts seen */
................................................................................
  undo_capture_command_line();
  detailFlag = find_option("detail",0,0)!=0;
  pickFlag = find_option("cherrypick",0,0)!=0;
  backoutFlag = find_option("backout",0,0)!=0;
  debugFlag = find_option("debug",0,0)!=0;
  zBinGlob = find_option("binary",0,1);
  nochangeFlag = find_option("nochange","n",0)!=0;
  forceFlag = find_option("force","f",0)!=0;
  zPivot = find_option("baseline",0,1);
  capture_case_sensitive_option();
  if( g.argc!=3 ){
    usage("VERSION");
  }
  db_must_be_within_tree();
  caseSensitive = filenames_are_case_sensitive();
................................................................................
    int t = pid;
    pid = mid;
    mid = t;
  }
  if( !is_a_version(pid) ){
    fossil_fatal("not a version: record #%d", pid);
  }
  if( !forceFlag && (mid==pid || vid==pid || mid==vid) ){
    fossil_print("Merge skipped because it is a no-op. "
                 " Use --force to override.\n");
    return;
  }
  if( detailFlag ){
    print_checkin_description(mid, 12, "merge-from:");
    print_checkin_description(pid, 12, "baseline:");
  }
  vfile_check_signature(vid, 1, 0);