Changeset 33980 in project


Ignore:
Timestamp:
04/16/17 15:17:48 (10 days ago)
Author:
sjamaan
Message:

svn-client: for diff, use revision pegged at working copy head so history can be traced correctly.

Location:
release/4/svn-client/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/svn-client/trunk/svn-client.scm

    r33978 r33980  
    342342  set_creds_for_next_command(user, pass);
    343343
    344   err = svn_client_diff6(diff_opts, path, rev1, path, rev2,
    345                          rel_path, depth, FALSE, FALSE, FALSE, FALSE,
    346                          FALSE, FALSE, FALSE, FALSE, APR_LOCALE_CHARSET,
    347                          outstream, NULL, NULL, svn_ctx, tmp_pool);
     344  err = svn_client_diff_peg6(diff_opts, path, &revision_working,
     345                             rev1, rev2, rel_path, depth, FALSE,
     346                             FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
     347                             FALSE, APR_LOCALE_CHARSET,
     348                             outstream, NULL, NULL, svn_ctx, tmp_pool);
    348349  svn_stream_close(outstream);
    349350  apr_file_close(outfile);
  • release/4/svn-client/trunk/tests/run.scm

    r33976 r33980  
    2020
    2121(define (svn-file f) (make-pathname checkout-dir f))
     22(define (repo-file f) (conc "file://" (make-pathname repo-dir f)))
    2223(define (write-svn-file file data)
    2324  (with-output-to-file (svn-file file) (lambda () (print data))))
     
    127128
    128129  (let* ((info (svn-client-info (svn-file "testdir/bar")
     130                                svn-opt-revision-head
     131                                svn-opt-revision-head
     132                                #f user pass))
     133         (rev (svn-info-rev (cadar info)))
     134         (diff-file (svn-diff (svn-file "testdir/bar")
     135                              (make-svn-opt-revision-number (sub1 rev))
     136                              (make-svn-opt-revision-number rev)
     137                              (svn-file "") #t user pass))
     138         (diff (with-input-from-file diff-file read-lines)))
     139    (test "revision just committed is 3" 3 rev)
     140    (delete-file* diff-file)
     141    (test "relative to root" "Index: testdir/bar" (car diff))
     142    (test "Unified context diff file contents of revision just committed"
     143          '("@@ -1 +1 @@"
     144            "-Also just added"
     145            "+Changed")
     146          (cddddr diff)))
     147
     148  ;; Again, but now using the repo root
     149  (let* ((info (svn-client-info (repo-file "testdir/bar")
    129150                                svn-opt-revision-head
    130151                                svn-opt-revision-head
Note: See TracChangeset for help on using the changeset viewer.