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

« back to all changes in this revision

Viewing changes to subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2015-08-07 21:32:47 UTC
  • mfrom: (0.2.15) (4.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20150807213247-ozyewtmgsr6tkewl
Tags: 1.9.0-1
* Upload to unstable
* New upstream release.
  + Security fixes
    - CVE-2015-3184: Mixed anonymous/authenticated path-based authz with
      httpd 2.4
    - CVE-2015-3187: svn_repos_trace_node_locations() reveals paths hidden
      by authz
* Add >= 2.7 requirement for python-all-dev Build-Depends, needed to run
  tests.
* Remove Build-Conflicts against ruby-test-unit.  (Closes: #791844)
* Remove patches/apache_module_dependency in favor of expressing the
  dependencies in authz_svn.load/dav_svn.load.
* Build-Depend on apache2-dev (>= 2.4.16) to ensure ap_some_authn_required()
  is available when building mod_authz_svn and Depend on apache2-bin (>=
  2.4.16) for runtime support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
    public Version getVersion();
52
52
 
53
53
    /**
 
54
     * @return Runtime version information about the loaded libsvn_client.
 
55
     */
 
56
    public RuntimeVersion getRuntimeVersion();
 
57
 
 
58
    /**
54
59
     * @return Extended version information about the underlying
55
60
     * native libraries and operating system.
56
61
     */
74
79
    public boolean isAdminDirectory(String name);
75
80
 
76
81
    /**
77
 
     * List a directory or file of the working copy.
 
82
     * Return the status of the working copy and maybe repository.
78
83
     *
79
84
     * @param path        Path to explore.
80
85
     * @param depth       How deep to recurse into subdirectories.
81
86
     * @param onServer    Request status information from server.
 
87
     * @param onDisk      Check the working copy for local modifications.
 
88
     *                    A value of <code>false</code> only
 
89
     *                    has effect when <code>onServer</code> is
 
90
     *                    <code>true</code>.
82
91
     * @param getAll      get status for uninteresting (unchanged) files.
83
92
     * @param noIgnore    get status for normaly ignored files and directories.
84
93
     * @param ignoreExternals if externals are ignored during status
 
94
     * @param depthAsSticky When set, interpret <code>depth</code> as
 
95
     *                      the ambient depth of the working copy.
85
96
     * @param changelists changelists to filter by
86
 
     */
 
97
     * @since 1.9
 
98
     */
 
99
    void status(String path, Depth depth,
 
100
                boolean onServer, boolean ignoreLocal,
 
101
                boolean getAll, boolean noIgnore,
 
102
                boolean ignoreExternals, boolean depthAsSticky,
 
103
                Collection<String> changelists, StatusCallback callback)
 
104
            throws ClientException;
 
105
 
 
106
    /**
 
107
     * Return information about the status of the working copy and
 
108
     * maybe repository.
 
109
     * <p>
 
110
     * Behaves like the 1.9 version with
 
111
     *     <code>onDisk = true</code> and
 
112
     *     <code>depthAsSticky = false</code>.
 
113
     * @deprecated
 
114
     */
 
115
    @Deprecated
87
116
    void status(String path, Depth depth, boolean onServer,
88
117
                boolean getAll, boolean noIgnore, boolean ignoreExternals,
89
118
                Collection<String> changelists, StatusCallback callback)
131
160
     * accepted by the command-line client.
132
161
     * @param prompt the callback interface
133
162
     */
 
163
    void setPrompt(AuthnCallback prompt);
 
164
 
 
165
    /**
 
166
     * Register callback interface to supply username and password on demand.
 
167
     * This callback can also be used to provide theequivalent of the
 
168
     * <code>--no-auth-cache</code> and <code>--non-interactive</code> arguments
 
169
     * accepted by the command-line client.
 
170
     * @param prompt the callback interface
 
171
     */
 
172
    @SuppressWarnings("deprecation")
134
173
    void setPrompt(UserPasswordCallback prompt);
135
174
 
136
175
    /**
 
176
     * Set callbacks for ra_svn tunnel handling.
 
177
     * @since 1.9
 
178
     */
 
179
    void setTunnelAgent(TunnelAgent tunnelAgent);
 
180
 
 
181
    /**
137
182
     * Retrieve the log messages for an item.
138
183
     * @param path          path or url to get the log message for.
139
184
     * @param pegRevision   revision to interpret path
210
255
            throws ClientException;
211
256
 
212
257
    /**
 
258
     * Reverts set of files or directories to a pristine state.
 
259
     * @param path      A set of paths to revert.
 
260
     * @param depth     the depth to recurse into subdirectories
 
261
     * @param changelists changelists to filter by
 
262
     * @param clearChangelists If set, will clear changelist association
 
263
     *                         from the reverted paths.
 
264
     * @param metadataOnly Revert just the metadata (including conflict data)
 
265
     *                     and not the working files/dirs
 
266
     * @throws ClientException
 
267
     * @since 1.9
 
268
     */
 
269
    void revert(Set<String> paths, Depth depth,
 
270
                Collection<String> changelists,
 
271
                boolean clearChangelists,
 
272
                boolean metadataOnly)
 
273
            throws ClientException;
 
274
 
 
275
    /**
 
276
     * Reverts set of files or directories to a pristine state.
 
277
     * <p>
 
278
     * Behaves like the 1.9 version with <code>clearChangelists</code>
 
279
     * set to <code>false</code>;
 
280
     */
 
281
    void revert(Set<String> paths, Depth depth,
 
282
                Collection<String> changelists)
 
283
            throws ClientException;
 
284
 
 
285
 
 
286
    /**
213
287
     * Reverts a file to a pristine state.
214
288
     * @param path      path of the file.
215
289
     * @param depth     the depth to recurse into subdirectories
221
295
 
222
296
    /**
223
297
     * Adds a file to the repository.
 
298
     * <p>
 
299
     * <b>Note:</b> Behaves like the 1.8 version with
 
300
     * <code>noAutoProps</code> set to <code>false</code>.
 
301
     *
224
302
     * @param path      path to be added.
225
303
     * @param depth     the depth to recurse into subdirectories
226
304
     * @param force     if adding a directory and recurse true and path is a
229
307
     *                  ignore patterns
230
308
     * @param addParents add any intermediate parents to the working copy
231
309
     * @throws ClientException
232
 
     * @note this method behaves like the 1.8 version with noAutoProps=false
233
310
     */
234
311
    void add(String path, Depth depth, boolean force, boolean noIgnores,
235
312
             boolean addParents)
299
376
     * @param makeParents Whether to create intermediate parents
300
377
     * @param ignoreExternals Whether or not to process external definitions
301
378
     *                        as part of this operation.
 
379
     * @param metadataOnly Copy just the metadata and not the working files/dirs
 
380
     * @param pinExternals Whether or not to pin external definitions as part
 
381
     *                     of this operation.
 
382
     * @param externalsToPin The set of externals to pin.
 
383
     *            Keys are either local absolute paths (when the source of the
 
384
     *            copy is the working copy) or URLs within the repository
 
385
     *            (when the source is the repository) where an
 
386
     *            <code>svn:externals</code> property is defined.
 
387
     *            Values are lists of parsed {@link ExternalItem}
 
388
     *            objects from each external definitions.
 
389
     *            If <code>pinExternals</code> is <code>true</code>, only
 
390
     *            the externals in this set will be pinned; if this parameter
 
391
     *            is <code>null</code>, all externals will be pinned.
 
392
     *            If <code>pinExternals</code> is <code>false</code>,
 
393
     *            this parameter will be ignored.
302
394
     * @param revpropTable A string-to-string mapping of revision properties
303
395
     *                     to values which will be set if this operation
304
396
     *                     results in a commit.
305
397
     * @param handler   the commit message callback, may be <code>null</code>
306
398
     *                  if <code>destPath</code> is not a URL
307
399
     * @throws ClientException If the copy operation fails.
 
400
     * @throws NullPointerException if the <code>sources</code> list is empty.
 
401
     * @since 1.9
 
402
     */
 
403
    void copy(List<CopySource> sources, String destPath,
 
404
              boolean copyAsChild, boolean makeParents,
 
405
              boolean ignoreExternals, boolean metadataOnly,
 
406
              boolean pinExternals,
 
407
              Map<String, List<ExternalItem>> externalsToPin,
 
408
              Map<String, String> revpropTable,
 
409
              CommitMessageCallback handler, CommitCallback callback)
 
410
            throws ClientException;
 
411
 
 
412
    /**
 
413
     * Copy versioned paths with the history preserved.
 
414
     * <p>
 
415
     * Behaves like the 1.9 version with
 
416
     *     <code>pinExternals</code> set to <code>false</code> and
 
417
     *     <code>externalsToPin</code> set to <code>null</code> and
 
418
     *     <code>metadataOnly</code> set to <code>false</code>.
308
419
     */
309
420
    void copy(List<CopySource> sources, String destPath,
310
421
              boolean copyAsChild, boolean makeParents,
344
455
     * @deprecated Provided for backward compatibility with 1.7. Passes
345
456
     *             metadataOnly false and allowMixRev true.
346
457
     */
 
458
    @Deprecated
347
459
    void move(Set<String> srcPaths, String destPath, boolean force,
348
460
              boolean moveAsChild, boolean makeParents,
349
461
              Map<String, String> revpropTable,
370
482
     * Recursively cleans up a local directory, finishing any
371
483
     * incomplete operations, removing lockfiles, etc.
372
484
     * @param path a local directory.
 
485
     * @param breakLocks ### FIXME: Missing docstring in svn_client.h
 
486
     * @param clearDavCache ### FIXME: Missing docstring in svn_client.h
 
487
     * @param removeUnusedPristines ### FIXME: Missing docstring in svn_client.h
 
488
     * @param includeExternals Recurse into externals working copies
 
489
     *        and clean them up, too.
 
490
     * @throws ClientException
 
491
     * @since 1.9
 
492
     */
 
493
    void cleanup(String path,
 
494
                 boolean breakLocks,
 
495
                 boolean fixRecordedTimestamps,
 
496
                 boolean clearDavCache,
 
497
                 boolean removeUnusedPristines,
 
498
                 boolean includeExternals)
 
499
        throws ClientException;
 
500
 
 
501
    /**
 
502
     * Recursively cleans up a local directory, finishing any
 
503
     * incomplete operations, removing lockfiles, etc.
 
504
     * <p>
 
505
     * Behaves like the 1.9 version with <code>includeExternals</code>
 
506
     * set to <code>false<code>, and the other flags to
 
507
     * <code>true</code>.
 
508
     * @param path a local directory.
373
509
     * @throws ClientException
374
510
     */
375
511
    void cleanup(String path) throws ClientException;
399
535
     * @param depth           how deep to recurse in subdirectories
400
536
     * @param nativeEOL       which EOL characters to use during export
401
537
     * @throws ClientException
 
538
     * @since 1.9
 
539
     */
 
540
    long doExport(String srcPath, String destPath, Revision revision,
 
541
                  Revision pegRevision, boolean force,
 
542
                  boolean ignoreExternals, boolean ignoreKeywords,
 
543
                  Depth depth, String nativeEOL)
 
544
            throws ClientException;
 
545
 
 
546
    /**
 
547
     * Exports the contents of either a subversion repository into a
 
548
     * 'clean' directory (meaning a directory with no administrative
 
549
     * directories).
 
550
     * <p>
 
551
     * <b>Note:</b> Behaves like the 1.9 version with
 
552
     * ignoreKeywords set to false.
 
553
     *
 
554
     * @param srcPath         the url of the repository path to be exported
 
555
     * @param destPath        a destination path that must not already exist.
 
556
     * @param revision        the revsion to be exported
 
557
     * @param pegRevision     the revision to interpret srcPath
 
558
     * @param force           set if it is ok to overwrite local files
 
559
     * @param ignoreExternals ignore external during export
 
560
     * @param depth           how deep to recurse in subdirectories
 
561
     * @param nativeEOL       which EOL characters to use during export
 
562
     * @throws ClientException
402
563
     */
403
564
    long doExport(String srcPath, String destPath, Revision revision,
404
565
                  Revision pegRevision, boolean force, boolean ignoreExternals,
457
618
    /**
458
619
     * Import a file or directory into a repository directory  at
459
620
     * head.
 
621
     * <p>
 
622
     * <b>Note:</b> Behaves like the 1.8 version with noAutoProps
 
623
     * set to false and without the filtering option.
 
624
     *
460
625
     * @param path      the local path
461
626
     * @param url       the target url
462
627
     * @param depth     depth to traverse into subdirectories
469
634
     * @param handler   the commit message callback
470
635
     * @param callback  the commit status callback
471
636
     * @throws ClientException
472
 
     * @note this method behaves like the 1.8 version with noAutoProps=false
473
 
     *       and without the filtering option.
474
637
     */
475
638
    void doImport(String path, String url, Depth depth,
476
639
                  boolean noIgnore, boolean ignoreUnknownNodeTypes,
501
664
     * @param ignoreMergeinfo ignore merge history, treat sources as unrelated
502
665
     * @param diffIgnoreAncestry always treat source files as related
503
666
     * @param dryRun         do not change anything
 
667
     * @param allowMixedRev  allow merging into a mixed-revision working copy
 
668
     * @param recordOnly     record mergeinfo but do not run merge
 
669
     * @throws ClientException
 
670
     * @since 1.9
 
671
     */
 
672
    void merge(String path1, Revision revision1, String path2,
 
673
               Revision revision2, String localPath, boolean force, Depth depth,
 
674
               boolean ignoreMergeinfo, boolean diffIgnoreAncestry,
 
675
               boolean dryRun, boolean allowMixedRev, boolean recordOnly)
 
676
            throws ClientException;
 
677
 
 
678
    /**
 
679
     * Merge changes from two paths into a new local path.
 
680
     * <p>
 
681
     * <b>Note:</b> Behaves like the 1.9 version with allowMixedRev
 
682
     *              always set to <code>true</code>.
 
683
     *
 
684
     * @param path1          first path or url
 
685
     * @param revision1      first revision
 
686
     * @param path2          second path or url
 
687
     * @param revision2      second revision
 
688
     * @param localPath      target local path
 
689
     * @param force          overwrite local changes
 
690
     * @param depth          how deep to traverse into subdirectories
 
691
     * @param ignoreMergeinfo ignore merge history, treat sources as unrelated
 
692
     * @param diffIgnoreAncestry always treat source files as related
 
693
     * @param dryRun         do not change anything
504
694
     * @param recordOnly     record mergeinfo but do not run merge
505
695
     * @throws ClientException
506
696
     * @since 1.8
513
703
 
514
704
    /**
515
705
     * Merge changes from two paths into a new local path.
 
706
     * <p>
 
707
     * <b>Note:</b> Behaves like the 1.8 version where ignoreAncestry
 
708
     * maps to both ignoreMergeinfo and diffIgnoreAncestry
516
709
     *
517
710
     * @param path1          first path or url
518
711
     * @param revision1      first revision
525
718
     * @param dryRun         do not change anything
526
719
     * @param recordOnly     record mergeinfo but do not run merge
527
720
     * @throws ClientException
528
 
     * @note Behaves like the 1.8 where ignoreAncestry maps to
529
 
     *       both ignoreMergeinfo and diffIgnoreAncestry
530
721
     */
531
722
    void merge(String path1, Revision revision1, String path2,
532
723
               Revision revision2, String localPath, boolean force, Depth depth,
545
736
     * @param ignoreMergeinfo ignore merge history, treat sources as unrelated
546
737
     * @param diffIgnoreAncestry always treat source files as related
547
738
     * @param dryRun        do not change anything
 
739
     * @param allowMixedRev  allow merging into a mixed-revision working copy
 
740
     * @param recordOnly    record mergeinfo but do not run merge
 
741
     * @throws ClientException
 
742
     * @since 1.9
 
743
     */
 
744
    void merge(String path, Revision pegRevision, List<RevisionRange> revisions,
 
745
               String localPath, boolean force, Depth depth,
 
746
               boolean ignoreMergeinfo, boolean diffIgnoreAncestry,
 
747
               boolean dryRun, boolean allowMixedRev, boolean recordOnly)
 
748
             throws ClientException;
 
749
 
 
750
    /**
 
751
     * Merge set of revisions into a new local path.
 
752
     * <p>
 
753
     * <b>Note:</b> Behaves like the 1.9 version with allowMixedRev
 
754
     *              always set to <code>true</code>.
 
755
     *
 
756
     * @param path          path or url
 
757
     * @param pegRevision   revision to interpret path
 
758
     * @param revisions     revisions to merge; may be null, indicating that
 
759
     *                      the optimal range should be determined automatcially
 
760
     * @param localPath     target local path
 
761
     * @param force         overwrite local changes
 
762
     * @param depth         how deep to traverse into subdirectories
 
763
     * @param ignoreMergeinfo ignore merge history, treat sources as unrelated
 
764
     * @param diffIgnoreAncestry always treat source files as related
 
765
     * @param dryRun        do not change anything
548
766
     * @param recordOnly    record mergeinfo but do not run merge
549
767
     * @throws ClientException
550
768
     * @since 1.8
557
775
 
558
776
    /**
559
777
     * Merge set of revisions into a new local path.
 
778
     * <p>
 
779
     * <b>Note:</b> Behaves like the 1.8 version where ignoreAncestry
 
780
     * maps to both ignoreMergeinfo and diffIgnoreAncestry.
 
781
     *
560
782
     * @param path          path or url
561
783
     * @param pegRevision   revision to interpret path
562
784
     * @param revisions     revisions to merge;
569
791
     * @param dryRun        do not change anything
570
792
     * @param recordOnly    record mergeinfo but do not run merge
571
793
     * @throws ClientException
572
 
     * @note Behaves like the 1.8 where ignoreAncestry maps to
573
 
     *       both ignoreMergeinfo and diffIgnoreAncestry
574
794
     */
575
795
    void merge(String path, Revision pegRevision, List<RevisionRange> revisions,
576
796
               String localPath, boolean force, Depth depth,
594
814
     * @throws ClientException
595
815
     * @deprecated Will be removed in a future release
596
816
     */
 
817
    @Deprecated
597
818
    void mergeReintegrate(String path, Revision pegRevision,
598
819
                          String localPath, boolean dryRun)
599
820
             throws ClientException;
616
837
     * @param pegRevision            peg rev for pathOrUrl
617
838
     * @param mergeSourceUrl         the source of the merge
618
839
     * @param srcPegRevision         peg rev for mergeSourceUrl
619
 
     * @param srcStartRevieion       lower bound of the source revision range
 
840
     * @param srcStartRevision       lower bound of the source revision range
620
841
     * @param srcEndRevision         upper bound of the source revision range
621
842
     * @param discoverChangedPaths   return paths of changed items
622
843
     * @param depth                  the depth to recurse to
635
856
 
636
857
    /**
637
858
     * Retrieve either merged or eligible-to-be-merged revisions.
 
859
     * <p>
 
860
     * <b>Note:</b> Behaves like the 1.8 version, with unspecified
 
861
     * revision range.
 
862
     *
638
863
     * @param kind                   kind of revisions to receive
639
864
     * @param pathOrUrl              target of merge
640
865
     * @param pegRevision            peg rev for pathOrUrl
644
869
     * @param depth                  the depth to recurse to
645
870
     * @param revProps               the revprops to retrieve
646
871
     * @param callback               the object to receive the log messages
647
 
     * @note Behaves like the 1.8 version, with unspecified revision range.
648
872
     */
649
873
    void getMergeinfoLog(Mergeinfo.LogKind kind, String pathOrUrl,
650
874
                         Revision pegRevision, String mergeSourceUrl,
660
884
     * @param target2       second path or url
661
885
     * @param revision2     second revision
662
886
     * @param relativeToDir index path is relative to this path
663
 
     * @param outFileName   file name where difference are written
 
887
     * @param outStream     the stream to which difference are written
664
888
     * @param depth         how deep to traverse into subdirectories
665
889
     * @param ignoreAncestry ignore if files are not related
666
890
     * @param noDiffDeleted no output on deleted files
681
905
              DiffOptions options)
682
906
            throws ClientException;
683
907
 
 
908
    /**
 
909
     * Display the differences between two paths
 
910
     * @param target1       first path or url
 
911
     * @param revision1     first revision
 
912
     * @param target2       second path or url
 
913
     * @param revision2     second revision
 
914
     * @param relativeToDir index path is relative to this path
 
915
     * @param outFileName   file name where difference are written
 
916
     * @param depth         how deep to traverse into subdirectories
 
917
     * @param ignoreAncestry ignore if files are not related
 
918
     * @param noDiffDeleted no output on deleted files
 
919
     * @param force         diff even on binary files
 
920
     * @param copiesAsAdds  if set, copied files will be shown in their
 
921
     *                      entirety, not as diffs from their sources
 
922
     * @param ignoreProps   don't show property diffs
 
923
     * @param propsOnly     show property changes only
 
924
     * @param options       additional options for controlling the output
 
925
     * @throws ClientException
 
926
     * @since 1.8
 
927
     */
684
928
    void diff(String target1, Revision revision1, String target2,
685
929
              Revision revision2, String relativeToDir, String outFileName,
686
930
              Depth depth, Collection<String> changelists,
696
940
     * @param target2       second path or url
697
941
     * @param revision2     second revision
698
942
     * @param relativeToDir index path is relative to this path
699
 
     * @param outFileName   file name where difference are written
 
943
     * @param outStream     the stream to which difference are written
700
944
     * @param depth         how deep to traverse into subdirectories
701
945
     * @param ignoreAncestry ignore if files are not related
702
946
     * @param noDiffDeleted no output on deleted files
714
958
              boolean copiesAsAdds, boolean ignoreProps, boolean propsOnly)
715
959
            throws ClientException;
716
960
 
 
961
    /**
 
962
     * Display the differences between two paths
 
963
     * @param target1       first path or url
 
964
     * @param revision1     first revision
 
965
     * @param target2       second path or url
 
966
     * @param revision2     second revision
 
967
     * @param relativeToDir index path is relative to this path
 
968
     * @param outFileName   file name where difference are written
 
969
     * @param depth         how deep to traverse into subdirectories
 
970
     * @param ignoreAncestry ignore if files are not related
 
971
     * @param noDiffDeleted no output on deleted files
 
972
     * @param force         diff even on binary files
 
973
     * @param copiesAsAdds  if set, copied files will be shown in their
 
974
     *                      entirety, not as diffs from their sources
 
975
     * @param ignoreProps   don't show property diffs
 
976
     * @param propsOnly     show property changes only
 
977
     * @throws ClientException
 
978
     */
717
979
    void diff(String target1, Revision revision1, String target2,
718
980
              Revision revision2, String relativeToDir, String outFileName,
719
981
              Depth depth, Collection<String> changelists,
728
990
     * @param startRevision first Revision to compare
729
991
     * @param endRevision   second Revision to compare
730
992
     * @param relativeToDir index path is relative to this path
731
 
     * @param outFileName   file name where difference are written
 
993
     * @param outStream     the stream to which difference are written
732
994
     * @param depth         how deep to traverse into subdirectories
733
995
     * @param changelists  if non-null, filter paths using changelists
734
996
     * @param ignoreAncestry ignore if files are not related
750
1012
              DiffOptions options)
751
1013
            throws ClientException;
752
1014
 
 
1015
    /**
 
1016
     * Display the differences between two paths.
 
1017
     * @param target        path or url
 
1018
     * @param pegRevision   revision tointerpret target
 
1019
     * @param startRevision first Revision to compare
 
1020
     * @param endRevision   second Revision to compare
 
1021
     * @param relativeToDir index path is relative to this path
 
1022
     * @param outFileName   file name where difference are written
 
1023
     * @param depth         how deep to traverse into subdirectories
 
1024
     * @param changelists  if non-null, filter paths using changelists
 
1025
     * @param ignoreAncestry ignore if files are not related
 
1026
     * @param noDiffDeleted no output on deleted files
 
1027
     * @param force         diff even on binary files
 
1028
     * @param copiesAsAdds  if set, copied files will be shown in their
 
1029
     *                      entirety, not as diffs from their sources
 
1030
     * @param ignoreProps   don't show property diffs
 
1031
     * @param propsOnly     show property changes only
 
1032
     * @param options       additional options for controlling the output
 
1033
     * @throws ClientException
 
1034
     * @since 1.8
 
1035
     */
753
1036
    void diff(String target, Revision pegRevision, Revision startRevision,
754
1037
              Revision endRevision, String relativeToDir, String outFileName,
755
1038
              Depth depth, Collection<String> changelists,
765
1048
     * @param startRevision first Revision to compare
766
1049
     * @param endRevision   second Revision to compare
767
1050
     * @param relativeToDir index path is relative to this path
768
 
     * @param outFileName   file name where difference are written
 
1051
     * @param outStream     the stream to which difference are written
769
1052
     * @param depth         how deep to traverse into subdirectories
770
1053
     * @param changelists  if non-null, filter paths using changelists
771
1054
     * @param ignoreAncestry ignore if files are not related
785
1068
              boolean copiesAsAdds, boolean ignoreProps, boolean propsOnly)
786
1069
            throws ClientException;
787
1070
 
 
1071
    /**
 
1072
     * Display the differences between two paths.
 
1073
     * @param target        path or url
 
1074
     * @param pegRevision   revision tointerpret target
 
1075
     * @param startRevision first Revision to compare
 
1076
     * @param endRevision   second Revision to compare
 
1077
     * @param relativeToDir index path is relative to this path
 
1078
     * @param outFileName   file name where difference are written
 
1079
     * @param depth         how deep to traverse into subdirectories
 
1080
     * @param changelists  if non-null, filter paths using changelists
 
1081
     * @param ignoreAncestry ignore if files are not related
 
1082
     * @param noDiffDeleted no output on deleted files
 
1083
     * @param force         diff even on binary files
 
1084
     * @param copiesAsAdds  if set, copied files will be shown in their
 
1085
     *                      entirety, not as diffs from their sources
 
1086
     * @param ignoreProps   don't show property diffs
 
1087
     * @param propsOnly     show property changes only
 
1088
     * @throws ClientException
 
1089
     */
788
1090
    void diff(String target, Revision pegRevision, Revision startRevision,
789
1091
              Revision endRevision, String relativeToDir, String outFileName,
790
1092
              Depth depth, Collection<String> changelists,
824
1126
     *
825
1127
     * @param target Path or URL.
826
1128
     * @param pegRevision Revision at which to interpret
827
 
     * <code>target</code>.  If {@link Revision.Kind#unspecified} or
 
1129
     * <code>target</code>.  If {@link Revision#UNSPECIFIED} or
828
1130
     * <code>null</code>, behave identically to {@link
829
1131
     * #diffSummarize(String, Revision, String, Revision, Depth,
830
1132
     * Collection, boolean, DiffSummaryCallback)}, using
831
1133
     * <code>path</code> for both of that method's targets.
832
 
     * @param startRevision Beginning of range for comparsion of
 
1134
     * @param startRevision Beginning of range for comparison of
833
1135
     * <code>target</code>.
834
 
     * @param endRevision End of range for comparsion of
 
1136
     * @param endRevision End of range for comparison of
835
1137
     * <code>target</code>.
836
1138
     * @param depth how deep to recurse.
837
1139
     * @param changelists  if non-null, filter paths using changelists
889
1191
     *
890
1192
     * @param paths   paths of the items
891
1193
     * @param name    name of the property
892
 
     * @param value   new value of the property. Set value to <code>
893
 
     * null</code> to delete a property
 
1194
     * @param value   new value of the property. Set value to
 
1195
     * <code>null</code> to delete a property
894
1196
     * @param depth   the depth to recurse into subdirectories
895
1197
     * @param changelists changelists to filter by
896
1198
     * @param force   do not check if the value is valid
897
 
     * @param revpropTable A string-to-string mapping of revision properties
898
 
     *                     to values which will be set if this operation
899
 
     *                     results in a commit.
900
1199
     * @throws ClientException
901
1200
     */
902
1201
    void propertySetLocal(Set<String> paths, String name, byte[] value,
904
1203
                          boolean force)
905
1204
            throws ClientException;
906
1205
 
 
1206
    /**
 
1207
     * Sets one property of an item with a String value
 
1208
     *
 
1209
     * @param paths   paths of the items
 
1210
     * @param name    name of the property
 
1211
     * @param value   new value of the property. Set value to <code>
 
1212
     * null</code> to delete a property
 
1213
     * @param depth   the depth to recurse into subdirectories
 
1214
     * @param changelists changelists to filter by
 
1215
     * @param force   do not check if the value is valid
 
1216
     * @param revpropTable A string-to-string mapping of revision properties
 
1217
     *                     to values which will be set if this operation
 
1218
     *                     results in a commit.
 
1219
     * @throws ClientException
 
1220
     */
907
1221
    void propertySetRemote(String path, long baseRev, String name,
908
1222
                           byte[] value, CommitMessageCallback handler,
909
1223
                           boolean force, Map<String, String> revpropTable,
964
1278
 
965
1279
    /**
966
1280
     * Retrieve the content of a file
 
1281
     *
 
1282
     * Always expands keywords and never returns properties.
 
1283
     *
967
1284
     * @param path      the path of the file
968
1285
     * @param revision  the revision to retrieve
969
1286
     * @param pegRevision the revision to interpret path
982
1299
     * @param revision    the revision to retrieve
983
1300
     * @param pegRevision the revision at which to interpret the path
984
1301
     * @param stream      the stream to write the file's content to
985
 
     * @throws ClientException
986
 
     * @see java.io.PipedOutputStream
987
 
     * @see java.io.PipedInputStream
988
 
     */
989
 
    void streamFileContent(String path, Revision revision, Revision pegRevision,
 
1302
     * @param returnProps whether to return the file's own (not inherited)
 
1303
     *                    properties dalong with the contents
 
1304
     * @return The file's properties if <code>returnProps</code> is
 
1305
     *         set (which may yield an empty map), otherwise
 
1306
     *         <code>null</code>.
 
1307
     * @throws ClientException
 
1308
     * @see java.io.PipedOutputStream
 
1309
     * @see java.io.PipedInputStream
 
1310
     * @since 1.9
 
1311
     */
 
1312
    Map<String, byte[]>
 
1313
        streamFileContent(String path,
 
1314
                          Revision revision, Revision pegRevision,
 
1315
                          boolean expandKeywords, boolean returnProps,
 
1316
                          OutputStream stream)
 
1317
        throws ClientException;
 
1318
 
 
1319
    /**
 
1320
     * Write the file's content to the specified output stream.  If
 
1321
     * you need an InputStream, use a
 
1322
     * PipedInputStream/PipedOutputStream combination.
 
1323
     *
 
1324
     * Always expands keywords and never returns properties.
 
1325
     *
 
1326
     * @param path        the path of the file
 
1327
     * @param revision    the revision to retrieve
 
1328
     * @param pegRevision the revision at which to interpret the path
 
1329
     * @param stream      the stream to write the file's content to
 
1330
     * @throws ClientException
 
1331
     * @see java.io.PipedOutputStream
 
1332
     * @see java.io.PipedInputStream
 
1333
     */
 
1334
    void streamFileContent(String path,
 
1335
                           Revision revision, Revision pegRevision,
990
1336
                           OutputStream stream)
991
1337
        throws ClientException;
992
1338
 
1013
1359
     *                      information
1014
1360
     * @param callback      callback to receive the file content and the other
1015
1361
     *                      information
 
1362
     * @param options       additional options for controlling the output
1016
1363
     * @throws ClientException
1017
 
     */
1018
 
    void blame(String path, Revision pegRevision, Revision revisionStart,
1019
 
               Revision revisionEnd, boolean ignoreMimeType,
1020
 
               boolean includeMergedRevisions,
1021
 
               BlameCallback callback) throws ClientException;
 
1364
     * @since 1.9
 
1365
     */
 
1366
    void blame(String path, Revision pegRevision, Revision revisionStart,
 
1367
               Revision revisionEnd, boolean ignoreMimeType,
 
1368
               boolean includeMergedRevisions,
 
1369
               BlameCallback callback, DiffOptions options)
 
1370
            throws ClientException;
 
1371
 
 
1372
    /**
 
1373
     * Retrieve the content together with the author, the revision and the date
 
1374
     * of the last change of each line
 
1375
     * <p>
 
1376
     * Behaves like the 1.9 version with <code>options</code> set to
 
1377
     * their default values.
 
1378
     */
 
1379
    void blame(String path, Revision pegRevision, Revision revisionStart,
 
1380
               Revision revisionEnd, boolean ignoreMimeType,
 
1381
               boolean includeMergedRevisions,
 
1382
               BlameCallback callback)
 
1383
            throws ClientException;
1022
1384
 
1023
1385
    /**
1024
1386
     * Set directory for the configuration information, taking the
1040
1402
    String getConfigDirectory() throws ClientException;
1041
1403
 
1042
1404
    /**
 
1405
     * Set an event handler that will be called every time the
 
1406
     * configuration is loaded by this client object.
 
1407
     */
 
1408
    void setConfigEventHandler(ConfigEvent configHandler)
 
1409
            throws ClientException;
 
1410
 
 
1411
    /**
 
1412
     * Return a reference to the installed configuration event
 
1413
     * handler. The returned value may be <code>null</code>.
 
1414
     */
 
1415
    ConfigEvent getConfigEventHandler() throws ClientException;
 
1416
 
 
1417
    /**
1043
1418
     * cancel the active operation
1044
1419
     * @throws ClientException
1045
1420
     */
1069
1444
    /**
1070
1445
     * Recursively get the paths which belong to a changelist
1071
1446
     * @param rootPath    the wc path under which to check
1072
 
     * @param changelists the changelists to look under
 
1447
     * @param changelists the changelists to look under;
 
1448
     *     if <code>null</code>, all changelists will be considered.
1073
1449
     * @param depth       the depth to recurse
1074
1450
     * @param callback    the callback to return the changelists through
1075
1451
     */
1097
1473
            throws ClientException;
1098
1474
 
1099
1475
    /**
1100
 
     * Retrieve information about repository or working copy items.
 
1476
     * Invoke <code>callback</code> to return information
 
1477
     * <code>pathOrUrl</code> in <code>revision</code>.  The
 
1478
     * information returned is system-generated metadata, not the sort
 
1479
     * of "property" metadata created by users.
 
1480
     * <p>
 
1481
     * If both revision arguments are either <code>null</code> or
 
1482
     * {@link Revision#START}, then information will be pulled solely
 
1483
     * from the working copy; no network connections will be made.
 
1484
     * <p>
 
1485
     * Otherwise, information will be pulled from a repository.  The
 
1486
     * actual node revision selected is determined by the
 
1487
     * <code>pathOrUrl</code> as it exists in
 
1488
     * <code>pegRevision</code>.  If <code>pegRevision</code> is
 
1489
     * {@link Revision#START}, then it defaults to {@link
 
1490
     * Revision#HEAD} for URLs or {@link Revision#WORKING} for WC
 
1491
     * targets.
 
1492
     * <p>
 
1493
     * If <code>pathOrUrl</code> is not a local path, then if
 
1494
     * <code>revision</code> is {@link Revision#PREVIOUS} (or some
 
1495
     * other kind that requires a local path), an error will be
 
1496
     * returned, because the desired revision cannot be determined.
 
1497
     * <p>
 
1498
     * If <code>pathOrUrl</code> is a file, just invoke the callback on it.  If it
 
1499
     * is a directory, then descend according to <code>depth</code>.
 
1500
     * <p>
1101
1501
     * @param pathOrUrl     the path or the url of the item
1102
1502
     * @param revision      the revision of the item to return
1103
1503
     * @param pegRevision   the revision to interpret pathOrUrl
1104
1504
     * @param depth         the depth to recurse
 
1505
     * @param fetchExcluded when <code>true</code>, retrieve
 
1506
     * information about nodes that are excluded from the working copy
 
1507
     * @param fetchActualOnly when <code>true</code>, retrieve
 
1508
     * information about node that are not versioned, but are still
 
1509
     * tree conflicted.
 
1510
     * @param includeExternals Recurs into externals directories
1105
1511
     * @param changelists   if non-null, filter paths using changelists
1106
1512
     * @param callback      a callback to receive the infos retrieved
 
1513
     * @since 1.9
 
1514
     */
 
1515
    void info(String pathOrUrl,
 
1516
              Revision revision, Revision pegRevision, Depth depth,
 
1517
              boolean fetchExcluded, boolean fetchActualOnly,
 
1518
              boolean includeExternals,
 
1519
              Collection<String> changelists, InfoCallback callback)
 
1520
        throws ClientException;
 
1521
 
 
1522
    /**
 
1523
     * Retrieve information about repository or working copy items.
 
1524
     * <p>
 
1525
     * Behaves like the 1.9 version, with <code>fetchExcluded</code>
 
1526
     * set to <code>false</code>, <code>fetchActualOnly</code> set to
 
1527
     * <code>true</code> anf <code>includeExternals</code> set to
 
1528
     * <code>false</code>.
1107
1529
     */
1108
1530
    void info2(String pathOrUrl, Revision revision, Revision pegRevision,
1109
1531
               Depth depth, Collection<String> changelists,
1145
1567
               int stripCount, boolean reverse, boolean ignoreWhitespace,
1146
1568
               boolean removeTempfiles, PatchCallback callback)
1147
1569
            throws ClientException;
 
1570
 
 
1571
    /**
 
1572
     * Recursively vacuum a working copy, removing unnecessary data.
 
1573
     * <p>
 
1574
     * This method will report an error when
 
1575
     * <code>removeUnversionedItems</code> or
 
1576
     * <code>removeIgnoredItems</code> are set, and the working copy
 
1577
     * is already locked. This prevents accidental corruption of the
 
1578
     * working copy if this method is invoked while another client is
 
1579
     * performing some other operation on the working copy.
 
1580
     * @param path The path of the working copy directory.
 
1581
     * @param removeUnversionedItems Remove unversioned items from the
 
1582
     *        working copy after it has been successfully cleaned up.
 
1583
     * @param removeIgnoredItems Remove unversioned items that are
 
1584
     *        ignored by Subversion, after the working copy has been
 
1585
     *        successfully cleaned up.
 
1586
     * @param fixRecordedTimestamps Update timestamps recorded in the
 
1587
     *        working copy database to their actual on-disk values.
 
1588
     * @param removeUnusedPristines Remove pristine files that are not
 
1589
     *        referenced by the working copy.
 
1590
     * @param includeExternals Recurse into externals working copies
 
1591
     *        and vacuum them, too.
 
1592
     * @since 1.9
 
1593
     */
 
1594
    void vacuum(String path,
 
1595
                boolean removeUnversionedItems,
 
1596
                boolean removeIgnoredItems,
 
1597
                boolean fixRecordedTimestamps,
 
1598
                boolean removeUnusedPristines,
 
1599
                boolean includeExternals)
 
1600
            throws ClientException;
 
1601
 
 
1602
    /**
 
1603
     * Open a persistent session to a repository.
 
1604
     * <p>
 
1605
     * <b>Note:</b> The session object inherits the progress callback,
 
1606
     * configuration directory and authentication info.
 
1607
     *
 
1608
     * @param pathOrUrl A path in a working copy from which the
 
1609
     *        session URL is derived, or the URL itself.
 
1610
     * @throws remote.RetryOpenSession If the session URL was redirected
 
1611
     * @throws SubversionException If an URL redirect cycle was detected
 
1612
     * @throws ClientException
 
1613
     * @since 1.9
 
1614
     */
 
1615
    ISVNRemote openRemoteSession(String pathOrUrl)
 
1616
            throws ClientException, SubversionException;
 
1617
 
 
1618
    /**
 
1619
     * Open a persistent session to a repository.
 
1620
     * <p>
 
1621
     * <b>Note:</b> The session object inherits the progress callback,
 
1622
     * configuration directory and authentication info.
 
1623
     *
 
1624
     * @param pathOrUrl A path in a working copy from which the
 
1625
     *        session URL is derived, or the URL itself.
 
1626
     * @param retryAttempts The number of times to retry the operation
 
1627
     *        if the given URL is redirected.
 
1628
     * @throws IllegalArgumentException If <code>retryAttempts</code>
 
1629
     *         is not positive
 
1630
     * @throws remote.RetryOpenSession If the session URL was redirected
 
1631
     * @throws SubversionException If an URL redirect cycle was detected
 
1632
     * @throws ClientException
 
1633
     * @since 1.9
 
1634
     */
 
1635
    ISVNRemote openRemoteSession(String pathOrUrl, int retryAttempts)
 
1636
            throws ClientException, SubversionException;
1148
1637
}