Fossil

Diff
Login

Differences From Artifact [3ed67f9d2a]:

To Artifact [20ae250737]:


340
341
342
343
344
345
346
347

348
349
350
351
352
353
354



355
356
357
358
359
360
361
340
341
342
343
344
345
346

347
348
349
350
351
352
353

354
355
356
357
358
359
360
361
362
363







-
+






-
+
+
+







  blob_reset(&file);
  return rc;
}

/*
** COMMAND: 3-way-merge*
**
** Usage: %fossil 3-way-merge BASELINE V1 V2 MERGED
** Usage: %fossil 3-way-merge ?--? BASELINE V1 V2 MERGED
**
** Inputs are files BASELINE, V1, and V2.  The file MERGED is generated
** as output.
**
** BASELINE is a common ancestor of two files V1 and V2 that have diverging
** edits.  The generated output file MERGED is the combination of all
** changes in both V1 and V2.
** changes in both V1 and V2. The -- flag may be used one time, anywhere
** in the argument list, to mean that all following arguments should be
** treated as filenames even if they look like flags.
**
** This command has no effect on the Fossil repository.  It is a utility
** command made available for the convenience of users.  This command can
** be used, for example, to help import changes from an upstream project.
**
** Suppose an upstream project has a file named "Xup.c" which is imported
** with modifications to the local project as "Xlocal.c".  Suppose further
369
370
371
372
373
374
375
376

377
378
379
380
381
382
383
371
372
373
374
375
376
377

378
379
380
381
382
383
384
385







-
+







**
*/
void delta_3waymerge_cmd(void){
  Blob pivot, v1, v2, merged;
  int nConflict;

  /* We should be done with options.. */
  verify_all_options();
  verify_all_options2();

  if( g.argc!=6 ){
    usage("PIVOT V1 V2 MERGED");
  }
  if( blob_read_from_file(&pivot, g.argv[2], ExtFILE)<0 ){
    fossil_fatal("cannot read %s", g.argv[2]);
  }