~ubuntu-branches/debian/experimental/subversion/experimental

« back to all changes in this revision

Viewing changes to subversion/libsvn_repos/rev_hunt.c

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2015-07-16 19:39:54 UTC
  • mfrom: (0.1.13)
  • Revision ID: package-import@ubuntu.com-20150716193954-6ueu2w62h4h556xh
Tags: 1.9.0~rc3-1
* New upstream pre-release.
* Point the Vcs-* URLs at the right directory

Show diffs side-by-side

added added

removed removed

Lines of Context:
1332
1332
  apr_hash_t *last_props;
1333
1333
  const char *last_path;
1334
1334
  svn_fs_root_t *last_root;
 
1335
  svn_boolean_t include_merged_revisions;
1335
1336
};
1336
1337
 
1337
1338
/* Send PATH_REV to HANDLER and HANDLER_BATON, using information provided by
1369
1370
  SVN_ERR(svn_prop_diffs(&prop_diffs, props, sb->last_props,
1370
1371
                         sb->iterpool));
1371
1372
 
1372
 
  /* Check if the contents *may* have changed. (Allow false positives,
1373
 
     for now, as the blame implementation currently depends on them.) */
1374
 
  /* Special case: In the first revision, we always provide a delta. */
1375
 
  if (sb->last_root)
1376
 
    SVN_ERR(svn_fs_contents_different(&contents_changed, sb->last_root,
1377
 
                                      sb->last_path, root, path_rev->path,
1378
 
                                      sb->iterpool));
 
1373
  /* Check if the contents *may* have changed. */
 
1374
  if (! sb->last_root)
 
1375
    {
 
1376
      /* Special case: In the first revision, we always provide a delta. */
 
1377
      contents_changed = TRUE;
 
1378
    }
 
1379
  else if (sb->include_merged_revisions
 
1380
           && strcmp(sb->last_path, path_rev->path))
 
1381
    {
 
1382
      /* ### This is a HACK!!!
 
1383
       * Blame -g, in older clients anyways, relies on getting a notification
 
1384
       * whenever the path changes - even if there was no content change.
 
1385
       *
 
1386
       * TODO: A future release should take an extra parameter and depending
 
1387
       * on that either always send a text delta or only send it if there
 
1388
       * is a difference. */
 
1389
      contents_changed = TRUE;
 
1390
    }
1379
1391
  else
1380
 
    contents_changed = TRUE;
 
1392
    {
 
1393
      /* Did the file contents actually change?
 
1394
       * It could e.g. be a property-only change. */
 
1395
      SVN_ERR(svn_fs_contents_different(&contents_changed, sb->last_root,
 
1396
                                        sb->last_path, root, path_rev->path,
 
1397
                                        sb->iterpool));
 
1398
    }
1381
1399
 
1382
1400
  /* We have all we need, give to the handler. */
1383
1401
  SVN_ERR(handler(handler_baton, path_rev->path, path_rev->revnum,
1446
1464
  last_pool = svn_pool_create(scratch_pool);
1447
1465
  sb.iterpool = svn_pool_create(scratch_pool);
1448
1466
  sb.last_pool = svn_pool_create(scratch_pool);
 
1467
  sb.include_merged_revisions = FALSE;
1449
1468
 
1450
1469
  /* We want the first txdelta to be against the empty file. */
1451
1470
  sb.last_root = NULL;
1601
1620
  /* Create an empty hash table for the first property diff. */
1602
1621
  sb.last_props = apr_hash_make(sb.last_pool);
1603
1622
 
 
1623
  /* Inform send_path_revision() whether workarounds / special behavior
 
1624
   * may be needed. */
 
1625
  sb.include_merged_revisions = include_merged_revisions;
1604
1626
 
1605
1627
  /* Get the revisions we are interested in. */
1606
1628
  duplicate_path_revs = apr_hash_make(scratch_pool);