Network Working Group G. Clemm Request for Comments: 3253 Rational Software Category: Standards Track J. Amsden T. Ellison IBM C. Kaler Microsoft J. Whitehead U.C. Santa Cruz March 2002
Network Working Group G. Clemm Request for Comments: 3253 Rational Software Category: Standards Track J. Amsden T. Ellison IBM C. Kaler Microsoft J. Whitehead U.C. Santa Cruz March 2002
Versioning Extensions to WebDAV (Web Distributed Authoring and Versioning)
WebDAV的版本控制扩展(Web分布式创作和版本控制)
Status of this Memo
本备忘录的状况
This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.
本文件规定了互联网社区的互联网标准跟踪协议,并要求进行讨论和提出改进建议。有关本协议的标准化状态和状态,请参考当前版本的“互联网官方协议标准”(STD 1)。本备忘录的分发不受限制。
Copyright Notice
版权公告
Copyright (C) The Internet Society (2002). All Rights Reserved.
版权所有(C)互联网协会(2002年)。版权所有。
Abstract
摘要
This document specifies a set of methods, headers, and resource types that define the WebDAV (Web Distributed Authoring and Versioning) versioning extensions to the HTTP/1.1 protocol. WebDAV versioning will minimize the complexity of clients that are capable of interoperating with a variety of versioning repository managers, to facilitate widespread deployment of applications capable of utilizing the WebDAV Versioning services. WebDAV versioning includes automatic versioning for versioning-unaware clients, version history management, workspace management, baseline management, activity management, and URL namespace versioning.
本文档指定了一组方法、标题和资源类型,用于定义HTTP/1.1协议的WebDAV(Web分布式创作和版本控制)版本控制扩展。WebDAV版本控制将最小化能够与各种版本控制存储库管理器互操作的客户端的复杂性,以促进能够利用WebDAV版本控制服务的应用程序的广泛部署。WebDAV版本控制包括自动版本控制,用于无意识的客户端版本控制、版本历史记录管理、工作区管理、基线管理、活动管理和URL命名空间版本控制。
Table of Contents
目录
1 Introduction.................................................... 6 1.1 Relationship to WebDAV........................................ 7 1.2 Notational Conventions........................................ 8 1.3 Terms......................................................... 8 1.4 Property Values............................................... 11 1.4.1 Initial Property Value..................................... 11
1 Introduction.................................................... 6 1.1 Relationship to WebDAV........................................ 7 1.2 Notational Conventions........................................ 8 1.3 Terms......................................................... 8 1.4 Property Values............................................... 11 1.4.1 Initial Property Value..................................... 11
1.4.2 Protected Property Value................................... 12 1.4.3 Computed Property Value.................................... 12 1.4.4 Boolean Property Value..................................... 12 1.4.5 DAV:href Property Value.................................... 12 1.5 DAV Namespace XML Elements.................................... 12 1.6 Method Preconditions and Postconditions....................... 12 1.6.1 Example - CHECKOUT request................................. 13 1.7 Clarification of COPY Semantics with Overwrite:T.............. 13 1.8 Versioning Methods and Write Locks............................ 14 2 Basic Versioning Features....................................... 14 2.1 Basic Versioning Packages..................................... 14 2.2 Basic Versioning Semantics.................................... 16 2.2.1 Creating a Version-Controlled Resource..................... 16 2.2.2 Modifying a Version-Controlled Resource.................... 17 2.2.3 Reporting.................................................. 19 3 Version-Control Feature......................................... 20 3.1 Additional Resource Properties................................ 20 3.1.1 DAV:comment................................................ 20 3.1.2 DAV:creator-displayname.................................... 20 3.1.3 DAV:supported-method-set (protected)....................... 20 3.1.4 DAV:supported-live-property-set (protected)................ 21 3.1.5 DAV:supported-report-set (protected)....................... 21 3.2 Version-Controlled Resource Properties........................ 21 3.2.1 DAV:checked-in (protected)................................. 21 3.2.2 DAV:auto-version........................................... 22 3.3 Checked-Out Resource Properties............................... 22 3.3.1 DAV:checked-out (protected)................................ 23 3.3.2 DAV:predecessor-set........................................ 23 3.4 Version Properties............................................ 23 3.4.1 DAV:predecessor-set (protected)............................ 23 3.4.2 DAV:successor-set (computed)............................... 23 3.4.3 DAV:checkout-set (computed)................................ 23 3.4.4 DAV:version-name (protected)............................... 24 3.5 VERSION-CONTROL Method........................................ 24 3.5.1 Example - VERSION-CONTROL.................................. 25 3.6 REPORT Method................................................. 25 3.7 DAV:version-tree Report....................................... 26 3.7.1 Example - DAV:version-tree Report.......................... 27 3.8 DAV:expand-property Report.................................... 29 3.8.1 Example - DAV:expand-property.............................. 30 3.9 Additional OPTIONS Semantics.................................. 31 3.10 Additional PUT Semantics..................................... 31 3.11 Additional PROPFIND Semantics................................ 32 3.12 Additional PROPPATCH Semantics............................... 33 3.13 Additional DELETE Semantics.................................. 33 3.14 Additional COPY Semantics.................................... 34 3.15 Additional MOVE Semantics.................................... 34 3.16 Additional UNLOCK Semantics.................................. 35
1.4.2 Protected Property Value................................... 12 1.4.3 Computed Property Value.................................... 12 1.4.4 Boolean Property Value..................................... 12 1.4.5 DAV:href Property Value.................................... 12 1.5 DAV Namespace XML Elements.................................... 12 1.6 Method Preconditions and Postconditions....................... 12 1.6.1 Example - CHECKOUT request................................. 13 1.7 Clarification of COPY Semantics with Overwrite:T.............. 13 1.8 Versioning Methods and Write Locks............................ 14 2 Basic Versioning Features....................................... 14 2.1 Basic Versioning Packages..................................... 14 2.2 Basic Versioning Semantics.................................... 16 2.2.1 Creating a Version-Controlled Resource..................... 16 2.2.2 Modifying a Version-Controlled Resource.................... 17 2.2.3 Reporting.................................................. 19 3 Version-Control Feature......................................... 20 3.1 Additional Resource Properties................................ 20 3.1.1 DAV:comment................................................ 20 3.1.2 DAV:creator-displayname.................................... 20 3.1.3 DAV:supported-method-set (protected)....................... 20 3.1.4 DAV:supported-live-property-set (protected)................ 21 3.1.5 DAV:supported-report-set (protected)....................... 21 3.2 Version-Controlled Resource Properties........................ 21 3.2.1 DAV:checked-in (protected)................................. 21 3.2.2 DAV:auto-version........................................... 22 3.3 Checked-Out Resource Properties............................... 22 3.3.1 DAV:checked-out (protected)................................ 23 3.3.2 DAV:predecessor-set........................................ 23 3.4 Version Properties............................................ 23 3.4.1 DAV:predecessor-set (protected)............................ 23 3.4.2 DAV:successor-set (computed)............................... 23 3.4.3 DAV:checkout-set (computed)................................ 23 3.4.4 DAV:version-name (protected)............................... 24 3.5 VERSION-CONTROL Method........................................ 24 3.5.1 Example - VERSION-CONTROL.................................. 25 3.6 REPORT Method................................................. 25 3.7 DAV:version-tree Report....................................... 26 3.7.1 Example - DAV:version-tree Report.......................... 27 3.8 DAV:expand-property Report.................................... 29 3.8.1 Example - DAV:expand-property.............................. 30 3.9 Additional OPTIONS Semantics.................................. 31 3.10 Additional PUT Semantics..................................... 31 3.11 Additional PROPFIND Semantics................................ 32 3.12 Additional PROPPATCH Semantics............................... 33 3.13 Additional DELETE Semantics.................................. 33 3.14 Additional COPY Semantics.................................... 34 3.15 Additional MOVE Semantics.................................... 34 3.16 Additional UNLOCK Semantics.................................. 35
4 Checkout-In-Place Feature....................................... 35 4.1 Additional Version Properties................................. 35 4.1.1 DAV:checkout-fork.......................................... 36 4.1.2 DAV:checkin-fork........................................... 36 4.2 Checked-Out Resource Properties............................... 36 4.2.1 DAV:checkout-fork.......................................... 36 4.2.2 DAV:checkin-fork........................................... 37 4.3 CHECKOUT Method............................................... 37 4.3.1 Example - CHECKOUT......................................... 38 4.4 CHECKIN Method................................................ 38 4.4.1 Example - CHECKIN.......................................... 40 4.5 UNCHECKOUT Method............................................. 40 4.5.1 Example - UNCHECKOUT....................................... 41 4.6 Additional OPTIONS Semantics.................................. 42 5 Version-History Feature......................................... 42 5.1 Version History Properties.................................... 42 5.1.1 DAV:version-set (protected)................................ 42 5.1.2 DAV:root-version (computed)................................ 42 5.2 Additional Version-Controlled Resource Properties............. 42 5.2.1 DAV:version-history (computed)............................. 43 5.3 Additional Version Properties................................. 43 5.3.1 DAV:version-history (computed)............................. 43 5.4 DAV:locate-by-history Report.................................. 43 5.4.1 Example - DAV:locate-by-history Report..................... 44 5.5 Additional OPTIONS Semantics.................................. 45 5.6 Additional DELETE Semantics................................... 46 5.7 Additional COPY Semantics..................................... 46 5.8 Additional MOVE Semantics..................................... 46 5.9 Additional VERSION-CONTROL Semantics.......................... 46 5.10 Additional CHECKIN Semantics................................. 47 6 Workspace Feature............................................... 47 6.1 Workspace Properties.......................................... 48 6.1.1 DAV:workspace-checkout-set (computed)...................... 48 6.2 Additional Resource Properties................................ 48 6.2.1 DAV:workspace (protected).................................. 48 6.3 MKWORKSPACE Method............................................ 48 6.3.1 Example - MKWORKSPACE...................................... 49 6.4 Additional OPTIONS Semantics.................................. 49 6.4.1 Example - OPTIONS.......................................... 51 6.5 Additional DELETE Semantics................................... 51 6.6 Additional MOVE Semantics..................................... 52 6.7 Additional VERSION-CONTROL Semantics.......................... 52 6.7.1 Example - VERSION-CONTROL.................................. 53 7 Update Feature.................................................. 53 7.1 UPDATE Method................................................. 53 7.1.1 Example - UPDATE........................................... 55 7.2 Additional OPTIONS Semantics.................................. 55 8 Label Feature................................................... 56
4 Checkout-In-Place Feature....................................... 35 4.1 Additional Version Properties................................. 35 4.1.1 DAV:checkout-fork.......................................... 36 4.1.2 DAV:checkin-fork........................................... 36 4.2 Checked-Out Resource Properties............................... 36 4.2.1 DAV:checkout-fork.......................................... 36 4.2.2 DAV:checkin-fork........................................... 37 4.3 CHECKOUT Method............................................... 37 4.3.1 Example - CHECKOUT......................................... 38 4.4 CHECKIN Method................................................ 38 4.4.1 Example - CHECKIN.......................................... 40 4.5 UNCHECKOUT Method............................................. 40 4.5.1 Example - UNCHECKOUT....................................... 41 4.6 Additional OPTIONS Semantics.................................. 42 5 Version-History Feature......................................... 42 5.1 Version History Properties.................................... 42 5.1.1 DAV:version-set (protected)................................ 42 5.1.2 DAV:root-version (computed)................................ 42 5.2 Additional Version-Controlled Resource Properties............. 42 5.2.1 DAV:version-history (computed)............................. 43 5.3 Additional Version Properties................................. 43 5.3.1 DAV:version-history (computed)............................. 43 5.4 DAV:locate-by-history Report.................................. 43 5.4.1 Example - DAV:locate-by-history Report..................... 44 5.5 Additional OPTIONS Semantics.................................. 45 5.6 Additional DELETE Semantics................................... 46 5.7 Additional COPY Semantics..................................... 46 5.8 Additional MOVE Semantics..................................... 46 5.9 Additional VERSION-CONTROL Semantics.......................... 46 5.10 Additional CHECKIN Semantics................................. 47 6 Workspace Feature............................................... 47 6.1 Workspace Properties.......................................... 48 6.1.1 DAV:workspace-checkout-set (computed)...................... 48 6.2 Additional Resource Properties................................ 48 6.2.1 DAV:workspace (protected).................................. 48 6.3 MKWORKSPACE Method............................................ 48 6.3.1 Example - MKWORKSPACE...................................... 49 6.4 Additional OPTIONS Semantics.................................. 49 6.4.1 Example - OPTIONS.......................................... 51 6.5 Additional DELETE Semantics................................... 51 6.6 Additional MOVE Semantics..................................... 52 6.7 Additional VERSION-CONTROL Semantics.......................... 52 6.7.1 Example - VERSION-CONTROL.................................. 53 7 Update Feature.................................................. 53 7.1 UPDATE Method................................................. 53 7.1.1 Example - UPDATE........................................... 55 7.2 Additional OPTIONS Semantics.................................. 55 8 Label Feature................................................... 56
8.1 Additional Version Properties................................. 56 8.1.1 DAV:label-name-set (protected)............................. 56 8.2 LABEL Method.................................................. 56 8.2.1 Example - Setting a label.................................. 58 8.3 Label Header.................................................. 58 8.4 Additional OPTIONS Semantics.................................. 59 8.5 Additional GET Semantics...................................... 59 8.6 Additional PROPFIND Semantics................................. 59 8.7 Additional COPY Semantics..................................... 60 8.8 Additional CHECKOUT Semantics................................. 60 8.9 Additional UPDATE Semantics................................... 61 9 Working-Resource Feature........................................ 62 9.1 Additional Version Properties................................. 62 9.1.1 DAV:checkout-fork.......................................... 62 9.1.2 DAV:checkin-fork........................................... 63 9.2 Working Resource Properties................................... 63 9.2.1 DAV:auto-update (protected)................................ 63 9.2.2 DAV:checkout-fork.......................................... 63 9.2.3 DAV:checkin-fork........................................... 63 9.3 CHECKOUT Method (applied to a version)........................ 63 9.3.1 Example - CHECKOUT of a version............................ 65 9.4 CHECKIN Method (applied to a working resource)................ 65 9.4.1 Example - CHECKIN of a working resource.................... 66 9.5 Additional OPTIONS Semantics.................................. 67 9.6 Additional COPY Semantics..................................... 67 9.7 Additional MOVE Semantics..................................... 67 10 Advanced Versioning Features.................................. 67 10.1 Advanced Versioning Packages................................. 68 10.2 Advanced Versioning Terms.................................... 68 11 MERGE Feature................................................. 70 11.1 Additional Checked-Out Resource Properties................... 70 11.1.1 DAV:merge-set............................................. 70 11.1.2 DAV:auto-merge-set........................................ 71 11.2 MERGE Method................................................. 71 11.2.1 Example - MERGE........................................... 74 11.3 DAV:merge-preview Report..................................... 75 11.3.1 Example - DAV:merge-preview Report........................ 76 11.4 Additional OPTIONS Semantics................................. 77 11.5 Additional DELETE Semantics.................................. 77 11.6 Additional CHECKIN Semantics................................. 77 12 Baseline Feature.............................................. 77 12.1 Version-Controlled Configuration Properties.................. 78 12.1.1 DAV:baseline-controlled-collection (protected)............ 78 12.2 Checked-Out Configuration Properties......................... 78 12.2.1 DAV:subbaseline-set....................................... 78 12.3 Baseline Properties.......................................... 78 12.3.1 DAV:baseline-collection (protected)....................... 79 12.3.2 DAV:subbaseline-set (protected)........................... 79
8.1 Additional Version Properties................................. 56 8.1.1 DAV:label-name-set (protected)............................. 56 8.2 LABEL Method.................................................. 56 8.2.1 Example - Setting a label.................................. 58 8.3 Label Header.................................................. 58 8.4 Additional OPTIONS Semantics.................................. 59 8.5 Additional GET Semantics...................................... 59 8.6 Additional PROPFIND Semantics................................. 59 8.7 Additional COPY Semantics..................................... 60 8.8 Additional CHECKOUT Semantics................................. 60 8.9 Additional UPDATE Semantics................................... 61 9 Working-Resource Feature........................................ 62 9.1 Additional Version Properties................................. 62 9.1.1 DAV:checkout-fork.......................................... 62 9.1.2 DAV:checkin-fork........................................... 63 9.2 Working Resource Properties................................... 63 9.2.1 DAV:auto-update (protected)................................ 63 9.2.2 DAV:checkout-fork.......................................... 63 9.2.3 DAV:checkin-fork........................................... 63 9.3 CHECKOUT Method (applied to a version)........................ 63 9.3.1 Example - CHECKOUT of a version............................ 65 9.4 CHECKIN Method (applied to a working resource)................ 65 9.4.1 Example - CHECKIN of a working resource.................... 66 9.5 Additional OPTIONS Semantics.................................. 67 9.6 Additional COPY Semantics..................................... 67 9.7 Additional MOVE Semantics..................................... 67 10 Advanced Versioning Features.................................. 67 10.1 Advanced Versioning Packages................................. 68 10.2 Advanced Versioning Terms.................................... 68 11 MERGE Feature................................................. 70 11.1 Additional Checked-Out Resource Properties................... 70 11.1.1 DAV:merge-set............................................. 70 11.1.2 DAV:auto-merge-set........................................ 71 11.2 MERGE Method................................................. 71 11.2.1 Example - MERGE........................................... 74 11.3 DAV:merge-preview Report..................................... 75 11.3.1 Example - DAV:merge-preview Report........................ 76 11.4 Additional OPTIONS Semantics................................. 77 11.5 Additional DELETE Semantics.................................. 77 11.6 Additional CHECKIN Semantics................................. 77 12 Baseline Feature.............................................. 77 12.1 Version-Controlled Configuration Properties.................. 78 12.1.1 DAV:baseline-controlled-collection (protected)............ 78 12.2 Checked-Out Configuration Properties......................... 78 12.2.1 DAV:subbaseline-set....................................... 78 12.3 Baseline Properties.......................................... 78 12.3.1 DAV:baseline-collection (protected)....................... 79 12.3.2 DAV:subbaseline-set (protected)........................... 79
12.4 Additional Resource Properties............................... 79 12.4.1 DAV:version-controlled-configuration (computed)........... 79 12.5 Additional Workspace Properties.............................. 80 12.5.1 DAV:baseline-controlled-collection-set (computed)......... 80 12.6 BASELINE-CONTROL Method...................................... 80 12.6.1 Example - BASELINE-CONTROL................................ 82 12.7 DAV:compare-baseline Report.................................. 84 12.7.1 Example - DAV:compare-baseline Report..................... 85 12.8 Additional OPTIONS Semantics................................. 86 12.9 Additional MKCOL Semantics................................... 86 12.10 Additional COPY Semantics................................... 86 12.11 Additional CHECKOUT Semantics............................... 86 12.12 Additional CHECKIN Semantics................................ 86 12.13 Additional UPDATE Semantics................................. 87 12.14 Additional MERGE Semantics.................................. 89 13 Activity Feature.............................................. 90 13.1 Activity Properties.......................................... 91 13.1.1 DAV:activity-version-set (computed)....................... 91 13.1.2 DAV:activity-checkout-set (computed)...................... 92 13.1.3 DAV:subactivity-set....................................... 92 13.1.4 DAV:current-workspace-set (computed)...................... 92 13.2 Additional Version Properties................................ 92 13.2.1 DAV:activity-set.......................................... 93 13.3 Additional Checked-Out Resource Properties................... 93 13.3.1 DAV:unreserved............................................ 93 13.3.2 DAV:activity-set.......................................... 93 13.4 Additional Workspace Properties.............................. 93 13.4.1 DAV:current-activity-set.................................. 94 13.5 MKACTIVITY Method............................................ 94 13.5.1 Example - MKACTIVITY...................................... 95 13.6 DAV:latest-activity-version Report........................... 95 13.7 Additional OPTIONS Semantics................................. 96 13.8 Additional DELETE Semantics.................................. 96 13.9 Additional MOVE Semantics.................................... 97 13.10 Additional CHECKOUT Semantics............................... 97 13.10.1 Example - CHECKOUT with an activity...................... 98 13.11 Additional CHECKIN Semantics................................ 99 13.12 Additional MERGE Semantics.................................. 99 14 Version-Controlled-Collection Feature.........................100 14.1 Version-Controlled Collection Properties.....................102 14.1.1 DAV:eclipsed-set (computed)...............................102 14.2 Collection Version Properties................................103 14.2.1 DAV:version-controlled-binding-set (protected)............103 14.3 Additional OPTIONS Semantics.................................103 14.4 Additional DELETE Semantics..................................103 14.5 Additional MKCOL Semantics...................................104 14.6 Additional COPY Semantics....................................104 14.7 Additional MOVE Semantics....................................104
12.4 Additional Resource Properties............................... 79 12.4.1 DAV:version-controlled-configuration (computed)........... 79 12.5 Additional Workspace Properties.............................. 80 12.5.1 DAV:baseline-controlled-collection-set (computed)......... 80 12.6 BASELINE-CONTROL Method...................................... 80 12.6.1 Example - BASELINE-CONTROL................................ 82 12.7 DAV:compare-baseline Report.................................. 84 12.7.1 Example - DAV:compare-baseline Report..................... 85 12.8 Additional OPTIONS Semantics................................. 86 12.9 Additional MKCOL Semantics................................... 86 12.10 Additional COPY Semantics................................... 86 12.11 Additional CHECKOUT Semantics............................... 86 12.12 Additional CHECKIN Semantics................................ 86 12.13 Additional UPDATE Semantics................................. 87 12.14 Additional MERGE Semantics.................................. 89 13 Activity Feature.............................................. 90 13.1 Activity Properties.......................................... 91 13.1.1 DAV:activity-version-set (computed)....................... 91 13.1.2 DAV:activity-checkout-set (computed)...................... 92 13.1.3 DAV:subactivity-set....................................... 92 13.1.4 DAV:current-workspace-set (computed)...................... 92 13.2 Additional Version Properties................................ 92 13.2.1 DAV:activity-set.......................................... 93 13.3 Additional Checked-Out Resource Properties................... 93 13.3.1 DAV:unreserved............................................ 93 13.3.2 DAV:activity-set.......................................... 93 13.4 Additional Workspace Properties.............................. 93 13.4.1 DAV:current-activity-set.................................. 94 13.5 MKACTIVITY Method............................................ 94 13.5.1 Example - MKACTIVITY...................................... 95 13.6 DAV:latest-activity-version Report........................... 95 13.7 Additional OPTIONS Semantics................................. 96 13.8 Additional DELETE Semantics.................................. 96 13.9 Additional MOVE Semantics.................................... 97 13.10 Additional CHECKOUT Semantics............................... 97 13.10.1 Example - CHECKOUT with an activity...................... 98 13.11 Additional CHECKIN Semantics................................ 99 13.12 Additional MERGE Semantics.................................. 99 14 Version-Controlled-Collection Feature.........................100 14.1 Version-Controlled Collection Properties.....................102 14.1.1 DAV:eclipsed-set (computed)...............................102 14.2 Collection Version Properties................................103 14.2.1 DAV:version-controlled-binding-set (protected)............103 14.3 Additional OPTIONS Semantics.................................103 14.4 Additional DELETE Semantics..................................103 14.5 Additional MKCOL Semantics...................................104 14.6 Additional COPY Semantics....................................104 14.7 Additional MOVE Semantics....................................104
14.8 Additional VERSION-CONTROL Semantics.........................104 14.9 Additional CHECKOUT Semantics................................105 14.10 Additional CHECKIN Semantics................................105 14.11 Additional UPDATE and MERGE Semantics.......................106 15 Internationalization Considerations...........................106 16 Security Considerations.......................................107 16.1 Auditing and Traceability....................................107 16.2 Increased Need for Access Control............................108 16.3 Security Through Obscurity...................................108 16.4 Denial of Service............................................108 17 IANA Considerations...........................................109 18 Intellectual Property.........................................109 19 Acknowledgements..............................................109 20 References....................................................110 Appendix A - Resource Classification..............................111 A.1 DeltaV-Compliant Unmapped URL.................................111 A.2 DeltaV-Compliant Resource.....................................111 A.3 DeltaV-Compliant Collection...................................112 A.4 Versionable Resource..........................................112 A.5 Version-Controlled Resource...................................112 A.6 Version.......................................................113 A.7 Checked-In Version-Controlled Resource........................113 A.8 Checked-Out Resource..........................................113 A.9 Checked-Out Version-Controlled Resource.......................114 A.10 Working Resource.............................................114 A.11 Version History..............................................114 A.12 Workspace....................................................115 A.13 Activity.....................................................115 A.14 Version-Controlled Collection................................115 A.15 Collection Version...........................................115 A.16 Version-Controlled Configuration.............................116 A.17 Baseline.....................................................116 A.18 Checked-Out Version-Controlled Configuration.................116 Authors' Addresses................................................117 Full Copyright Statement..........................................118
14.8 Additional VERSION-CONTROL Semantics.........................104 14.9 Additional CHECKOUT Semantics................................105 14.10 Additional CHECKIN Semantics................................105 14.11 Additional UPDATE and MERGE Semantics.......................106 15 Internationalization Considerations...........................106 16 Security Considerations.......................................107 16.1 Auditing and Traceability....................................107 16.2 Increased Need for Access Control............................108 16.3 Security Through Obscurity...................................108 16.4 Denial of Service............................................108 17 IANA Considerations...........................................109 18 Intellectual Property.........................................109 19 Acknowledgements..............................................109 20 References....................................................110 Appendix A - Resource Classification..............................111 A.1 DeltaV-Compliant Unmapped URL.................................111 A.2 DeltaV-Compliant Resource.....................................111 A.3 DeltaV-Compliant Collection...................................112 A.4 Versionable Resource..........................................112 A.5 Version-Controlled Resource...................................112 A.6 Version.......................................................113 A.7 Checked-In Version-Controlled Resource........................113 A.8 Checked-Out Resource..........................................113 A.9 Checked-Out Version-Controlled Resource.......................114 A.10 Working Resource.............................................114 A.11 Version History..............................................114 A.12 Workspace....................................................115 A.13 Activity.....................................................115 A.14 Version-Controlled Collection................................115 A.15 Collection Version...........................................115 A.16 Version-Controlled Configuration.............................116 A.17 Baseline.....................................................116 A.18 Checked-Out Version-Controlled Configuration.................116 Authors' Addresses................................................117 Full Copyright Statement..........................................118
1 Introduction
1导言
This document specifies a set of methods, headers, and properties that define the WebDAV (Web Distributed Authoring and Versioning) versioning extensions to the HTTP/1.1 protocol. Versioning is concerned with tracking and accessing the history of important states of a web resource, such as a standalone web page. The benefits of versioning in the context of the worldwide web include:
本文档指定了一组方法、标题和属性,用于定义HTTP/1.1协议的WebDAV(Web分布式创作和版本控制)版本控制扩展。版本控制涉及跟踪和访问web资源(如独立网页)重要状态的历史记录。在全球web环境中进行版本控制的好处包括:
- A resource has an explicit history and a persistent identity across the various states it has had during the course of that history. It allows browsing through past and alternative versions of a resource. Frequently the modification and authorship history of a resource is critical information in itself.
- 一个资源有一个明确的历史记录,并且在该历史记录的过程中,它在各个州都有一个持久的身份。它允许浏览资源的过去版本和替代版本。通常,资源的修改和作者历史本身就是关键信息。
- Resource states (versions) are given stable names that can support externally stored links for annotation and link server support. Both annotation and link servers frequently need to store stable references to portions of resources that are not under their direct control. By providing stable states of resources, version control systems allow not only stable pointers into those resources, but also well defined methods to determine the relationships of those states of a resource.
- 资源状态(版本)具有稳定的名称,可以支持外部存储的链接以支持注释和链接服务器。注释服务器和链接服务器通常都需要存储对不受其直接控制的资源部分的稳定引用。通过提供稳定的资源状态,版本控制系统不仅允许稳定的指向这些资源的指针,还允许定义良好的方法来确定资源状态之间的关系。
WebDAV Versioning defines both basic and advanced versioning functionality.
WebDAV版本控制定义了基本和高级版本控制功能。
Basic versioning allows users to:
基本版本控制允许用户:
- Put a resource under version control - Determine whether a resource is under version control - Determine whether a resource update will automatically be captured as a new version - Create and access distinct versions of a resource
- 将资源置于版本控制之下-确定资源是否处于版本控制之下-确定资源更新是否将自动捕获为新版本-创建和访问资源的不同版本
Advanced versioning provides additional functionality for parallel development and configuration management of sets of web resources.
高级版本控制为web资源集的并行开发和配置管理提供了额外的功能。
This document will first define the properties and method semantics for the basic versioning features, and then define the additional properties and method semantics for the advanced versioning features. An implementer that is only interested in basic versioning should skip the advanced versioning sections (Section 10 to Section 14).
本文档将首先为基本版本控制功能定义属性和方法语义,然后为高级版本控制功能定义附加属性和方法语义。只对基本版本控制感兴趣的实现者应该跳过高级版本控制部分(第10节到第14节)。
To maximize interoperability and the use of existing protocol functionality, versioning support is designed as extensions to the WebDAV protocol [RFC2518], which itself is an extension to the HTTP protocol [RFC2616]. All method marshalling and postconditions defined by RFC 2518 and RFC 2616 continue to hold, to ensure that versioning unaware clients can interoperate successfully with versioning servers. Although the versioning extensions are designed to be orthogonal to most aspects of the WebDAV and HTTP protocols, a clarification to RFC 2518 is required for effective interoperable versioning. This clarification is described in Section 1.7.
为了最大化互操作性和现有协议功能的使用,版本控制支持被设计为WebDAV协议[RFC2518]的扩展,该协议本身是HTTP协议[RFC2616]的扩展。RFC2518和RFC2616定义的所有方法编组和后置条件仍然有效,以确保不知道版本控制的客户端可以与版本控制服务器成功地互操作。尽管版本控制扩展的设计与WebDAV和HTTP协议的大多数方面是正交的,但为了实现有效的互操作版本控制,需要对RFC2518进行澄清。第1.7节对该澄清进行了说明。
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
本文件中的关键词“必须”、“不得”、“要求”、“应”、“不得”、“应”、“不应”、“建议”、“可”和“可选”应按照RFC 2119中的说明进行解释。
The term "protected" is placed in parentheses following the definition of a protected property (see Section 1.4.2).
术语“受保护”放在受保护财产定义后的括号内(见第1.4.2节)。
The term "computed" is placed in parentheses following the definition of a computed property (see Section 1.4.3).
术语“计算”放在计算属性定义后的括号内(见第1.4.3节)。
When an XML element type in the "DAV:" namespace is referenced in this document outside of the context of an XML fragment, the string "DAV:" will be prefixed to the element type.
当“DAV:”命名空间中的XML元素类型在XML片段上下文之外的文档中被引用时,字符串“DAV:”将作为元素类型的前缀。
When a method is defined in this document, a list of preconditions and postconditions will be defined for that method. If the semantics of an existing method is being extended, a list of additional preconditions and postconditions will be defined. A precondition or postcondition is prefixed by a parenthesized XML element type that identifies that precondition or postcondition (see Section 1.6).
当本文件中定义了一种方法时,将为该方法定义一系列先决条件和后决条件。如果正在扩展现有方法的语义,将定义一个附加前提和后条件列表。前置条件或后置条件的前缀是括号中的XML元素类型,用于标识该前置条件或后置条件(请参见第1.6节)。
This document uses the terms defined in RFC 2616, in RFC 2518, and in this section. Section 2.2 defines the semantic versioning model underlying this terminology.
本文件使用RFC 2616、RFC 2518和本节中定义的术语。第2.2节定义了该术语的语义版本控制模型。
Version Control, Checked-In, Checked-Out
版本控制,签入,签出
"Version control" is a set of constraints on how a resource can be updated. A resource under version control is either in a "checked-in" or "checked-out" state, and the version control constraints apply only while the resource is in the checked-in state.
“版本控制”是关于如何更新资源的一组约束。版本控制下的资源处于“签入”或“签出”状态,并且版本控制约束仅在资源处于签入状态时适用。
Versionable Resource
可版本资源
A "versionable resource" is a resource that can be put under version control.
“可版本化资源”是可置于版本控制之下的资源。
Version-Controlled Resource
版本控制资源
When a versionable resource is put under version control, it becomes a "version-controlled resource". A version-controlled resource can be "checked out" to allow modification of its content or dead properties by standard HTTP and WebDAV methods.
当可版本资源置于版本控制之下时,它将成为“版本控制资源”。版本控制的资源可以“签出”,以允许通过标准HTTP和WebDAV方法修改其内容或死属性。
Checked-Out Resource
签出资源
A "checked-out resource" is a resource under version control that is in the checked-out state.
“签出资源”是处于签出状态的版本控制下的资源。
Version Resource
版本资源
A "version resource", or simply "version", is a resource that contains a copy of a particular state (content and dead properties) of a version-controlled resource. A version is created by "checking in" a checked-out resource. The server allocates a distinct new URL for each new version, and this URL will never be used to identify any resource other than that version. The content and dead properties of a version never change.
“版本资源”或简称“版本”是包含版本控制资源的特定状态(内容和死属性)副本的资源。通过“签入”已签出的资源来创建版本。服务器为每个新版本分配一个不同的新URL,此URL将永远不会用于标识该版本以外的任何资源。版本的内容和死属性永远不会更改。
Version History Resource
版本历史资源
A "version history resource", or simply "version history", is a resource that contains all the versions of a particular version-controlled resource.
“版本历史记录资源”或简称“版本历史记录”是包含特定版本控制资源的所有版本的资源。
Version Name
版本名
A "version name" is a string chosen by the server to distinguish one version of a version history from the other versions of that version history. Versions from different version histories may have the same version name.
“版本名”是服务器选择的字符串,用于区分版本历史记录的一个版本与该版本历史记录的其他版本。不同版本历史记录中的版本可能具有相同的版本名。
Predecessor, Successor, Ancestor, Descendant
前任、继承人、祖先、后代
When a version-controlled resource is checked out and then subsequently checked in, the version that was checked out becomes a "predecessor" of the version created by the checkin. A client can specify multiple predecessors for a new version if the new version is logically a merge of those predecessors. When a version is connected to another version by traversing one or more predecessor relations, it is called an "ancestor" of that version. The inverse of the predecessor and ancestor relations are the "successor" and "descendant" relations. Therefore, if X is a predecessor of Y, then Y is a successor of X, and if X is an ancestor of Y, then Y is a descendant of X.
当签出受版本控制的资源并随后签入时,签出的版本将成为签入创建的版本的“前置版本”。如果新版本在逻辑上是多个前置版本的合并,则客户端可以为新版本指定多个前置版本。当一个版本通过遍历一个或多个前置关系连接到另一个版本时,它被称为该版本的“祖先”。前任与祖先关系的倒数是“继承人”与“后代”关系。因此,如果X是Y的前身,那么Y是X的继承者,如果X是Y的祖先,那么Y是X的后代。
Root Version Resource
根版本资源
The "root version resource", or simply "root version", is the version in a version history that is an ancestor of every other version in that version history.
“根版本资源”或简称“根版本”是版本历史中的版本,它是该版本历史中所有其他版本的祖先。
Workspace Resource
工作区资源
A "workspace resource", or simply "workspace", is a collection that contains at most one version-controlled resource for a given version history (see Section 6).
“工作区资源”或简称“工作区”是一个集合,对于给定的版本历史记录,它最多包含一个受版本控制的资源(请参见第6节)。
Working Resource
工作资源
A "working resource" is a checked-out resource created by the server at a server-defined URL when a version (instead of a version-controlled resource) is checked out. Unlike a checked-out version-controlled resource, a working resource is deleted when it is checked in.
“工作资源”是服务器在签出版本(而不是版本控制资源)时在服务器定义的URL处创建的签出资源。与签出的版本控制资源不同,工作资源在签入时会被删除。
Fork, Merge
分叉,合并
When a second successor is added to a version, this creates a "fork" in the version history. When a version is created with multiple predecessors, this creates a "merge" in the version history. A server may restrict the version history to be linear (with no forks or merges), but an interoperable versioning client should be prepared to deal with both forks and merges in the version history.
将第二个后续版本添加到版本时,将在版本历史记录中创建一个“fork”。使用多个前置版本创建版本时,将在版本历史记录中创建“合并”。服务器可能会将版本历史限制为线性(没有分叉或合并),但可互操作的版本控制客户端应该准备好处理版本历史中的分叉和合并。
The following diagram illustrates several of the previous definitions. Each box represents a version and each line between two boxes represents a predecessor/successor relationship. For example, it shows V3 is a predecessor of V5, V7 is a successor of V5, V1 is an ancestor of V4, and V7 is a descendant of V4. It also shows that there is a fork at version V2 and a merge at version V7.
下图说明了前面的几个定义。每个框表示一个版本,两个框之间的每一行表示前置/后继关系。例如,它显示V3是V5的前身,V7是V5的继承者,V1是V4的祖先,V7是V4的后代。它还显示在V2版本有一个fork,在V7版本有一个merge。
History of foo.html
foo.html的历史
+---+ Root Version -------> | | V1 +---+ ^ | | | | +---+ | Version Name ----> V2 | | | Ancestor +---+ | / \ | / \ | +---+ +---+ | | V3 | | V4 ^ +---+ +---+ | | | | Predecessor | | | | +---+ +---+ | | | V5 | | V6 | Descendant +---+ +---+ | Successor | \ / | | \ / | v +---+ v | | V7 +---+
+---+ Root Version -------> | | V1 +---+ ^ | | | | +---+ | Version Name ----> V2 | | | Ancestor +---+ | / \ | / \ | +---+ +---+ | | V3 | | V4 ^ +---+ +---+ | | | | Predecessor | | | | +---+ +---+ | | | V5 | | V6 | Descendant +---+ +---+ | Successor | \ / | | \ / | v +---+ v | | V7 +---+
Label
标签
A "label" is a name that can be used to select a version from a version history. A label can be assigned by either a client or the server. The same label can be used in different version histories.
“标签”是可用于从版本历史记录中选择版本的名称。标签可以由客户端或服务器分配。相同的标签可用于不同的版本历史记录。
Unless an initial value of a property of a given type is defined by this document, the initial value of a property of that type is implementation dependent.
除非本文档定义了给定类型属性的初始值,否则该类型属性的初始值取决于实现。
When a property of a specific kind of resource is "protected", the property value cannot be updated on that kind of resource except by a method explicitly defined as updating that specific property. In particular, a protected property cannot be updated with a PROPPATCH request. Note that a given property can be protected on one kind of resource, but not protected on another kind of resource.
当特定类型资源的属性被“保护”时,除非通过显式定义为更新该特定属性的方法,否则无法更新该类型资源的属性值。特别是,无法使用PROPPATCH请求更新受保护的属性。请注意,给定的属性可以在一种资源上受保护,但不能在另一种资源上受保护。
When a property is "computed", its value is defined in terms of a computation based on the content and other properties of that resource, or even of some other resource. When the semantics of a method is defined in this document, the effect of that method on non-computed properties will be specified; the effect of that method on computed properties will not be specified, but can be inferred from the computation defined for those properties. A computed property is always a protected property.
当一个属性被“计算”时,它的值被定义为基于该资源的内容和其他属性的计算,甚至是基于其他资源的计算。当在本文档中定义方法的语义时,将指定该方法对非计算属性的影响;不会指定该方法对计算属性的影响,但可以从为这些属性定义的计算中推断。计算属性始终是受保护的属性。
Some properties take a Boolean value of either "false" or "true".
某些属性的布尔值为“false”或“true”。
The DAV:href XML element is defined in RFC 2518, Section 12.3.
在RFC 2518第12.3节中定义了DAV:href XML元素。
Although WebDAV request and response bodies can be extended by arbitrary XML elements, which can be ignored by the message recipient, an XML element in the DAV namespace MUST NOT be used in the request or response body of a versioning method unless that XML element is explicitly defined in an IETF RFC.
尽管WebDAV请求和响应主体可以通过任意XML元素进行扩展(消息接收方可以忽略),但DAV命名空间中的XML元素不得用于版本控制方法的请求或响应主体,除非该XML元素在IETF RFC中明确定义。
A "precondition" of a method describes the state of the server that must be true for that method to be performed. A "postcondition" of a method describes the state of the server that must be true after that method has been completed. If a method precondition or postcondition for a request is not satisfied, the response status of the request MUST be either 403 (Forbidden) if the request should not be repeated because it will always fail, or 409 (Conflict) if it is expected that the user might be able to resolve the conflict and resubmit the request.
方法的“先决条件”描述了要执行该方法必须为true的服务器状态。方法的“后置条件”描述了该方法完成后必须为true的服务器状态。如果请求的方法先决条件或后决条件未满足,则请求的响应状态必须为403(禁止),如果请求不应重复,因为它将始终失败,或者409(冲突),如果预期用户可能能够解决冲突并重新提交请求。
In order to allow better client handling of 403 and 409 responses, a distinct XML element type is associated with each method precondition and postcondition of a request. When a particular precondition is not satisfied or a particular postcondition cannot be achieved, the appropriate XML element MUST be returned as the child of a top-level DAV:error element in the response body, unless otherwise negotiated by the request. In a 207 Multi-Status response, the DAV:error element would appear in the appropriate DAV:responsedescription element.
为了让客户端更好地处理403和409响应,不同的XML元素类型与请求的每个方法先决条件和后决条件相关联。如果不满足特定的先决条件或无法实现特定的后决条件,则必须将相应的XML元素作为响应体中顶级DAV:error元素的子元素返回,除非请求另行协商。在207多状态响应中,DAV:error元素将出现在相应的DAV:responsedescription元素中。
>>REQUEST
>>请求
CHECKOUT /foo.html HTTP/1.1 Host: www.webdav.org
CHECKOUT/foo.html HTTP/1.1主机:www.webdav.org
>>RESPONSE
>>回应
HTTP/1.1 409 Conflict Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
HTTP/1.1 409 Conflict Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <D:error xmlns:D="DAV:"> <D:must-be-checked-in/> </D:error>
<?xml version="1.0" encoding="utf-8" ?> <D:error xmlns:D="DAV:"> <D:must-be-checked-in/> </D:error>
In this example, the request to CHECKOUT /foo.html fails because /foo.html is not checked in.
在本例中,签出/foo.html的请求失败,因为没有签入/foo.html。
RFC 2518, Section 8.8.4 states:
RFC 2518第8.8.4节规定:
"If a resource exists at the destination and the Overwrite header is "T" then prior to performing the copy the server MUST perform a DELETE with "Depth: infinity" on the destination resource."
如果目标上存在资源且覆盖标头为“T”,则在执行复制之前,服务器必须在目标资源上执行“深度:无穷大”的删除
The purpose of this sentence is to ensure that following a COPY, all destination resources have the same content and dead properties as the corresponding resources identified by the request-URL (where a resource with a given name relative to the Destination URL "corresponds" to a resource with the same name relative to the request-URL). If at the time of the request, there already is a resource at the destination that has the same resource type as the corresponding resource at the request-URL, that resource MUST NOT be deleted, but MUST be updated to have the content and dead properties
这句话的目的是确保在复制之后,所有目标资源都具有与请求URL标识的相应资源相同的内容和死属性(其中相对于目标URL具有给定名称的资源“对应”于相对于请求URL具有相同名称的资源)。如果在请求时,目标上已经有一个资源与请求URL上的相应资源具有相同的资源类型,则不得删除该资源,但必须更新该资源以具有内容和死属性
of its corresponding member. If a client wishes all resources at the destination to be deleted prior to the COPY, it MUST explicitly issue a DELETE request.
它的相应成员。如果客户端希望在复制之前删除目标上的所有资源,则必须明确发出删除请求。
The difference between updating a resource and replacing a resource with a new resource is especially important when resource history is being maintained (the former adds to an existing history, while the latter creates a new history). In addition, locking and access control constraints might allow you to update a resource, but not allow you to delete it and create a new one in its place.
在维护资源历史记录时,更新资源和用新资源替换资源之间的区别尤其重要(前者添加到现有历史记录,而后者创建新历史记录)。此外,锁定和访问控制约束可能允许您更新资源,但不允许您删除资源并在其位置创建新资源。
Note that this clarification does not apply to a MOVE request. A MOVE request with Overwrite:T MUST perform the DELETE with "Depth:infinity" on the destination resource prior to performing the MOVE.
请注意,此澄清不适用于移动请求。具有Overwrite:T的移动请求必须在执行移动之前在目标资源上执行具有“Depth:infinity”的删除。
If a write-locked resource has a non-computed property defined by this document, the property value MUST NOT be changed by a request unless the appropriate lock token is included in the request. Since every method introduced in this document other than REPORT modifies at least one property defined by this document, every versioning method other than REPORT is affected by a write lock. In particular, the method MUST fail with a 423 (Locked) status if the resource is write-locked and the appropriate token is not specified in an If request header.
如果写锁定的资源具有此文档定义的非计算属性,则请求不得更改属性值,除非请求中包含相应的锁定令牌。由于此文档中引入的每个方法(报表除外)都会修改此文档定义的至少一个属性,因此除报表之外的每个版本控制方法都会受到写锁的影响。特别是,如果资源是写锁定的,并且在if请求头中没有指定适当的令牌,则该方法必须以423(锁定)状态失败。
2 Basic Versioning Features
2基本版本控制功能
Each basic versioning feature defines extensions to existing HTTP and WebDAV methods, as well as new resource types, live properties, and methods.
每个基本版本控制功能都定义了对现有HTTP和WebDAV方法的扩展,以及新的资源类型、活动属性和方法。
A server MAY support any combination of versioning features. However, in order to minimize the complexity of a WebDAV basic versioning client, a WebDAV basic versioning server SHOULD support one of the following three "packages" (feature sets):
服务器可以支持版本控制功能的任意组合。但是,为了最小化WebDAV基本版本控制客户端的复杂性,WebDAV基本版本控制服务器应支持以下三个“包”(功能集)之一:
- Core-Versioning Package: version-control - Basic-Server-Workspace Package: version-control, workspace, version-history, checkout - Basic-Client-Workspace Package: version-control, working-resource, update, label
- 核心版本控制包:版本控制-基本服务器工作区包:版本控制、工作区、版本历史记录、签出-基本客户端工作区包:版本控制、工作资源、更新、标签
The core-versioning package supports linear versioning by both versioning-aware and versioning-unaware clients. A versioning-aware client can use reports and properties to access previous versions of a version-controlled resource.
核心版本控制包支持版本控制感知和版本控制不感知客户端的线性版本控制。具有版本控制意识的客户端可以使用报表和属性访问版本控制资源的早期版本。
The basic workspace packages support parallel development of version-controlled resources. Each client has its own configuration of the shared version-controlled resources, and can make changes to its configuration without disturbing that of another client.
基本工作区包支持版本控制资源的并行开发。每个客户端都有其自己的共享版本控制资源配置,并且可以在不干扰其他客户端配置的情况下更改其配置。
In the basic-server-workspace package, all persistent state is maintained on the server. Each client has its own workspace resource allocated on the server, where each workspace identifies a configuration of the shared version-controlled resources. Each client makes changes to its workspace, and can transfer changes when appropriate from one workspace to another. The server workspace package is appropriate for clients with no local persistent state, or for clients that wish to expose their working configurations to other clients.
在基本服务器工作区包中,所有持久状态都在服务器上维护。每个客户端都在服务器上分配了自己的工作区资源,其中每个工作区标识共享版本控制资源的配置。每个客户端都对其工作区进行更改,并可以在适当时将更改从一个工作区转移到另一个工作区。服务器工作区包适用于没有本地持久状态的客户机,或者适用于希望向其他客户机公开其工作配置的客户机。
In the basic-client-workspace package, each client maintains in local persistent storage the state for its configuration of the shared version-controlled resources. When a client is ready to make its changes visible to other clients, it allocates a set of "working resources" on the server, updates the content and dead properties of these working resources, and then uses the set of working resources to update the version-controlled resources. The working resources are used, instead of directly updating the version-controlled resources, so that sets of consistent updates can be prepared in parallel by multiple clients. Also, a working resource allows a client to prepare a single update that requires multiple server requests (e.g. updating both the content and dead properties of a resource requires both a PUT and a PROPPATCH). The client workspace package simplifies the server implementation by requiring each client to maintain its own namespace, but this requires that the clients have local persistent state, and does not allow clients to expose their working configurations to other clients.
在基本客户机工作区包中,每个客户机在本地持久性存储中维护其共享版本控制资源的配置状态。当客户机准备使其更改对其他客户机可见时,它会在服务器上分配一组“工作资源”,更新这些工作资源的内容和死属性,然后使用该组工作资源更新版本控制的资源。使用工作资源,而不是直接更新版本控制资源,这样多个客户端可以并行准备一致的更新集。此外,工作资源允许客户端准备需要多个服务器请求的单个更新(例如,更新资源的内容和死属性需要PUT和PROPPATCH)。客户机工作区包通过要求每个客户机维护自己的名称空间来简化服务器实现,但这要求客户机具有本地持久状态,并且不允许客户机向其他客户机公开其工作配置。
A server that supports both basic workspace packages will interoperate with all basic versioning clients.
支持两个基本工作区包的服务器将与所有基本版本控制客户端进行互操作。
In order to track the history of the content and dead properties of a versionable resource, a user can put the resource under version control with a VERSION-CONTROL request. A VERSION-CONTROL request performs three distinct operations:
为了跟踪可版本化资源的内容和死属性的历史记录,用户可以通过版本控制请求将资源置于版本控制之下。版本控制请求执行三种不同的操作:
1) It creates a new "version history resource". In basic versioning, a version history resource is not assigned a URL, and hence is not visible in the http scheme URL space. However, when the version-history feature (see Section 5) is supported, this changes, and each version history resource is assigned a new distinct and unique server-defined URL.
1) 它创建了一个新的“版本历史资源”。在基本版本控制中,版本历史资源没有分配URL,因此在http方案URL空间中不可见。但是,如果支持版本历史记录功能(请参见第5节),则会发生更改,并且会为每个版本历史记录资源分配一个新的独特的服务器定义URL。
2) It creates a new "version resource" and adds it to the new version history resource. The body and dead properties of the new version resource are a copy of those of the versionable resource.
2) 它创建一个新的“版本资源”,并将其添加到新的版本历史资源中。新版本资源的body和dead属性是可版本资源的body和dead属性的副本。
The server assigns the new version resource a new distinct and unique URL.
服务器为新版本资源分配一个新的独特的URL。
3) It converts the versionable resource into a "version-controlled resource". The version-controlled resource continues to be identified by the same URL that identified it as a versionable resource. As part of this conversion, it adds a DAV:checked-in property, whose value contains the URL of the new version resource.
3) 它将可版本资源转换为“版本控制资源”。版本控制资源继续由将其标识为可版本资源的同一URL标识。作为此转换的一部分,它添加了一个DAV:checked-in属性,其值包含新版本资源的URL。
Note that a versionable resource and a version-controlled resource are not new types of resources (i.e. they introduce no new DAV:resourcetype), but rather they are any type of resource that supports the methods and live properties defined for them in this document, in addition to all the methods and live properties implied by their DAV:resourcetype. For example, a collection (whose DAV:resourcetype is DAV:collection) is a versionable resource if it supports the VERSION-CONTROL method, and is a version-controlled resource if it supports the version-controlled resource methods and live properties.
请注意,可版本资源和受版本控制的资源不是新类型的资源(即,它们不引入新的DAV:resourcetype),而是支持本文档中为其定义的方法和活动属性的任何类型的资源,除了DAV:resourcetype隐含的所有方法和活动属性之外。例如,集合(其DAV:resourcetype为DAV:collection)如果支持版本控制方法,则为可版本化资源;如果支持版本控制资源方法和活动属性,则为版本控制资源。
In the following example, foo.html is a versionable resource that is put under version control. After the VERSION-CONTROL request succeeds, there are two additional resources: a new version history resource and a new version resource in that version history. The versionable resource is converted into a version-controlled resource, whose DAV:checked-in property identifies the new version resource.
在下面的示例中,foo.html是一个可版本化的资源,受版本控制。版本控制请求成功后,还有两个额外的资源:新版本历史记录资源和该版本历史记录中的新版本资源。可版本资源转换为版本控制资源,其DAV:checked-in属性标识新版本资源。
The content and dead properties of a resource are represented by the symbol appearing inside the box for that resource (e.g., "S1" in the following example).
资源的内容和死属性由出现在该资源框内的符号表示(例如,以下示例中的“S1”)。
===VERSION-CONTROL==>
===VERSION-CONTROL==>
| +----+ version | version- | | history versionable | controlled +----+ resource resource | resource | /foo.html | /foo.html | | v +----+ | +----+ checked-in +----+ version | S1 | | | S1 |----------->| S1 | resource +----+ | +----+ +----+ /his/73/ver/1
| +----+ version | version- | | history versionable | controlled +----+ resource resource | resource | /foo.html | /foo.html | | v +----+ | +----+ checked-in +----+ version | S1 | | | S1 |----------->| S1 | resource +----+ | +----+ +----+ /his/73/ver/1
Thus, whereas before the VERSION-CONTROL request there was only one, non-version-controlled resource, after VERSION-CONTROL there are three separate, distinct resources, each containing its own state and properties: the version-controlled resource, the version resource, and the version history resource. Since the version-controlled resource and the version resource are separate, distinct resources, when a method is applied to a version-controlled resource, it is only applied to that version-controlled resource, and is not applied to the version resource that is currently identified by the DAV:checked-in property of that version-controlled resource. Although the content and dead properties of a checked-in version-controlled resource are required to be the same as those of its current DAV:checked-in version, its live properties may differ. An implementation may optimize storage by retrieving the content and dead properties of a checked-in version-controlled resource from its current DAV:checked-in version rather than storing them in the version-controlled resource, but this is just an implementation optimization.
因此,在版本控制请求之前,只有一个非版本控制资源,而在版本控制之后,有三个独立的、不同的资源,每个资源都包含自己的状态和属性:版本控制资源、版本资源和版本历史资源。由于版本控制资源和版本资源是独立的、不同的资源,因此当方法应用于版本控制资源时,它仅应用于该版本控制资源,并且不应用于当前由该版本控制资源的DAV:checked-in属性标识的版本资源。尽管受签入版本控制的资源的内容和死属性必须与其当前DAV:签入版本的内容和死属性相同,但其活动属性可能不同。实现可以通过从其当前DAV:签入版本检索签入版本控制资源的内容和死属性来优化存储,而不是将其存储在版本控制资源中,但这只是实现优化。
Normally, a resource is placed under version control with an explicit VERSION-CONTROL request. A server MAY automatically place every new versionable resource under version control. In this case, the resulting state on the server MUST be the same as if the client had explicitly applied a VERSION-CONTROL request to the versionable resource.
通常,资源置于版本控制下,并带有显式的版本控制请求。服务器可以自动将每个新的可版本化资源置于版本控制之下。在这种情况下,服务器上的结果状态必须与客户端显式地将版本控制请求应用于可版本资源时的状态相同。
In order to use methods like PUT and PROPPATCH to directly modify the content or dead properties of a version-controlled resource, the version-controlled resource must first be checked out. When the checked-out resource is checked in, a new version is created in the
为了使用PUT和PROPPATCH等方法直接修改版本控制资源的内容或死属性,必须首先签出版本控制资源。签入签出的资源时,将在中创建新版本
version history of that version-controlled resource. The version that was checked out is remembered as the predecessor of the new version.
受版本控制的资源的版本历史记录。签出的版本将作为新版本的前身被记住。
The DAV:auto-version property (see Sections 3.2.2) of a checked-in version-controlled resource determines how it responds to a method that attempts to modify its content or dead properties. Possible responses include:
签入版本控制资源的DAV:auto-version属性(请参见第3.2.2节)确定它如何响应尝试修改其内容或死属性的方法。可能的答复包括:
- Fail the request. The resource requires an explicit CHECKOUT request for it to be modified (see Sections 4 and 9.2.1).
- 请求失败。资源需要显式的签出请求才能修改(参见第4节和第9.2.1节)。
- Automatically checkout the resource, perform the modification, and automatically checkin the resource. This ensures that every state of the resource is tracked by the server, but can result in an excessive number of versions being created.
- 自动签出资源、执行修改并自动签入资源。这可以确保服务器跟踪资源的每个状态,但可能会导致创建过多的版本。
- Automatically checkout the resource, perform the modification, and then if the resource is not write-locked, automatically checkin the resource. If the resource is write-locked, it remains checked-out until the write-lock is removed (either explicitly through a subsequent UNLOCK request or implicitly through a time-out of the write-lock). This helps a locking client avoid the proliferation of versions, while still allowing a non-locking client to update the resource.
- 自动签出资源,执行修改,然后如果资源未写锁定,则自动签入资源。如果资源被写锁定,则它将保持签出状态,直到删除写锁定(通过后续解锁请求显式删除,或通过写锁定超时隐式删除)。这有助于锁定客户端避免版本激增,同时仍允许非锁定客户端更新资源。
- Automatically checkout the resource, perform the modification, and then leave the resource checked out. If the resource is write-locked, it will be automatically checked in when the write-lock is removed, but an explicit CHECKIN operation (see Section 4.4) is required for a non-write-locked resource. This minimizes the number of new versions that will be created by a versioning unaware client, but only a versioning aware client can create new versions of a non-write-locked resource.
- 自动签出资源,执行修改,然后使资源保持签出状态。如果资源被写锁定,则在删除写锁定时将自动签入,但非写锁定资源需要显式签入操作(参见第4.4节)。这将最小化不知道版本控制的客户端将创建的新版本数,但只有知道版本控制的客户端才能创建非写锁定资源的新版本。
- Fail the request unless the resource is write-locked. If it is write-locked, automatically checkout the resource and perform the modification. The resource is automatically checked in when the write-lock is removed. This minimizes the number of new versions that will be created by a versioning unaware client, but never automatically checks out a resource that will not subsequently be automatically checked in.
- 请求失败,除非资源被写锁定。如果资源被写锁定,则自动签出资源并执行修改。删除写锁后,资源将自动签入。这将最大限度地减少不知道版本控制的客户端将创建的新版本数量,但不会自动签出随后不会自动签入的资源。
The following diagram illustrates the effect of the checkout/checkin process on a version-controlled resource and its version history. The symbol inside a box (S1, S2, S3) represents the current content and dead properties of the resource represented by that box. The symbol next to a box (V1, V2, V3) represents the URL for that resource.
下图说明了签出/签入过程对版本受控资源及其版本历史的影响。框(S1、S2、S3)内的符号表示该框表示的资源的当前内容和无效属性。框(V1、V2、V3)旁边的符号表示该资源的URL。
===checkout==> ===PUT==> ===checkin==>
===checkout==> ===PUT==> ===checkin==>
/foo.html (version-controlled resource)
/foo.html(版本控制资源)
+----+ | +----+ | +----+ | +----+ | S2 | | | S2 | | | S3 | | | S3 | +----+ | +----+ | +----+ | +----+ Checked-In=V2|Checked-Out=V2|Checked-Out=V2|Checked-In=V3
+----+ | +----+ | +----+ | +----+ | S2 | | | S2 | | | S3 | | | S3 | +----+ | +----+ | +----+ | +----+ Checked-In=V2|Checked-Out=V2|Checked-Out=V2|Checked-In=V3
/his/73 (version history for /foo.html)
/his/73 (version history for /foo.html)
+----+ | +----+ | +----+ | +----+ | S1 | V1 | | S1 | V1 | | S1 | V1 | | S1 | V1 +----+ | +----+ | +----+ | +----+ | | | | | | | | | | | | | | +----+ | +----+ | +----+ | +----+ | S2 | V2 | | S2 | V2 | | S2 | V2 | | S2 | V2 +----+ | +----+ | +----+ | +----+ | | | | | | | | | | | +----+ | | | | S3 | V3 | | | +----+
+----+ | +----+ | +----+ | +----+ | S1 | V1 | | S1 | V1 | | S1 | V1 | | S1 | V1 +----+ | +----+ | +----+ | +----+ | | | | | | | | | | | | | | +----+ | +----+ | +----+ | +----+ | S2 | V2 | | S2 | V2 | | S2 | V2 | | S2 | V2 +----+ | +----+ | +----+ | +----+ | | | | | | | | | | | +----+ | | | | S3 | V3 | | | +----+
Note that a version captures only a defined subset of the state of a resource. In particular, a version of a basic resource captures its content and dead properties, but not its live properties.
请注意,版本仅捕获资源状态的定义子集。特别是,基本资源的版本捕获其内容和死属性,但不捕获其活属性。
Some versioning information about a resource requires that parameters be specified along with that request for information. Included in basic versioning is the required support for an extensible reporting mechanism, which includes a REPORT method as well as a live property for determining what reports are supported by a particular resource. The REPORT method is required by versioning, but it can be used in non-versioning WebDAV extensions.
有关资源的某些版本控制信息要求在请求信息时指定参数。基本版本控制中包括对可扩展报告机制的必要支持,该机制包括一个报告方法以及一个用于确定特定资源支持哪些报告的活动属性。版本控制需要REPORT方法,但可以在非版本控制WebDAV扩展中使用。
To allow a client to query the properties of all versions in the version history of a specified version-controlled resource, basic versioning provides the DAV:version-tree report (see Section 3.7). A more powerful version history reporting mechanism is provided by applying the DAV:expand-property report (see Section 3.8) to a version history resource (see Section 5).
为了允许客户端查询指定版本控制资源的版本历史记录中所有版本的属性,基本版本控制提供了DAV:version树报告(请参见第3.7节)。通过将DAV:expand属性报告(请参见第3.8节)应用于版本历史资源(请参见第5节),可以提供更强大的版本历史报告机制。
3 Version-Control Feature
3版本控制功能
The version-control feature provides support for putting a resource under version control, creating an associated version-controlled resource and version history resource as described in Section 2.2.1. A server indicates that it supports the version-control feature by including the string "version-control" as a field in the DAV header in the response to an OPTIONS request. The version-control feature MUST be supported if any other versioning feature is supported.
版本控制功能支持将资源置于版本控制之下,创建相关的版本控制资源和版本历史记录资源,如第2.2.1节所述。服务器通过在对选项请求的响应中在DAV头中包含字符串“version control”(版本控制)作为字段来表示它支持版本控制功能。如果支持任何其他版本控制功能,则必须支持版本控制功能。
The version-control feature introduces the following REQUIRED properties for any WebDAV resource.
版本控制功能为任何WebDAV资源引入以下必需属性。
This property is used to track a brief comment about a resource that is suitable for presentation to a user. The DAV:comment of a version can be used to indicate why that version was created.
此属性用于跟踪有关适合向用户演示的资源的简短评论。版本的DAV:注释可用于指示创建该版本的原因。
<!ELEMENT comment (#PCDATA)> PCDATA value: string
<!ELEMENT comment (#PCDATA)> PCDATA value: string
This property contains a description of the creator of the resource that is suitable for presentation to a user. The DAV:creator-displayname of a version can be used to indicate who created that version.
此属性包含适合向用户演示的资源创建者的描述。版本的DAV:creator显示名称可用于指示是谁创建了该版本。
<!ELEMENT creator-displayname (#PCDATA)> PCDATA value: string
<!ELEMENT creator-displayname (#PCDATA)> PCDATA value: string
This property identifies the methods that are supported by the resource. A method is supported by a resource if there is some state of that resource for which an application of that method will
此属性标识资源支持的方法。如果某个资源的某个状态是该方法的应用程序将支持的,则该资源支持该方法
successfully satisfy all postconditions of that method, including any additional postconditions added by the features supported by that resource.
成功满足该方法的所有后置条件,包括由该资源支持的功能添加的任何附加后置条件。
<!ELEMENT supported-method-set (supported-method*)> <!ELEMENT supported-method ANY> <!ATTLIST supported-method name NMTOKEN #REQUIRED> name value: a method name
<!ELEMENT supported-method-set (supported-method*)> <!ELEMENT supported-method ANY> <!ATTLIST supported-method name NMTOKEN #REQUIRED> name value: a method name
This property identifies the live properties that are supported by the resource. A live property is supported by a resource if that property has the semantics defined for that property. The value of this property MUST identify all live properties defined by this document that are supported by the resource, and SHOULD identify all live properties that are supported by the resource.
此属性标识资源支持的活动属性。如果活动属性具有为该属性定义的语义,则该属性受资源支持。此属性的值必须标识此文档定义的资源支持的所有活动属性,并且应标识资源支持的所有活动属性。
<!ELEMENT supported-live-property-set (supported-live-property*)> <!ELEMENT supported-live-property name> <!ELEMENT prop ANY> ANY value: a property element type
<!ELEMENT supported-live-property-set (supported-live-property*)> <!ELEMENT supported-live-property name> <!ELEMENT prop ANY> ANY value: a property element type
This property identifies the reports that are supported by the resource.
此属性标识资源支持的报告。
<!ELEMENT supported-report-set (supported-report*)> <!ELEMENT supported-report report> <!ELEMENT report ANY> ANY value: a report element type
<!ELEMENT supported-report-set (supported-report*)> <!ELEMENT supported-report report> <!ELEMENT report ANY> ANY value: a report element type
The version-control feature introduces the following REQUIRED properties for a version-controlled resource.
版本控制功能为受版本控制的资源引入以下必需属性。
This property appears on a checked-in version-controlled resource, and identifies a version that has the same content and dead properties as the version-controlled resource. This property is removed when the resource is checked out, and then added back (identifying a new version) when the resource is checked back in.
此属性显示在签入的版本控制资源上,并标识与版本控制资源具有相同内容和无效属性的版本。签出资源时删除此属性,然后在签回资源时重新添加(标识新版本)。
<!ELEMENT checked-in (href)>
<!ELEMENT checked-in (href)>
If the DAV:auto-version value is DAV:checkout-checkin, when a modification request (such as PUT/PROPPATCH) is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout and followed by a checkin operation.
如果DAV:auto version值为DAV:checkout checkin,则当修改请求(如PUT/PROPPATCH)应用于签入版本控制的资源时,该请求将自动在签出之前执行,然后执行签入操作。
If the DAV:auto-version value is DAV:checkout-unlocked-checkin, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout operation. If the resource is not write-locked, the request is automatically followed by a checkin operation.
如果DAV:auto version值为DAV:checkout unlocked checkin,则当修改请求应用于签入的版本控制资源时,该请求将自动在签出操作之前执行。如果资源未被写锁定,则请求后会自动执行签入操作。
If the DAV:auto-version value is DAV:checkout, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout operation.
如果DAV:auto version值为DAV:checkout,则当修改请求应用于签入的版本控制资源时,该请求将自动在签出操作之前执行。
If the DAV:auto-version value is DAV:locked-checkout, when a modification request is applied to a write-locked checked-in version-controlled resource, the request is automatically preceded by a checkout operation.
如果DAV:auto version值为DAV:locked checkout,则当修改请求应用于写锁定的签入版本控制资源时,该请求将自动在签出操作之前执行。
If an update to a write-locked checked-in resource is automatically preceded by a checkout of that resource, the checkout is associated with the write lock. When this write lock is removed (e.g. from an UNLOCK or a lock timeout), if the resource has not yet been checked in, the removal of the write lock is automatically preceded by a checkin operation.
如果对写锁定签入资源的更新之前自动签出该资源,则签出与写锁定关联。当删除此写锁(例如,从解锁或锁定超时)时,如果资源尚未签入,则在删除写锁之前会自动执行签入操作。
A server MAY refuse to allow the value of the DAV:auto-version property to be modified, or MAY only support values from a subset of the valid values.
服务器可能拒绝修改DAV:auto-version属性的值,或者可能只支持有效值的子集中的值。
<!ELEMENT auto-version (checkout-checkin | checkout-unlocked-checkin | checkout | locked-checkout)? > <!ELEMENT checkout-checkin EMPTY> <!ELEMENT checkout-unlocked-checkin EMPTY> <!ELEMENT checkout EMPTY> <!ELEMENT locked-checkout EMPTY>
<!ELEMENT auto-version (checkout-checkin | checkout-unlocked-checkin | checkout | locked-checkout)? > <!ELEMENT checkout-checkin EMPTY> <!ELEMENT checkout-unlocked-checkin EMPTY> <!ELEMENT checkout EMPTY> <!ELEMENT locked-checkout EMPTY>
The version-control feature introduces the following REQUIRED properties for a checked-out resource.
版本控制功能为签出的资源引入以下必需属性。
This property identifies the version that was identified by the DAV:checked-in property at the time the resource was checked out. This property is removed when the resource is checked in.
此属性标识资源签出时由DAV:checked-in属性标识的版本。签入资源时,将删除此属性。
<!ELEMENT checked-out (href)>
<!ELEMENT checked-out (href)>
This property determines the DAV:predecessor-set property of the version that results from checking in this resource.
此属性确定签入此资源后生成的版本的DAV:precedure set属性。
A server MAY reject attempts to modify the DAV:predecessor-set of a version-controlled resource.
服务器可能会拒绝修改版本控制资源的DAV:前置集的尝试。
<!ELEMENT predecessor-set (href+)>
<!ELEMENT predecessor-set (href+)>
The version-control feature introduces the following REQUIRED properties for a version.
版本控制功能为版本引入以下必需属性。
This property identifies each predecessor of this version. Except for the root version, which has no predecessors, each version has at least one predecessor.
此属性标识此版本的每个前置版本。除了没有前置版本的根版本外,每个版本至少有一个前置版本。
<!ELEMENT predecessor-set (href*)>
<!ELEMENT predecessor-set (href*)>
This property identifies each version whose DAV:predecessor-set identifies this version.
此属性标识其DAV:前置集标识此版本的每个版本。
<!ELEMENT successor-set (href*)>
<!ELEMENT successor-set (href*)>
This property identifies each checked-out resource whose DAV:checked-out property identifies this version.
此属性标识其DAV:checked-out属性标识此版本的每个签出资源。
<!ELEMENT checkout-set (href*)>
<!ELEMENT checkout-set (href*)>
This property contains a server-defined string that is different for each version in a given version history. This string is intended for display for a user, unlike the URL of a version, which is normally only used by a client and not displayed for a user.
此属性包含一个服务器定义的字符串,该字符串对于给定版本历史记录中的每个版本都是不同的。此字符串用于为用户显示,与版本的URL不同,版本的URL通常仅由客户端使用,而不显示给用户。
<!ELEMENT version-name (#PCDATA)> PCDATA value: string
<!ELEMENT version-name (#PCDATA)> PCDATA value: string
A VERSION-CONTROL request can be used to create a version-controlled resource at the request-URL. It can be applied to a versionable resource or to a version-controlled resource.
版本控制请求可用于在请求URL处创建版本控制资源。它可以应用于可版本化资源或受版本控制的资源。
If the request-URL identifies a versionable resource, a new version history resource is created, a new version is created whose content and dead properties are copied from the versionable resource, and the resource is given a DAV:checked-in property that is initialized to identify this new version.
如果请求URL标识可版本资源,则会创建新的版本历史记录资源,创建一个新版本,其内容和死属性从可版本资源复制,并为该资源提供一个DAV:checked-in属性,该属性已初始化以标识此新版本。
If the request-URL identifies a version-controlled resource, the resource just remains under version-control. This allows a client to be unaware of whether or not a server automatically puts a resource under version control when it is created.
如果请求URL标识了受版本控制的资源,则该资源仍处于版本控制之下。这使得客户端不知道服务器在创建资源时是否自动将其置于版本控制之下。
If a VERSION-CONTROL request fails, the server state preceding the request MUST be restored.
如果版本控制请求失败,则必须恢复请求之前的服务器状态。
Marshalling:
编组:
If a request body is included, it MUST be a DAV:version-control XML element.
如果包含请求主体,则它必须是DAV:version-control XML元素。
<!ELEMENT version-control ANY>
<!ELEMENT version-control ANY>
If a response body for a successful request is included, it MUST be a DAV:version-control-response XML element. Note that this document does not define any elements for the VERSION-CONTROL response body, but the DAV:version-control-response element is defined to ensure interoperability between future extensions that do define elements for the VERSION-CONTROL response body.
如果包含成功请求的响应主体,则它必须是DAV:version-control-response-XML元素。请注意,本文档没有为版本控制响应主体定义任何元素,但定义了DAV:VERSION-CONTROL-response元素以确保将来的扩展之间的互操作性,这些扩展确实为版本控制响应主体定义了元素。
<!ELEMENT version-control-response ANY>
<!ELEMENT version-control-response ANY>
Postconditions:
后条件:
(DAV:put-under-version-control): If the request-URL identified a versionable resource at the time of the request, the request MUST have created a new version history and MUST have created a new version resource in that version history. The resource MUST have a DAV:checked-in property that identifies the new version. The content, dead properties, and DAV:resourcetype of the new version MUST be the same as those of the resource. Note that an implementation can choose to locate the version history and version resources anywhere that it wishes. In particular, it could locate them on the same host and server as the version-controlled resource, on a different virtual host maintained by the same server, on the same host maintained by a different server, or on a different host maintained by a different server.
(DAV:置于版本控制之下):如果请求URL在请求时标识了可版本化资源,则请求必须已创建新的版本历史记录,并且必须已在该版本历史记录中创建了新的版本资源。资源必须具有标识新版本的DAV:checked-in属性。新版本的内容、死属性和DAV:resourcetype必须与资源的内容、死属性和DAV:resourcetype相同。请注意,实现可以选择将版本历史记录和版本资源定位到它希望的任何位置。特别是,它可以将它们定位在与版本控制资源相同的主机和服务器上、由相同服务器维护的不同虚拟主机上、由不同服务器维护的相同主机上或由不同服务器维护的不同主机上。
(DAV:must-not-change-existing-checked-in-out): If the request-URL identified a resource already under version control at the time of the request, the request MUST NOT change the DAV:checked-in or DAV:checked-out property of that version-controlled resource.
(DAV:不得更改已签入的现有资源):如果请求URL在请求时标识了已处于版本控制下的资源,则请求不得更改该版本控制资源的DAV:已签入或DAV:已签出属性。
>>REQUEST
>>请求
VERSION-CONTROL /foo.html HTTP/1.1 Host: www.webdav.org Content-Length: 0
版本控制/foo.html HTTP/1.1主机:www.webdav.org内容长度:0
>>RESPONSE
>>回应
HTTP/1.1 200 OK
HTTP/1.1200ok
In this example, /foo.html is put under version control. A new version history is created for it, and a new version is created that has a copy of the content and dead properties of /foo.html. The DAV:checked-in property of /foo.html identifies this new version.
在本例中,/foo.html处于版本控制之下。将为其创建一个新版本历史记录,并创建一个新版本,其中包含/foo.html的内容和无效属性的副本。/foo.html的DAV:checked-in属性标识这个新版本。
A REPORT request is an extensible mechanism for obtaining information about a resource. Unlike a resource property, which has a single value, the value of a report can depend on additional information specified in the REPORT request body and in the REPORT request headers.
报告请求是一种可扩展的机制,用于获取有关资源的信息。与具有单个值的资源属性不同,报表的值可以取决于报表请求正文和报表请求标头中指定的其他信息。
Marshalling:
编组:
The body of a REPORT request specifies which report is being requested, as well as any additional information that will be used to customize the report.
报告请求的正文指定请求的报告以及用于自定义报告的任何附加信息。
The request MAY include a Depth header. If no Depth header is included, Depth:0 is assumed.
该请求可以包括深度报头。如果未包含深度标头,则假定深度为0。
The response body for a successful request MUST contain the requested report.
成功请求的响应正文必须包含请求的报告。
If a Depth request header is included, the response MUST be a 207 Multi-Status. The request MUST be applied separately to the collection itself and to all members of the collection that satisfy the Depth value. The DAV:prop element of a DAV:response for a given resource MUST contain the requested report for that resource.
如果包含深度请求标头,则响应必须为207多状态。请求必须分别应用于集合本身和满足深度值的集合的所有成员。给定资源的DAV:response的DAV:prop元素必须包含该资源的请求报告。
Preconditions:
先决条件:
(DAV:supported-report): The specified report MUST be supported by the resource identified by the request-URL.
(DAV:支持的报告):指定的报告必须由请求URL标识的资源支持。
Postconditions:
后条件:
(DAV:no-modification): The REPORT method MUST NOT have changed the content or dead properties of any resource.
(DAV:无修改):报告方法不得更改任何资源的内容或死属性。
The DAV:version-tree report describes the requested properties of all the versions in the version history of a version. If the report is requested for a version-controlled resource, it is redirected to its DAV:checked-in or DAV:checked-out version.
版本树报告描述了版本历史记录中所有版本的请求属性。如果为受版本控制的资源请求报告,则报告将重定向到其DAV:签入或DAV:签出版本。
The DAV:version-tree report MUST be supported by all version resources and all version-controlled resources.
所有版本资源和所有受版本控制的资源都必须支持DAV:version树报告。
Marshalling:
编组:
The request body MUST be a DAV:version-tree XML element.
请求正文必须是DAV:version树XML元素。
<!ELEMENT version-tree ANY> ANY value: a sequence of zero or more elements, with at most one DAV:prop element. prop: see RFC 2518, Section 12.11
<!ELEMENT version-tree ANY> ANY value: a sequence of zero or more elements, with at most one DAV:prop element. prop: see RFC 2518, Section 12.11
The response body for a successful request MUST be a DAV:multistatus XML element.
成功请求的响应体必须是DAV:multistatusxml元素。
multistatus: see RFC 2518, Section 12.9
Multistaus:见RFC 2518第12.9节
The response body for a successful DAV:version-tree REPORT request MUST contain a DAV:response element for each version in the version history of the version identified by the request-URL.
成功的DAV:version树报告请求的响应正文必须包含请求URL标识的版本的版本历史记录中每个版本的DAV:response元素。
The version history drawn below would produce the following version tree report.
下面绘制的版本历史将生成以下版本树报告。
foo.html History
foo.html历史记录
+---+ | | V1 +---+ / \ / \ +---+ +---+ | | V2 | | V2.1.1 +---+ +---+
+---+ | | V1 +---+ / \ / \ +---+ +---+ | | V2 | | V2.1.1 +---+ +---+
>>REQUEST
>>请求
REPORT /foo.html HTTP/1.1 Host: www.webdav.org Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
REPORT /foo.html HTTP/1.1 Host: www.webdav.org Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <D:version-tree xmlns:D="DAV:"> <D:prop> <D:version-name/> <D:creator-displayname/> <D:successor-set/> </D:prop> </D:version-tree>
<?xml version="1.0" encoding="utf-8" ?> <D:version-tree xmlns:D="DAV:"> <D:prop> <D:version-name/> <D:creator-displayname/> <D:successor-set/> </D:prop> </D:version-tree>
>>RESPONSE
>>回应
HTTP/1.1 207 Multi-Status Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
HTTP/1.1 207 Multi-Status Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <D:multistatus xmlns:D="DAV:"> <D:response> <D:href>http://repo.webdav.org/his/23/ver/V1</D:href> <D:propstat> <D:prop> <D:version-name>V1</D:version-name> <D:creator-displayname>Fred</D:creator-displayname> <D:successor-set> <D:href>http://repo.webdav.org/his/23/ver/V2</D:href> <D:href>http://repo.webdav.org/his/23/ver/V2.1.1</D:href> </D:successor-set> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> <D:response> <D:href>http://repo.webdav.org/his/23/ver/V2</D:href> <D:propstat> <D:prop> <D:version-name>V2</D:version-name> <D:creator-displayname>Fred</D:creator-displayname> <D:successor-set/> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> <D:response> <D:href>http://repo.webdav.org/his/23/ver/V2.1.1</D:href> <D:propstat> <D:prop> <D:version-name>V2.1.1</D:version-name> <D:creator-displayname>Sally</D:creator-displayname> <D:successor-set/> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> </D:multistatus>
<?xml version="1.0" encoding="utf-8" ?> <D:multistatus xmlns:D="DAV:"> <D:response> <D:href>http://repo.webdav.org/his/23/ver/V1</D:href> <D:propstat> <D:prop> <D:version-name>V1</D:version-name> <D:creator-displayname>Fred</D:creator-displayname> <D:successor-set> <D:href>http://repo.webdav.org/his/23/ver/V2</D:href> <D:href>http://repo.webdav.org/his/23/ver/V2.1.1</D:href> </D:successor-set> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> <D:response> <D:href>http://repo.webdav.org/his/23/ver/V2</D:href> <D:propstat> <D:prop> <D:version-name>V2</D:version-name> <D:creator-displayname>Fred</D:creator-displayname> <D:successor-set/> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> <D:response> <D:href>http://repo.webdav.org/his/23/ver/V2.1.1</D:href> <D:propstat> <D:prop> <D:version-name>V2.1.1</D:version-name> <D:creator-displayname>Sally</D:creator-displayname> <D:successor-set/> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> </D:multistatus>
Many property values are defined as a DAV:href, or a set of DAV:href elements. The DAV:expand-property report provides a mechanism for retrieving in one request the properties from the resources identified by those DAV:href elements. This report not only decreases the number of requests required, but also allows the server to minimize the number of separate read transactions required on the underlying versioning store.
许多属性值定义为一个DAV:href或一组DAV:href元素。DAV:expand属性报告提供了一种机制,用于在一个请求中从那些DAV:href元素标识的资源中检索属性。此报告不仅减少了所需的请求数,还允许服务器将底层版本控制存储上所需的单独读取事务数降至最低。
The DAV:expand-property report SHOULD be supported by all resources that support the REPORT method.
支持报告方法的所有资源都应支持DAV:expand属性报告。
Marshalling:
编组:
The request body MUST be a DAV:expand-property XML element.
请求正文必须是DAV:expand属性XML元素。
<!ELEMENT expand-property (property*)> <!ELEMENT property (property*)> <!ATTLIST property name NMTOKEN #REQUIRED> name value: a property element type <!ATTLIST property namespace NMTOKEN "DAV:"> namespace value: an XML namespace
<!ELEMENT expand-property (property*)> <!ELEMENT property (property*)> <!ATTLIST property name NMTOKEN #REQUIRED> name value: a property element type <!ATTLIST property namespace NMTOKEN "DAV:"> namespace value: an XML namespace
The response body for a successful request MUST be a DAV:multistatus XML element.
成功请求的响应体必须是DAV:multistatusxml元素。
multistatus: see RFC 2518, Section 12.9
Multistaus:见RFC 2518第12.9节
The properties reported in the DAV:prop elements of the DAV:multistatus element MUST be those identified by the DAV:property elements in the DAV:expand-property element. If there are DAV:property elements nested within a DAV:property element, then every DAV:href in the value of the corresponding property is replaced by a DAV:response element whose DAV:prop elements report the values of the properties identified by the nested DAV:property elements. The nested DAV:property elements can in turn contain DAV:property elements, so that multiple levels of DAV:href expansion can be requested.
DAV:multistatus元素的DAV:prop元素中报告的属性必须是由DAV:expand属性元素中的DAV:property元素标识的属性。如果在DAV:property元素中嵌套了DAV:property元素,则相应属性值中的每个DAV:href都将替换为一个DAV:response元素,该元素的DAV:prop元素报告由嵌套的DAV:property元素标识的属性值。嵌套的DAV:property元素又可以包含DAV:property元素,因此可以请求多个级别的DAV:href扩展。
Note that a validating parser MUST be aware that the DAV:expand-property report effectively modifies the DTD of every property by replacing every occurrence of "href" in the DTD with "href | response".
请注意,验证解析器必须知道,DAV:expand属性报告通过将DTD中出现的每一个“href”替换为“href | response”,有效地修改了每个属性的DTD。
This example describes how to query a version-controlled resource to determine the DAV:creator-display-name and DAV:activity-set of every version in the version history of that version-controlled resource. This example assumes that the server supports the version-history feature (see Section 5).
此示例描述如何查询版本受控资源,以确定该版本受控资源的版本历史记录中每个版本的DAV:creator显示名称和DAV:activity集。本例假设服务器支持版本历史记录功能(请参阅第5节)。
>>REQUEST
>>请求
REPORT /foo.html HTTP/1.1 Host: www.webdav.org Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
REPORT /foo.html HTTP/1.1 Host: www.webdav.org Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <D:expand-property xmlns:D="DAV:"> <D:property name="version-history"> <D:property name="version-set"> <D:property name="creator-displayname"/> <D:property name="activity-set"/> </D:property> </D:property> </D:expand-property>
<?xml version="1.0" encoding="utf-8" ?> <D:expand-property xmlns:D="DAV:"> <D:property name="version-history"> <D:property name="version-set"> <D:property name="creator-displayname"/> <D:property name="activity-set"/> </D:property> </D:property> </D:expand-property>
>>RESPONSE
>>回应
HTTP/1.1 207 Multi-Status Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
HTTP/1.1 207 Multi-Status Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <D:multistatus xmlns:D="DAV:"> <D:response> <D:href>http://www.webdav.org/foo.html</D:href> <D:propstat> <D:prop> <D:version-history> <D:response> <D:href>http://repo.webdav.org/his/23</D:href> <D:propstat> <D:prop> <D:version-set> <D:response> <D:href>http://repo.webdav.org/his/23/ver/1</D:href> <D:propstat> <D:prop> <D:creator-displayname>Fred</D:creator-displayname>
<?xml version="1.0" encoding="utf-8" ?> <D:multistatus xmlns:D="DAV:"> <D:response> <D:href>http://www.webdav.org/foo.html</D:href> <D:propstat> <D:prop> <D:version-history> <D:response> <D:href>http://repo.webdav.org/his/23</D:href> <D:propstat> <D:prop> <D:version-set> <D:response> <D:href>http://repo.webdav.org/his/23/ver/1</D:href> <D:propstat> <D:prop> <D:creator-displayname>Fred</D:creator-displayname>
<D:activity-set> <D:href> http://www.webdav.org/ws/dev/sally </D:href> </D:activity-set> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> <D:response> <D:href>http://repo.webdav.org/his/23/ver/2</D:href> <D:propstat> <D:prop> <D:creator-displayname>Sally</D:creator-displayname> <D:activity-set> <D:href>http://repo.webdav.org/act/add-refresh-cmd</D:href> </D:activity-set> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> </D:version-set> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> </D:version-history> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> </D:multistatus>
<D:activity-set> <D:href> http://www.webdav.org/ws/dev/sally </D:href> </D:activity-set> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> <D:response> <D:href>http://repo.webdav.org/his/23/ver/2</D:href> <D:propstat> <D:prop> <D:creator-displayname>Sally</D:creator-displayname> <D:activity-set> <D:href>http://repo.webdav.org/act/add-refresh-cmd</D:href> </D:activity-set> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> </D:version-set> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> </D:version-history> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> </D:multistatus>
In this example, the DAV:creator-displayname and DAV:activity-set properties of the versions in the DAV:version-set of the DAV:version-history of http://www.webdav.org/foo.html are reported.
在此示例中,的DAV:version历史记录的DAV:version集中的版本的DAV:creator displayname和DAV:activity集属性http://www.webdav.org/foo.html 据报道。
If the server supports the version-control feature, it MUST include "version-control" as a field in the DAV response header from an OPTIONS request on any resource that supports any versioning properties, reports, or methods.
如果服务器支持版本控制功能,则必须在支持任何版本控制属性、报告或方法的任何资源上的选项请求的DAV响应标头中包含“版本控制”字段。
Additional Preconditions:
其他先决条件:
(DAV:cannot-modify-version-controlled-content): If the request-URL identifies a resource with a DAV:checked-in property, the request MUST fail unless DAV:auto-version semantics will automatically check out the resource.
(DAV:无法修改版本控制的内容):如果请求URL使用DAV:签入属性标识资源,则请求必须失败,除非DAV:自动版本语义将自动签出资源。
(DAV:cannot-modify-version): If the request-URL identifies a version, the request MUST fail.
(DAV:无法修改版本):如果请求URL标识版本,则请求必须失败。
If the request creates a new resource that is automatically placed under version control, all preconditions for VERSION-CONTROL apply to the request.
如果请求创建了自动置于版本控制下的新资源,则版本控制的所有先决条件都将应用于该请求。
Additional Postconditions:
附加后条件:
(DAV:auto-checkout): If the resource was a checked-in version-controlled resource whose DAV:auto-version property indicates it should be automatically checked out but not automatically checked in for a modification request, then the server MUST have automatically checked out the resource prior to executing the request. In particular, the value of the DAV:checked-out property of the resource MUST be that of the DAV:checked-in property prior to the request, the DAV:checked-in property MUST have been removed, and the DAV:predecessor-set property MUST be initialized to be the same as the DAV:checked-out property. If any part of the checkout/update sequence failed, the status from the failed part of the request MUST be returned, and the server state preceding the request sequence MUST be restored.
(DAV:自动签出):如果资源是签入的版本控制资源,其DAV:自动版本属性指示该资源应自动签出,但不自动签入修改请求,则服务器必须在执行请求之前自动签出该资源。特别是,在请求之前,资源的DAV:checked-out属性的值必须是DAV:checked-In属性的值,DAV:checked-In属性必须已删除,并且DAV:preference-set属性必须初始化为与DAV:checked-out属性相同。如果签出/更新序列的任何部分失败,则必须返回请求失败部分的状态,并且必须恢复请求序列之前的服务器状态。
(DAV:auto-checkout-checkin): If the resource was a checked-in version-controlled resource whose DAV:auto-version property indicates it should be automatically checked out and automatically checked in for a modification request, then the server MUST have automatically checked out the resource prior to executing the request and automatically checked it in after the request. In particular, the DAV:checked-in property of the resource MUST identify a new version whose content and dead properties are the same as those of the resource. The DAV:predecessor-set of the new version MUST identify the version identified by the DAV:checked-in property prior to the request. If any part of the checkout/update/checkin sequence failed, the status from the failed part of the request MUST be returned, and the server state preceding the request sequence MUST be restored.
(DAV:自动签出签入):如果资源是签入的版本控制资源,其DAV:自动版本属性指示该资源应自动签出并自动签入修改请求,然后,服务器必须在执行请求之前自动签出资源,并在请求之后自动签入资源。特别是,资源的DAV:checked-In属性必须标识其内容和死属性与资源相同的新版本。新版本的DAV:前置集必须在请求之前标识由DAV:签入属性标识的版本。如果签出/更新/签入序列的任何部分失败,则必须返回请求失败部分的状态,并且必须恢复请求序列之前的服务器状态。
If the request creates a new resource, the new resource MAY have automatically been placed under version control, and all postconditions for VERSION-CONTROL apply to the request.
如果请求创建了新资源,则新资源可能已自动置于版本控制之下,并且版本控制的所有后条件均适用于该请求。
A DAV:allprop PROPFIND request SHOULD NOT return any of the properties defined by this document. This allows a versioning server to perform efficiently when a naive client, which does not understand the cost of asking a server to compute all possible live properties, issues a DAV:allprop PROPFIND request.
DAV:allprop PROPFIND请求不应返回此文档定义的任何属性。这允许版本控制服务器在一个不了解要求服务器计算所有可能的活动属性的成本的简单客户端发出DAV:allprop-PROPFIND请求时高效地执行。
Additional Preconditions:
其他先决条件:
(DAV:supported-live-property): If the request attempts to access a property defined by this document, the semantics of that property MUST be supported by the server.
(DAV:supported live property):如果请求试图访问此文档定义的属性,则服务器必须支持该属性的语义。
Additional Preconditions:
其他先决条件:
(DAV:cannot-modify-version-controlled-property): If the request attempts to modify a dead property, same semantics as PUT (see Section 3.10).
(DAV:无法修改版本控制属性):如果请求试图修改死属性,则语义与PUT相同(参见第3.10节)。
(DAV:cannot-modify-version): If the request attempts to modify a dead property, same semantics as PUT (see Section 3.10).
(DAV:无法修改版本):如果请求试图修改死属性,则语义与PUT相同(参见第3.10节)。
(DAV:cannot-modify-protected-property): An attempt to modify a property that is defined by this document, as being protected for that kind of resource, MUST fail.
(DAV:无法修改受保护的属性):尝试修改此文档定义为受该类资源保护的属性必须失败。
(DAV:supported-live-property): An attempt to modify a property defined by this document, but whose semantics are not enforced by the server, MUST fail. This helps ensure that a client will be notified when it is trying to use a property whose semantics are not supported by the server.
(DAV:受支持的live属性):尝试修改此文档定义的属性(但其语义未由服务器强制执行)必须失败。这有助于确保客户端在尝试使用其语义不受服务器支持的属性时收到通知。
Additional Postconditions:
附加后条件:
(DAV:auto-checkout): If the request modified a dead property, same semantics as PUT (see Section 3.10).
(DAV:自动签出):如果请求修改了死属性,则语义与PUT相同(参见第3.10节)。
(DAV:auto-checkout-checkin): If the request modified a dead property, same semantics as PUT (see Section 3.10).
(DAV:自动签出签入):如果请求修改了死属性,则语义与PUT相同(参见第3.10节)。
Additional Preconditions:
其他先决条件:
(DAV:no-version-delete): A server MAY fail an attempt to DELETE a version.
(DAV:无版本删除):服务器删除版本的尝试可能失败。
Additional Postconditions:
附加后条件:
(DAV:update-predecessor-set): If a version was deleted, the server MUST have replaced any reference to that version in a DAV:predecessor-set by a copy of the DAV:predecessor-set of the deleted version.
(DAV:update Preference set):如果删除了版本,则服务器必须已将DAV:Preference集合中对该版本的任何引用替换为已删除版本的DAV:Preference集合的副本。
Additional Preconditions:
其他先决条件:
If the request creates a new resource that is automatically placed under version control, all preconditions for VERSION-CONTROL apply to the request.
如果请求创建了自动置于版本控制下的新资源,则版本控制的所有先决条件都将应用于该请求。
Additional Postconditions:
附加后条件:
(DAV:must-not-copy-versioning-property): A property defined by this document MUST NOT have been copied to the new resource created by this request, but instead that property of the new resource MUST have the default initial value it would have had if the new resource had been created by a non-versioning method such as PUT or a MKCOL.
(DAV:不得复制版本控制属性):此文档定义的属性不得复制到此请求创建的新资源,但新资源的属性必须具有默认初始值,如果新资源是通过非版本控制方法(如PUT或MKCOL)创建的,则该属性必须具有默认初始值。
(DAV:auto-checkout): If the destination is a version-controlled resource, same semantics as PUT (see Section 3.10).
(DAV:自动签出):如果目标是版本控制的资源,则语义与PUT相同(参见第3.10节)。
(DAV:auto-checkout-checkin): If the destination is a version-controlled resource, same semantics as PUT (see Section 3.10).
(DAV:自动签出签入):如果目标是受版本控制的资源,则语义与PUT相同(参见第3.10节)。
(DAV:copy-creates-new-resource): If the source of a COPY is a version-controlled resource or version, and if there is no resource at the destination of the COPY, then the COPY creates a new non-version-controlled resource at the destination of the COPY. The new resource MAY automatically be put under version control, but the resulting version-controlled resource MUST be associated with a new version history created for that new version-controlled resource, and all postconditions for VERSION-CONTROL apply to the request.
(DAV:复制创建新资源):如果副本的源是版本控制的资源或版本,并且副本的目标位置没有资源,则副本将在副本的目标位置创建新的非版本控制资源。新资源可能会自动置于版本控制之下,但生成的版本控制资源必须与为该新版本控制资源创建的新版本历史记录相关联,并且版本控制的所有后条件都适用于该请求。
Additional Preconditions:
其他先决条件:
(DAV:cannot-rename-version): If the request-URL identifies a version, the request MUST fail.
(DAV:无法重命名版本):如果请求URL标识版本,则请求必须失败。
Additional Postconditions:
附加后条件:
(DAV:preserve-versioning-properties): When a resource is moved from a source URL to a destination URL, a property defined by this document MUST have the same value at the destination URL as it had at the source URL.
(DAV:保留版本控制属性):当资源从源URL移动到目标URL时,此文档定义的属性在目标URL上的值必须与在源URL上的值相同。
Note that these semantics apply both to an explicit UNLOCK request, as well as to the removal of a lock because of a lock timeout. If a precondition or postcondition cannot be satisfied, the lock timeout MUST NOT occur.
注意,这些语义既适用于显式解锁请求,也适用于由于锁超时而移除锁。如果无法满足先决条件或后决条件,则不能发生锁定超时。
Additional Preconditions:
其他先决条件:
(DAV:version-history-is-tree): If the request-URL identifies a checked-out version-controlled resource that will be automatically checked in when the lock is removed, then the versions identified by the DAV:predecessor-set of the checked-out resource MUST be descendants of the root version of the version history for the DAV:checked-out version.
(DAV:version history is tree):如果请求URL标识了一个签出版本控制的资源,该资源将在解除锁定时自动签入,则签出资源的DAV:Preference集合标识的版本必须是DAV:checked out版本的版本历史的根版本的后代。
Additional Postconditions:
附加后条件:
(DAV:auto-checkin): If the request-URL identified a checked-out version-controlled resource that had been automatically checked out because of its DAV:auto-version property, the request MUST have created a new version in the version history of the DAV:checked-out version. The request MUST have allocated a URL for the version that MUST NOT have previously identified any other resource, and MUST NOT ever identify a resource other than this version. The content, dead properties, DAV:resourcetype, and DAV:predecessor-set of the new version MUST be copied from the checked-out resource. The DAV:version-name of the new version MUST be set to a server-defined value distinct from all other DAV:version-name values of other versions in the same version history. The request MUST have removed the DAV:checked-out property of the version-controlled resource, and MUST have added a DAV:checked-in property that identifies the new version.
(DAV:auto checkin):如果请求URL标识了一个签出版本控制的资源,该资源由于其DAV:auto version属性而被自动签出,则该请求必须在DAV:checkout版本的版本历史记录中创建了一个新版本。该请求必须已为该版本分配了一个URL,该版本以前不得标识任何其他资源,也不得标识此版本以外的资源。必须从签出的资源中复制新版本的内容、死属性、DAV:resourcetype和DAV:preference集。新版本的DAV:version name必须设置为服务器定义的值,该值不同于同一版本历史记录中其他版本的所有其他DAV:version name值。请求必须已删除版本控制资源的DAV:checked-out属性,并且必须已添加标识新版本的DAV:checked-in属性。
4 CHECKOUT-IN-PLACE FEATURE
4.就地检查功能
With the version-control feature, WebDAV locking can be used to avoid the proliferation of versions that would result if every modification to a version-controlled resource produced a new version. The checkout-in-place feature provides an alternative mechanism that allows a client to explicitly check out and check in a resource to create a new version.
通过版本控制功能,可以使用WebDAV锁定来避免版本的扩散,如果对版本控制资源的每次修改都会产生新版本,则会导致版本的扩散。就地签出功能提供了另一种机制,允许客户端显式签出和签入资源以创建新版本。
The checkout-in-place feature introduces the following REQUIRED properties for a version.
就地签出功能为版本引入了以下必需属性。
This property controls the behavior of CHECKOUT when a version already is checked out or has a successor. If the DAV:checkout-fork of a version is DAV:forbidden, a CHECKOUT request MUST fail if it would result in that version appearing in the DAV:predecessor-set or DAV:checked-out property of more than one version or checked-out resource. If DAV:checkout-fork is DAV:discouraged, such a CHECKOUT request MUST fail unless DAV:fork-ok is specified in the CHECKOUT request body.
当版本已签出或具有后续版本时,此属性控制签出行为。如果某个版本的DAV:checkout fork是DAV:bidden,则如果签出请求会导致该版本出现在多个版本或签出资源的DAV:preceduor集合或DAV:checkout属性中,则该签出请求必须失败。如果DAV:checkout fork是DAV:dis劝阻的,则此类签出请求必须失败,除非在签出请求正文中指定了DAV:fork ok。
A server MAY reject attempts to modify the DAV:checkout-fork of a version.
服务器可能会拒绝修改版本的DAV:checkout分支的尝试。
<!ELEMENT checkout-fork ANY> ANY value: A sequence of elements with at most one DAV:discouraged or DAV:forbidden element. <!ELEMENT discouraged EMPTY> <!ELEMENT forbidden EMPTY>
<!ELEMENT checkout-fork ANY> ANY value: A sequence of elements with at most one DAV:discouraged or DAV:forbidden element. <!ELEMENT discouraged EMPTY> <!ELEMENT forbidden EMPTY>
This property controls the behavior of CHECKIN when a version already has a successor. If the DAV:checkin-fork of a version is DAV:forbidden, a CHECKIN request MUST fail if it would result in that version appearing in the DAV:predecessor-set of more than one version. If DAV:checkin-fork is DAV:discouraged, such a CHECKIN request MUST fail unless DAV:fork-ok is specified in the CHECKIN request body.
当版本已有后续版本时,此属性控制签入行为。如果某个版本的DAV:checkin fork是DAV:bidden,那么如果签入请求会导致该版本出现在多个版本的DAV:preference集合中,则该版本必须失败。如果DAV:checkin fork是DAV:dis劝阻的,则除非在checkin请求主体中指定了DAV:fork ok,否则此类签入请求必须失败。
A server MAY reject attempts to modify the DAV:checkout-fork of a version.
服务器可能会拒绝修改版本的DAV:checkout分支的尝试。
<!ELEMENT checkin-fork ANY> ANY value: A sequence of elements with at most one DAV:discouraged or DAV:forbidden element. <!ELEMENT discouraged EMPTY> <!ELEMENT forbidden EMPTY>
<!ELEMENT checkin-fork ANY> ANY value: A sequence of elements with at most one DAV:discouraged or DAV:forbidden element. <!ELEMENT discouraged EMPTY> <!ELEMENT forbidden EMPTY>
The checkout-in-place feature introduces the following REQUIRED properties for a checked-out resource.
“就地签出”功能为签出的资源引入以下必需属性。
This property determines the DAV:checkout-fork property of the version that results from checking in this resource.
此属性确定签入此资源后生成的版本的DAV:checkout fork属性。
This property determines the DAV:checkin-fork property of the version that results from checking in this resource.
此属性确定签入此资源后生成的版本的DAV:checkin fork属性。
A CHECKOUT request can be applied to a checked-in version-controlled resource to allow modifications to the content and dead properties of that version-controlled resource.
签出请求可以应用于签入的版本控制资源,以允许修改该版本控制资源的内容和死属性。
If a CHECKOUT request fails, the server state preceding the request MUST be restored.
如果签出请求失败,则必须恢复该请求之前的服务器状态。
Marshalling:
编组:
If a request body is included, it MUST be a DAV:checkout XML element.
如果包含请求主体,则它必须是DAV:checkout XML元素。
<!ELEMENT checkout ANY>
<!ELEMENT checkout ANY>
ANY value: A sequence of elements with at most one DAV:fork-ok element.
任意值:最多包含一个DAV:fork ok元素的元素序列。
<!ELEMENT fork-ok EMPTY>
<!ELEMENT fork-ok EMPTY>
If a response body for a successful request is included, it MUST be a DAV:checkout-response XML element.
如果包含成功请求的响应体,则它必须是DAV:checkout-response-XML元素。
<!ELEMENT checkout-response ANY>
<!ELEMENT checkout-response ANY>
The response MUST include a Cache-Control:no-cache header.
响应必须包括缓存控件:无缓存标头。
Preconditions:
先决条件:
(DAV:must-be-checked-in): If a version-controlled resource is being checked out, it MUST have a DAV:checked-in property.
(DAV:必须签入):如果要签出受版本控制的资源,则该资源必须具有DAV:签入属性。
(DAV:checkout-of-version-with-descendant-is-forbidden): If the DAV:checkout-fork property of the version being checked out is DAV:forbidden, the request MUST fail if a version identifies that version in its DAV:predecessor-set.
(DAV:禁止签出具有子代的版本):如果要签出的版本的DAV:签出叉属性为DAV:禁止,则如果版本在其DAV:前置集中标识该版本,则请求必须失败。
(DAV:checkout-of-version-with-descendant-is-discouraged): If the DAV:checkout-fork property of the version being checked out is DAV:discouraged, the request MUST fail if a version identifies that version in its DAV:predecessor-set unless DAV:fork-ok is specified in the request body.
(DAV:不鼓励签出具有子代的版本):如果要签出的版本的DAV:签出分叉属性为DAV:不鼓励,则如果版本在其DAV:前置集中标识该版本,则请求必须失败,除非在请求正文中指定了DAV:分叉ok。
(DAV:checkout-of-checked-out-version-is-forbidden): If the DAV:checkout-fork property of the version being checked out is DAV:forbidden, the request MUST fail if a checked-out resource identifies that version in its DAV:checked-out property.
(DAV:禁止签出已签出版本):如果正在签出的版本的DAV:签出分叉属性为DAV:禁止,则如果签出资源在其DAV:签出属性中标识该版本,则请求必须失败。
(DAV:checkout-of-checked-out-version-is-discouraged): If the DAV:checkout-fork property of the version being checked out is DAV:discouraged, the request MUST fail if a checked-out resource identifies that version in its DAV:checked-out property unless DAV:fork-ok is specified in the request body.
(DAV:不鼓励签出已签出版本):如果正在签出的版本的DAV:签出分叉属性为DAV:不鼓励,则如果签出资源在其DAV:签出属性中标识该版本,则请求必须失败,除非在请求正文中指定了DAV:分叉ok。
Postconditions:
后条件:
(DAV:is-checked-out): The checked-out resource MUST have a DAV:checked-out property that identifies the DAV:checked-in version preceding the checkout. The version-controlled resource MUST NOT have a DAV:checked-in property.
(DAV:is checked out):签出的资源必须具有一个DAV:checked out属性,该属性标识签出之前的DAV:checked-in版本。受版本控制的资源不得具有DAV:签入属性。
(DAV:initialize-predecessor-set): The DAV:predecessor-set property of the checked-out resource MUST be initialized to be the DAV:checked-out version.
(DAV:初始化前置集):签出资源的DAV:前置集属性必须初始化为DAV:签出版本。
>>REQUEST
>>请求
CHECKOUT /foo.html HTTP/1.1 Host: www.webdav.org Content-Length: 0
CHECKOUT/foo.html HTTP/1.1主机:www.webdav.org内容长度:0
>>RESPONSE
>>回应
HTTP/1.1 200 OK Cache-Control: no-cache
HTTP/1.1 200正常缓存控制:无缓存
In this example, the version-controlled resource /foo.html is checked out.
在本例中,签出了版本控制资源/foo.html。
A CHECKIN request can be applied to a checked-out version-controlled resource to produce a new version whose content and dead properties are copied from the checked-out resource.
签入请求可应用于签出版本控制资源,以生成新版本,其内容和死属性从签出资源复制。
If a CHECKIN request fails, the server state preceding the request MUST be restored.
如果签入请求失败,则必须恢复请求之前的服务器状态。
Marshalling:
编组:
If a request body is included, it MUST be a DAV:checkin XML element.
如果包含请求主体,则它必须是DAV:checkin XML元素。
<!ELEMENT checkin ANY> ANY value: A sequence of elements with at most one DAV:keep-checked-out element and at most one DAV:fork-ok element.
<!ELEMENT checkin ANY>ANY value:一系列元素,最多包含一个DAV:keep checked out元素和一个DAV:fork ok元素。
<!ELEMENT keep-checked-out EMPTY> <!ELEMENT fork-ok EMPTY>
<!ELEMENT keep-checked-out EMPTY> <!ELEMENT fork-ok EMPTY>
If a response body for a successful request is included, it MUST be a DAV:checkin-response XML element.
如果包含成功请求的响应体,则它必须是DAV:checkin响应XML元素。
<!ELEMENT checkin-response ANY>
<!ELEMENT checkin-response ANY>
The response MUST include a Cache-Control:no-cache header.
响应必须包括缓存控件:无缓存标头。
Preconditions:
先决条件:
(DAV:must-be-checked-out): The request-URL MUST identify a resource with a DAV:checked-out property.
(DAV:必须签出):请求URL必须使用DAV:签出属性标识资源。
(DAV:version-history-is-tree) The versions identified by the DAV:predecessor-set of the checked-out resource MUST be descendants of the root version of the version history for the DAV:checked-out version.
(DAV:版本历史记录为树)已签出资源的DAV:前置集标识的版本必须是DAV:已签出版本的版本历史记录的根版本的后代。
(DAV:checkin-fork-forbidden): A CHECKIN request MUST fail if it would cause a version whose DAV:checkin-fork is DAV:forbidden to appear in the DAV:predecessor-set of more than one version.
(DAV:checkin fork fork Probled):如果签入请求会导致DAV:checkin fork为DAV:Probled的版本出现在多个版本的DAV:Preference集合中,则该请求必须失败。
(DAV:checkin-fork-discouraged): A CHECKIN request MUST fail if it would cause a version whose DAV:checkin-fork is DAV:discouraged to appear in the DAV:predecessor-set of more than one version, unless DAV:fork-ok is specified in the request body.
(DAV:checkin fork dis劝阻):如果签入请求会导致其DAV:checkin fork为DAV:dis劝阻的版本出现在多个版本的DAV:preference集合中,则签入请求必须失败,除非在请求正文中指定了DAV:fork ok。
Postconditions:
后条件:
(DAV:create-version): The request MUST have created a new version in the version history of the DAV:checked-out version. The request MUST have allocated a distinct new URL for the new
(DAV:创建版本):请求必须在DAV:签出版本的版本历史记录中创建了新版本。请求必须为新的URL分配了一个不同的新URL
version, and that URL MUST NOT ever identify any resource other than that version. The URL for the new version MUST be returned in a Location response header.
版本,并且该URL不得标识该版本以外的任何资源。新版本的URL必须在位置响应标头中返回。
(DAV:initialize-version-content-and-properties): The content, dead properties, DAV:resourcetype, and DAV:predecessor-set of the new version MUST be copied from the checked-out resource. The DAV:version-name of the new version MUST be set to a server-defined value distinct from all other DAV:version-name values of other versions in the same version history.
(DAV:初始化版本内容和属性):必须从签出的资源复制新版本的内容、死属性、DAV:resourcetype和DAV:Preference集。新版本的DAV:version name必须设置为服务器定义的值,该值不同于同一版本历史记录中其他版本的所有其他DAV:version name值。
(DAV:checked-in): If the request-URL identifies a version-controlled resource and DAV:keep-checked-out is not specified in the request body, the DAV:checked-out property of the version-controlled resource MUST have been removed and a DAV:checked-in property that identifies the new version MUST have been added.
(DAV:checked-in):如果请求URL标识受版本控制的资源,并且请求正文中未指定DAV:keep checked-out,则必须删除受版本控制的资源的DAV:checked-out属性,并且必须添加标识新版本的DAV:checked-in属性。
(DAV:keep-checked-out): If DAV:keep-checked-out is specified in the request body, the DAV:checked-out property of the checked-out resource MUST have been updated to identify the new version.
(DAV:keep checked out):如果在请求正文中指定了DAV:keep checked out,则必须已更新签出资源的DAV:checked out属性以标识新版本。
>>REQUEST
>>请求
CHECKIN /foo.html HTTP/1.1 Host: www.webdav.org Content-Length: 0
CHECKIN/foo.html HTTP/1.1主机:www.webdav.org内容长度:0
>>RESPONSE
>>回应
HTTP/1.1 201 Created Location: http://repo.webdav.org/his/23/ver/32 Cache-Control: no-cache
HTTP/1.1 201 Created Location: http://repo.webdav.org/his/23/ver/32 Cache-Control: no-cache
In this example, version-controlled resource /foo.html is checked in, and a new version is created at http://repo.webdav.org/his/23/ver/32.
在本例中,签入了版本控制资源/foo.html,并在http://repo.webdav.org/his/23/ver/32.
An UNCHECKOUT request can be applied to a checked-out version-controlled resource to cancel the CHECKOUT and restore the pre-CHECKOUT state of the version-controlled resource.
可以对签出的版本控制资源应用取消签出请求,以取消签出并恢复版本控制资源的签出前状态。
If an UNCHECKOUT request fails, the server MUST undo any partial effects of the UNCHECKOUT request.
如果取消选中请求失败,服务器必须撤消取消选中请求的任何部分效果。
Marshalling:
编组:
If a request body is included, it MUST be a DAV:uncheckout XML element.
如果包含请求主体,则它必须是DAV:uncheckout XML元素。
<!ELEMENT uncheckout ANY>
<!ELEMENT uncheckout ANY>
If a response body for a successful request is included, it MUST be a DAV:uncheckout-response XML element.
如果包含成功请求的响应体,则它必须是DAV:uncheckout响应XML元素。
<!ELEMENT uncheckout-response ANY>
<!ELEMENT uncheckout-response ANY>
The response MUST include a Cache-Control:no-cache header.
响应必须包括缓存控件:无缓存标头。
Preconditions:
先决条件:
(DAV:must-be-checked-out-version-controlled-resource): The request-URL MUST identify a version-controlled resource with a DAV:checked-out property.
(DAV:必须签出版本控制资源):请求URL必须使用DAV:签出属性标识版本控制资源。
Postconditions:
后条件:
(DAV:cancel-checked-out): The value of the DAV:checked-in property is that of the DAV:checked-out property prior to the request, and the DAV:checked-out property has been removed.
(DAV:cancel checked out):DAV:checked-in属性的值是请求之前的DAV:checked-out属性的值,并且DAV:checked-out属性已被删除。
(DAV:restore-content-and-dead-properties): The content and dead properties of the version-controlled resource are copies of its DAV:checked-in version.
(DAV:还原内容和死属性):版本控制资源的内容和死属性是其DAV:签入版本的副本。
>>REQUEST
>>请求
UNCHECKOUT /foo.html HTTP/1.1 Host: www.webdav.org Content-Length: 0
UNCHECKOUT/foo.html HTTP/1.1主机:www.webdav.org内容长度:0
>>RESPONSE
>>回应
HTTP/1.1 200 OK Cache-Control: no-cache
HTTP/1.1 200正常缓存控制:无缓存
In this example, the content and dead properties of the version-controlled resource identified by http://www.webdav.org/foo.html are restored to their values preceding the most recent CHECKOUT of that version-controlled resource.
在本例中,版本控制资源的内容和死属性由http://www.webdav.org/foo.html 还原为该版本控制资源最近签出之前的值。
If a server supports the checkout-in-place feature, it MUST include "checkout-in-place" as a field in the DAV response header from an OPTIONS request on any resource that supports any versioning properties, reports, or methods.
如果服务器支持就地签出功能,则必须在支持任何版本控制属性、报告或方法的任何资源上的选项请求的DAV响应标头中包含“就地签出”字段。
5 Version-History Feature
5版本历史记录功能
It is often useful to have access to a version history even after all version-controlled resources for that version history have been deleted. A server can provide this functionality by supporting version history resources. A version history resource is a resource that exists in a server defined namespace and therefore is unaffected by any deletion or movement of version-controlled resources. A version history resource is an appropriate place to add a property that logically applies to all states of a resource. The DAV:expand-property report (see Section 3.8) can be applied to the DAV:version-set of a version history resource to provide a variety of useful reports on all versions in that version history.
即使在删除了版本历史记录的所有版本控制资源之后,访问该版本历史记录也是非常有用的。服务器可以通过支持版本历史资源来提供此功能。版本历史记录资源是存在于服务器定义的命名空间中的资源,因此不受版本控制资源的任何删除或移动的影响。版本历史记录资源是添加逻辑上应用于资源所有状态的属性的适当位置。DAV:expand属性报告(参见第3.8节)可应用于版本历史资源的DAV:version集,以提供该版本历史中所有版本的各种有用报告。
The DAV:resourcetype of a version history MUST be DAV:version-history.
版本历史记录的DAV:resourcetype必须是DAV:version history。
The version-history feature introduces the following REQUIRED properties for a version history.
版本历史记录功能为版本历史记录引入以下必需属性。
This property identifies each version of this version history.
此属性标识此版本历史记录的每个版本。
<!ELEMENT version-set (href+)>
<!ELEMENT version-set (href+)>
This property identifies the root version of this version history.
此属性标识此版本历史记录的根版本。
<!ELEMENT root-version (href)>
<!ELEMENT root-version (href)>
The version-history feature introduces the following REQUIRED property for a version-controlled resource.
版本历史记录功能为受版本控制的资源引入以下必需属性。
This property identifies the version history resource for the DAV:checked-in or DAV:checked-out version of this version-controlled resource.
此属性标识此版本控制资源的DAV:签入或DAV:签出版本的版本历史记录资源。
<!ELEMENT version-history (href)>
<!ELEMENT version-history (href)>
The version-history feature introduces the following REQUIRED property for a version.
版本历史记录功能为版本引入以下必需属性。
This property identifies the version history that contains this version.
此属性标识包含此版本的版本历史记录。
<!ELEMENT version-history (href)>
<!ELEMENT version-history (href)>
Many properties identify a version from some version history. It is often useful to be able to efficiently locate a version-controlled resource for that version history. The DAV:locate-by-history report can be applied to a collection to locate the collection member that is a version-controlled resource for a specified version history resource.
许多属性从某些版本历史记录中标识版本。能够有效地定位该版本历史记录的版本控制资源通常很有用。DAV:locate by history报告可应用于集合,以定位集合成员,该成员是指定版本历史记录资源的版本受控资源。
Marshalling:
编组:
The request body MUST be a DAV:locate-by-history XML element.
请求正文必须是DAV:locate by history XML元素。
<!ELEMENT locate-by-history (version-history-set, prop)> <!ELEMENT version-history-set (href+)> prop: see RFC 2518, Section 12.11
<!ELEMENT locate-by-history (version-history-set, prop)> <!ELEMENT version-history-set (href+)> prop: see RFC 2518, Section 12.11
The response body for a successful request MUST be a DAV:multistatus XML element containing every version-controlled resource that is a member of the collection identified by the request-URL, and whose DAV:version-history property identifies one of the version history resources identified by the request body. The DAV:prop element in the request body identifies which properties should be reported in the DAV:prop elements in the response body.
成功请求的响应主体必须是DAV:multistatus XML元素,其中包含每个版本受控资源,这些资源是由请求URL标识的集合的成员,并且其DAV:version history属性标识了由请求主体标识的一个版本历史资源。请求主体中的DAV:prop元素标识响应主体中的DAV:prop元素应报告哪些属性。
Preconditions:
先决条件:
(DAV:must-be-version-history): Each member of the DAV:version-history-set element in the request body MUST identify a version history resource.
(DAV:必须是版本历史记录):请求正文中DAV:版本历史记录集元素的每个成员都必须标识版本历史记录资源。
>>REQUEST
>>请求
REPORT /ws/public HTTP/1.1 Host: www.webdav.org Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
REPORT /ws/public HTTP/1.1 Host: www.webdav.org Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <D:locate-by-history xmlns:D="DAV:"> <D:version-history-set> <D:href>http://repo.webdav.org/his/23</D:href> <D:href>http://repo.webdav.org/his/84</D:href> <D:href>http://repo.webdav.org/his/129</D:href> <D:version-history-set/> <D:prop> </D:version-history> </D:prop> </D:locate-by-history>
<?xml version="1.0" encoding="utf-8" ?> <D:locate-by-history xmlns:D="DAV:"> <D:version-history-set> <D:href>http://repo.webdav.org/his/23</D:href> <D:href>http://repo.webdav.org/his/84</D:href> <D:href>http://repo.webdav.org/his/129</D:href> <D:version-history-set/> <D:prop> </D:version-history> </D:prop> </D:locate-by-history>
>>RESPONSE
>>回应
HTTP/1.1 207 Multi-Status Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
HTTP/1.1 207 Multi-Status Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <D:multistatus xmlns:D="DAV:"> <D:response> <D:href>http://www.webdav.org/ws/public/x/test.html</D:href> <D:propstat> <D:prop> <D:version-history> <D:href>http://repo.webdav.org/his/23</D:href> </D:version-history> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> </D:multistatus>
<?xml version="1.0" encoding="utf-8" ?> <D:multistatus xmlns:D="DAV:"> <D:response> <D:href>http://www.webdav.org/ws/public/x/test.html</D:href> <D:propstat> <D:prop> <D:version-history> <D:href>http://repo.webdav.org/his/23</D:href> </D:version-history> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> </D:multistatus>
In this example, there is only one version-controlled member of /ws/public that is a version-controlled resource for one of the three specified version history resources. In particular, /ws/public/x/test.html is the version-controlled resource for http://repo.webdav.org/his/23.
在本例中,/ws/public只有一个受版本控制的成员,它是三个指定版本历史记录资源之一的版本控制资源。特别是,/ws/public/x/test.html是的版本控制资源http://repo.webdav.org/his/23.
If the server supports the version-history feature, it MUST include "version-history" as a field in the DAV response header from an OPTIONS request on any resource that supports any versioning properties, reports, or methods.
如果服务器支持版本历史记录功能,则必须在支持任何版本控制属性、报告或方法的任何资源上的选项请求的DAV响应标头中包含“版本历史记录”字段。
A DAV:version-history-collection-set element MAY be included in the request body to identify collections that may contain version history resources.
请求正文中可能包含DAV:version history集合集合元素,以标识可能包含版本历史资源的集合。
Additional Marshalling:
附加编组:
If an XML request body is included, it MUST be a DAV:options XML element.
如果包含XML请求主体,则它必须是DAV:options XML元素。
<!ELEMENT options ANY> ANY value: A sequence of elements with at most one DAV:version-history-collection-set element.
<!ELEMENT options ANY>ANY value:最多包含一个DAV:version history集合元素的元素序列。
If an XML response body for a successful request is included, it MUST be a DAV:options-response XML element.
如果包含成功请求的XML响应体,则它必须是DAV:options响应XML元素。
<!ELEMENT options-response ANY> ANY value: A sequence of elements with at most one DAV:version-history-collection-set element.
<!ELEMENT options response ANY>ANY value:最多包含一个DAV:version history集合元素的元素序列。
<!ELEMENT version-history-collection-set (href*)>
<!ELEMENT version-history-collection-set (href*)>
If DAV:version-history-collection-set is included in the request body, the response body for a successful request MUST contain a DAV:version-history-collection-set element identifying collections that may contain version histories. An identified collection MAY be the root collection of a tree of collections, all of which may contain version histories. Since different servers can control different parts of the URL namespace, different resources on the same host MAY have different DAV:version-history-collection-set values. The identified collections MAY be located on different hosts from the resource.
如果请求正文中包含DAV:version history集合集,则成功请求的响应正文必须包含一个DAV:version history集合集元素,该元素标识可能包含版本历史的集合。标识的集合可能是集合树的根集合,所有集合都可能包含版本历史记录。由于不同的服务器可以控制URL命名空间的不同部分,因此同一主机上的不同资源可能具有不同的DAV:version history集合集值。标识的集合可能位于与资源不同的主机上。
Additional Postconditions:
附加后条件:
(DAV:delete-version-set): If the request deleted a version history, the request MUST have deleted all versions in the DAV:version-set of that version history, and MUST have satisfied the postconditions for version deletion (see Section 3.13).
(DAV:删除版本集):如果请求删除了版本历史记录,则该请求必须已删除该版本历史记录的DAV:版本集中的所有版本,并且必须满足版本删除的后条件(参见第3.13节)。
(DAV:version-history-has-root): If the request deleted the root version of a version history, the request MUST have updated the DAV:root-version of the version history to refer to another version that is an ancestor of all other remaining versions in that version history. A result of this postcondition is that every version history will have at least one version, and the only way to delete all versions is to delete the version history resource.
(DAV:version history has root):如果请求删除了版本历史记录的根版本,则该请求必须已更新版本历史记录的DAV:root版本,以引用该版本历史记录中所有其他版本的祖先版本。此后置条件的结果是,每个版本历史记录将至少有一个版本,删除所有版本的唯一方法是删除版本历史记录资源。
Additional Preconditions:
其他先决条件:
(DAV:cannot-copy-history): If the request-URL identifies a version history, the request MUST fail. In order to create another version history whose versions have the same content and dead properties, the appropriate sequence of VERSION-CONTROL, CHECKOUT, PUT, PROPPATCH, and CHECKIN requests must be made.
(DAV:无法复制历史记录):如果请求URL标识版本历史记录,则请求必须失败。为了创建另一个版本历史记录,其版本具有相同的内容和死属性,必须执行版本控制、签出、放置、PROPPATCH和签入请求的适当顺序。
Additional Preconditions:
其他先决条件:
(DAV:cannot-rename-history): If the request-URL identifies a version history, the request MUST fail.
(DAV:无法重命名历史记录):如果请求URL标识版本历史记录,则请求必须失败。
Additional Postconditions:
附加后条件:
(DAV:new-version-history): If the request created a new version history, the request MUST have allocated a new server-defined URL for that version history that MUST NOT have previously identified any other resource, and MUST NOT ever identify a resource other than this version history.
(DAV:新版本历史记录):如果请求创建了新版本历史记录,则该请求必须为该版本历史记录分配了一个新的服务器定义的URL,该URL以前不得标识任何其他资源,并且不得标识此版本历史记录以外的资源。
Additional Postconditions:
附加后条件:
(DAV:add-to-history): A URL for the new version resource MUST have been added to the DAV:version-set of the version history of the DAV:checked-out version.
(DAV:添加到历史记录):新版本资源的URL必须已添加到DAV:签出版本的版本历史记录的DAV:版本集中。
6 Workspace Feature
6工作空间特征
In order to allow multiple users to work concurrently on adding versions to the same version history, it is necessary to allocate on the server multiple checked-out resources for the same version history. Even if only one user is making changes to a resource, that user will sometimes wish to create a "private" version, and then to expose that version at a later time. One way to provide this functionality depends on the client keeping track of its current set of checked-out resources. This is the working-resource feature defined in Section 8. The other way to provide this functionality avoids the need for persistent state on the client, and instead has the server maintain a human meaningful namespace for related sets of checked-out resources. This is the workspace feature defined in this section.
为了允许多个用户同时向同一版本历史添加版本,需要在服务器上为同一版本历史分配多个签出资源。即使只有一个用户正在对资源进行更改,该用户有时也会希望创建一个“私有”版本,然后在以后公开该版本。提供此功能的一种方法取决于客户端跟踪其当前签出的资源集。这是第8节中定义的工作资源特性。提供此功能的另一种方法是避免在客户端上需要持久状态,而是让服务器为相关的签出资源集维护一个有意义的名称空间。这是本节中定义的工作空间功能。
The workspace feature introduces a "workspace resource". A workspace resource is a collection whose members are related version-controlled and non-version-controlled resources. Multiple workspaces may be used to expose different versions and configurations of a set of version-controlled resources concurrently. In order to make changes to a version-controlled resource in one workspace visible in another workspace, that version-controlled resource must be checked in, and then the corresponding version-controlled resource in the other workspace can be updated to display the content and dead properties of the new version.
工作区功能引入了“工作区资源”。工作区资源是一个集合,其成员是相关的版本控制资源和非版本控制资源。多个工作区可用于同时公开一组版本受控资源的不同版本和配置。为了使一个工作区中的版本控制资源的更改在另一个工作区中可见,必须签入该版本控制资源,然后可以更新另一个工作区中相应的版本控制资源,以显示新版本的内容和无效属性。
In order to ensure unambiguous merging (see Section 11) and baselining (see Section 12) semantics, a workspace may contain at most one version-controlled resource for a given version history. This is required for unambiguous merging because the MERGE method must identify which version-controlled resource is to be the merge target of a given version. This is required for unambiguous baselining because a baseline can only select one version for a given version-controlled resource.
为了确保明确的合并(参见第11节)和基线(参见第12节)语义,对于给定的版本历史,工作区最多可以包含一个版本控制资源。这对于明确的合并是必需的,因为合并方法必须标识哪个版本控制的资源是给定版本的合并目标。这对于明确的基线是必需的,因为基线只能为给定的版本控制资源选择一个版本。
Initially, an empty workspace can be created. Non-version-controlled resources can then be added to the workspace with standard WebDAV requests such as PUT and MKCOL. Version-controlled resources can be added to the workspace with VERSION-CONTROL requests. If the
最初,可以创建一个空的工作空间。然后,可以使用标准WebDAV请求(如PUT和MKCOL)将非版本控制的资源添加到工作区。可以使用版本控制请求将版本控制资源添加到工作区。如果
baseline feature is supported, collections in the workspace can be placed under baseline control, and then initialized by existing baselines.
如果支持基线功能,则工作区中的集合可以置于基线控制下,然后由现有基线初始化。
The workspace feature introduces the following REQUIRED property for a workspace.
工作区功能为工作区引入以下必需属性。
This property identifies each checked-out resource whose DAV:workspace property identifies this workspace.
此属性标识其DAV:workspace属性标识此工作区的每个签出资源。
<!ELEMENT workspace-checkout-set (href*)>
<!ELEMENT workspace-checkout-set (href*)>
The workspace feature introduces the following REQUIRED property for a WebDAV resource.
工作区功能为WebDAV资源引入以下必需属性。
The DAV:workspace property of a workspace resource MUST identify itself. The DAV:workspace property of any other type of resource MUST be the same as the DAV:workspace of its parent collection.
工作区资源的DAV:workspace属性必须标识自身。任何其他类型资源的DAV:workspace属性必须与其父集合的DAV:workspace相同。
<!ELEMENT workspace (href)>
<!ELEMENT workspace (href)>
A MKWORKSPACE request creates a new workspace resource. A server MAY restrict workspace creation to particular collections, but a client can determine the location of these collections from a DAV:workspace-collection-set OPTIONS request (see Section 6.4).
MKWORKSPACE请求创建新的工作区资源。服务器可以将工作区创建限制为特定集合,但客户端可以通过DAV:workspace集合集选项请求确定这些集合的位置(请参见第6.4节)。
If a MKWORKSPACE request fails, the server state preceding the request MUST be restored.
如果MKWORKSPACE请求失败,则必须恢复请求之前的服务器状态。
Marshalling:
编组:
If a request body is included, it MUST be a DAV:mkworkspace XML element.
如果包含请求主体,则它必须是DAV:mkworkspace XML元素。
<!ELEMENT mkworkspace ANY>
<!ELEMENT mkworkspace ANY>
If a response body for a successful request is included, it MUST be a DAV:mkworkspace-response XML element.
如果包含成功请求的响应主体,则它必须是DAV:mkworkspace响应XML元素。
<!ELEMENT mkworkspace-response ANY>
<!ELEMENT mkworkspace-response ANY>
The response MUST include a Cache-Control:no-cache header.
响应必须包括缓存控件:无缓存标头。
Preconditions:
先决条件:
(DAV:resource-must-be-null): A resource MUST NOT exist at the request-URL.
(DAV:resource必须为null):请求URL中不能存在资源。
(DAV:workspace-location-ok): The request-URL MUST identify a location where a workspace can be created.
(DAV:工作区位置确定):请求URL必须标识可以创建工作区的位置。
Postconditions:
后条件:
(DAV:initialize-workspace): A new workspace exists at the request-URL. The DAV:resourcetype of the workspace MUST be DAV:collection. The DAV:workspace of the workspace MUST identify the workspace.
(DAV:初始化工作区):请求URL处存在新工作区。工作区的DAV:resourcetype必须是DAV:collection。工作区的DAV:workspace必须标识工作区。
>>REQUEST
>>请求
MKWORKSPACE /ws/public HTTP/1.1 Host: www.webdav.org Content-Length: 0
MKWORKSPACE /ws/public HTTP/1.1 Host: www.webdav.org Content-Length: 0
>>RESPONSE
>>回应
HTTP/1.1 201 Created Cache-Control: no-cache
HTTP/1.1 201创建的缓存控制:无缓存
In this example, a new workspace is created at http://www.webdav.org/ws/public.
在本例中,将在以下位置创建一个新工作区:http://www.webdav.org/ws/public.
If a server supports the workspace feature, it MUST include "workspace" as a field in the DAV response header from an OPTIONS request on any resource that supports any versioning properties, reports, or methods.
如果服务器支持工作区功能,则必须在支持任何版本控制属性、报告或方法的任何资源上的选项请求的DAV响应标头中包含“工作区”作为字段。
If a server supports the workspace feature, it MUST also support the checkout-in-place feature and the version-history feature.
如果服务器支持工作区功能,它还必须支持就地签出功能和版本历史记录功能。
A DAV:workspace-collection-set element MAY be included in the request body to identify collections that may contain workspace resources.
请求主体中可能包含DAV:workspace集合集元素,以标识可能包含工作空间资源的集合。
Additional Marshalling:
附加编组:
If an XML request body is included, it MUST be a DAV:options XML element.
如果包含XML请求主体,则它必须是DAV:options XML元素。
<!ELEMENT options ANY> ANY value: A sequence of elements with at most one DAV:workspace-collection-set element.
<!元素选项任意>任意值:最多包含一个DAV:workspace集合集元素的元素序列。
If an XML response body for a successful request is included, it MUST be a DAV:options-response XML element.
如果包含成功请求的XML响应体,则它必须是DAV:options响应XML元素。
<!ELEMENT options-response ANY> ANY value: A sequence of elements with at most one DAV:workspace-collection-set element.
<!ELEMENT options response ANY>ANY value:最多包含一个DAV:workspace集合集合元素的元素序列。
<!ELEMENT workspace-collection-set (href*)>
<!ELEMENT workspace-collection-set (href*)>
If DAV:workspace-collection-set is included in the request body, the response body for a successful request MUST contain a DAV:workspace-collection-set element identifying collections that may contain workspaces. An identified collection MAY be the root collection of a tree of collections, all of which may contain workspaces. Since different servers can control different parts of the URL namespace, different resources on the same host MAY have different DAV:workspace-collection-set values. The identified collections MAY be located on different hosts from the resource.
如果请求正文中包含DAV:workspace集合集,则成功请求的响应正文必须包含一个DAV:workspace集合集元素,该元素标识可能包含工作空间的集合。已标识的集合可能是集合树的根集合,所有集合都可能包含工作空间。由于不同的服务器可以控制URL命名空间的不同部分,因此同一主机上的不同资源可能具有不同的DAV:workspace集合集值。标识的集合可能位于与资源不同的主机上。
>>REQUEST
>>请求
OPTIONS /doc HTTP/1.1 Host: www.webdav.org Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
OPTIONS /doc HTTP/1.1 Host: www.webdav.org Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <D:options xmlns:D="DAV:"> <D:version-history-collection-set/> <D:workspace-collection-set/> </D:options>
<?xml version="1.0" encoding="utf-8" ?> <D:options xmlns:D="DAV:"> <D:version-history-collection-set/> <D:workspace-collection-set/> </D:options>
>>RESPONSE
>>回应
HTTP/1.1 200 OK DAV: 1 DAV: version-control,checkout-in-place,version-history,workspace Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
HTTP/1.1 200 OK DAV: 1 DAV: version-control,checkout-in-place,version-history,workspace Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <D:options-response xmlns:D="DAV:"> <D:version-history-collection-set> <D:href>http://repo.webdav.org/his</D:href> </D:version-history-collection-set> <D:workspace-collection-set> <D:href>http://www.webdav.org/public/ws</D:href> <D:href>http://www.webdav.org/private/ws</D:href> </D:workspace-collection-set> </D:options-response>
<?xml version="1.0" encoding="utf-8" ?> <D:options-response xmlns:D="DAV:"> <D:version-history-collection-set> <D:href>http://repo.webdav.org/his</D:href> </D:version-history-collection-set> <D:workspace-collection-set> <D:href>http://www.webdav.org/public/ws</D:href> <D:href>http://www.webdav.org/private/ws</D:href> </D:workspace-collection-set> </D:options-response>
In this example, the server indicates that it provides Class 1 DAV support and basic-server-workspace versioning support. In addition, the server indicates the requested locations of the version history resources and the workspace resources.
在本例中,服务器表示它提供了Class 1 DAV支持和基本服务器工作区版本控制支持。此外,服务器还指示版本历史记录资源和工作区资源的请求位置。
Additional Postconditions:
附加后条件:
(DAV:delete-workspace-members): If a workspace is deleted, any resource that identifies that workspace in its DAV:workspace property MUST be deleted.
(DAV:delete workspace members):如果删除工作区,则必须删除在其DAV:workspace属性中标识该工作区的任何资源。
Additional Postconditions:
附加后条件:
(DAV:workspace-member-moved): If the request-URL did not identify a workspace, the DAV:workspace of the destination MUST have been updated to have the same value as the DAV:workspace of the parent collection of the destination.
(DAV:workspace成员已移动):如果请求URL未标识工作区,则目标的DAV:workspace必须已更新,以具有与目标的父集合的DAV:workspace相同的值。
(DAV:workspace-moved): If the request-URL identified a workspace, any reference to that workspace in a DAV:workspace property MUST have been updated to refer to the new location of that workspace.
(DAV:workspace-moved):如果请求URL标识了一个工作区,则必须更新DAV:workspace属性中对该工作区的任何引用,以引用该工作区的新位置。
A VERSION-CONTROL request can be used to create a new version-controlled resource for an existing version history. This allows the creation of version-controlled resources for the same version history in multiple workspaces.
版本控制请求可用于为现有版本历史创建新的版本控制资源。这允许在多个工作区中为同一版本历史创建版本受控资源。
Additional Marshalling:
附加编组:
<!ELEMENT version-control ANY> ANY value: A sequence of elements with at most one DAV:version element.
<!ELEMENT version control ANY>ANY value:一系列元素,最多包含一个DAV:version元素。
<!ELEMENT version (href)>
<!ELEMENT version (href)>
Additional Preconditions:
其他先决条件:
(DAV:cannot-add-to-existing-history): If the DAV:version-control request body element contains a DAV:version element, the request-URL MUST NOT identify a resource.
(DAV:无法添加到现有历史记录):如果DAV:版本控制请求正文元素包含DAV:版本元素,则请求URL不得标识资源。
(DAV:must-be-version): The DAV:href of the DAV:version element MUST identify a version.
(DAV:必须是版本):DAV:version元素的DAV:href必须标识版本。
(DAV:one-version-controlled-resource-per-history-per-workspace): If the DAV:version-control request body specifies a version, and if the request-URL is a member of a workspace, then there MUST NOT already be a version-controlled member of that workspace whose DAV:checked-in or DAV:checked-out property identifies any version from the version history of the version specified in the request body.
(DAV:每个工作区每个历史记录一个版本控制的资源):如果DAV:版本控制请求主体指定了一个版本,并且如果请求URL是工作区的成员,然后,该工作区中必须没有版本受控成员,其DAV:checked-in或DAV:checked-out属性从请求正文中指定的版本的版本历史记录中标识任何版本。
Additional Postconditions:
附加后条件:
(DAV:new-version-controlled-resource): If the request-URL did NOT identify a resource, a new version-controlled resource exists at the request-URL whose content and dead properties are initialized by those of the version in the request body, and whose DAV:checked-in property identifies that version.
(DAV:受新版本控制的资源):如果请求URL未标识资源,则在请求URL处存在一个新的受版本控制的资源,该资源的内容和无效属性由请求正文中版本的内容和无效属性初始化,并且其DAV:签入属性标识该版本。
>>REQUEST
>>请求
VERSION-CONTROL /ws/public/bar.html HTTP/1.1 Host: www.webdav.org Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
VERSION-CONTROL /ws/public/bar.html HTTP/1.1 Host: www.webdav.org Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <D:version-control xmlns:D="DAV:"> <D:version> <D:href>http://repo.webdav.org/his/12/ver/V3</D:href> </D:version> </D:version-control>
<?xml version="1.0" encoding="utf-8" ?> <D:version-control xmlns:D="DAV:"> <D:version> <D:href>http://repo.webdav.org/his/12/ver/V3</D:href> </D:version> </D:version-control>
>>RESPONSE
>>回应
HTTP/1.1 201 Created Cache-Control: no-cache
HTTP/1.1 201创建的缓存控制:无缓存
In this example, a new version-controlled resource is created at /ws/public/bar.html. The content and dead properties of the new version-controlled resource are initialized to be the same as those of the version identified by http://repo.webdav.org/his/12/ver/V3.
在本例中,在/ws/public/bar.html处创建了一个新的版本控制资源。新版本控制资源的内容和死属性被初始化为与http://repo.webdav.org/his/12/ver/V3.
7 UPDATE Feature
7更新功能
The update feature provides a mechanism for changing the state of a checked-in version-controlled resource to be that of another version from the version history of that resource.
更新功能提供了一种机制,用于将签入的版本控制资源的状态从该资源的版本历史更改为另一个版本的状态。
The UPDATE method modifies the content and dead properties of a checked-in version-controlled resource (the "update target") to be those of a specified version (the "update source") from the version history of that version-controlled resource.
UPDATE方法将签入的版本控制资源(“更新目标”)的内容和死属性修改为该版本控制资源的版本历史中指定版本(“更新源”)的内容和死属性。
The response to an UPDATE request identifies the resources modified by the request, so that a client can efficiently update any cached state it is maintaining. Extensions to the UPDATE method allow multiple resources to be modified from a single UPDATE request (see Section 12.13).
对更新请求的响应标识由该请求修改的资源,以便客户机能够有效地更新其正在维护的任何缓存状态。更新方法的扩展允许从单个更新请求修改多个资源(请参阅第12.13节)。
Marshalling:
编组:
The request body MUST be a DAV:update element.
请求正文必须是DAV:update元素。
<!ELEMENT update ANY> ANY value: A sequence of elements with at most one DAV:version element and at most one DAV:prop element. <!ELEMENT version (href)> prop: see RFC 2518, Section 12.11
<!ELEMENT update ANY> ANY value: A sequence of elements with at most one DAV:version element and at most one DAV:prop element. <!ELEMENT version (href)> prop: see RFC 2518, Section 12.11
The response for a successful request MUST be a 207 Multi-Status, where the DAV:multistatus XML element in the response body identifies all resources that have been modified by the request.
成功请求的响应必须是207 Multi Status,其中响应主体中的DAV:multistatus XML元素标识了已被请求修改的所有资源。
multistatus: see RFC 2518, Section 12.9
Multistaus:见RFC 2518第12.9节
The response MUST include a Cache-Control:no-cache header.
响应必须包括缓存控件:无缓存标头。
Postconditions:
后条件:
(DAV:update-content-and-properties): If the DAV:version element in the request body identified a version that is in the same version history as the DAV:checked-in version of a version-controlled resource identified by the request-URL, then the content and dead properties of that version-controlled resource MUST be the same as those of the version specified by the DAV:version element, and the DAV:checked-in property of the version-controlled resource MUST identify that version. The request-URL MUST appear in a DAV:response element in the response body.
(DAV:updatecontent和properties):如果请求正文中的DAV:version元素标识的版本与请求URL标识的版本控制资源的DAV:checked-in版本处于相同的版本历史记录中,然后,该版本控制资源的内容和死属性必须与DAV:version元素指定的版本的内容和死属性相同,并且版本控制资源的DAV:checked-in属性必须标识该版本。请求URL必须出现在响应正文中的DAV:response元素中。
(DAV:report-properties): If DAV:prop is specified in the request body, the properties specified in the DAV:prop element MUST be reported in the DAV:response elements in the response body.
(DAV:report properties):如果在请求正文中指定了DAV:prop,则在DAV:prop元素中指定的属性必须在响应正文中的DAV:response元素中报告。
>>REQUEST
>>请求
UPDATE /foo.html HTTP/1.1 Host: www.webdav.org Content-type: text/xml; charset="utf-8" Content-Length: xxxx
UPDATE /foo.html HTTP/1.1 Host: www.webdav.org Content-type: text/xml; charset="utf-8" Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <D:update xmlns:D="DAV:"> <D:version> <D:href>http://repo.webdav.org/his/23/ver/33</D:href> </D:version> </D:update>
<?xml version="1.0" encoding="utf-8" ?> <D:update xmlns:D="DAV:"> <D:version> <D:href>http://repo.webdav.org/his/23/ver/33</D:href> </D:version> </D:update>
>>RESPONSE
>>回应
HTTP/1.1 207 Multi-Status Content-Type: text/xml; charset="utf-8" Content-Length: xxxx Cache-Control: no-cache
HTTP/1.1 207 Multi-Status Content-Type: text/xml; charset="utf-8" Content-Length: xxxx Cache-Control: no-cache
<?xml version="1.0" encoding="utf-8" ?> <D:multistatus xmlns:D="DAV:"> <D:response> <D:href>http://www.webdav.org/foo.html</D:href> <D:status>HTTP/1.1 200 OK</D:status> </D:response>
<?xml version="1.0" encoding="utf-8" ?> <D:multistatus xmlns:D="DAV:"> <D:response> <D:href>http://www.webdav.org/foo.html</D:href> <D:status>HTTP/1.1 200 OK</D:status> </D:response>
In this example, the content and dead properties of http://repo.webdav.org/his/23/ver/33 are copied to the version-controlled resource /foo.html, and the DAV:checked-in property of /foo.html is updated to refer to http://repo.webdav.org/his/23/ver/33.
在本例中,的内容和死属性http://repo.webdav.org/his/23/ver/33 复制到受版本控制的资源/foo.html,并更新/foo.html的DAV:checked-in属性以引用http://repo.webdav.org/his/23/ver/33.
If the server supports the update feature, it MUST include "update" as a field in the DAV response header from an OPTIONS request on any resource that supports any versioning properties, reports, or methods.
如果服务器支持更新功能,则必须在支持任何版本控制属性、报告或方法的任何资源上的选项请求的DAV响应标头中包含“更新”字段。
8 Label Feature
8标签特征
A version "label" is a string that distinguishes one version in a version history from all other versions in that version history. A label can automatically be assigned by a server, or it can be assigned by a client in order to provide a meaningful name for that version. A given version label can be assigned to at most one version of a given version history, but client assigned labels can be reassigned to another version at any time. Note that although a given label can be applied to at most one version from the same version history, the same label can be applied to versions from different version histories.
版本“标签”是一个字符串,用于将版本历史记录中的一个版本与该版本历史记录中的所有其他版本区分开来。标签可以由服务器自动分配,也可以由客户端分配,以便为该版本提供有意义的名称。给定版本标签最多可以分配给给定版本历史记录的一个版本,但客户端分配的标签可以随时重新分配给另一个版本。请注意,尽管给定标签最多可应用于同一版本历史记录中的一个版本,但同一标签可应用于不同版本历史记录中的版本。
For certain methods, if the request-URL identifies a version-controlled resource, a label can be specified in a Label request header (see Section 8.3) to cause the method to be applied to the version selected by that label from the version history of that version-controlled resource.
对于某些方法,如果请求URL标识版本受控资源,则可以在标签请求标头中指定标签(参见第8.3节),以使该方法应用于该标签从该版本受控资源的版本历史记录中选择的版本。
The label feature introduces the following REQUIRED property for a version.
标签功能为版本引入以下必需属性。
This property contains the labels that currently select this version.
此属性包含当前选择此版本的标签。
<!ELEMENT label-name-set (label-name*)> <!ELEMENT label-name (#PCDATA)> PCDATA value: string
<!ELEMENT label-name-set (label-name*)> <!ELEMENT label-name (#PCDATA)> PCDATA value: string
A LABEL request can be applied to a version to modify the labels that select that version. The case of a label name MUST be preserved when it is stored and retrieved. When comparing two label names to decide if they match or not, a server SHOULD use a case-sensitive URL-escaped UTF-8 encoded comparison of the two label names.
标签请求可以应用于版本,以修改选择该版本的标签。存储和检索标签名称时,必须保留其大小写。当比较两个标签名以确定它们是否匹配时,服务器应使用区分大小写的URL对两个标签名进行UTF-8编码的比较。
If a LABEL request is applied to a checked in version-controlled resource, the operation MUST be applied to the DAV:checked-in version of that version-controlled resource.
如果标签请求应用于签入版本控制资源,则该操作必须应用于该版本控制资源的DAV:签入版本。
Marshalling:
编组:
The request body MUST be a DAV:label element.
请求正文必须是DAV:label元素。
<!ELEMENT label ANY> ANY value: A sequence of elements with at most one DAV:add, DAV:set, or DAV:remove element.
<!ELEMENT label ANY>ANY value:最多包含一个DAV:add、DAV:set或DAV:remove元素的元素序列。
<!ELEMENT add (label-name)> <!ELEMENT set (label-name)> <!ELEMENT remove (label-name)> <!ELEMENT label-name (#PCDATA)> PCDATA value: string
<!ELEMENT add (label-name)> <!ELEMENT set (label-name)> <!ELEMENT remove (label-name)> <!ELEMENT label-name (#PCDATA)> PCDATA value: string
The request MAY include a Label header.
请求可以包括标签头。
The request MAY include a Depth header. If no Depth header is included, Depth:0 is assumed. Standard depth semantics apply, and the request is applied to the collection identified by the request-URL and to all members of the collection that satisfy the Depth value. If a Depth header is included and the request fails on any resource, the response MUST be a 207 Multi-Status that identifies all resources for which the request has failed.
该请求可以包括深度报头。如果未包含深度标头,则假定深度为0。标准深度语义适用,并且请求应用于由请求URL标识的集合以及满足深度值的集合的所有成员。如果包含深度标头且请求在任何资源上失败,则响应必须为207多状态,该状态标识请求失败的所有资源。
If a response body for a successful request is included, it MUST be a DAV:label-response XML element.
如果包含成功请求的响应体,则它必须是DAV:label响应XML元素。
<!ELEMENT label-response ANY>
<!ELEMENT label-response ANY>
The response MUST include a Cache-Control:no-cache header.
响应必须包括缓存控件:无缓存标头。
Preconditions:
先决条件:
(DAV:must-be-checked-in): If the request-URL identifies a version-controlled resource, the version-controlled resource MUST be checked in.
(DAV:必须签入):如果请求URL标识版本控制资源,则必须签入版本控制资源。
(DAV:must-select-version-in-history): If a Label request header is included and the request-URL identifies a version-controlled resource, the specified label MUST select a version in the version history of the version-controlled resource.
(DAV:必须在历史记录中选择版本):如果包含标签请求标头,并且请求URL标识版本受控资源,则指定的标签必须在版本受控资源的版本历史记录中选择版本。
(DAV:add-must-be-new-label): If DAV:add is specified in the request body, the specified label MUST NOT appear in the DAV:label-name-set of any version in the version history of that version-controlled resource.
(DAV:add必须是新标签):如果在请求正文中指定了DAV:add,则指定的标签不得出现在该版本受控资源的版本历史记录中任何版本的DAV:label名称集中。
(DAV:label-must-exist): If DAV:remove is specified in the request body, the specified label MUST appear in the DAV:label-name-set of that version.
(DAV:label必须存在):如果在请求正文中指定了DAV:remove,则指定的标签必须出现在该版本的DAV:label名称集中。
Postconditions:
后条件:
(DAV:add-or-set-label): If DAV:add or DAV:set is specified in the request body, the specified label MUST appear in the DAV:label-name-set of the specified version, and MUST NOT appear in the DAV:label-name-set of any other version in the version history of that version.
(DAV:add或set label):如果在请求正文中指定了DAV:add或DAV:set,则指定的标签必须出现在指定版本的DAV:label名称集中,并且不得出现在该版本的版本历史记录中任何其他版本的DAV:label名称集中。
(DAV:remove-label): If DAV:remove is specified in the request body, the specified label MUST NOT appear in the DAV:label-name-set of any version in the version history of that version.
(DAV:remove label):如果在请求正文中指定了DAV:remove,则指定的标签不得出现在该版本的版本历史记录中任何版本的DAV:label名称集中。
>>REQUEST
>>请求
LABEL /foo.html HTTP/1.1 Host: www.webdav.org Content-type: text/xml; charset="utf-8" Content-Length: xxxx
LABEL /foo.html HTTP/1.1 Host: www.webdav.org Content-type: text/xml; charset="utf-8" Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <D:label xmlns:D="DAV:"> <D:set> <D:label-name>default</D:label-name> </D:set> </D:label>
<?xml version="1.0" encoding="utf-8" ?> <D:label xmlns:D="DAV:"> <D:set> <D:label-name>default</D:label-name> </D:set> </D:label>
>>RESPONSE
>>回应
HTTP/1.1 200 OK Cache-Control: no-cache
HTTP/1.1 200正常缓存控制:无缓存
In this example, the label "default" is applied to the DAV:checked-in version of /foo.html.
在本例中,标签“default”应用于/foo.html的DAV:checked-In版本。
For certain methods (e.g. GET, PROPFIND), if the request-URL identifies a version-controlled resource, a label can be specified in a Label request header to cause the method to be applied to the version selected by that label from the version history of that version-controlled resource.
对于某些方法(例如GET、PROPFIND),如果请求URL标识受版本控制的资源,则可以在标签请求标头中指定标签,以使该方法应用于该标签从该受版本控制的资源的版本历史记录中选择的版本。
The value of a label header is the name of a label, encoded using URL-escaped UTF-8. For example, the label "release B.3" is identified by the following header:
标签头的值是标签的名称,使用URL转义UTF-8编码。例如,标签“版本B.3”由以下标题标识:
Label: release%20B.3
标签:版本%20B.3
A Label header MUST have no effect on a request whose request-URL does not identify a version-controlled resource. In particular, it MUST have no effect on a request whose request-URL identifies a version or a version history.
如果请求URL未标识受版本控制的资源,则标签标头必须对该请求无效。特别是,它必须对其请求URL标识版本或版本历史的请求没有影响。
A server MUST return an HTTP-1.1 Vary header containing Label in a successful response to a cacheable request (e.g., GET) that includes a Label header.
在对包含标签头的可缓存请求(例如GET)的成功响应中,服务器必须返回包含标签的HTTP-1.1 VARIE头。
If the server supports the label feature, it MUST include "label" as a field in the DAV response header from an OPTIONS request on any resource that supports any versioning properties, reports, or methods.
如果服务器支持标签功能,则必须在支持任何版本控制属性、报告或方法的任何资源上的选项请求的DAV响应标头中包含“标签”字段。
Additional Marshalling:
附加编组:
The request MAY include a Label header.
请求可以包括标签头。
Additional Preconditions:
其他先决条件:
(DAV:must-select-version-in-history): If a Label request header is included and the request-URL identifies a version-controlled resource, the specified label MUST select a version in the version history of the version-controlled resource.
(DAV:必须在历史记录中选择版本):如果包含标签请求标头,并且请求URL标识版本受控资源,则指定的标签必须在版本受控资源的版本历史记录中选择版本。
Additional Postconditions:
附加后条件:
(DAV:apply-request-to-labeled-version): If the request-URL identifies a version-controlled resource and a Label request header is included, the response MUST contain the content of the specified version rather than that of the version-controlled resource.
(DAV:apply request to labeled version):如果请求URL标识受版本控制的资源,并且包含标签请求标头,则响应必须包含指定版本的内容,而不是受版本控制的资源的内容。
Additional Marshalling:
附加编组:
The request MAY include a Label header.
请求可以包括标签头。
Additional Preconditions:
其他先决条件:
(DAV:must-select-version-in-history): If a Label request header is included and the request-URL identifies a version-controlled resource, the specified label MUST select a version in the version history of the version-controlled resource.
(DAV:必须在历史记录中选择版本):如果包含标签请求标头,并且请求URL标识版本受控资源,则指定的标签必须在版本受控资源的版本历史记录中选择版本。
Additional Postconditions:
附加后条件:
(DAV:apply-request-to-labeled-version): If the request-URL identifies a version-controlled resource and a Label request header is included, the response MUST contain the properties of the specified version rather than that of the version-controlled resource.
(DAV:apply request to labeled version):如果请求URL标识受版本控制的资源,并且包含标签请求标头,则响应必须包含指定版本的属性,而不是受版本控制的资源的属性。
Additional Marshalling:
附加编组:
The request MAY include a Label header.
请求可以包括标签头。
Additional Preconditions:
其他先决条件:
(DAV:must-select-version-in-history): If a Label request header is included and the request-URL identifies a version-controlled resource, the specified label MUST select a version in the version history of the version-controlled resource.
(DAV:必须在历史记录中选择版本):如果包含标签请求标头,并且请求URL标识版本受控资源,则指定的标签必须在版本受控资源的版本历史记录中选择版本。
Additional Postconditions:
附加后条件:
(DAV:apply-request-to-labeled-version): If the request-URL identifies a version-controlled resource and a Label request header is included, the request MUST have copied the properties and content of the specified version rather than that of the version-controlled resource.
(DAV:apply request to labeled version):如果请求URL标识受版本控制的资源,并且包含标签请求标头,则请求必须复制了指定版本的属性和内容,而不是受版本控制的资源的属性和内容。
If the server supports the working-resource option, a LABEL header may be included to check out the version selected by the specified label.
如果服务器支持working resource(工作资源)选项,则可能会包含一个标签头,以签出指定标签选择的版本。
Additional Marshalling:
附加编组:
The request MAY include a Label header.
请求可以包括标签头。
Additional Preconditions:
其他先决条件:
(DAV:must-select-version-in-history): If a Label request header is included and the request-URL identifies a version-controlled resource, the specified label MUST select a version in the version history of the version-controlled resource.
(DAV:必须在历史记录中选择版本):如果包含标签请求标头,并且请求URL标识版本受控资源,则指定的标签必须在版本受控资源的版本历史记录中选择版本。
(DAV:must-not-have-label-and-apply-to-version): If a Label request header is included, the request body MUST NOT contain a DAV:apply-to-version element.
(DAV:不得包含label和apply to version):如果包含label请求标头,则请求正文不得包含DAV:apply to version元素。
Additional Postconditions:
附加后条件:
(DAV:apply-request-to-labeled-version): If the request-URL identifies a checked-in version-controlled resource, and a Label request header is included, the CHECKOUT MUST have been applied to the version selected by the specified label, and not to the version-controlled resource itself.
(DAV:将请求应用于标记的版本):如果请求URL标识签入的版本控制资源,并且包含标签请求标头,则签出必须应用于指定标签选择的版本,而不是版本控制资源本身。
If the request body of an UPDATE request contains a DAV:label-name element, the update target is the resource identified by the request-URL, and the update source is the version selected by the specified label from the version history of the update target.
如果更新请求的请求正文包含DAV:label name元素,则更新目标是由请求URL标识的资源,更新源是由指定标签从更新目标的版本历史记录中选择的版本。
Additional Marshalling:
附加编组:
<!ELEMENT update ANY> ANY value: A sequence of elements with at most one DAV:label-name or DAV:version element (but not both). <!ELEMENT label-name (#PCDATA)> PCDATA value: string
<!ELEMENT update ANY> ANY value: A sequence of elements with at most one DAV:label-name or DAV:version element (but not both). <!ELEMENT label-name (#PCDATA)> PCDATA value: string
The request MAY include a Depth header. If no Depth header is included, Depth:0 is assumed. Standard depth semantics apply, and the request is applied to the collection identified by the request-URL and to all members of the collection that satisfy the Depth value. If a Depth header is included and the request fails on any resource, the response MUST be a 207 Multi-Status that identifies all resources for which the request has failed.
该请求可以包括深度报头。如果未包含深度标头,则假定深度为0。标准深度语义适用,并且请求应用于由请求URL标识的集合以及满足深度值的集合的所有成员。如果包含深度标头且请求在任何资源上失败,则响应必须为207多状态,该状态标识请求失败的所有资源。
Additional Preconditions:
其他先决条件:
(DAV:must-select-version-in-history): If the request includes a DAV:label-name element in the request body, the label MUST select a version in the version history of the version-controlled resource identified by the request-URL.
(DAV:必须在历史记录中选择版本):如果请求正文中包含DAV:label name元素,则标签必须在由请求URL标识的版本控制资源的版本历史记录中选择版本。
(DAV:depth-update): If the request includes a Depth header, standard depth semantics apply, and the request is applied to the collection identified by the request-URL and to all members of the collection that satisfy the Depth value. The request MUST be applied to a collection before being applied to any members of that collection, since an update of a version-controlled collection might change the membership of that collection.
(DAV:深度更新):如果请求包含深度头,则应用标准深度语义,并将请求应用于由请求URL标识的集合以及满足深度值的集合的所有成员。请求必须先应用于集合,然后再应用于该集合的任何成员,因为版本控制集合的更新可能会更改该集合的成员身份。
Additional Postconditions:
附加后条件:
(DAV:apply-request-to-labeled-version): If a DAV:label-name element appears in the request body, the content and dead properties of the version-controlled resource must have been updated to be those of the version selected by that label.
(DAV:apply request to labeled version):如果请求正文中出现DAV:label name元素,则版本控制资源的内容和死属性必须已更新为该标签所选版本的内容和死属性。
9 Working-Resource Feature
9工作资源特征
The working-resource feature provides an alternative to the workspace feature for supporting parallel development. Unlike the workspace feature, where the desired configuration of versions and checked-out resources is maintained on the server, the working-resource feature maintains the configuration on the client. This simplifies the server implementation, but does not allow a user to access the configuration from clients in different physical locations, such as from another office, from home, or while traveling. Another difference is that the workspace feature isolates clients from a logical change that involves renaming shared resources, until that logical change is complete and tested; with the working resource feature, all clients use a common set of shared version-controlled resources and every client sees the result of a MOVE as soon as it occurs.
工作资源特性为支持并行开发提供了工作空间特性的替代方案。与工作区功能不同,工作区功能在服务器上维护版本和签出资源的所需配置,而工作资源功能在客户端上维护配置。这简化了服务器实现,但不允许用户从不同物理位置的客户端访问配置,例如从另一个办公室、从家中或在旅行时。另一个区别是工作区特性将客户端与涉及重命名共享资源的逻辑更改隔离开来,直到逻辑更改完成并经过测试;使用working resource功能,所有客户机都使用一组共享的版本控制资源,并且每个客户机都会在移动的结果出现时立即看到。
If a server supports the working-resource feature but not the checkout-in-place feature, a CHECKOUT request can only be used to create a working resource, and cannot be used to check out a version-controlled resource. If a server supports the checkout-in-place feature, but not the working-resource feature, a CHECKOUT can only be used to change the state of a version-controlled resource from checked-in to checked-out.
如果服务器支持工作资源功能,但不支持就地签出功能,则签出请求只能用于创建工作资源,而不能用于签出受版本控制的资源。如果服务器支持就地签出功能,但不支持工作资源功能,则签出只能用于将版本控制资源的状态从签入更改为签出。
The working-resource feature introduces the following REQUIRED properties for a version.
工作资源功能为版本引入了以下必需属性。
This property is defined in Section 4.1.1.
该特性在第4.1.1节中定义。
This property is defined in Section 4.1.2.
该特性在第4.1.2节中定义。
The working-resource feature introduces the following REQUIRED properties for a working resource. Since a working resource is a checked-out resource, it also has any property defined in this document for a checked-out resource.
工作资源功能为工作资源引入以下必需属性。由于工作资源是签出资源,因此它还具有在此文档中为签出资源定义的任何属性。
This property identifies the version-controlled resource that will be updated when the working resource is checked in.
此属性标识签入工作资源时将更新的版本控制资源。
<!ELEMENT auto-update (href)>
<!ELEMENT auto-update (href)>
This property is defined in Section 4.2.1.
该特性在第4.2.1节中定义。
This property is defined in Section 4.2.2.
该特性在第4.2.2节中定义。
A CHECKOUT request can be applied to a version to create a new working resource. The content and dead properties of the working resource are a copy of the version that was checked out.
签出请求可以应用于版本以创建新的工作资源。工作资源的内容和死属性是已签出版本的副本。
Marshalling:
编组:
If a request body is included, it MUST be a DAV:checkout XML element.
如果包含请求主体,则它必须是DAV:checkout XML元素。
<!ELEMENT checkout ANY>
<!ELEMENT checkout ANY>
ANY value: A sequence of elements with at most one DAV:apply-to-version and at most one DAV:fork-ok element.
任意值:一系列元素,其中最多有一个DAV:apply-to-version和最多一个DAV:fork-ok元素。
<!ELEMENT apply-to-version EMPTY> <!ELEMENT fork-ok EMPTY>
<!ELEMENT apply-to-version EMPTY> <!ELEMENT fork-ok EMPTY>
If a response body for a successful request is included, it MUST be a DAV:checkout-response XML element.
如果包含成功请求的响应体,则它必须是DAV:checkout-response-XML元素。
<!ELEMENT checkout-response ANY>
<!ELEMENT checkout-response ANY>
The response MUST include a Location header.
响应必须包括位置标头。
The response MUST include a Cache-Control:no-cache header.
响应必须包括缓存控件:无缓存标头。
Preconditions:
先决条件:
(DAV:checkout-of-version-with-descendant-is-forbidden): See Section 4.3.
(DAV:禁止使用子代签出版本):见第4.3节。
(DAV:checkout-of-version-with-descendant-is-discouraged): See Section 4.3.
(DAV:不鼓励使用子代签出版本):参见第4.3节。
(DAV:checkout-of-checked-out-version-is-forbidden): See Section 4.3.
(DAV:禁止签出已签出版本):见第4.3节。
(DAV:checkout-of-checked-out-version-is-discouraged): See Section 4.3.
(DAV:不鼓励签出已签出版本):见第4.3节。
Postconditions:
后条件:
(DAV:create-working-resource): If the request-URL identified a version, the Location response header MUST contain the URL of a new working resource. The DAV:checked-out property of the new working resource MUST identify the version that was checked out. The content and dead properties of the working resource MUST be copies of the content and dead properties of the DAV:checked-out version. The DAV:predecessor-set property of the working resource MUST be initialized to be the version identified by the request-URL. The DAV:auto-update property of the working resource MUST NOT exist.
(DAV:创建工作资源):如果请求URL标识了版本,则位置响应标头必须包含新工作资源的URL。新工作资源的DAV:checked-out属性必须标识已签出的版本。工作资源的内容和死属性必须是DAV:checked-out版本的内容和死属性的副本。必须将工作资源的DAV:preference set属性初始化为由请求URL标识的版本。工作资源的DAV:auto-update属性不能存在。
(DAV:create-working-resource-from-checked-in-version): If the request-URL identified a version-controlled resource, and DAV:apply-to-version is specified in the request body, the CHECKOUT is applied to the DAV:checked-in version of the version-controlled resource, and not the version-controlled resource itself. A new working resource is created and the version-controlled resource remains checked-in. The DAV:auto-update property of the working resource MUST identify the version-controlled resource.
(DAV:从签入版本创建工作资源):如果请求URL标识了版本控制资源,并且在请求正文中指定了DAV:apply to version,则签出将应用于版本控制资源的DAV:checked-in版本,而不是版本控制资源本身。将创建一个新的工作资源,并且版本控制资源将保持签入状态。工作资源的DAV:auto-update属性必须标识受版本控制的资源。
>>REQUEST
>>请求
CHECKOUT /his/12/ver/V3 HTTP/1.1 Host: repo.webdav.org Content-Length: 0
CHECKOUT /his/12/ver/V3 HTTP/1.1 Host: repo.webdav.org Content-Length: 0
>>RESPONSE
>>回应
HTTP/1.1 201 Created Location: http://repo.webdav.org/wr/157 Cache-Control: no-cache
HTTP/1.1 201 Created Location: http://repo.webdav.org/wr/157 Cache-Control: no-cache
In this example, the version identified by http://repo.webdav.org/his/12/ver/V3 is checked out, and the new working resource is located at http://repo.webdav.org/wr/157.
在本例中,由http://repo.webdav.org/his/12/ver/V3 已签出,并且新工作资源位于http://repo.webdav.org/wr/157.
A CHECKIN request can be applied to a working resource to produce a new version whose content and dead properties are a copy of those of the working resource. If the DAV:auto-update property of the working resource was set because the working resource was created by applying a CHECKOUT with the DAV:apply-to-version flag to a version-controlled resource, the CHECKIN request will also update the content and dead properties of that version-controlled resource to be those of the new version.
签入请求可以应用于工作资源,以生成一个新版本,该版本的内容和失效属性是工作资源的内容和失效属性的副本。如果设置了工作资源的DAV:auto-update属性,因为工作资源是通过将带有DAV:apply-to-version标志的签出应用于版本控制资源而创建的,则签入请求还将该版本控制资源的内容和死属性更新为新版本的内容和死属性。
Marshalling:
编组:
If a request body is included, it MUST be a DAV:checkin XML element.
如果包含请求主体,则它必须是DAV:checkin XML元素。
<!ELEMENT checkin ANY> ANY value: A sequence of elements with at most one DAV:fork-ok element.
<!元素签入任意>任意值:一系列元素,最多包含一个DAV:fork ok元素。
<!ELEMENT fork-ok EMPTY>
<!ELEMENT fork-ok EMPTY>
If a response body for a successful request is included, it MUST be a DAV:checkin-response XML element.
如果包含成功请求的响应体,则它必须是DAV:checkin响应XML元素。
<!ELEMENT checkin-response ANY>
<!ELEMENT checkin-response ANY>
The response MUST include a Cache-Control:no-cache header.
响应必须包括缓存控件:无缓存标头。
Preconditions:
先决条件:
(DAV:must-be-checked-out): See Section 4.4.
(DAV:必须签出):见第4.4节。
(DAV:version-history-is-tree) See Section 4.4.
(DAV:版本历史是树)见第4.4节。
(DAV:checkin-fork-forbidden): See Section 4.4.
(DAV:禁止签入叉):见第4.4节。
(DAV:checkin-fork-discouraged): See Section 4.4.
(DAV:不鼓励签入叉):参见第4.4节。
(DAV:no-overwrite-by-auto-update): If the DAV:auto-update property for the checked-out resource identifies a version-controlled resource, at least one of the versions identified by the DAV:predecessor-set property of the checked-out resource MUST identify a version that is either the same as or a descendant of the version identified by the DAV:checked-in property of that version-controlled resource.
(DAV:自动更新不覆盖):如果签出资源的DAV:自动更新属性标识版本受控资源,签出资源的DAV:preforcent set属性标识的至少一个版本必须标识与该版本受控资源的DAV:checked-in属性标识的版本相同的版本或其后代。
Postconditions:
后条件:
(DAV:create-version): See Section 4.4.
(DAV:创建版本):参见第4.4节。
(DAV:initialize-version-content-and-properties): See Section 4.4.
(DAV:初始化版本内容和属性):参见第4.4节。
(DAV:auto-update): If the DAV:auto-update property of the checked-out resource identified a version-controlled resource, an UPDATE request with the new version MUST have been applied to that version-controlled resource.
(DAV:auto-update):如果签出资源的DAV:auto-update属性标识了受版本控制的资源,则必须已将具有新版本的更新请求应用于该受版本控制的资源。
(DAV:delete-working-resource): If the request-URL identifies a working resource and if DAV:keep-checked-out is not specified in the request body, the working resource is deleted.
(DAV:delete working resource):如果请求URL标识了一个工作资源,并且请求正文中未指定DAV:keep checked out,则删除该工作资源。
>>REQUEST
>>请求
CHECKIN /wr/157 HTTP/1.1 Host: repo.webdav.org Content-Length: 0
CHECKIN /wr/157 HTTP/1.1 Host: repo.webdav.org Content-Length: 0
>>RESPONSE
>>回应
HTTP/1.1 201 Created Location: http://repo.webdav.org/his/23/ver/15 Cache-Control: no-cache
HTTP/1.1 201 Created Location: http://repo.webdav.org/his/23/ver/15 Cache-Control: no-cache
In this example, the working resource /wr/157 checked in, and a new version is created at http://repo.webdav.org/his/23/ver/15.
在本例中,工作资源/wr/157已签入,并在中创建了一个新版本http://repo.webdav.org/his/23/ver/15.
If the server supports the working-resource feature, it MUST include "working-resource" as a field in the DAV response header from an OPTIONS request on any resource that supports any versioning properties, reports, or methods.
如果服务器支持working resource功能,则必须在支持任何版本控制属性、报告或方法的任何资源上的选项请求的DAV响应标头中包含“working resource”字段。
Additional Postconditions:
附加后条件:
(DAV:copy-creates-new-resource): The result of copying a working resource is a new non-version-controlled resource at the destination of the COPY. The new resource MAY automatically be put under version control, but the resulting version-controlled resource MUST be associated with a new version history created for that new version-controlled resource.
(DAV:复制创建新资源):复制工作资源的结果是复制目标处的新非版本控制资源。新资源可以自动置于版本控制之下,但生成的版本控制资源必须与为该新版本控制资源创建的新版本历史关联。
Additional Preconditions:
其他先决条件:
(DAV:cannot-rename-working-resource): If the request-URL identifies a working resource, the request MUST fail.
(DAV:无法重命名工作资源):如果请求URL标识工作资源,则请求必须失败。
Additional Postconditions:
附加后条件:
(DAV:update-auto-update): If the request-URL identified a version-controlled resource, any DAV:auto-update properties that identified that version-controlled resource MUST have been updated to contain the new location of that version-controlled resource.
(DAV:update auto-update):如果请求URL标识了版本受控资源,则标识该版本受控资源的任何DAV:auto-update属性必须已更新,以包含该版本受控资源的新位置。
10 Advanced Versioning Features
10个高级版本控制功能
Advanced versioning addresses the problems of parallel development and configuration management of multiple sets of interrelated resources. Traditionally, artifacts of software development, including requirements, design documents, code, and test cases, have been a focus of configuration management. Web sites, comprising multiple inter-linked resources (HTML, graphics, sound, CGI, and others), are another class of complex information artifacts that benefit from the application of configuration management. The advanced versioning capabilities for coordinating concurrent change provide the infrastructure for efficient and controlled management of large evolving web sites.
高级版本控制解决了多组相关资源的并行开发和配置管理问题。传统上,软件开发的工件(包括需求、设计文档、代码和测试用例)一直是配置管理的重点。Web站点由多个相互链接的资源(HTML、图形、声音、CGI等)组成,是另一类复杂的信息构件,可从配置管理的应用中获益。用于协调并发更改的高级版本控制功能为高效和受控地管理大型不断发展的网站提供了基础设施。
Although a server MAY support any combination of advanced versioning features, in order to minimize the complexity of a WebDAV advanced versioning client, a WebDAV advanced versioning server SHOULD support one of the following packages:
尽管服务器可能支持高级版本控制功能的任何组合,但为了最小化WebDAV高级版本控制客户端的复杂性,WebDAV高级版本控制服务器应支持以下软件包之一:
Advanced-Server-Workspace Package: basic-server-workspace package plus all advanced features
高级服务器工作区包:基本服务器工作区包加上所有高级功能
Advanced-Client-Workspace Package: basic-client-workspace package plus all advanced features
高级客户端工作区包:基本客户端工作区包加上所有高级功能
The advanced-server-workspace package supports advanced versioning capabilities for a client with no persistent state. The advanced-client-workspace package supports advanced versioning capabilities for a client that maintains configuration state on the client. A server that supports both advanced workspace packages will interoperate with all versioning clients.
高级服务器工作区包支持无持久状态的客户端的高级版本控制功能。高级客户机工作区包支持维护客户机配置状态的客户机的高级版本控制功能。支持两个高级工作区包的服务器将与所有版本控制客户端进行互操作。
The following additional terms are used by the advanced versioning features.
高级版本控制功能使用以下附加术语。
Collection
收集
A "collection" is a resource whose state consists of not only content and properties, but also a set of named "bindings", where a binding identifies what RFC 2518 calls an "internal member" of the collection. Note that a binding is not a resource, but rather is a part of the state of a collection that defines a mapping from a binding name (a URL segment) to a resource (an internal member of the collection).
“集合”是一种资源,其状态不仅包括内容和属性,还包括一组命名的“绑定”,其中绑定标识RFC2518所称的集合的“内部成员”。请注意,绑定不是资源,而是集合状态的一部分,该集合定义了从绑定名称(URL段)到资源(集合的内部成员)的映射。
Collection Version Resource
集合版本资源
A "collection version resource", or simply "collection version", captures the dead properties of a version-controlled collection, as well as the names of its version-controlled bindings (see Section 14). A version-controlled binding is a binding to a version-controlled resource. If the checkout-in-place feature is supported, a collection version can be created by checking out and then checking in a version-controlled collection. If the working-resource feature is supported, a collection version can be created by checking out a collection version (to create a "working collection") and then checking in the working collection.
“集合版本资源”或简称“集合版本”捕获受版本控制的集合的死属性及其受版本控制的绑定的名称(请参见第14节)。版本控制绑定是对版本控制资源的绑定。如果支持就地签出功能,则可以通过签出然后签入版本控制的集合来创建集合版本。如果支持工作资源功能,则可以通过签出集合版本(创建“工作集合”),然后签入工作集合来创建集合版本。
Configuration
配置
A "configuration" is a set of resources that consists of a root collection and all members (not just internal members) of that root collection that are not members of another configuration. The root collection is called the "configuration root", and the members of this set are called the "members of the configuration". Note that a collection (which is a single resource) is very different from a configuration (which is a set of resources).
“配置”是一组资源,由根集合和该根集合中不属于另一配置的所有成员(不仅仅是内部成员)组成。根集合称为“配置根”,此集合的成员称为“配置成员”。请注意,集合(是单个资源)与配置(是一组资源)非常不同。
Baseline Resource
基线资源
A "baseline resource", or simply "baseline", of a collection is a version of the configuration that is rooted at that collection (see Section 12). In particular, a baseline captures the DAV:checked-in version of every version-controlled member of that configuration. Note that a collection version (which captures the state of a single resource) is very different from a collection baseline (which captures the state of a set of resources).
集合的“基线资源”或简称为“基线”,是以该集合为根的配置版本(参见第12节)。特别是,基线捕获该配置的每个版本控制成员的DAV:checked-In版本。请注意,集合版本(捕获单个资源的状态)与集合基线(捕获一组资源的状态)非常不同。
Baseline-Controlled Collection
基线控制收集
A "baseline-controlled collection" is a collection from which baselines can be created (see Section 12).
“基线控制集合”是一种可以从中创建基线的集合(参见第12节)。
Version-Controlled Configuration Resource
版本控制配置资源
A "version-controlled configuration resource", or simply "version-controlled configuration", is a special kind of version-controlled resource that is associated with a baseline-controlled collection, and is used to create and access baselines of that collection (see Section 12). When a collection is both version-controlled and baseline-controlled, a client can create a new version of the collection by checking out and checking in that collection, and it can create a new baseline of that collection by checking out and checking in the version-controlled configuration of that collection.
“版本控制配置资源”或简称“版本控制配置”是一种特殊类型的版本控制资源,与基线控制集合关联,用于创建和访问该集合的基线(请参见第12节)。当集合同时受版本控制和基线控制时,客户端可以通过签出和签入该集合来创建集合的新版本,也可以通过签出和签入该集合的版本控制配置来创建该集合的新基线。
Activity Resource
活动资源
An "activity resource", or simply "activity", is a resource that selects a set of versions that correspond to a single logical change, where the versions selected from a given version history form a single line of descent through that version history (see Section 13).
“活动资源”或简称“活动”是一种资源,用于选择与单个逻辑变更相对应的一组版本,其中从给定版本历史中选择的版本形成通过该版本历史的单一下降线(见第13节)。
11 Merge Feature
11合并功能
When a user wants to accept the changes (new versions) created by someone else, it is important not just to update the version-controlled resources in the user's workspace with those new versions, since this could result in "backing out" changes the user has made to those version-controlled resources. Instead, the versions created in another workspace should be "merged" into the user's version-controlled resources.
当用户希望接受由其他人创建的更改(新版本)时,重要的是不要仅使用这些新版本更新用户工作区中的版本控制资源,因为这可能会导致用户对这些版本控制资源所做的更改“退出”。相反,在另一个工作区中创建的版本应该“合并”到用户的版本控制资源中。
The version history of a version-controlled resource provides the information needed to determine the result of the merge. In particular, the merge should select whichever version is later in the line of descent from the root version. In case the versions to be merged are on different lines of descent (neither version is a descendant of the other), neither version should be selected, but instead, a new version should be created that contains the logical merge of the content and dead properties of those versions. The MERGE request can be used to check out each version-controlled resource that requires such a merge, and set the DAV:merge-set property of each checked-out resource to identify the version to be merged. The user is responsible for modifying the content and dead properties of the checked-out resource so that it represents the logical merge of that version, and then adding that version to the DAV:predecessor-set of the checked-out resource.
版本受控资源的版本历史记录提供了确定合并结果所需的信息。特别是,合并应该选择根版本的下降线中较晚的版本。如果要合并的版本位于不同的后代线上(两个版本都不是另一个版本的后代),则不应选择任何一个版本,而是应创建一个新版本,其中包含这些版本的内容和死属性的逻辑合并。合并请求可用于签出每个需要此类合并的版本控制资源,并设置每个签出资源的DAV:MERGE set属性以标识要合并的版本。用户负责修改已签出资源的内容和死属性,以便它表示该版本的逻辑合并,然后将该版本添加到已签出资源的DAV:preference集合中。
If the server is capable of automatically performing the merge, it MAY update the content, dead properties, and DAV:predecessor-set of the checked-out resource itself. Before checking in the automatically merged resource, the user is responsible for verifying that the automatic merge is correct.
如果服务器能够自动执行合并,它可能会更新已签出资源本身的内容、死属性和DAV:前置集。在签入自动合并的资源之前,用户负责验证自动合并是否正确。
The merge feature introduces the following REQUIRED properties for a checked-out resource.
合并功能为签出的资源引入以下必需属性。
This property identifies each version that is to be merged into this checked-out resource.
此属性标识要合并到此签出资源中的每个版本。
<!ELEMENT merge-set (href*)>
<!ELEMENT merge-set (href*)>
This property identifies each version that the server has merged into this checked-out resource. The client should confirm that the merge has been performed correctly before moving a URL from the DAV:auto-merge-set to the DAV:predecessor-set of a checked-out resource.
此属性标识服务器已合并到此签出资源中的每个版本。在将URL从DAV:自动合并集移动到签出资源的DAV:前置集之前,客户端应确认已正确执行合并。
<!ELEMENT auto-merge-set (href*)>
<!ELEMENT auto-merge-set (href*)>
The MERGE method performs the logical merge of a specified version (the "merge source") into a specified version-controlled resource (the "merge target"). If the merge source is neither an ancestor nor a descendant of the DAV:checked-in or DAV:checked-out version of the merge target, the MERGE checks out the merge target (if it is not already checked out) and adds the URL of the merge source to the DAV:merge-set of the merge target. It is then the client's responsibility to update the content and dead properties of the checked-out merge target so that it reflects the logical merge of the merge source into the current state of the merge target. The client indicates that it has completed the update of the merge target, by deleting the merge source URL from the DAV:merge-set of the checked-out merge target, and adding it to the DAV:predecessor-set. As an error check for a client forgetting to complete a merge, the server MUST fail an attempt to CHECKIN a version-controlled resource with a non-empty DAV:merge-set.
MERGE方法执行指定版本(“合并源”)到指定版本控制资源(“合并目标”)的逻辑合并。如果合并源既不是合并目标的DAV:checked-in或DAV:checked-out版本的祖先也不是后代,则合并将签出合并目标(如果尚未签出),并将合并源的URL添加到合并目标的DAV:merge集。然后,客户机负责更新签出合并目标的内容和死属性,以便将合并源的逻辑合并反映到合并目标的当前状态。客户端通过从签出的合并目标的DAV:merge集合中删除合并源URL,并将其添加到DAV:preference集合中,指示它已完成合并目标的更新。作为对忘记完成合并的客户端的错误检查,服务器必须无法尝试签入具有非空DAV:merge集的版本控制资源。
When a server has the ability to automatically update the content and dead properties of the merge target to reflect the logical merge of the merge source, it may do so unless DAV:no-auto-merge is specified in the MERGE request body. In order to notify the client that a merge source has been automatically merged, the MERGE request MUST add the URL of the auto-merged source to the DAV:auto-merge-set property of the merge target, and not to the DAV:merge-set property. The client indicates that it has verified that the auto-merge is valid, by deleting the merge source URL from the DAV:auto-merge-set, and adding it to the DAV:predecessor-set.
当服务器能够自动更新合并目标的内容和死属性以反映合并源的逻辑合并时,它可以这样做,除非在合并请求正文中指定了DAV:no auto merge。为了通知客户端合并源已自动合并,合并请求必须将自动合并源的URL添加到合并目标的DAV:auto merge set属性中,而不是添加到DAV:merge set属性中。客户端通过从DAV:auto-merge集中删除合并源URL并将其添加到DAV:preference集中,表明已验证自动合并有效。
Multiple merge sources can be specified in a single MERGE request. The set of merge sources for a MERGE request is determined from the DAV:source element of the MERGE request body as follows:
可以在单个合并请求中指定多个合并源。合并请求的合并源集合由合并请求正文的DAV:source元素确定,如下所示:
- If DAV:source identifies a version, that version is a merge source. - If DAV:source identifies a version-controlled resource, the DAV:checked-in version of that version-controlled resource is a merge source.
- 如果DAV:source标识一个版本,则该版本为合并源。-如果DAV:source标识受版本控制的资源,则该受版本控制资源的DAV:checked-in版本为合并源。
- If DAV:source identifies a collection, the DAV:checked-in version of each version-controlled resource that is a member of that collection is a merge source.
- 如果DAV:source标识集合,则作为该集合成员的每个版本受控资源的DAV:checked-in版本都是合并源。
The request-URL identifies the set of possible merge targets. If the request-URL identifies a collection, any member of the configuration rooted at the request-URL is a possible merge target. The merge target of a particular merge source is the version-controlled or checked-out resource whose DAV:checked-in or DAV:checked-out version is from the same version history as the merge source. If a merge source has no merge target, that merge source is ignored.
请求URL标识一组可能的合并目标。如果请求URL标识集合,则以请求URL为根的配置的任何成员都可能是合并目标。特定合并源的合并目标是版本控制或签出的资源,其DAV:checked-in或DAV:checked-out版本与合并源来自同一版本历史记录。如果合并源没有合并目标,则忽略该合并源。
The MERGE response identifies the resources that a client must modify to complete the merge. It also identifies the resources modified by the request, so that a client can efficiently update any cached state it is maintaining.
合并响应标识客户端必须修改以完成合并的资源。它还标识由请求修改的资源,以便客户机能够有效地更新它正在维护的任何缓存状态。
Marshalling:
编组:
The request body MUST be a DAV:merge element.
请求正文必须是DAV:merge元素。
The set of merge sources is determined by the DAV:source element in the request body.
合并源的集合由请求正文中的DAV:source元素确定。
<!ELEMENT merge ANY> ANY value: A sequence of elements with one DAV:source element, at most one DAV:no-auto-merge element, at most one DAV:no-checkout element, at most one DAV:prop element, and any legal set of elements that can occur in a DAV:checkout element. <!ELEMENT source (href+)> <!ELEMENT no-auto-merge EMPTY> <!ELEMENT no-checkout EMPTY> prop: see RFC 2518, Section 12.11
<!ELEMENT merge ANY> ANY value: A sequence of elements with one DAV:source element, at most one DAV:no-auto-merge element, at most one DAV:no-checkout element, at most one DAV:prop element, and any legal set of elements that can occur in a DAV:checkout element. <!ELEMENT source (href+)> <!ELEMENT no-auto-merge EMPTY> <!ELEMENT no-checkout EMPTY> prop: see RFC 2518, Section 12.11
The response for a successful request MUST be a 207 Multi-Status, where the DAV:multistatus XML element in the response body identifies all resources that have been modified by the request.
成功请求的响应必须是207 Multi Status,其中响应主体中的DAV:multistatus XML元素标识了已被请求修改的所有资源。
multistatus: see RFC 2518, Section 12.9
Multistaus:见RFC 2518第12.9节
The response to a successful request MUST include a Location header containing the URL for the new version created by the checkin.
对成功请求的响应必须包含一个位置标头,其中包含签入创建的新版本的URL。
The response MUST include a Cache-Control:no-cache header.
响应必须包括缓存控件:无缓存标头。
Preconditions:
先决条件:
(DAV:cannot-merge-checked-out-resource): The DAV:source element MUST NOT identify a checked-out resource. If the DAV:source element identifies a collection, the collection MUST NOT have a member that is a checked-out resource.
(DAV:无法合并签出的资源):DAV:源元素不能标识签出的资源。如果DAV:source元素标识一个集合,则该集合中的成员不能是已签出的资源。
(DAV:checkout-not-allowed): If DAV:no-checkout is specified in the request body, it MUST be possible to perform the merge without checking out any of the merge targets.
(DAV:不允许签出):如果在请求正文中指定了DAV:不签出,则必须能够在不签出任何合并目标的情况下执行合并。
All preconditions of the CHECKOUT operation apply to the checkouts performed by the request.
签出操作的所有先决条件都适用于请求执行的签出。
Postconditions:
后条件:
(DAV:ancestor-version): If a merge target is a version-controlled or checked-out resource whose DAV:checked-in version or DAV:checked-out version is the merge source or is a descendant of the merge source, the merge target MUST NOT have been modified by the MERGE.
(DAV:祖先版本):如果合并目标是版本控制或签出的资源,其DAV:签入版本或DAV:签出版本是合并源或合并源的后代,则合并目标不得已被合并修改。
(DAV:descendant-version): If the merge target was a checked-in version-controlled resource whose DAV:checked-in version was an ancestor of the merge source, an UPDATE operation MUST have been applied to the merge target to set its content and dead properties to be those of the merge source. If the UPDATE method is not supported, the merge target MUST have been checked out, the content and dead properties of the merge target MUST have been set to those of the merge source, and the merge source MUST have been added to the DAV:auto-merge-set of the merge target. The merge target MUST appear in a DAV:response XML element in the response body.
(DAV:后代版本):如果合并目标是签入版本控制的资源,其DAV:签入版本是合并源的祖先,则必须对合并目标应用更新操作,以将其内容和死属性设置为合并源的内容和死属性。如果不支持更新方法,则合并目标必须已签出,合并目标的内容和死属性必须已设置为合并源的内容和死属性,并且合并源必须已添加到合并目标的DAV:自动合并集中。合并目标必须出现在响应正文中的DAV:response XML元素中。
(DAV:checked-out-for-merge): If the merge target was a checked-in version-controlled resource whose DAV:checked-in version was neither a descendant nor an ancestor of the merge source, a CHECKOUT MUST have been applied to the merge target. All XML elements in the DAV:merge XML element that could appear in a DAV:checkout XML element MUST have been used as arguments to the CHECKOUT request. The merge target MUST appear in a DAV:response XML element in the response body.
(DAV:签出以进行合并):如果合并目标是签入版本控制的资源,其DAV:签入版本既不是合并源的后代,也不是其祖先,则必须已对合并目标应用签出。DAV:checkout XML元素中可能出现的DAV:merge XML元素中的所有XML元素都必须用作签出请求的参数。合并目标必须出现在响应正文中的DAV:response XML元素中。
(DAV:update-merge-set): If the DAV:checked-out version of the merge target is neither equal to nor a descendant of the merge source, the merge source MUST be added to either the DAV:merge-set or the DAV:auto-merge-set of the merge target. The merge target MUST appear in a DAV:response XML element in the response body.
(DAV:更新合并集):如果合并目标的DAV:签出版本既不等于合并源,也不是合并源的后代,则必须将合并源添加到合并目标的DAV:合并集或DAV:自动合并集。合并目标必须出现在响应正文中的DAV:response XML元素中。
If a merge source has been added to the DAV:auto-merge-set, the content and dead properties of the merge target MUST have been modified by the server to reflect the result of a logical merge of the merge source and the merge target. If a merge source has been added to the DAV:merge-set, the content and dead properties of the merge target MUST NOT have been modified by the server. If DAV:no-auto-merge is specified in the request body, the merge source MUST NOT have been added to the DAV:auto-merge-set.
如果已将合并源添加到DAV:auto merge集中,则服务器必须修改合并目标的内容和死属性,以反映合并源和合并目标的逻辑合并结果。如果已将合并源添加到DAV:merge集中,则服务器不得修改合并目标的内容和死属性。如果在请求正文中未指定DAV:no auto merge,则合并源不得添加到DAV:auto merge集中。
(DAV:report-properties): If DAV:prop is specified in the request body, the properties specified in the DAV:prop element MUST be reported in the DAV:response elements in the response body.
(DAV:report properties):如果在请求正文中指定了DAV:prop,则在DAV:prop元素中指定的属性必须在响应正文中的DAV:response元素中报告。
>>REQUEST
>>请求
MERGE /ws/public HTTP/1.1 Host: www.webdav.org Content-type: text/xml; charset="utf-8" Content-Length: xxxx
MERGE /ws/public HTTP/1.1 Host: www.webdav.org Content-type: text/xml; charset="utf-8" Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <D:merge xmlns:D="DAV:"> <D:source> <D:href>http://www.webdav.org/ws/dev/sally</D:href> </D:source> </D:merge>
<?xml version="1.0" encoding="utf-8" ?> <D:merge xmlns:D="DAV:"> <D:source> <D:href>http://www.webdav.org/ws/dev/sally</D:href> </D:source> </D:merge>
>>RESPONSE
>>回应
HTTP/1.1 207 Multi-Status Content-Type: text/xml; charset="utf-8" Content-Length: xxxx Cache-Control: no-cache
HTTP/1.1 207 Multi-Status Content-Type: text/xml; charset="utf-8" Content-Length: xxxx Cache-Control: no-cache
<?xml version="1.0" encoding="utf-8" ?> <D:multistatus xmlns:D="DAV:"> <D:response> <D:href>http://www.webdav.org/ws/public/src/parse.c</D:href> <D:status>HTTP/1.1 200 OK</D:status> </D:response> <D:response> <D:href>http://www.webdav.org/ws/public/doc/parse.html</D:href> <D:status>HTTP/1.1 200 OK</D:status> </D:response> </D:multistatus>
<?xml version="1.0" encoding="utf-8" ?> <D:multistatus xmlns:D="DAV:"> <D:response> <D:href>http://www.webdav.org/ws/public/src/parse.c</D:href> <D:status>HTTP/1.1 200 OK</D:status> </D:response> <D:response> <D:href>http://www.webdav.org/ws/public/doc/parse.html</D:href> <D:status>HTTP/1.1 200 OK</D:status> </D:response> </D:multistatus>
In this example, the DAV:checked-in versions from the workspace http://www.webdav.org/ws/dev/sally are merged into the version-controlled resources in the workspace http://www.webdav.org/ws/public. The resources /ws/public/src/parse.c and /ws/public/doc/parse.html were modified by the request.
在本例中,DAV:从工作区签入版本http://www.webdav.org/ws/dev/sally 合并到工作区中受版本控制的资源中http://www.webdav.org/ws/public. 请求修改了资源/ws/public/src/parse.c和/ws/public/doc/parse.html。
A merge preview describes the changes that would result if the versions specified by the DAV:source element in the request body were to be merged into the resource identified by the request-URL (commonly, a collection).
合并预览描述了如果请求正文中的DAV:source元素指定的版本要合并到由请求URL(通常是集合)标识的资源中,将导致的更改。
Marshalling:
编组:
The request body MUST be a DAV:merge-preview XML element.
请求正文必须是DAV:merge预览XML元素。
<!ELEMENT merge-preview (source)> <!ELEMENT source (href)>
<!ELEMENT merge-preview (source)> <!ELEMENT source (href)>
The response body for a successful request MUST be a DAV:merge-preview-report XML element.
成功请求的响应主体必须是DAV:merge preview report XML元素。
<!ELEMENT merge-preview-report (update-preview | conflict-preview | ignore-preview)*>
<!ELEMENT merge-preview-report (update-preview | conflict-preview | ignore-preview)*>
A DAV:update-preview element identifies a merge target whose DAV:checked-in property would change as a result of the MERGE, and identifies the merge source for that merge target.
DAV:update预览元素标识其DAV:checked-in属性将因合并而更改的合并目标,并标识该合并目标的合并源。
<!ELEMENT update-preview (target, version)> <!ELEMENT target (href)> <!ELEMENT version (href)>
<!ELEMENT update-preview (target, version)> <!ELEMENT target (href)> <!ELEMENT version (href)>
A DAV:conflict-preview element identifies a merge target that requires a merge.
DAV:conflict预览元素标识需要合并的合并目标。
<!ELEMENT conflict-preview (target, common-ancestor, version)>
<!ELEMENT conflict-preview (target, common-ancestor, version)>
A DAV:common-ancestor element identifies the version that is a common ancestor of both the merge source and the DAV:checked-in or DAV:checked-out version of the merge target.
DAV:common祖先元素标识合并源和合并目标的DAV:checked-in或DAV:checked-out版本的共同祖先版本。
<!ELEMENT common-ancestor (href)>
<!ELEMENT common-ancestor (href)>
A DAV:ignore-preview element identifies a version that has no merge target and therefore would be ignored by the merge.
DAV:ignore预览元素标识没有合并目标的版本,因此合并将忽略该版本。
<!ELEMENT ignore-preview (version)>
<!ELEMENT ignore-preview (version)>
>>REQUEST
>>请求
REPORT /ws/public HTTP/1.1 Host: www.webdav.org Content-type: text/xml; charset="utf-8" Content-Length: xxxx
REPORT /ws/public HTTP/1.1 Host: www.webdav.org Content-type: text/xml; charset="utf-8" Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <D:merge-preview xmlns:D="DAV:"> <D:source> <D:href>http://www.webdav.org/ws/dev/fred</D:href> </D:source> </D:merge-preview>
<?xml version="1.0" encoding="utf-8" ?> <D:merge-preview xmlns:D="DAV:"> <D:source> <D:href>http://www.webdav.org/ws/dev/fred</D:href> </D:source> </D:merge-preview>
>>RESPONSE
>>回应
HTTP/1.1 200 OK Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
HTTP/1.1 200 OK Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <D:merge-preview-report xmlns:D="DAV:"> <D:conflict-preview> <D:target> <D:href>http://www.webdav.org/ws/public/foo.html</D:href> </D:target> <D:common-ancestor> <D:href>http://repo.webdav.org/his/23/ver/18</D:href> </D:common-ancestor> <D:version> <D:href>http://repo.webdav.org/his/23/ver/42</D:href> </D:version> </D:conflict-preview> <D:update-preview> <D:target> <D:href>http://www.webdav.org/ws/public/bar.html</D:href> </D:target> <D:version> <D:href>http://www.repo/his/42/ver/3</D:href> </D:version> </D:update-preview> </D:merge-preview-report>
<?xml version="1.0" encoding="utf-8" ?> <D:merge-preview-report xmlns:D="DAV:"> <D:conflict-preview> <D:target> <D:href>http://www.webdav.org/ws/public/foo.html</D:href> </D:target> <D:common-ancestor> <D:href>http://repo.webdav.org/his/23/ver/18</D:href> </D:common-ancestor> <D:version> <D:href>http://repo.webdav.org/his/23/ver/42</D:href> </D:version> </D:conflict-preview> <D:update-preview> <D:target> <D:href>http://www.webdav.org/ws/public/bar.html</D:href> </D:target> <D:version> <D:href>http://www.repo/his/42/ver/3</D:href> </D:version> </D:update-preview> </D:merge-preview-report>
In this example, the merge preview report indicates that version /his/23/ver/42 would be merged in /ws/public/foo.html, and version /his/42/ver/3 would update /ws/public/bar.html if the workspace http://www.webdav.org/ws/dev/fred was merged into the workspace http://www.webdav.org/ws/public.
在本例中,合并预览报告指出/his/23/ver/42版本将合并到/ws/public/foo.html中,如果工作区已关闭,则/his/42/ver/3版本将更新/ws/public/bar.htmlhttp://www.webdav.org/ws/dev/fred 已合并到工作区中http://www.webdav.org/ws/public.
If the server supports the merge feature, it MUST include "merge" as a field in the DAV response header from an OPTIONS request on any resource that supports any versioning properties, reports, or methods.
如果服务器支持合并功能,则必须在支持任何版本控制属性、报告或方法的任何资源上的选项请求的DAV响应标头中包含“合并”字段。
Additional Postconditions:
附加后条件:
(DAV:delete-version-reference): If a version is deleted, any reference to that version in a DAV:merge-set or DAV:auto-merge-set property MUST be removed.
(DAV:delete version reference):如果删除版本,则必须删除DAV:merge set或DAV:auto merge set属性中对该版本的任何引用。
Additional Preconditions:
其他先决条件:
(DAV:merge-must-be-complete): The DAV:merge-set and DAV:auto-merge-set of the checked-out resource MUST be empty or not exist.
(DAV:合并必须完成):签出资源的DAV:合并集和DAV:自动合并集必须为空或不存在。
12 Baseline Feature
12基线特征
A configuration is a set of resources that consists of a root collection and all members of that root collection except those resources that are members of another configuration. A configuration that contains a large number of resources can consume a large amount of space on a server. This can make it prohibitively expensive to remember the state of an existing configuration by creating a Depth:infinity copy of its root collection.
配置是一组资源,包括根集合和该根集合的所有成员(属于另一配置的资源除外)。包含大量资源的配置可能会占用服务器上的大量空间。这会使通过创建其根集合的Depth:infinity副本来记住现有配置的状态的成本过高。
A baseline is a version resource that captures the state of each version-controlled member of a configuration. A baseline history is a version history whose versions are baselines. New baselines are created by checking out and then checking in a special kind of version-controlled resource called a version-controlled configuration.
基线是一种版本资源,用于捕获配置中每个受版本控制的成员的状态。基线历史记录是版本为基线的版本历史记录。新基线是通过签出然后签入一种称为版本控制配置的特殊类型的版本控制资源来创建的。
A collection that is under baseline control is called a baseline-controlled collection. In order to allow efficient baseline implementation, the state of a baseline of a collection is limited to
受基线控制的集合称为基线控制集合。为了实现高效的基线,集合基线的状态限制为
be a set of versions and their names relative to the collection, and the operations on a baseline are limited to the creation of a baseline from a collection, and restoring or merging the baseline back into a collection. A server MAY automatically put a collection under baseline control when it is created, or a client can use the BASELINE-CONTROL method to put a specified collection under baseline control.
是一组版本及其相对于集合的名称,基线上的操作仅限于从集合创建基线,以及将基线还原或合并回集合。创建集合时,服务器可以自动将其置于基线控制之下,或者客户端可以使用baseline-control方法将指定集合置于基线控制之下。
As a configuration gets large, it is often useful to break it up into a set of smaller configurations that form the logical "components" of that configuration. In order to capture the fact that a baseline of a configuration is logically extended by a component configuration baseline, the component configuration baseline is captured as a "subbaseline" of the baseline.
随着配置变得越来越大,将其分解为一组较小的配置(构成该配置的逻辑“组件”)通常很有用。为了捕获配置基线被组件配置基线逻辑扩展的事实,组件配置基线被捕获为基线的“子基线”。
The root collection of a configuration is unconstrained with respect to its relationship to the root collection of any of its components. In particular, the root collection of a configuration can have a member that is the root collection of one of its components (e.g., configuration /sys/x can have a component /sys/x/foo), can be a member of the root collection of one of its components (e.g., configuration /sys/y/z can have a component /sys/y), or neither (e.g., configuration /sys/x can have a component /comp/bar).
配置的根集合与其任何组件的根集合的关系不受约束。特别是,配置的根集合可以有一个成员,该成员是其一个组件的根集合(例如,配置/sys/x可以有一个组件/sys/x/foo),可以是其一个组件的根集合的成员(例如,配置/sys/y/z可以有一个组件/sys/y),或者两者都不是(例如,配置/sys/x可以有一个组件/comp/bar)。
Since a version-controlled configuration is a version-controlled resource, it has all the properties of a version-controlled resource. In addition, the baseline feature introduces the following REQUIRED property for a version-controlled configuration.
由于版本控制配置是版本控制资源,因此它具有版本控制资源的所有属性。此外,基线功能还为版本控制配置引入了以下必需属性。
This property identifies the collection that contains the version-controlled resources whose DAV:checked-in versions are being tracked by this version-controlled configuration. The DAV:version-controlled-configuration of the DAV:baseline-controlled-collection of a version-controlled configuration MUST identify that version-controlled configuration.
此属性标识包含此版本控制配置正在跟踪其DAV:签入版本的版本控制资源的集合。版本控制配置的DAV:基线控制集合的DAV:版本控制配置必须标识该版本控制配置。
<!ELEMENT baseline-controlled-collection (href)>
<!ELEMENT baseline-controlled-collection (href)>
Since a checked-out configuration is a checked-out resource, it has all the properties of a checked-out resource. In addition, the baseline feature introduces the following REQUIRED property for a checked-out configuration.
由于签出配置是签出资源,因此它具有签出资源的所有属性。此外,基线功能还为签出配置引入了以下必需属性。
This property determines the DAV:subbaseline-set property of the baseline that results from checking in this resource.
此属性确定签入此资源后产生的基线的DAV:subbaseline set属性。
A server MAY reject attempts to modify the DAV:subbaseline-set of a checked-out configuration.
服务器可能会拒绝修改签出配置的DAV:子基线集的尝试。
<!ELEMENT subbaseline-set (href*)>
<!ELEMENT subbaseline-set (href*)>
The DAV:resourcetype of a baseline MUST be DAV:baseline. Since a baseline is a version resource, it has all the properties of a version resource. In addition, the baseline feature introduces the following REQUIRED properties for a baseline.
基线的DAV:resourcetype必须是DAV:baseline。因为基线是版本资源,所以它具有版本资源的所有属性。此外,基线功能还为基线引入了以下必需的属性。
This property contains a server-defined URL for a collection, where each member of this collection MUST either be a version-controlled resource with the same DAV:checked-in version and relative name as a version-controlled member of the baseline-controlled collection at the time the baseline was created, or be a collection needed to provide the relative name for a version-controlled resource.
此属性包含集合的服务器定义URL,其中此集合的每个成员都必须是版本控制资源,具有与创建基线时基线控制集合的版本控制成员相同的DAV:签入版本和相对名称,或者是为受版本控制的资源提供相对名称所需的集合。
<!ELEMENT baseline-collection (href)>
<!ELEMENT baseline-collection (href)>
The URLs in the DAV:subbaseline-set property MUST identify a set of other baselines. The subbaselines of a baseline are the baselines identified by its DAV:subbaseline-set and all subbaselines of the baselines identified by its DAV:subbaseline-set.
DAV:subbaseline set属性中的URL必须标识一组其他基线。基线的子基线是由其DAV:子基线集标识的基线,以及由其DAV:子基线集标识的基线的所有子基线。
<!ELEMENT subbaseline-set (href*)>
<!ELEMENT subbaseline-set (href*)>
The baseline feature introduces the following REQUIRED property for a resource.
基线功能为资源引入以下必需属性。
If the resource is a member of a version-controlled configuration (i.e. the resource is a collection under baseline control or is a member of a collection under baseline control), this property identifies that version-controlled configuration.
如果资源是版本控制配置的成员(即资源是基线控制下的集合或基线控制下的集合的成员),则此属性标识该版本控制配置。
<!ELEMENT version-controlled-configuration (href)>
<!ELEMENT version-controlled-configuration (href)>
The baseline feature introduces the following REQUIRED property for a workspace.
基线功能为工作区引入以下必需属性。
This property identifies each member of the workspace that is a collection under baseline control (as well as the workspace itself, if it is under baseline control).
此属性标识作为基线控制下集合的工作区的每个成员(以及工作区本身,如果它处于基线控制下)。
<!ELEMENT baseline-controlled-collection-set (href*)>
<!ELEMENT baseline-controlled-collection-set (href*)>
A collection can be placed under baseline control with a BASELINE-CONTROL request. When a collection is placed under baseline control, the DAV:version-controlled-configuration property of the collection is set to identify a new version-controlled configuration. This version-controlled configuration can be checked out and then checked in to create a new baseline for that collection.
可以使用基线控制请求将集合置于基线控制之下。将集合置于基线控制下时,将设置集合的DAV:version-controlled配置属性以标识新的版本控制配置。可以签出并签入此版本控制的配置,以便为该集合创建新的基线。
If a baseline is specified in the request body, the DAV:checked-in version of the new version-controlled configuration will be that baseline, and the collection is initialized to contain version-controlled members whose DAV:checked-in versions and relative names are determined by the specified baseline.
如果在请求正文中指定了基线,则受版本控制的新配置的DAV:签入版本将是该基线,并且集合将初始化为包含受版本控制的成员,这些成员的DAV:签入版本和相对名称由指定的基线确定。
If no baseline is specified, a new baseline history is created containing a baseline that captures the state of the version-controlled members of the collection, and the DAV:checked-in version of the version-controlled configuration will be that baseline.
如果未指定基线,将创建一个新的基线历史记录,其中包含捕获集合中受版本控制的成员状态的基线,受版本控制配置的DAV:签入版本将是该基线。
Marshalling:
编组:
If a request body is included, it MUST be a DAV:baseline-control XML element.
如果包含请求主体,则它必须是DAV:baseline控件XML元素。
<!ELEMENT baseline-control ANY> ANY value: A sequence of elements with at most one DAV:baseline element.
<!元素基线控制任意>任意值:一系列元素,最多包含一个DAV:基线元素。
<!ELEMENT baseline (href)>
<!ELEMENT baseline (href)>
If a response body for a successful request is included, it MUST be a DAV:baseline-control-response XML element.
如果包含成功请求的响应主体,则它必须是DAV:baseline-control-response-XML元素。
<!ELEMENT baseline-control-response ANY>
<!ELEMENT baseline-control-response ANY>
The response MUST include a Cache-Control:no-cache header.
响应必须包括缓存控件:无缓存标头。
Preconditions:
先决条件:
(DAV:version-controlled-configuration-must-not-exist): The DAV:version-controlled-configuration property of the collection identified by the request-URL MUST not exist.
(DAV:版本控制的配置不得存在):由请求URL标识的集合的DAV:版本控制的配置属性不得存在。
(DAV:must-be-baseline): The DAV:href of the DAV:baseline element in the request body MUST identify a baseline.
(DAV:必须是基线):请求正文中DAV:baseline元素的DAV:href必须标识基线。
(DAV:must-have-no-version-controlled-members): If a DAV:baseline element is specified in the request body, the collection identified by the request-URL MUST have no version-controlled members.
(DAV:必须没有受版本控制的成员):如果在请求正文中指定了DAV:基线元素,则由请求URL标识的集合必须没有受版本控制的成员。
(DAV:one-baseline-controlled-collection-per-history-per-workspace): If the request-URL identifies a workspace or a member of a workspace, and if a baseline is specified in a DAV:baseline element in the request body, then there MUST NOT be another collection in that workspace whose DAV:version-controlled-configuration property identifies a version-controlled configuration for the baseline history of that baseline.
(DAV:每个工作区每个历史记录一个基线控制集合):如果请求URL标识工作区或工作区成员,并且如果在请求正文中的DAV:baseline元素中指定了基线,然后,该工作区中不得有另一个集合的DAV:version-controlled-configuration属性为该基线的基线历史记录标识版本控制的配置。
Postconditions:
后条件:
(DAV:create-version-controlled-configuration): A new version-controlled configuration is created, whose DAV:baseline-controlled-collection property identifies the collection.
(DAV:create version controlled configuration):将创建一个新的版本控制配置,其DAV:baseline controlled collection属性标识该集合。
(DAV:reference-version-controlled-configuration): The DAV:version-controlled-configuration of the collection identifies the new version-controlled configuration.
(DAV:参考版本控制配置):集合的DAV:版本控制配置标识新的版本控制配置。
(DAV:select-existing-baseline): If the request body specifies a baseline, the DAV:checked-in property of the new version-controlled configuration MUST have been set to identify this baseline. A version-controlled member of the collection will be created for each version in the baseline, where the version-controlled member will have the content and dead properties of that version, and will have the same name relative to the collection as the corresponding version-controlled resource had when the baseline was created. Any nested collections that are needed to provide the appropriate name for a version-controlled member will be created.
(DAV:选择现有基线):如果请求主体指定了基线,则必须设置新版本控制配置的DAV:签入属性以标识此基线。将为基线中的每个版本创建集合的版本控制成员,其中版本控制成员将具有该版本的内容和死属性,并且相对于集合的名称与创建基线时对应的版本控制资源的名称相同。将创建为版本受控成员提供适当名称所需的任何嵌套集合。
(DAV:create-new-baseline): If no baseline is specified in the request body, the request MUST have created a new baseline history at a server-defined URL, and MUST have created a new baseline in that baseline history. The DAV:baseline-collection of the new baseline MUST identify a collection whose members have the same relative name and DAV:checked-in version as the version-controlled members of the request collection. The DAV:checked-in property of the new version-controlled configuration MUST identify the new baseline.
(DAV:创建新基线):如果请求正文中未指定基线,则请求必须已在服务器定义的URL中创建了新基线历史记录,并且必须已在该基线历史记录中创建了新基线。新基线的DAV:baseline集合必须标识其成员具有与请求集合的版本控制成员相同的相对名称和DAV:checked-in版本的集合。新版本控制配置的DAV:checked-in属性必须标识新基线。
>>REQUEST
>>请求
BASELINE-CONTROL /src HTTP/1.1 Host: www.webdav.org Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
BASELINE-CONTROL /src HTTP/1.1 Host: www.webdav.org Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <D:baseline-control xmlns:D="DAV:"> <D:href>http://www.webdav.org/repo/blh/13/ver/8</D:href> </D:baseline-control>
<?xml version="1.0" encoding="utf-8" ?> <D:baseline-control xmlns:D="DAV:"> <D:href>http://www.webdav.org/repo/blh/13/ver/8</D:href> </D:baseline-control>
>>RESPONSE
>>回应
HTTP/1.1 200 OK Cache-Control: no-cache Content-Length: 0
HTTP/1.1 200正常缓存控制:无缓存内容长度:0
In this example, the collection /src is placed under baseline control, and is populated with members from an existing baseline. A new version-controlled configuration (/repo/vcc/128) is created and associated with /src, and /src is initialized with version-controlled members whose DAV:checked-in versions are those selected by the DAV:baseline-collection (/repo/bc/15) of the specified baseline (/repo/blh/13/ver/8). The following diagram illustrates the resulting state on the server.
在本例中,集合/src置于基线控制之下,并由现有基线中的成员填充。创建新的版本控制配置(/repo/vcc/128)并将其与/src关联,并且使用版本控制成员初始化/src,这些成员的DAV:checked-in版本是由指定基线(/repo/blh/13/ver/8)的DAV:baseline集合(/repo/bc/15)选择的版本。下图说明了服务器上的结果状态。
+-------------------------------------+ |Baseline-Controlled Collection |<------+ |/src | | |-------------------------------------| | |DAV:version-controlled-configuration +---+ | +-------------------------------------+ | | | | | | +-------------------------------------+ | | |Version-Controlled Configuration |<--+ | |/repo/vcc/128 | | |-------------------------------------| | |DAV:baseline-controlled-collection +-------+ |-------------------------------------| |DAV:checked-in +-------+ +-------------------------------------+ | |DAV:version-history +---+ | +-------------------------------------+ | | | | | | +------------------------+ | | |Baseline History |<---------------+ | |/repo/blh/13 | | |------------------------+ | |DAV:version-set +----------------+ | +------------------------+ | | | | | v | v v | | | +------------------------+ | | |Baseline |<-------+-----------+ |/repo/blh/13/ver/8 | |------------------------+ +--------------+ |DAV:baseline-collection +---->|Collection | +------------------------+ |/repo/bc/15 | +--------------+
+-------------------------------------+ |Baseline-Controlled Collection |<------+ |/src | | |-------------------------------------| | |DAV:version-controlled-configuration +---+ | +-------------------------------------+ | | | | | | +-------------------------------------+ | | |Version-Controlled Configuration |<--+ | |/repo/vcc/128 | | |-------------------------------------| | |DAV:baseline-controlled-collection +-------+ |-------------------------------------| |DAV:checked-in +-------+ +-------------------------------------+ | |DAV:version-history +---+ | +-------------------------------------+ | | | | | | +------------------------+ | | |Baseline History |<---------------+ | |/repo/blh/13 | | |------------------------+ | |DAV:version-set +----------------+ | +------------------------+ | | | | | v | v v | | | +------------------------+ | | |Baseline |<-------+-----------+ |/repo/blh/13/ver/8 | |------------------------+ +--------------+ |DAV:baseline-collection +---->|Collection | +------------------------+ |/repo/bc/15 | +--------------+
In order to create new baselines of /src, /repo/vcc/128 can be checked out, new versions can be created or selected by the version-controlled members of /src, and then /repo/vcc/128 can be checked in to capture the current state of those version-controlled members.
为了创建/src的新基线,可以签出/repo/vcc/128,由/src的版本控制成员创建或选择新版本,然后签入/repo/vcc/128以捕获这些版本控制成员的当前状态。
A DAV:compare-baseline report contains the differences between the baseline identified by the request-URL (the "request baseline") and the baseline specified in the request body (the "compare baseline").
DAV:compare baseline报告包含请求URL标识的基线(“请求基线”)与请求正文中指定的基线(“比较基线”)之间的差异。
Marshalling:
编组:
The request body MUST be a DAV:compare-baseline XML element.
请求主体必须是DAV:compare-baseline XML元素。
<!ELEMENT compare-baseline (href)>
<!ELEMENT compare-baseline (href)>
The response body for a successful request MUST be a DAV:compare-baseline-report XML element.
成功请求的响应主体必须是DAV:compare-baseline报告XML元素。
<!ELEMENT compare-baseline-report (added-version | deleted-version | changed-version)*>
<!ELEMENT compare-baseline-report (added-version | deleted-version | changed-version)*>
A DAV:added-version element identifies a version that is the DAV:checked-in version of a member of the DAV:baseline-collection of the compare baseline, but no version in the version history of that version is the DAV:checked-in version of a member of the DAV:baseline-collection of the request baseline.
DAV:added version元素标识的版本是比较基线的DAV:baseline集合成员的DAV:checked-in版本,但该版本的版本历史记录中没有版本是请求基线的DAV:baseline集合成员的DAV:checked-in版本。
<!ELEMENT added-version (href)>
<!ELEMENT added-version (href)>
A DAV:deleted-version element identifies a version that is the DAV:checked-in version of a member of the DAV:baseline-collection of the request baseline, but no version in the version history of that version is the DAV:checked-in version of a member of the DAV:baseline-collection of the compare baseline.
DAV:deleted version元素标识的版本是请求基线的DAV:baseline集合成员的DAV:checked-in版本,但该版本的版本历史记录中没有版本是比较基线的DAV:baseline集合成员的DAV:checked-in版本。
<!ELEMENT deleted-version (href)>
<!ELEMENT deleted-version (href)>
A DAV:changed-version element identifies two different versions from the same version history that are the DAV:checked-in version of the DAV:baseline-collection of the request baseline and the compare baseline, respectively.
DAV:changed version元素标识来自同一版本历史记录的两个不同版本,分别是请求基线和比较基线的DAV:baseline集合的DAV:checked-in版本。
<!ELEMENT changed-version (href, href)>
<!ELEMENT changed-version (href, href)>
Preconditions:
先决条件:
(DAV:must-be-baseline): The DAV:href in the request body MUST identify a baseline.
(DAV:必须是基线):请求正文中的DAV:href必须标识基线。
(DAV:baselines-from-same-history): A server MAY require that the baselines being compared be from the same baseline history.
(DAV:来自相同历史记录的基线):服务器可能要求要比较的基线来自相同的基线历史记录。
>>REQUEST
>>请求
REPORT /bl-his/12/bl/14 HTTP/1.1 Host: repo.webdav.com Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
REPORT /bl-his/12/bl/14 HTTP/1.1 Host: repo.webdav.com Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <D:compare-baseline xmlns:D="DAV:"> <D:href>http://repo.webdav.org/bl-his/12/bl/15</D:href> </D:compare-baseline>
<?xml version="1.0" encoding="utf-8" ?> <D:compare-baseline xmlns:D="DAV:"> <D:href>http://repo.webdav.org/bl-his/12/bl/15</D:href> </D:compare-baseline>
>>RESPONSE
>>回应
HTTP/1.1 200 OK Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
HTTP/1.1 200 OK Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <D:compare-baseline-report xmlns:D="DAV:"> <D:added-version> <D:href>http://repo.webdav.org/his/23/ver/8</D:href> </D:added-version> <D:changed-version> <D:href>http://repo.webdav.org/his/29/ver/12</D:href> <D:href>http://repo.webdav.org/his/29/ver/19</D:href> </D:changed-version> <D:deleted-version> <D:href>http://repo.webdav.org/his/12/ver/4</D:href> </D:deleted-version> </D:compare-baseline-report>
<?xml version="1.0" encoding="utf-8" ?> <D:compare-baseline-report xmlns:D="DAV:"> <D:added-version> <D:href>http://repo.webdav.org/his/23/ver/8</D:href> </D:added-version> <D:changed-version> <D:href>http://repo.webdav.org/his/29/ver/12</D:href> <D:href>http://repo.webdav.org/his/29/ver/19</D:href> </D:changed-version> <D:deleted-version> <D:href>http://repo.webdav.org/his/12/ver/4</D:href> </D:deleted-version> </D:compare-baseline-report>
In this example, the differences between baseline 14 and baseline 15 of http://repo.webdav.org/bl-his/12 are identified.
在本例中,基线14和基线15之间的差异http://repo.webdav.org/bl-his/12 被识别。
If a server supports the baseline feature, it MUST include "baseline" as a field in the DAV response header from an OPTIONS request on any resource that supports any versioning properties, reports, or methods.
如果服务器支持基线功能,则必须在支持任何版本控制属性、报告或方法的任何资源上的选项请求的DAV响应标头中包含“基线”字段。
Additional Postconditions:
附加后条件:
If a server automatically puts a newly created collection under baseline control, all postconditions for BASELINE-CONTROL apply to the MKCOL.
如果服务器自动将新创建的集合置于基线控制下,则基线控制的所有后置条件都将应用于MKCOL。
Additional Postconditions:
附加后条件:
If the request creates a new collection at the Destination, and a server automatically puts a newly created collection under baseline control, all postconditions for BASELINE-CONTROL apply to the COPY.
如果请求在目标位置创建新集合,并且服务器自动将新创建的集合置于基线控制之下,则基线控制的所有后置条件都将应用于副本。
Additional Preconditions:
其他先决条件:
(DAV:must-not-update-baseline-collection): If the request-URL identifies a member of the configuration rooted at the DAV:baseline-collection of a baseline, the request MUST fail.
(DAV:must not update baseline collection):如果请求URL标识根在基线的DAV:baseline集合上的配置成员,则请求必须失败。
Additional Preconditions:
其他先决条件:
(DAV:no-checked-out-baseline-controlled-collection-members): If the request-URL identifies a version-controlled configuration, all version-controlled members of the DAV:baseline-controlled-collection of the version-controlled configuration MUST be checked-in.
(DAV:无签出的基线控制集合成员):如果请求URL标识版本控制配置,则必须签入版本控制配置的DAV:基线控制集合的所有版本控制成员。
(DAV:one-version-per-history-per-baseline): If the request-URL identifies a version-controlled configuration, the set of versions selected by that version-controlled configuration MUST contain at most one version from any version history, where a version is selected by a version-controlled configuration if the version is identified by the DAV:checked-in property of any member of the
(DAV:每个基线每个历史记录一个版本):如果请求URL标识版本控制配置,则该版本控制配置选择的版本集必须包含任何版本历史记录中最多一个版本,其中,版本由版本控制配置选择,前提是该版本由该配置的任何成员的DAV:checked-in属性标识
configuration rooted at the DAV:baseline-controlled collection of that version-controlled configuration, or is identified by the DAV:checked-in property of any member of the configuration rooted at the DAV:baseline-collection of any subbaseline of that version-controlled configuration.
以该版本受控配置的DAV:baseline受控集合为根的配置,或由以该版本受控配置的任何子基线的DAV:baseline集合为根的配置的任何成员的DAV:checked-in属性标识。
(DAV:cannot-modify-version-controlled-configuration): If the request-URL identifies a version-controlled member of a baseline-controlled collection whose version-controlled configuration is checked-in, the request MUST fail unless the DAV:auto-version property of the version-controlled configuration will automatically check out that version-controlled configuration when it is modified.
(DAV:无法修改版本控制配置):如果请求URL标识了签入其版本控制配置的基线控制集合的版本控制成员,请求必须失败,除非版本控制配置的DAV:auto version属性在修改时自动签出该版本控制配置。
Additional Postconditions:
附加后条件:
(DAV:create-baseline-collection): If the request-URL identifies a version-controlled configuration, the DAV:baseline-collection of the new baseline identifies a collection whose members have the same relative name and DAV:checked-in version as the members of the DAV:baseline-controlled-collection of the version-controlled configuration at the time of the request.
(DAV:创建基线集合):如果请求URL标识版本控制的配置,新基线的DAV:baseline集合标识一个集合,该集合的成员与请求时版本控制配置的DAV:baseline受控集合的成员具有相同的相对名称和DAV:checked-in版本。
(DAV:modify-configuration): If the request-URL identifies a version-controlled member of a baseline-controlled collection, this is a modification to the version-controlled configuration of that baseline-controlled collection, and standard auto-versioning semantics apply.
(DAV:修改配置):如果请求URL标识基线控制集合的版本控制成员,则这是对该基线控制集合的版本控制配置的修改,并应用标准自动版本控制语义。
Additional Preconditions:
其他先决条件:
(DAV:baseline-controlled-members-must-be-checked-in): If the request-URL identifies a version-controlled configuration, then all version-controlled members of the DAV:baseline-controlled-collection of that version-controlled configuration MUST be checked-in.
(DAV:必须签入受基线控制的成员):如果请求URL标识受版本控制的配置,则必须签入该受版本控制的配置的DAV:受基线控制的集合的所有受版本控制的成员。
(DAV:must-not-update-baseline-collection): If the request-URL identifies a member of the configuration rooted at the DAV:baseline-collection of a baseline, the request MUST fail.
(DAV:must not update baseline collection):如果请求URL标识根在基线的DAV:baseline集合上的配置成员,则请求必须失败。
(DAV:cannot-modify-version-controlled-configuration): If the request updates the DAV:checked-in property of any version-controlled member of a baseline-controlled collection whose version-controlled configuration is checked-in, the request MUST
(DAV:无法修改版本控制配置):如果请求更新其版本控制配置已签入的基线控制集合的任何版本控制成员的DAV:签入属性,则请求必须
fail unless the DAV:auto-version property of the version-controlled configuration will automatically check out that version-controlled configuration when it is modified.
除非版本控制配置的DAV:auto version属性在修改时自动签出该版本控制配置,否则失败。
Additional Postconditions:
附加后条件:
(DAV:set-baseline-controlled-collection-members): If the request updated the DAV:checked-in property of a version-controlled configuration, then the version-controlled members of the DAV:baseline-controlled-collection of that version-controlled configuration MUST have been updated so that they have the same relative name, content, and dead properties as the members of the DAV:baseline-collection of the baseline. In particular:
(DAV:设置基线控制集合成员):如果请求更新了版本控制配置的DAV:签入属性,则该版本控制配置的DAV:基线控制集合的版本控制成员必须已更新,以便它们具有相同的相对名称、内容、,和死属性作为基线的DAV:baseline集合的成员。特别地:
- A version-controlled member for a given version history MUST have been deleted if there is no version-controlled member for that version history in the DAV:baseline-collection of the baseline. - A version-controlled member for a given version history MUST have been renamed if its name relative to the baseline-controlled collection is different from that of the version-controlled member for that version history in the DAV:baseline-collection of the baseline. - A new version-controlled member MUST have been created for each member of the DAV:baseline-collection of the baseline for which there is no corresponding version-controlled member in the baseline-controlled collection. - An UPDATE request MUST have been applied to each version-controlled member for a given version history whose DAV:checked-in version is not the same as that of the version-controlled member for that version history in the DAV:baseline-collection of the baseline.
- 如果在基线的DAV:baseline集合中没有给定版本历史记录的版本控制成员,则必须已删除该版本历史记录的版本控制成员。-如果给定版本历史记录的版本受控成员相对于基线受控集合的名称不同于基线的DAV:基线集合中该版本历史记录的版本受控成员的名称,则必须重命名该版本历史记录的版本受控成员。-对于基线控制集合中没有相应版本控制成员的基线的DAV:基线集合的每个成员,必须已创建新版本控制成员。-对于给定的版本历史记录,其DAV:签入版本与基线的DAV:基线集合中该版本历史记录的版本受控成员的DAV:签入版本不相同的每个版本受控成员都必须应用更新请求。
(DAV:update-subbaselines): If the request updated a version-controlled configuration whose DAV:baseline-controlled-collection contains a baseline-controlled member for one of the subbaselines of the request baseline, then the DAV:checked-in property of the version-controlled configuration of that baseline-controlled member MUST have been updated to be that subbaseline. If the request updated a version-controlled configuration whose DAV:baseline-controlled-collection is a member of a workspace that contains a baseline-controlled member for one of the subbaselines of the request baseline, then the DAV:checked-in property of the version-controlled configuration of that baseline-controlled member MUST have been updated to be that subbaseline.
(DAV:更新子基线):如果请求更新了版本控制的配置,其DAV:基线控制的集合包含请求基线的其中一个子基线的基线控制成员,然后,该基线受控成员的版本受控配置的DAV:checked-in属性必须已更新为该子基线。如果请求更新了版本控制配置,其DAV:baseline controlled集合是工作区的成员,该工作区包含请求基线的一个子基线的基线控制成员,然后,该基线受控成员的版本受控配置的DAV:checked-in属性必须已更新为该子基线。
(DAV:modify-configuration): If the request updated the DAV:checked-in property of any version-controlled member of a baseline-controlled collection, and if this DAV:checked-in property differs from the DAV:checked-in property of the corresponding version-controlled member of the DAV:baseline-collection of the DAV:checked-in baseline of the DAV:version-controlled-configuration of the baseline-controlled collection, then this is a modification to that version-controlled configuration, and standard auto-versioning semantics apply.
(DAV:修改配置):如果请求更新了基线控制集合的任何版本控制成员的DAV:签入属性,如果此DAV:checked-in属性与基线控制集合的DAV:version-controlled配置的DAV:checked-in基线的DAV:baseline集合的相应版本控制成员的DAV:checked-in属性不同,则这是对该版本控制配置的修改,并应用标准的自动版本控制语义。
If the merge source is a baseline, the merge target is a version-controlled configuration for the baseline history of that baseline, where the baseline-controlled collection of that version-controlled configuration is a member of the collection identified by the request-URL.
如果合并源是基线,则合并目标是该基线的基线历史记录的版本控制配置,其中该版本控制配置的基线控制集合是由请求URL标识的集合的成员。
Additional Preconditions:
其他先决条件:
(DAV:must-not-update-baseline-collection): Same semantics as UPDATE (see Section 12.13).
(DAV:不得更新基线集合):与更新相同的语义(参见第12.13节)。
(DAV:cannot-modify-version-controlled-configuration): Same semantics as UPDATE (see Section 12.13).
(DAV:无法修改版本控制配置):语义与更新相同(参见第12.13节)。
Additional Postconditions:
附加后条件:
(DAV:merge-baseline): If the merge target is a version-controlled configuration whose DAV:checked-out baseline is not a descendant of the merge baseline, then the merge baseline MUST have been added to the DAV:auto-merge-set of a version-controlled configuration. The DAV:checked-in version of each member of the DAV:baseline-collection of that baseline MUST have been merged into the DAV:baseline-controlled-collection of that version-controlled configuration.
(DAV:合并基线):如果合并目标是版本控制的配置,其DAV:签出基线不是合并基线的后代,则合并基线必须已添加到版本控制配置的DAV:自动合并集中。该基线的DAV:baseline集合的每个成员的DAV:checked-in版本必须已合并到该版本控制配置的DAV:baseline控制集合中。
(DAV:merge-subbaselines): If the merge target is a version-controlled configuration whose DAV:baseline-controlled-collection contains a baseline-controlled member for one of the subbaselines of the merge baseline, then that subbaseline MUST have been merged into the version-controlled configuration of that baseline-controlled member. If the merge target is a version-controlled configuration whose DAV:baseline-controlled-collection is a member of a workspace that contains a baseline-controlled member for one of the subbaselines of the merge baseline, then that subbaseline MUST have been merged into the version-controlled configuration of that baseline-controlled member.
(DAV:合并子基线):如果合并目标是版本控制配置,其DAV:基线控制集合包含合并基线的其中一个子基线的基线控制成员,则该子基线必须已合并到该基线控制成员的版本控制配置中。如果合并目标是版本控制配置,其DAV:baseline controlled集合是包含合并基线的其中一个子基线的基线控制成员的工作区的成员,则该子基线必须已合并到该基线控制成员的版本控制配置中。
(DAV:set-baseline-controlled-collection-members): Same semantics as UPDATE (see Section 12.13).
(DAV:设置基线受控集合成员):语义与更新相同(参见第12.13节)。
(DAV:modify-configuration): Same semantics as UPDATE (see Section 12.13).
(DAV:修改配置):与更新相同的语义(参见第12.13节)。
13 Activity Feature
13活动特征
An activity is a resource that selects a set of versions that are on a single "line of descent", where a line of descent is a sequence of versions connected by successor relationships. If an activity selects versions from multiple version histories, the versions selected in each version history must be on a single line of descent.
活动是一种资源,用于选择位于单个“下降线”上的一组版本,其中下降线是由后续关系连接的一系列版本。如果某个活动从多个版本历史记录中选择版本,则在每个版本历史记录中选择的版本必须位于一条下降线上。
A common problem that motivates the use of activities is that it is often desirable to perform several different logical changes in a single workspace, and then selectively merge a subset of those logical changes to other workspaces. An activity can be used to represent a single logical change, where an activity tracks all the resources that were modified to effect that single logical change. When a version-controlled resource is checked out, the user specifies which activity should be associated with a new version that will be created when that version-controlled resource is checked in. It is then possible to select a particular logical change for merging into another workspace, by specifying the appropriate activity in a MERGE request.
促使活动使用的一个常见问题是,通常希望在单个工作区中执行多个不同的逻辑更改,然后有选择地将这些逻辑更改的子集合并到其他工作区。活动可用于表示单个逻辑更改,其中活动跟踪为实现该单个逻辑更改而修改的所有资源。签出受版本控制的资源时,用户指定应将哪个活动与签入该受版本控制的资源时将创建的新版本相关联。然后,通过在合并请求中指定适当的活动,可以选择要合并到另一个工作区的特定逻辑更改。
Another common problem is that although a version-controlled resource may need to have multiple lines of descent, all work done by members of a given team must be on a single line of descent (to avoid merging between team members). An activity resource provides the mechanism for addressing this problem. When a version-controlled resource is checked out, a client can request that an existing activity be used or that a new activity be created. Activity semantics then ensure that all versions in a given version history that are associated with an activity are on a single line of descent. If all members of a team share a common activity (or sub-activities of a common activity), then all changes made by members of that team will be on a single line of descent.
另一个常见问题是,尽管版本控制资源可能需要有多条下降线,但给定团队成员完成的所有工作都必须在一条下降线上(以避免团队成员之间合并)。活动资源提供了解决此问题的机制。签出受版本控制的资源时,客户端可以请求使用现有活动或创建新活动。然后,活动语义确保给定版本历史中与活动关联的所有版本都位于一条下降线上。如果一个团队的所有成员共享一个公共活动(或公共活动的子活动),那么该团队成员所做的所有更改都将在一条直线上进行。
The following diagram illustrates activities. Version V5 is the latest version of foo.html selected by activity Act-2, and version V8 is the latest version of bar.html selected by activity Act-2.
下图说明了活动。V5版是活动Act-2选择的foo.html的最新版本,V8版是活动Act-2选择的bar.html的最新版本。
foo.html History bar.html History
foo.html History bar.html History
+---+ +---+ Act-1| |V1 Act-1| |V6 +---+ +---+ | | | | +---+ +---+ Act-1| |V2 Act-2| |V7 +---+ +---+ / \ | / \ | +---+ +---+ +---+ Act-1| |V3 Act-2| |V4 Act-2| |V8 +---+ +---+ +---+ | | | | +---+ +---+ Act-2| |V5 Act-3| |V9 +---+ +---+
+---+ +---+ Act-1| |V1 Act-1| |V6 +---+ +---+ | | | | +---+ +---+ Act-1| |V2 Act-2| |V7 +---+ +---+ / \ | / \ | +---+ +---+ +---+ Act-1| |V3 Act-2| |V4 Act-2| |V8 +---+ +---+ +---+ | | | | +---+ +---+ Act-2| |V5 Act-3| |V9 +---+ +---+
Activities appear under a variety of names in existing versioning systems. When an activity is used to capture a logical change, it is commonly called a "change set". When an activity is used to capture a line of descent, it is commonly called a "branch". When a system supports both branches and change sets, it is often useful to require that a particular change set occur on a particular branch. This relationship can be captured by making the change set activity be a "subactivity" of the branch activity.
在现有版本控制系统中,活动以各种名称出现。当一个活动用于捕获一个逻辑变更时,它通常被称为“变更集”。当一个活动被用来捕获一条下降线时,它通常被称为“分支”。当系统同时支持分支和变更集时,要求特定变更集出现在特定分支上通常是有用的。通过使变更集活动成为分支活动的“子活动”,可以捕获这种关系。
The DAV:resourcetype of an activity MUST be DAV:activity.
活动的DAV:resourcetype必须是DAV:activity。
The activity feature introduces the following REQUIRED properties for an activity.
“活动”功能为活动引入了以下必需属性。
This property identifies each version whose DAV:activity-set property identifies this activity. Multiple versions of a single version history can be selected by an activity's DAV:activity-version-set
此属性标识其DAV:activity集属性标识此活动的每个版本。活动的DAV:activity版本集可以选择单个版本历史记录的多个版本
property, but all DAV:activity-version-set versions from a given version history must be on a single line of descent from the root version of that version history.
属性,但给定版本历史记录中的所有DAV:activity版本集版本必须位于该版本历史记录根版本的一条下降线上。
<!ELEMENT activity-version-set (href*)>
<!ELEMENT activity-version-set (href*)>
This property identifies each checked-out resource whose DAV:activity-set identifies this activity.
此属性标识其DAV:activity集标识此活动的每个签出资源。
<!ELEMENT activity-checkout-set (href*)>
<!ELEMENT activity-checkout-set (href*)>
This property identifies each activity that forms a part of the logical change being captured by this activity. An activity behaves as if its DAV:activity-version-set is extended by the DAV:activity-version-set of each activity identified in the DAV:subactivity-set. In particular, the versions in this extended set MUST be on a single line of descent, and when an activity selects a version for merging, the latest version in this extended set is the one that will be merged.
此属性标识构成此活动捕获的逻辑更改一部分的每个活动。活动的行为就像其DAV:activity版本集被DAV:subactivity集中标识的每个活动的DAV:activity版本集扩展一样。特别是,此扩展集中的版本必须位于一条下降线上,并且当活动选择要合并的版本时,此扩展集中的最新版本将被合并。
A server MAY reject attempts to modify the DAV:subactivity-set of an activity.
服务器可能会拒绝修改活动的DAV:子活动集的尝试。
<!ELEMENT subactivity-set (href*)>
<!ELEMENT subactivity-set (href*)>
This property identifies each workspace whose DAV:current-activity-set identifies this activity.
此属性标识其DAV:current活动集标识此活动的每个工作区。
<!ELEMENT current-workspace-set (href*)>
<!ELEMENT current-workspace-set (href*)>
The activity feature introduces the following REQUIRED property for a version.
“活动”功能为版本引入以下必需属性。
This property identifies the activities that determine to which logical changes this version contributes, and on which lines of descent this version appears. A server MAY restrict the DAV:activity-set to identify a single activity. A server MAY refuse to allow the value of the DAV:activity-set property of a version to be modified.
此属性标识确定此版本对哪些逻辑更改做出贡献以及此版本出现在哪些下降线上的活动。服务器可以限制DAV:activity集以标识单个活动。服务器可能拒绝修改版本的DAV:activity set属性的值。
<!ELEMENT activity-set (href*)>
<!ELEMENT activity-set (href*)>
The activity feature introduces the following REQUIRED properties for a checked-out resource.
“活动”功能为签出的资源引入以下必需属性。
This property of a checked-out resource indicates whether the DAV:activity-set of another checked-out resource associated with the version history of this version-controlled resource can have an activity that is in the DAV:activity-set property of this checked-out resource.
已签出资源的此属性指示与此版本受控资源的版本历史记录关联的另一个已签出资源的DAV:activity集是否可以包含此已签出资源的DAV:activity集属性中的活动。
A result of the requirement that an activity must form a single line of descent through a given version history is that if multiple checked-out resources for a given version history are checked out unreserved into a single activity, only the first CHECKIN will succeed. Before another of these checked-out resources can be checked in, the user will first have to merge into that checked-out resource the latest version selected by that activity from that version history, and then modify the DAV:predecessor-set of that checked-out resource to identify that version.
一个活动必须通过给定版本历史形成一条下降线这一要求的结果是,如果给定版本历史的多个签出资源被无保留地签出到单个活动中,则只有第一次签入才会成功。在签入另一个已签出资源之前,用户必须首先将该活动从该版本历史记录中选择的最新版本合并到该已签出资源中,然后修改该已签出资源的DAV:preference集以标识该版本。
<!ELEMENT unreserved (#PCDATA)> PCDATA value: boolean
<!ELEMENT unreserved (#PCDATA)> PCDATA value: boolean
This property of a checked-out resource determines the DAV:activity-set property of the version that results from checking in this resource.
签出资源的此属性确定签入此资源后生成的版本的DAV:activity set属性。
The activity feature introduces the following REQUIRED property for a workspace.
“活动”功能为工作区引入以下必需属性。
This property identifies the activities that currently are being performed in this workspace. When a member of this workspace is checked out, if no activity is specified in the checkout request, the DAV:current-activity-set will be used. This allows an activity-unaware client to update a workspace in which activity tracking is required. The DAV:current-activity-set MAY be restricted to identify at most one activity.
此属性标识当前在此工作区中执行的活动。签出此工作区的成员时,如果签出请求中未指定任何活动,则将使用DAV:current活动集。这允许不知道活动的客户端更新需要活动跟踪的工作区。DAV:current活动集最多只能识别一个活动。
<!ELEMENT current-activity-set (href*)>
<!ELEMENT current-activity-set (href*)>
A MKACTIVITY request creates a new activity resource. A server MAY restrict activity creation to particular collections, but a client can determine the location of these collections from a DAV:activity-collection-set OPTIONS request.
MKACTIVITY请求创建新的活动资源。服务器可以将活动创建限制为特定集合,但客户端可以通过DAV:activity collection set OPTIONS请求确定这些集合的位置。
Marshalling:
编组:
If a request body is included, it MUST be a DAV:mkactivity XML element.
如果包含请求主体,则它必须是DAV:mkactivity XML元素。
<!ELEMENT mkactivity ANY>
<!ELEMENT mkactivity ANY>
If a response body for a successful request is included, it MUST be a DAV:mkactivity-response XML element.
如果包含成功请求的响应正文,则它必须是DAV:mkactivity-response-XML元素。
<!ELEMENT mkactivity-response ANY>
<!ELEMENT mkactivity-response ANY>
The response MUST include a Cache-Control:no-cache header.
响应必须包括缓存控件:无缓存标头。
Preconditions:
先决条件:
(DAV:resource-must-be-null): A resource MUST NOT exist at the request-URL.
(DAV:resource必须为null):请求URL中不能存在资源。
(DAV:activity-location-ok): The request-URL MUST identify a location where an activity can be created.
(DAV:activity location ok):请求URL必须标识可以创建活动的位置。
Postconditions:
后条件:
(DAV:initialize-activity): A new activity exists at the request-URL. The DAV:resourcetype of the activity MUST be DAV:activity.
(DAV:初始化活动):请求URL处存在新活动。活动的DAV:resourcetype必须是DAV:activity。
>>REQUEST
>>请求
MKACTIVITY /act/test-23 HTTP/1.1 Host: repo.webdav.org Content-Length: 0
MKACTIVITY /act/test-23 HTTP/1.1 Host: repo.webdav.org Content-Length: 0
>>RESPONSE
>>回应
HTTP/1.1 201 Created Cache-Control: no-cache
HTTP/1.1 201创建的缓存控制:无缓存
In this example, a new activity is created at http://repo.webdav.org/act/test-23.
在本例中,将在以下位置创建一个新活动:http://repo.webdav.org/act/test-23.
The DAV:latest-activity-version report can be applied to a version history to identify the latest version that is selected from that version history by a given activity.
DAV:latest activity version报告可应用于版本历史记录,以标识给定活动从该版本历史记录中选择的最新版本。
Marshalling:
编组:
The request body MUST be a DAV:latest-activity-version XML element.
请求正文必须是DAV:latest activity version XML元素。
<!ELEMENT latest-activity-version (href)>
<!ELEMENT latest-activity-version (href)>
The response body for a successful request MUST be a DAV:latest-activity-version-report XML element.
成功请求的响应主体必须是DAV:latest activity version报告XML元素。
<!ELEMENT latest-activity-version-report (href)>
<!ELEMENT latest-activity-version-report (href)>
The DAV:href of the response body MUST identify the version of the given version history that is a member of the DAV:activity-version-set of the given activity and has no descendant that is a member of the DAV:activity-version-set of that activity.
响应正文的DAV:href必须标识作为给定活动的DAV:activity版本集成员的给定版本历史的版本,并且没有作为该活动的DAV:activity版本集成员的子体。
Preconditions:
先决条件:
(DAV:must-be-activity): The DAV:href in the request body MUST identify an activity.
(DAV:必须是活动):请求正文中的DAV:href必须标识活动。
If the server supports the activity feature, it MUST include "activity" as a field in the DAV response header from an OPTIONS request on any resource that supports any versioning properties, reports, or methods.
如果服务器支持“活动”功能,则必须在支持任何版本控制属性、报告或方法的任何资源上的选项请求的DAV响应标头中包含“活动”字段。
A DAV:activity-collection-set element MAY be included in the request body to identify collections that may contain activity resources.
请求主体中可能包含DAV:activity集合集合元素,以标识可能包含活动资源的集合。
Additional Marshalling:
附加编组:
If an XML request body is included, it MUST be a DAV:options XML element.
如果包含XML请求主体,则它必须是DAV:options XML元素。
<!ELEMENT options ANY> ANY value: A sequence of elements with at most one DAV:activity-collection-set element.
<!元素选项任意>任意值:一系列元素,最多包含一个DAV:activity集合元素。
If an XML response body for a successful request is included, it MUST be a DAV:options-response XML element.
如果包含成功请求的XML响应体,则它必须是DAV:options响应XML元素。
<!ELEMENT options-response ANY> ANY value: A sequence of elements with at most one DAV:activity-collection-set element.
<!ELEMENT options response ANY>ANY value:最多包含一个DAV:activity集合元素的元素序列。
<!ELEMENT activity-collection-set (href*)>
<!ELEMENT activity-collection-set (href*)>
If DAV:activity-collection-set is included in the request body, the response body for a successful request MUST contain a DAV:activity-collection-set element identifying collections that may contain activities. An identified collection MAY be the root collection of a tree of collections, all of which may contain activities. Since different servers can control different parts of the URL namespace, different resources on the same host MAY have different DAV:activity-collection-set values. The identified collections MAY be located on different hosts from the resource.
如果请求正文中包含DAV:activity集合集,则成功请求的响应正文必须包含一个DAV:activity集合集元素,该元素标识可能包含活动的集合。已标识的集合可以是集合树的根集合,所有集合都可能包含活动。由于不同的服务器可以控制URL命名空间的不同部分,因此同一主机上的不同资源可能具有不同的DAV:activity集合集值。标识的集合可能位于与资源不同的主机上。
Additional Postconditions:
附加后条件:
(DAV:delete-activity-reference): If an activity is deleted, any reference to that activity in a DAV:activity-set, DAV:subactivity-set, or DAV:current-activity-set MUST be removed.
(DAV:删除活动引用):如果删除活动,则必须删除DAV:活动集、DAV:子活动集或DAV:当前活动集中对该活动的任何引用。
Additional Postconditions:
附加后条件:
(DAV:update-checked-out-reference): If a checked-out resource is moved, any reference to that resource in a DAV:activity-checkout-set property MUST be updated to refer to the new location of that resource.
(DAV:update checked out reference):如果已签出的资源被移动,则必须更新DAV:activity签出集属性中对该资源的任何引用,以引用该资源的新位置。
(DAV:update-activity-reference): If the request-URL identifies an activity, any reference to that activity in a DAV:activity-set, DAV:subactivity-set, or DAV:current-activity-set MUST be updated to refer to the new location of that activity.
(DAV:update activity reference):如果请求URL标识活动,则必须更新DAV:activity集、DAV:subactivity集或DAV:current activity集中对该活动的任何引用,以引用该活动的新位置。
(DAV:update-workspace-reference): If the request-URL identifies a workspace, any reference to that workspace in a DAV:current-workspace-set property MUST be updated to refer to the new location of that workspace.
(DAV:update workspace reference):如果请求URL标识工作区,则必须更新DAV:current workspace set属性中对该工作区的任何引用,以引用该工作区的新位置。
A CHECKOUT request MAY specify the DAV:activity-set for the checked-out resource.
签出请求可以指定签出资源的DAV:activity集。
Additional Marshalling:
附加编组:
<!ELEMENT checkout ANY> ANY value: A sequence of elements with at most one DAV:activity-set and at most one DAV:unreserved.
<!ELEMENT checkout ANY>ANY value:一系列元素,其中最多有一个DAV:activity集,最多有一个DAV:unreserved。
<!ELEMENT activity-set (href+ | new)> <!ELEMENT new EMPTY> <!ELEMENT unreserved EMPTY>
<!ELEMENT activity-set (href+ | new)> <!ELEMENT new EMPTY> <!ELEMENT unreserved EMPTY>
Additional Preconditions:
其他先决条件:
(DAV:one-checkout-per-activity-per-history): If there is a request activity set, unless DAV:unreserved is specified, another checkout from a version of that version history MUST NOT select an activity in that activity set.
(DAV:每个历史记录每个活动一次签出):如果存在请求活动集,除非指定了DAV:unreserved,否则该版本历史记录的另一次签出不得选择该活动集中的活动。
(DAV:linear-activity): If there is a request activity set, unless DAV:unreserved is specified, the selected version MUST be a descendant of all other versions of that version history that select that activity.
(DAV:linear activity):如果存在请求活动集,除非指定了DAV:unreserved,否则所选版本必须是选择该活动的该版本历史记录的所有其他版本的后代。
Additional Postconditions:
附加后条件:
(DAV:initialize-activity-set): The DAV:activity-set of the checked-out resource is set as follows:
(DAV:初始化活动集):签出资源的DAV:活动集设置如下:
- If DAV:new is specified as the DAV:activity-set in the request body, then a new activity created by the server is used. - Otherwise, if activities are specified in the request body, then those activities are used. - Otherwise, if the version-controlled resource is a member of a workspace and the DAV:current-activity-set of the workspace is set, then those activities are used. - Otherwise, the DAV:activity-set of the DAV:checked-out version is used.
- 如果将DAV:new指定为请求正文中设置的DAV:activity,则使用服务器创建的新活动。-否则,如果在请求正文中指定了活动,则使用这些活动。-否则,如果版本控制资源是工作区的成员,并且设置了工作区的DAV:current活动集,则将使用这些活动。-否则,将使用DAV:签出版本的DAV:活动集。
(DAV:initialize-unreserved): If DAV:unreserved was specified in the request body, then the DAV:unreserved property of the checked-out resource MUST be "true".
(DAV:initialize unreserved):如果在请求正文中指定了DAV:unreserved,则签出资源的DAV:unreserved属性必须为“true”。
>>REQUEST
>>请求
CHECKOUT /ws/public/foo.html HTTP/1.1 Host: www.webdav.org Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
CHECKOUT /ws/public/foo.html HTTP/1.1 Host: www.webdav.org Content-Type: text/xml; charset="utf-8" Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <D:checkout xmlns:D="DAV:"> <D:activity-set> <D:href>http://repo.webdav.org/act/fix-bug-23</D:href> </D:activity-set> </D:checkout>
<?xml version="1.0" encoding="utf-8" ?> <D:checkout xmlns:D="DAV:"> <D:activity-set> <D:href>http://repo.webdav.org/act/fix-bug-23</D:href> </D:activity-set> </D:checkout>
>>RESPONSE
>>RESPONSEtranslate error, please retry
HTTP/1.1 200 OK Cache-Control: no-cache
HTTP/1.1 200正常缓存控制:无缓存
In this example, the CHECKOUT is being performed in the http://repo.webdav.org/act/fix-bug-23 activity.
在本例中,签出是在http://repo.webdav.org/act/fix-bug-23 活动
Additional Preconditions:
其他先决条件:
(DAV:linear-activity): Any version which is in the version history of the checked-out resource and whose DAV:activity-set identifies an activity from the DAV:activity-set of the checked-out resource MUST be an ancestor of the checked-out resource.
(DAV:线性活动):签出资源的版本历史记录中的任何版本,其DAV:活动集从签出资源的DAV:活动集中标识活动,都必须是签出资源的祖先。
(DAV:atomic-activity-checkin): If the request-URL identifies an activity, the server MAY fail the request if any of the checked-out resources in the DAV:activity-checkout-set of either that activity or any subactivity of that activity cannot be checked in.
(DAV:atomic activity checkin):如果请求URL标识某个活动,则如果无法签入该活动或该活动的任何子活动的DAV:activity签出集中的任何签出资源,服务器可能会导致请求失败。
Additional Postconditions:
附加后条件:
(DAV:initialize-activity-set): The DAV:activity-set of the new version MUST have been initialized to be the same as the DAV:activity-set of the checked-out resource.
(DAV:初始化活动集):新版本的DAV:活动集必须已初始化为与签出资源的DAV:活动集相同。
(DAV:activity-checkin): If the request-URL identified an activity, the server MUST have successfully applied the CHECKIN request to each checked-out resource in the DAV:activity-checkout-set of both that activity and any subactivity of that activity.
(DAV:activity checkin):如果请求URL标识了一个活动,则服务器必须已成功地将签入请求应用于该活动及其任何子活动的DAV:activity签出集中的每个签出资源。
If the DAV:source element of the request body identifies an activity, then for each version history containing a version selected by that activity, the latest version selected by that activity is a merge source. Note that the versions selected by an activity are the versions in its DAV:activity-version-set unioned with the versions selected by the activities in its DAV:subactivity-set.
如果请求主体的DAV:source元素标识了一个活动,那么对于包含该活动选择的版本的每个版本历史记录,该活动选择的最新版本就是合并源。请注意,活动选择的版本是其DAV:activity版本集中的版本,与活动在其DAV:subactivity集中选择的版本联合。
Additional Marshalling:
附加编组:
<!ELEMENT checkin-activity EMPTY>
<!ELEMENT checkin-activity EMPTY>
Additional Postconditions:
附加后条件:
(DAV:checkin-activity): If DAV:checkin-activity is specified in the request body, and if the DAV:source element in the request body identifies an activity, a CHECKIN request MUST have been successfully applied to that activity before the merge sources were determined.
(DAV:checkin活动):如果在请求正文中指定了DAV:checkin活动,并且如果请求正文中的DAV:source元素标识了一个活动,则在确定合并源之前,签入请求必须已成功应用于该活动。
14 Version-Controlled-Collection Feature
14版本控制收集功能
As with any versionable resource, when a collection is put under version control, a version history resource is created to contain versions for that version-controlled collection. In order to preserve standard versioning semantics (a version of a collection should not be modifiable), a collection version only records information about the version-controlled bindings of that collection.
与任何可版本化资源一样,当集合置于版本控制下时,将创建一个版本历史记录资源,以包含该版本控制集合的版本。为了保留标准版本控制语义(集合的版本不应可修改),集合版本仅记录有关该集合的版本控制绑定的信息。
In order to cleanly separate a modification to the namespace from a modification to content or dead properties, a version of a collection has no members, but instead records in its DAV:version-controlled-binding-set property the binding name and version history resource of each version-controlled internal member of that collection. If, instead, a collection version contained bindings to other versions, creating a new version of a resource would require creating a new version of all the collection versions that contain that resource, which would cause activities to become entangled. For example, suppose a "feature-12" activity created a new version of /x/y/a.html. If a collection version contained bindings to versions of its members, a new version of /x/y would have to be created to contain the new version of /x/y/a.html, and a new version of /x would have to be created to contain the new version of /x/y. Now suppose a "bugfix-47" activity created a new version of /x/z/b.html. Again, a new version of /x/z and a new version of /x would have to be created to contain the new version of /x/y/b.html. But now it is impossible to merge just "bugfix-47" into another workspace without "feature-12", because the version of /x that contains the desired version of /x/z/b.html also contains version of /x/y/a.html created for "feature-12". If, instead, a collection version just records the binding name and version history resource of each version-controlled internal member, changing the version selected by a member of that collection would not require a new version of the collection. The new version is still in the same version history so no new collection version is required, and "feature-12" and "bugfix-47" would not become entangled.
为了清晰地将对命名空间的修改与对内容或死属性的修改分开,集合的版本没有成员,而是在其DAV:version controlled binding set属性中记录该集合的每个受版本控制的内部成员的绑定名称和版本历史资源。相反,如果集合版本包含与其他版本的绑定,则创建资源的新版本需要创建包含该资源的所有集合版本的新版本,这将导致活动陷入混乱。例如,假设一个“feature-12”活动创建了一个新版本的/x/y/a.html。如果集合版本包含对其成员版本的绑定,则必须创建新版本的/x/y以包含新版本的/x/y/a.html,并且必须创建新版本的/x以包含新版本的/x/y。现在假设一个“bugfix-47”活动创建了一个新版本的/x/z/b.html。同样,必须创建新版本的/x/z和新版本的/x,以包含新版本的/x/y/b.html。但是现在不可能只将“bugfix-47”合并到没有“feature-12”的另一个工作区中,因为包含所需版本/x/z/b.html的/x版本也包含为“feature-12”创建的/x/y/a.html版本。相反,如果集合版本只记录每个受版本控制的内部成员的绑定名称和版本历史记录资源,则更改该集合成员选择的版本将不需要新版本的集合。新版本仍处于相同的版本历史记录中,因此不需要新的集合版本,“feature-12”和“bugfix-47”也不会纠缠在一起。
In the following example, there are three version histories, named VH14, VH19, and VH24, where VH14 contains versions of a collection. The version-controlled collection /x has version V2 of version history VH14 as its DAV:checked-in version. Since V2 has recorded two version controlled bindings, one with binding name "a" to version history VH19, and the other with binding name "b" to version history VH24, /x MUST have two version-controlled bindings, one named "a" to a version-controlled resource for history VH19, and the other named "b" to a version-controlled resource for history VH24. The version-
在以下示例中,有三个版本历史记录,分别命名为VH14、VH19和VH24,其中VH14包含集合的版本。版本控制集合/x将版本历史记录VH14的V2版本作为其DAV:签入版本。由于V2记录了两个版本控制绑定,一个绑定名为“a”到版本历史记录VH19,另一个绑定名为“b”到版本历史记录VH24,/x必须有两个版本控制绑定,一个绑定名为“a”到历史记录VH19的版本控制资源,另一个绑定名为“b”到历史记录VH24的版本控制资源。版本-
controlled resource /x/a currently has V4 of VH19 as its DAV:checked-in version, while /x/b has V8 of VH24 as its DAV:checked-in version.
受控资源/x/a当前将VH19的V4作为其DAV:签入版本,而/x/b将VH24的V8作为其DAV:签入版本。
VH19 +---------+ | +---+ | | | |V4 | | +---+ | | | | | | | | +---+ | | | |V5 | VH14 | +---+ | +---------+ | | | | +---+ | | | | a +---+ | | |V1 | | +---+ | ---->| |checked-in=V4 | +---+ | a | | |V6 | / +---+ | | ------>| +---+ | / | | / | +---------+ +---+ | +---+ | /x | |checked-in=V2 | | |V2 | +---+ | +---+ | VH24 \ | | \ | b +---------+ \ b +---+ | | ------>| +---+ | ---->| |checked-in=V8 | +---+ | | | |V7 | +---+ | | |V3 | | +---+ | | +---+ | | | | +---------+ | | | | +---+ | | | |V8 | | +---+ | | | | | | | | +---+ | | | |V9 | | +---+ | +---------+
VH19 +---------+ | +---+ | | | |V4 | | +---+ | | | | | | | | +---+ | | | |V5 | VH14 | +---+ | +---------+ | | | | +---+ | | | | a +---+ | | |V1 | | +---+ | ---->| |checked-in=V4 | +---+ | a | | |V6 | / +---+ | | ------>| +---+ | / | | / | +---------+ +---+ | +---+ | /x | |checked-in=V2 | | |V2 | +---+ | +---+ | VH24 \ | | \ | b +---------+ \ b +---+ | | ------>| +---+ | ---->| |checked-in=V8 | +---+ | | | |V7 | +---+ | | |V3 | | +---+ | | +---+ | | | | +---------+ | | | | +---+ | | | |V8 | | +---+ | | | | | | | | +---+ | | | |V9 | | +---+ | +---------+
For any request (e.g., DELETE, MOVE, COPY) that modifies a version-controlled binding of a checked-in version-controlled collection, the request MUST fail unless the version-controlled collection has a DAV:auto-version property that will automatically check out the version-controlled collection when it is modified.
对于修改签入版本控制集合的版本控制绑定的任何请求(例如,删除、移动、复制),请求必须失败,除非版本控制集合具有DAV:auto-version属性,该属性将在修改版本控制集合时自动签出该集合。
Although a collection version only records the version-controlled bindings of a collection, a version-controlled collection MAY contain both version-controlled and non-version-controlled bindings. Non-
尽管集合版本仅记录集合的版本控制绑定,但版本控制集合可能同时包含版本控制绑定和非版本控制绑定。非-
version-controlled bindings are not under version control, and therefore can be added or deleted without checking out the version-controlled collection.
版本控制绑定不受版本控制,因此可以在不签出版本控制集合的情况下添加或删除。
Note that a collection version captures only a defined subset of the state of a collection. In particular, a version of a collection captures its dead properties and its bindings to version-controlled resources, but not its live properties or bindings to non-version-controlled resources.
请注意,集合版本仅捕获集合状态的定义子集。特别是,集合的版本捕获其死属性及其到版本控制资源的绑定,但不捕获其活属性或到非版本控制资源的绑定。
When a server supports the working-resource feature, a client can check out a collection version to create a working collection. Unlike a version-controlled collection, which contains bindings to version-controlled resources and non-version-controlled resources, a working collection contains bindings to version history resources and non-version-controlled resources. In particular, a working collection is initialized to contain bindings to the version history resources specified by the DAV:version-controlled-binding-set of the checked out collection version. The members of a working collection can then be deleted or moved to another working collection. Non-version-controlled resources can be added to a working collection with methods such as PUT, COPY, and MKCOL. When a working collection is checked in, a VERSION-CONTROL request is automatically applied to every non-version-controlled member of the working collection, and each non-version-controlled member is replaced by its newly created version history. The DAV:version-controlled-binding-set of the new version resulting from checking in a working collection contains the binding name and version history URL for each member of the working collection.
当服务器支持工作资源功能时,客户端可以签出集合版本以创建工作集合。与版本控制集合(其中包含到版本控制资源和非版本控制资源的绑定)不同,工作集合包含到版本历史记录资源和非版本控制资源的绑定。特别是,工作集合被初始化为包含对已签出集合版本的DAV:version-controlled绑定集指定的版本历史记录资源的绑定。然后可以删除工作集合的成员或将其移动到另一个工作集合。可以使用PUT、COPY和MKCOL等方法将非版本控制的资源添加到工作集合中。签入工作集合时,版本控制请求将自动应用于该工作集合的每个非版本控制成员,并且每个非版本控制成员将替换为其新创建的版本历史记录。签入工作集合后生成的新版本的DAV:version-controlled绑定集包含工作集合中每个成员的绑定名称和版本历史URL。
A version-controlled collection has all the properties of a collection and of a version-controlled resource. In addition, the version-controlled-collection feature introduces the following REQUIRED property for a version-controlled collection.
受版本控制的集合具有集合和受版本控制资源的所有属性。此外,版本控制集合功能还为版本控制集合引入了以下必需属性。
This property identifies the non-version-controlled internal members of the collection that currently are eclipsing a version-controlled internal member of the collection.
此属性标识集合的非版本控制内部成员,这些成员当前与集合的版本控制内部成员相形见绌。
!ELEMENT eclipsed-set (binding-name*)> <!ELEMENT binding-name (#PCDATA)> PCDATA value: URL segment
!ELEMENT eclipsed-set (binding-name*)> <!ELEMENT binding-name (#PCDATA)> PCDATA value: URL segment
An UPDATE or MERGE request can give a version-controlled collection a version-controlled internal member that has the same name as an existing non-version-controlled internal member. In this case, the non-version-controlled internal member takes precedence and is said to "eclipse" the new versioned-controlled internal member. If the non-version-controlled internal member is removed (e.g., by a DELETE or MOVE), the version-controlled internal member is exposed.
更新或合并请求可以为版本控制的集合提供与现有非版本控制内部成员同名的版本控制内部成员。在这种情况下,非版本控制的内部成员优先,并被称为“eclipse”新版本控制的内部成员。如果移除了非版本控制的内部成员(例如,通过删除或移动),则版本控制的内部成员将暴露。
A collection version has all the properties of a version. In addition, the version-controlled-collection feature introduces the following REQUIRED property for a collection version.
集合版本具有版本的所有属性。此外,版本控制的集合功能还为集合版本引入了以下必需属性。
This property captures the name and version-history of each version-controlled internal member of a collection.
此属性捕获集合中每个受版本控制的内部成员的名称和版本历史记录。
<!ELEMENT version-controlled-binding-set (version-controlled-binding*)> <!ELEMENT version-controlled-binding (binding-name, version-history)> <!ELEMENT binding-name (#PCDATA)> PCDATA value: URL segment <!ELEMENT version-history (href)>
<!ELEMENT version-controlled-binding-set (version-controlled-binding*)> <!ELEMENT version-controlled-binding (binding-name, version-history)> <!ELEMENT binding-name (#PCDATA)> PCDATA value: URL segment <!ELEMENT version-history (href)>
If the server supports the version-controlled-collection feature, it MUST include "version-controlled-collection" as a field in the DAV response header from an OPTIONS request on any resource that supports any versioning properties, reports, or methods.
如果服务器支持版本控制收集功能,则必须在支持任何版本控制属性、报告或方法的任何资源上的选项请求的DAV响应标头中包含“版本控制收集”字段。
Additional Preconditions:
Additional Preconditions:translate error, please retry
(DAV:cannot-modify-checked-in-parent): If the request-URL identifies a version-controlled resource, the DELETE MUST fail when the collection containing the version-controlled resource is a checked-in version-controlled collection, unless DAV:auto-version semantics will automatically check out the version-controlled collection.
(DAV:无法修改签入父级):如果请求URL标识版本受控资源,则当包含版本受控资源的集合是签入版本受控集合时,删除必须失败,除非DAV:自动版本语义将自动签出版本受控集合。
Additional Preconditions:
其他先决条件:
If the request creates a new resource that is automatically placed under version control, all preconditions for VERSION-CONTROL apply to the request.
如果请求创建了自动置于版本控制下的新资源,则版本控制的所有先决条件都将应用于该请求。
Additional Postconditions:
附加后条件:
If the new collection is automatically put under version control, all postconditions for VERSION-CONTROL apply to the request.
如果新集合自动置于版本控制下,则版本控制的所有后置条件都将应用于请求。
Additional Preconditions:
其他先决条件:
(DAV:cannot-copy-collection-version): If the source of the request is a collection version, the request MUST fail.
(DAV:无法复制集合版本):如果请求源是集合版本,则请求必须失败。
Additional Preconditions:
其他先决条件:
(DAV:cannot-modify-checked-in-parent): If the source of the request is a version-controlled resource, the request MUST fail when the collection containing the source is a checked-in version-controlled collection, unless DAV:auto-version semantics will automatically check out that version-controlled collection.
(DAV:无法修改签入父级):如果请求源是版本控制资源,则当包含该源的集合是签入版本控制集合时,请求必须失败,除非DAV:自动版本语义将自动签出该版本控制集合。
(DAV:cannot-modify-destination-checked-in-parent): If the source of the request is a version-controlled resource, the request MUST fail when the collection containing the destination is a checked-in version-controlled collection, unless DAV:auto-version semantics will automatically check out that version-controlled collection.
(DAV:无法修改目标签入父级):如果请求源是版本控制资源,则当包含目标的集合是签入版本控制集合时,请求必须失败,除非DAV:自动版本语义将自动签出该版本控制集合。
Additional Preconditions:
其他先决条件:
(DAV:cannot-modify-checked-in-parent): If the parent of the request-URL is a checked-in version-controlled collection, the request MUST fail unless DAV:auto-version semantics will automatically check out that version-controlled collection.
(DAV:无法修改签入父级):如果请求URL的父级是签入版本控制的集合,则请求必须失败,除非DAV:自动版本语义将自动签出该版本控制的集合。
Additional Postconditions:
附加后条件:
(DAV:new-version-controlled-collection): If the request body identified a collection version, the collection at the request-URL MUST contain a version-controlled internal member for each DAV:version-controlled-binding specified in the DAV:version-controlled-binding-set of the collection version, where the name and DAV:version-history of the internal member MUST be the DAV:binding-name and the DAV:version-history specified by the DAV:version-controlled-binding. If the internal member is a member of a workspace, and there is another member of the workspace for the same version history, those two members MUST identify the same version-controlled resource; otherwise, a VERSION-CONTROL request with a server selected version of the version history MUST have been applied to the URL for that internal member.
(DAV:新版本控制的集合):如果请求主体标识了集合版本,则请求URL处的集合必须包含集合版本的DAV:版本控制绑定集中指定的每个DAV:版本控制绑定的版本控制内部成员,其中,内部成员的名称和DAV:version历史记录必须是DAV:version受控绑定指定的DAV:binding名称和DAV:version历史记录。如果内部成员是某个工作区的成员,并且该工作区的另一个成员具有相同的版本历史记录,则这两个成员必须标识相同的版本控制资源;否则,必须已将版本历史记录的服务器选定版本的版本控制请求应用于该内部成员的URL。
Additional Postconditions:
附加后条件:
(DAV:initialize-version-history-bindings): If the request has been applied to a collection version, the new working collection MUST be initialized to contain a binding to each of the history resources identified in the DAV:version-controlled-binding-set of that collection version.
(DAV:初始化版本历史绑定):如果请求已应用于集合版本,则必须初始化新的工作集合,以包含与该集合版本的DAV:版本控制绑定集中标识的每个历史资源的绑定。
Additional Postconditions:
附加后条件:
(DAV:initialize-version-controlled-bindings): If the request-URL identified a version-controlled collection, then the DAV:version-controlled-binding-set of the new collection version MUST contain a DAV:version-controlled-binding that identifies the binding name and version history for each version-controlled binding of the version- controlled collection.
(DAV:初始化版本控制的绑定):如果请求URL标识了版本控制的集合,然后,新集合版本的DAV:version受控绑定集必须包含一个DAV:version受控绑定,该绑定标识版本受控集合的每个版本受控绑定的绑定名称和版本历史记录。
(DAV:version-control-working-collection-members): If the request-URL identified a working collection, a VERSION-CONTROL request MUST have been automatically applied to every non-version-controlled member of the working collection, and each non-version-controlled member MUST have been replaced by its newly created version history. If a working collection member was a non-version-controlled collection, every member of the non-version-controlled collection MUST have been placed under version
(DAV:版本控制工作集合成员):如果请求URL标识了工作集合,则版本控制请求必须已自动应用于工作集合的每个非版本控制成员,并且每个非版本控制成员必须已由其新创建的版本历史记录替换。如果工作集合成员是非版本控制集合,则非版本控制集合的每个成员都必须置于版本下
control before the non-version-controlled collection was placed under version control. The DAV:version-controlled-binding-set of the new collection version MUST contain a DAV:version-controlled-binding that identifies the binding name and the version history URL for each member of the working collection.
控件,然后将非版本控制的集合置于版本控制之下。新集合版本的DAV:version受控绑定集必须包含一个DAV:version受控绑定,该绑定标识工作集合中每个成员的绑定名称和版本历史URL。
Additional Postconditions:
附加后条件:
(DAV:update-version-controlled-collection-members): If the request modified the DAV:checked-in version of a version-controlled collection, then the version-controlled members of that version-controlled collection MUST have been updated. In particular:
(DAV:更新版本控制的集合成员):如果请求修改了版本控制集合的DAV:签入版本,则该版本控制集合的版本控制成员必须已更新。特别地:
- A version-controlled internal member MUST have been deleted if its version history is not identified by the DAV:version-controlled-binding-set of the new DAV:checked-in version. - A version-controlled internal member for a given version history MUST have been renamed if its binding name differs from the DAV:binding-name for that version history in the DAV:version-controlled-binding-set of the new DAV:checked-in version. - A new version-controlled internal member MUST have been created when a version history is identified by the DAV:version-controlled-binding-set of the DAV:checked-in version, but there was no member of the version-controlled collection for that version history. If a new version-controlled member is in a workspace that already has a version-controlled resource for that version history, then the new version-controlled member MUST be just a binding (i.e., another name for) that existing version-controlled resource. Otherwise, the content and dead properties of the new version-controlled member MUST have been initialized to be those of the version specified for that version history by the request. If no version is specified for that version history by the request, the version selected is server defined.
- 如果新DAV:签入版本的DAV:版本控制绑定集未标识版本控制的内部成员的版本历史记录,则该成员必须已被删除。-如果给定版本历史记录的版本控制内部成员的绑定名称与新DAV:签入版本的DAV:版本控制绑定集中该版本历史记录的DAV:绑定名称不同,则必须重命名该成员的版本控制内部成员。-当版本历史记录由DAV:签入版本的DAV:版本控制绑定集标识时,必须已创建新的版本控制内部成员,但该版本历史记录的版本控制集合中没有成员。如果新版本受控成员位于已具有该版本历史记录的版本受控资源的工作区中,则新版本受控成员必须只是该现有版本受控资源的绑定(即,另一个名称)。否则,新版本受控成员的内容和死属性必须已初始化为请求为该版本历史记录指定的版本的内容和死属性。如果请求未为该版本历史记录指定版本,则所选版本由服务器定义。
15 Internationalization Considerations
15国际化考虑
This specification has been designed to be compliant with the IETF Policy on Character Sets and Languages [RFC2277]. Specifically, where human-readable strings exist in the protocol, either their charset is explicitly stated, or XML mechanisms are used to specify the charset used. Additionally, these human-readable strings all have the ability to express the natural language of the string.
本规范的设计符合IETF关于字符集和语言的政策[RFC2277]。具体来说,当协议中存在人类可读的字符串时,要么显式声明其字符集,要么使用XML机制指定所使用的字符集。此外,这些人类可读的字符串都能够表达字符串的自然语言。
Most of the human-readable strings in this protocol appear in properties, such as DAV:creator-displayname. As defined by RFC 2518, properties have their values marshaled as XML. XML has explicit provisions for character set tagging and encoding, and requires that XML processors read XML elements encoded, at minimum, using the UTF-8 [RFC2279] encoding of the ISO 10646 multilingual plane. The charset parameter of the Content-Type header, together with the XML "encoding" attribute, provide charset identification information for MIME and XML processors. Proper use of the charset header with XML is described in RFC 3023. XML also provides a language tagging capability for specifying the language of the contents of a particular XML element. XML uses either IANA registered language tags (see RFC 3066) or ISO 639 language tags in the "xml:lang" attribute of an XML element to identify the language of its content and attributes.
此协议中的大多数人类可读字符串显示在属性中,例如DAV:creator displayname。根据RFC2518的定义,属性的值被封送为XML。XML对字符集标记和编码有明确的规定,并要求XML处理器读取至少使用ISO10646多语言平面的UTF-8[RFC2279]编码的XML元素。内容类型头的字符集参数与XML“encoding”属性一起,为MIME和XML处理器提供字符集标识信息。RFC3023中描述了如何正确使用带有XML的字符集头。XML还提供了语言标记功能,用于指定特定XML元素内容的语言。XML在XML元素的“XML:lang”属性中使用IANA注册的语言标记(请参见RFC 3066)或ISO 639语言标记来标识其内容和属性的语言。
DeltaV applications, since they build upon WebDAV, are subject to the internationalization requirements specified in RFC 2518, Section 16. In brief, these requirements mandate the use of XML character set tagging, character set encoding, and language tagging capabilities. Additionally, they strongly recommend reading RFC 3023 for instruction on the use of MIME media types for XML transport and the use of the charset header.
DeltaV应用程序基于WebDAV,因此需要遵守RFC 2518第16节中规定的国际化要求。简言之,这些要求要求使用XML字符集标记、字符集编码和语言标记功能。此外,他们强烈建议阅读RFC3023,以获取有关使用MIME媒体类型进行XML传输和使用字符集头的说明。
Within this specification, a label is a human-readable string that is marshaled in the Label header and as XML in request entity bodies. When used in the Label header, the value of the label is URL-escaped and encoded using UTF-8.
在本规范中,标签是一个人类可读的字符串,在标签头中封送,在请求实体中封送为XML。在标签头中使用时,标签的值是URL转义的,并使用UTF-8进行编码。
16 Security Considerations
16安全考虑
All of the security considerations of WebDAV discussed in RFC 2518, Section 17 also apply to WebDAV versioning. Some aspects of the versioning protocol help address security risks introduced by WebDAV, but other aspects can increase these security risks. These issues are detailed below.
RFC 2518第17节中讨论的所有WebDAV安全注意事项也适用于WebDAV版本控制。版本控制协议的某些方面有助于解决WebDAV带来的安全风险,但其他方面可能会增加这些安全风险。这些问题详述如下。
WebDAV increases the ease with which a remote client can modify resources on a web site, but this also increases the risk of important information being overwritten and lost, either through user error or user maliciousness. The use of WebDAV versioning can help address this problem by guaranteeing that previous information is saved in the form of immutable versions, and therefore is easily available for retrieval or restoration. In addition, the version history provides a log of when changes were made, and by whom. When requests are appropriately authenticated, the history mechanism
WebDAV增加了远程客户端修改网站资源的方便性,但这也增加了重要信息被覆盖和丢失的风险,无论是由于用户错误还是用户恶意。WebDAV版本控制的使用可以确保以前的信息以不可变版本的形式保存,从而便于检索或恢复,从而有助于解决此问题。此外,版本历史记录提供了更改时间和更改人的日志。当请求经过适当的身份验证时,历史记录机制
provides a clear audit trail for changes to web resources. This can often significantly improve the ability to identify the source of the security problem, and thereby help guard against it in the future.
为web资源的更改提供清晰的审核跟踪。这通常可以显著提高识别安全问题根源的能力,从而有助于在将来防范安全问题。
WebDAV versioning provides a variety of links between related pieces of information. This can increase the risk that authentication or authorization errors allow a client to locate sensitive information. For example, if version history is not appropriately protected by access control, a client can use the version history of a public resource to identify later versions of that resource that the user intended to keep private. This increases the need for reliable authentication and accurate authorization.
WebDAV版本控制提供了相关信息之间的各种链接。这会增加身份验证或授权错误允许客户端定位敏感信息的风险。例如,如果版本历史记录未受到访问控制的适当保护,则客户端可以使用公共资源的版本历史记录来标识用户打算保持私有的该资源的更高版本。这增加了对可靠身份验证和准确授权的需求。
A WebDAV versioning client should be designed to handle a mixture of 200 (OK) and 403 (Forbidden) responses on attempts to access the properties and reports that are supported by a resource. For example, a particular user may be authorized to access the content and dead properties of a version-controlled resource, but not be authorized to access the DAV:checked-in, DAV:checked-out, or DAV:version-history properties of that resource.
WebDAV版本控制客户端应设计为在尝试访问资源支持的属性和报告时处理200(正常)和403(禁止)响应的混合。例如,特定用户可能被授权访问版本控制资源的内容和死属性,但无权访问该资源的DAV:checked-in、DAV:checked-out或DAV:version-history属性。
While it is acknowledged that "obscurity" is not an effective means of security, it is often a good technique to keep honest people honest. Within this protocol, version URLs, version history URLs, and working resource URLs are generated by the server and can be properly obfuscated so as not to draw attention to them. For example, a version of "http://foobar.com/reviews/salaries.html" might be assigned a URL such as "http://foobar.com/repo/4934943".
虽然人们承认“默默无闻”不是一种有效的安全手段,但它通常是一种保持诚实的人诚实的好方法。在此协议中,版本URL、版本历史URL和工作资源URL由服务器生成,可以正确地进行模糊处理,以免引起注意。例如,一个版本的“http://foobar.com/reviews/salaries.html“可能被分配了一个URL,例如”http://foobar.com/repo/4934943".
The auto-versioning mechanism provided by WebDAV can result in a large number of resources being created on the server, since each update to a resource could potentially result in the creation of a new version resource. This increases the risk of a denial of service attack that exhausts the storage capability of a server. This risk is especially significant because it can be an unintentional result of something like an aggressive auto-save feature provided by an editing client. A server can decrease this risk by using delta storage techniques to minimize the cost of additional versions, and by limiting auto-versioning to a locking client, and thereby decreasing the number of inadvertent version creations.
WebDAV提供的自动版本控制机制可能导致在服务器上创建大量资源,因为对资源的每次更新都可能导致创建新的版本资源。这会增加拒绝服务攻击的风险,从而耗尽服务器的存储能力。这种风险尤其严重,因为它可能是编辑客户端提供的主动自动保存功能之类的意外结果。服务器可以通过使用增量存储技术来降低附加版本的成本,并通过将自动版本控制限制为锁定客户端,从而减少无意中创建版本的数量,从而降低这种风险。
17 IANA Considerations
17 IANA考虑因素
This document uses the namespace defined by RFC 2518 for XML elements. All other IANA considerations from RFC 2518 are also applicable to WebDAV Versioning.
本文档使用RFC2518为XML元素定义的名称空间。RFC 2518中的所有其他IANA注意事项也适用于WebDAV版本控制。
18 Intellectual Property
18知识产权
The following notice is copied from RFC 2026, Section 10.4, and describes the position of the IETF concerning intellectual property claims made against this document.
以下通知摘自RFC 2026第10.4节,描述了IETF对本文件提出的知识产权索赔的立场。
The IETF takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use other technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on the procedures of the IETF with respect to rights in standards-track and standards-related documentation can be found in BCP-11. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF Secretariat.
IETF对可能声称与本文件中描述的实施或使用其他技术有关的任何知识产权或其他权利的有效性或范围,或此类权利下的任何许可可能或可能不可用的程度,不采取任何立场;它也不表示它已作出任何努力来确定任何此类权利。有关IETF在标准跟踪和标准相关文件中权利的程序信息,请参见BCP-11。可从IETF秘书处获得可供发布的权利声明副本和任何许可证保证,或本规范实施者或用户试图获得使用此类专有权利的一般许可证或许可的结果。
The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to practice this standard. Please address the information to the IETF Executive Director.
IETF邀请任何相关方提请其注意任何版权、专利或专利申请,或其他可能涉及实施本标准所需技术的专有权利。请将信息发送给IETF执行董事。
19 Acknowledgements
19致谢
This protocol is the collaborative product of the authors and the rest of the DeltaV design team: Boris Bokowski, Bruce Cragun (Novell), Jim Doubek (Macromedia), David Durand (INSO), Lisa Dusseault (Xythos), Chuck Fay (FileNet), Yaron Goland, Mark Hale (Interwoven), Henry Harbury (Merant), James Hunt, Jeff McAffer (OTI), Peter Raymond (Merant), Juergen Reuter, Edgar Schwarz (Marconi), Eric Sedlar (Oracle), Bradley Sergeant, Greg Stein, and John Vasta (Rational). We would like to acknowledge the foundation laid for us by the authors of the WebDAV and HTTP protocols upon which this protocol is layered, and the invaluable feedback from the WebDAV and DeltaV working groups.
本协议是作者和DeltaV设计团队其他成员的合作产品:Boris Bokowski、Bruce Cragun(Novell)、Jim Doubek(Macromedia)、David Durand(INSO)、Lisa Dusseault(Xythos)、Chuck Fay(FileNet)、Yaron Goland、Mark Hale(Interwoven)、Henry Harbury(Merant)、James Hunt、Jeff McAffer(OTI)、Peter Raymond(Merant),尤尔根·勒特、埃德加·施瓦兹(马可尼)、埃里克·塞德拉(甲骨文)、布拉德利军士、格雷格·斯坦和约翰·瓦斯塔(理性)。我们想知道我们为WebDAV和HTTP协议的作者奠定的基础,以及来自WebDAV和DelTAV工作组的宝贵反馈。
20 References
20份参考资料
[ISO639] ISO, "Code for the representation of names of languages", ISO 639:1988, 1998.
[ISO639]ISO,“语言名称表示代码”,ISO 639:1988,1998。
[RFC2026] Bradner, S., "The Internet Standards Process -- Revision 3", BCP 9, RFC 2026, October 1996.
[RFC2026]Bradner,S.,“互联网标准过程——第3版”,BCP 9,RFC 2026,1996年10月。
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。
[RFC2277] Alvestrand, H., "IETF Policy on Character Sets and Languages", BCP 18, RFC 2277, January 1998.
[RFC2277]Alvestrand,H.,“IETF字符集和语言政策”,BCP 18,RFC 2277,1998年1月。
[RFC2279] Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC 2279, January 1998.
[RFC2279]Yergeau,F.,“UTF-8,ISO 10646的转换格式”,RFC 2279,1998年1月。
[RFC2396] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, August 1998.
[RFC2396]Berners Lee,T.,Fielding,R.和L.Masinter,“统一资源标识符(URI):通用语法”,RFC 2396,1998年8月。
[RFC2518] Goland, Y., Whitehead, E., Faizi, A., Carter, S. and D. Jensen, "HTTP Extensions for Distributed Authoring - WEBDAV", RFC 2518, February 1999.
[RFC2518]Goland,Y.,Whitehead,E.,Faizi,A.,Carter,S.和D.Jensen,“分布式创作的HTTP扩展-WEBDAV”,RFC25181999年2月。
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P. and T.Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
[RFC2616]菲尔丁,R.,盖蒂斯,J.,莫卧儿,J.,弗里斯泰克,H.,马斯特,L.,利奇,P.和T.伯纳斯-李,“超文本传输协议——HTTP/1.1”,RFC 2616,1999年6月。
[RFC3023] Murata, M., St.Laurent, S. and D. Kohn, "XML Media Types", RFC 3023, January 2001.
[RFC3023]Murata,M.,St.Laurent,S.和D.Kohn,“XML媒体类型”,RFC 3023,2001年1月。
[RFC3066] Alvestrand, H., "Tags for the Identification of Languages", BCP 47, RFC 3066, January 2001.
[RFC3066]Alvestrand,H.,“语言识别标签”,BCP 47,RFC 3066,2001年1月。
Appendix A - Resource Classification
附录A-资源分类
This document introduces several different kinds of versioning resources, such as version-controlled resources, versions, checked-out resources, and version history resources. As clients discover resources on a server, they may find it useful to classify those resources (for example, to make UI decisions on choice of icon and menu options).
本文档介绍几种不同类型的版本控制资源,例如版本控制资源、版本、签出资源和版本历史记录资源。当客户机发现服务器上的资源时,他们可能会发现对这些资源进行分类很有用(例如,对图标和菜单选项的选择进行UI决策)。
Clients should classify a resource by examining the values of the DAV:supported-method-set (see Section 3.1.3) and DAV:supported-live-property-set (see Section 3.1.4) properties of that resource.
客户端应通过检查资源的DAV:supported方法集(请参见第3.1.3节)和DAV:supported live属性集(请参见第3.1.4节)属性的值来对资源进行分类。
The following list shows the supported live properties and methods for each kind of versioning resource. Where an optional feature introduces a new kind of versioning resource, that feature is noted in parentheses following the name of that kind of versioning resource. If a live property or method is optional for a kind of versioning resource, the feature that introduces that live property or method is noted in parentheses following the live property or method name.
下面的列表显示了每种版本控制资源支持的活动属性和方法。如果可选功能引入了一种新的版本控制资源,则该功能将在该类型版本控制资源名称后面的括号中注明。如果某类版本控制资源的活动属性或方法是可选的,则在活动属性或方法名称后的括号中会注明引入该活动属性或方法的功能。
Supported methods:
支持的方法:
- PUT [RFC2616] - MKCOL [RFC2518] - MKACTIVITY (activity) - VERSION-CONTROL (workspace) - MKWORKSPACE (workspace)
- 放置[RFC2616]-MKCOL[RFC2518]-MKACTIVITY(活动)-版本控制(工作区)-MKWORKSPACE(工作区)
Supported live properties:
支持的实时属性:
- DAV:comment - DAV:creator-displayname - DAV:supported-method-set - DAV:supported-live-property-set - DAV:supported-report-set - all properties defined in WebDAV [RFC2518].
- DAV:comment-DAV:creator displayname-DAV:supported method set-DAV:supported live property set-DAV:supported report set-WebDAV[RFC2518]中定义的所有属性。
Supported methods:
支持的方法:
- REPORT - all methods defined in WebDAV [RFC2518] - all methods defined in HTTP/1.1 [RFC2616].
- 报告-WebDAV[RFC2518]中定义的所有方法-HTTP/1.1[RFC2616]中定义的所有方法。
Supported live properties:
支持的实时属性:
- all DeltaV-compliant resource properties.
- 所有符合DeltaV的资源属性。
Supported methods:
支持的方法:
- BASELINE-CONTROL (baseline) - all DeltaV-compliant resource methods.
- 基线控制(基线)-所有符合DeltaV的资源方法。
Supported live properties:
支持的实时属性:
- DAV:workspace (workspace) - DAV:version-controlled-configuration (baseline) - all DeltaV-compliant resource properties.
- DAV:工作区(工作区)—DAV:版本控制配置(基线)—所有符合DeltaV的资源属性。
Supported methods:
支持的方法:
- VERSION-CONTROL - all DeltaV-compliant resource methods.
- 版本控制-所有符合DeltaV的资源方法。
Supported live properties:
支持的实时属性:
- DAV:auto-version - DAV:version-history (version-history) - DAV:workspace (workspace) - DAV:version-controlled-configuration (baseline) - all DeltaV-compliant resource properties.
- DAV:自动版本-DAV:版本历史记录(版本历史记录)-DAV:工作区(工作区)-DAV:版本控制配置(基线)-所有符合DeltaV的资源属性。
Supported methods:
支持的方法:
- VERSION-CONTROL - MERGE (merge) - all DeltaV-compliant resource methods.
- 版本控制-合并(MERGE)-所有符合DeltaV的资源方法。
Supported live properties:
支持的实时属性:
- DAV:predecessor-set - DAV:successor-set - DAV:checkout-set - DAV:version-name - DAV:checkout-fork (in-place-checkout or working resource) - DAV:checkin-fork (in-place-checkout or working resource) - DAV:version-history (version-history) - DAV:label-name-set (label) - DAV:activity-set (activity) - all DeltaV-compliant resource properties.
- DAV:前置集-DAV:后续集-DAV:签出集-DAV:版本名称-DAV:签出叉(就地签出或工作资源)-DAV:签入叉(就地签出或工作资源)-DAV:版本历史记录(版本历史记录)-DAV:标签名称集(标签)-DAV:活动集(活动)-所有符合DeltaV的资源属性。
Supported methods:
支持的方法:
- LABEL (label) - CHECKOUT (working-resource) - all DeltaV-compliant resource methods.
- 标签(LABEL)-签出(工作资源)-所有符合DeltaV的资源方法。
Supported live properties:
支持的实时属性:
- DAV:checked-in - all version-controlled resource properties.
- DAV:已签入-所有受版本控制的资源属性。
Supported methods:
支持的方法:
- CHECKOUT (checkout-in-place) - UPDATE (update) - all version-controlled resource methods.
- 签出(就地签出)-更新(更新)-所有版本控制的资源方法。
Supported live properties:
支持的实时属性:
- DAV:checked-out - DAV:predecessor-set - DAV:checkout-fork (in-place-checkout or working resource) - DAV:checkin-fork (in-place-checkout or working resource) - DAV:merge-set (merge) - DAV:auto-merge-set (merge) - DAV:unreserved (activity) - DAV:activity-set (activity)
- DAV:签出-DAV:前置集-DAV:签出叉(就地签出或工作资源)-DAV:签入叉(就地签出或工作资源)-DAV:合并集(合并)-DAV:自动合并集(合并)-DAV:未保留(活动)-DAV:活动集(活动)
Supported methods:
支持的方法:
- CHECKIN (checkout-in-place or working-resource) - all DeltaV-compliant resource methods.
- 签入(就地签出或工作资源)-所有符合DeltaV的资源方法。
Supported live properties:
支持的实时属性:
- all version-controlled resource properties. - all checked-out resource properties.
- 所有版本控制的资源属性。-所有已签出的资源属性。
Supported methods:
支持的方法:
- UNCHECKOUT - all version-controlled resource methods. - all checked-out resource methods.
- 取消选中-所有版本控制的资源方法。-所有签出的资源方法。
Supported live properties:
支持的实时属性:
- all DeltaV-compliant resource properties - all checked-out resource properties - DAV:auto-update.
- 所有符合DeltaV的资源属性-所有签出的资源属性-DAV:自动更新。
Supported methods:
支持的方法:
- all checked-out resource methods.
- 所有签出的资源方法。
Supported live properties:
支持的实时属性:
- DAV:version-set - DAV:root-version - all DeltaV-compliant resource properties.
- DAV:版本集-DAV:根版本-所有符合DeltaV的资源属性。
Supported methods:
支持的方法:
- all DeltaV-compliant resource methods.
- 所有符合DeltaV的资源方法。
Supported live properties:
支持的实时属性:
- DAV:workspace-checkout-set - DAV:baseline-controlled-collection-set (baseline) - DAV:current-activity-set (activity) - all DeltaV-compliant collection properties.
- DAV:工作区签出集-DAV:基线控制的集合集(基线)-DAV:当前活动集(活动)-所有符合DeltaV的集合属性。
Supported methods:
支持的方法:
- all DeltaV-compliant collection methods.
- 所有符合DeltaV的收集方法。
Supported live properties:
支持的实时属性:
- DAV:activity-version-set - DAV:activity-checkout-set - DAV:subactivity-set - DAV:current-workspace-set - all DeltaV-compliant resource properties.
- DAV:活动版本集-DAV:活动签出集-DAV:子活动集-DAV:当前工作区集-所有符合DeltaV的资源属性。
Supported methods:
支持的方法:
- all DeltaV-compliant resource methods.
- 所有符合DeltaV的资源方法。
Supported live properties:
支持的实时属性:
- DAV:eclipsed-set - all version-controlled resource properties.
- DAV:eclipsed set-所有受版本控制的资源属性。
Supported methods:
支持的方法:
- all version-controlled resource methods.
- 所有版本控制的资源方法。
Supported live properties:
支持的实时属性:
- DAV:version-controlled-binding-set - all version properties.
- DAV:版本控制绑定集-所有版本属性。
Supported methods:
支持的方法:
- all version methods.
- 所有版本方法。
Supported live properties:
支持的实时属性:
- DAV:baseline-controlled-collection - all version-controlled resource properties.
- DAV:基线控制的集合-所有版本控制的资源属性。
Supported methods:
支持的方法:
- all version-controlled resource methods.
- 所有版本控制的资源方法。
Supported live properties:
支持的实时属性:
- DAV:baseline-collection - DAV:subbaseline-set - all version properties.
- DAV:基线集合-DAV:子基线集-所有版本属性。
Supported methods:
支持的方法:
- all version methods.
- 所有版本方法。
Supported live properties:
支持的实时属性:
- DAV:subbaseline-set - all version-controlled configuration properties.
- DAV:子基线集-所有版本控制的配置属性。
Supported methods:
支持的方法:
- all version-controlled configuration methods.
- 所有版本控制的配置方法。
Authors' Addresses
作者地址
Geoffrey Clemm Rational Software 20 Maguire Road, Lexington, MA 02421
Geoffrey Clemm Rational Software马萨诸塞州列克星敦马圭尔路20号,邮编02421
EMail: geoffrey.clemm@rational.com
EMail: geoffrey.clemm@rational.com
Jim Amsden IBM 3039 Cornwallis, Research Triangle Park, NC 27709
吉姆·阿姆斯登IBM 3039康沃利斯,研究三角公园,北卡罗来纳州27709
EMail: jamsden@us.ibm.com
EMail: jamsden@us.ibm.com
Tim Ellison IBM Hursley Park, Winchester, UK S021 2JN
蒂姆·埃里森IBM赫斯利公园,英国温彻斯特S021 2JN
EMail: tim_ellison@uk.ibm.com
EMail: tim_ellison@uk.ibm.com
Christopher Kaler Microsoft One Microsoft Way, Redmond, WA 90852
克里斯托弗·卡勒微软一路,华盛顿州雷德蒙德,邮编90852
EMail: ckaler@microsoft.com
EMail: ckaler@microsoft.com
Jim Whitehead UC Santa Cruz, Dept. of Computer Science 1156 High Street, Santa Cruz, CA 95064
吉姆·怀特海德加州大学圣克鲁斯分校,计算机科学系,加利福尼亚州圣克鲁斯高街1156号,邮编95064
EMail: ejw@cse.ucsc.edu
EMail: ejw@cse.ucsc.edu
Full Copyright Statement
完整版权声明
Copyright (C) The Internet Society (2002). All Rights Reserved.
版权所有(C)互联网协会(2002年)。版权所有。
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.
本文件及其译本可复制并提供给他人,对其进行评论或解释或协助其实施的衍生作品可全部或部分编制、复制、出版和分发,不受任何限制,前提是上述版权声明和本段包含在所有此类副本和衍生作品中。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非出于制定互联网标准的需要,在这种情况下,必须遵循互联网标准过程中定义的版权程序,或根据需要将其翻译成英语以外的其他语言。
The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.
上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。
This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。
Acknowledgement
确认
Funding for the RFC Editor function is currently provided by the Internet Society.
RFC编辑功能的资金目前由互联网协会提供。