~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to subversion/libsvn_repos/delta.c

  • Committer: Package Import Robot
  • Author(s): James McCoy, Peter Samuelson, James McCoy
  • Date: 2014-01-12 19:48:33 UTC
  • mfrom: (0.2.10)
  • Revision ID: package-import@ubuntu.com-20140112194833-w3axfwksn296jn5x
Tags: 1.8.5-1
[ Peter Samuelson ]
* New upstream release.  (Closes: #725787) Rediff patches:
  - Remove apr-abi1 (applied upstream), rename apr-abi2 to apr-abi
  - Remove loosen-sqlite-version-check (shouldn't be needed)
  - Remove java-osgi-metadata (applied upstream)
  - svnmucc prompts for a changelog if none is provided. (Closes: #507430)
  - Remove fix-bdb-version-detection, upstream uses "apu-config --dbm-libs"
  - Remove ruby-test-wc (applied upstream)
  - Fix “svn diff -r N file” when file has svn:mime-type set.
    (Closes: #734163)
  - Support specifying an encoding for mod_dav_svn's environment in which
    hooks are run.  (Closes: #601544)
  - Fix ordering of “svnadmin dump” paths with certain APR versions.
    (Closes: #687291)
  - Provide a better error message when authentication fails with an
    svn+ssh:// URL.  (Closes: #273874)
  - Updated Polish translations.  (Closes: #690815)

[ James McCoy ]
* Remove all traces of libneon, replaced by libserf.
* patches/sqlite_3.8.x_workaround: Upstream fix for wc-queries-test test
  failurse.
* Run configure with --with-apache-libexecdir, which allows removing part of
  patches/rpath.
* Re-enable auth-test as upstream has fixed the problem of picking up
  libraries from the environment rather than the build tree.
  (Closes: #654172)
* Point LD_LIBRARY_PATH at the built auth libraries when running the svn
  command during the build.  (Closes: #678224)
* Add a NEWS entry describing how to configure mod_dav_svn to understand
  UTF-8.  (Closes: #566148)
* Remove ancient transitional package, libsvn-ruby.
* Enable compatibility with Sqlite3 versions back to Wheezy.
* Enable hardening flags.  (Closes: #734918)
* patches/build-fixes: Enable verbose build logs.
* Build against the default ruby version.  (Closes: #722393)

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
#include <apr_hash.h>
26
26
 
 
27
#include "svn_hash.h"
27
28
#include "svn_types.h"
28
29
#include "svn_delta.h"
29
30
#include "svn_fs.h"
506
507
                                           pool));
507
508
 
508
509
          /* Transmit the committed-date. */
509
 
          committed_date = apr_hash_get(r_props, SVN_PROP_REVISION_DATE,
510
 
                                        APR_HASH_KEY_STRING);
 
510
          committed_date = svn_hash_gets(r_props, SVN_PROP_REVISION_DATE);
511
511
          if (committed_date || source_path)
512
512
            {
513
513
              SVN_ERR(change_fn(c, object, SVN_PROP_ENTRY_COMMITTED_DATE,
515
515
            }
516
516
 
517
517
          /* Transmit the last-author. */
518
 
          last_author = apr_hash_get(r_props, SVN_PROP_REVISION_AUTHOR,
519
 
                                     APR_HASH_KEY_STRING);
 
518
          last_author = svn_hash_gets(r_props, SVN_PROP_REVISION_AUTHOR);
520
519
          if (last_author || source_path)
521
520
            {
522
521
              SVN_ERR(change_fn(c, object, SVN_PROP_ENTRY_LAST_AUTHOR,
629
628
  if (!*changed_p)
630
629
    return SVN_NO_ERROR;
631
630
 
632
 
  /* From this point on, assume things haven't changed. */
 
631
  /* If the SHA1 checksums match for these things, we'll claim they
 
632
     have the same contents.  (We don't give quite as much weight to
 
633
     MD5 checksums.)  */
 
634
  SVN_ERR(svn_fs_file_checksum(&checksum1, svn_checksum_sha1,
 
635
                               root1, path1, FALSE, pool));
 
636
  SVN_ERR(svn_fs_file_checksum(&checksum2, svn_checksum_sha1,
 
637
                               root2, path2, FALSE, pool));
 
638
  if (checksum1 && checksum2)
 
639
    {
 
640
      *changed_p = !svn_checksum_match(checksum1, checksum2);
 
641
      return SVN_NO_ERROR;
 
642
    }
 
643
 
 
644
  /* From this point on, our default answer is "Nothing's changed". */
633
645
  *changed_p = FALSE;
634
646
 
635
 
  /* So, things have changed.  But we need to know if the two sets of
636
 
     file contents are actually different.  If they have differing
637
 
     sizes, then we know they differ. */
 
647
  /* Different filesizes means the contents are different. */
638
648
  SVN_ERR(svn_fs_file_length(&size1, root1, path1, pool));
639
649
  SVN_ERR(svn_fs_file_length(&size2, root2, path2, pool));
640
650
  if (size1 != size2)
643
653
      return SVN_NO_ERROR;
644
654
    }
645
655
 
646
 
  /* Same sizes, huh?  Well, if their checksums differ, we know they
647
 
     differ. */
 
656
  /* Different MD5 checksums means the contents are different. */
648
657
  SVN_ERR(svn_fs_file_checksum(&checksum1, svn_checksum_md5, root1, path1,
649
658
                               FALSE, pool));
650
659
  SVN_ERR(svn_fs_file_checksum(&checksum2, svn_checksum_md5, root2, path2,
655
664
      return SVN_NO_ERROR;
656
665
    }
657
666
 
658
 
  /* Same sizes, same checksums.  Chances are reallllly good that they
659
 
     don't differ, but to be absolute sure, we need to compare bytes. */
 
667
  /* And finally, different contents means the ... uh ... contents are
 
668
     different. */
660
669
  SVN_ERR(svn_fs_file_contents(&stream1, root1, path1, pool));
661
670
  SVN_ERR(svn_fs_file_contents(&stream2, root2, path2, pool));
662
 
 
663
671
  SVN_ERR(svn_stream_contents_same2(&same, stream1, stream2, pool));
664
 
 
665
672
  *changed_p = !same;
666
673
 
667
674
  return SVN_NO_ERROR;
1012
1019
            }
1013
1020
 
1014
1021
          /*  Remove the entry from the source_hash. */
1015
 
          apr_hash_set(s_entries, key, APR_HASH_KEY_STRING, NULL);
 
1022
          svn_hash_sets(s_entries, key, NULL);
1016
1023
        }
1017
1024
      else
1018
1025
        {