Friday 10 November 2017

तोड़फोड़ माइम प्रकार बाइनरी विकल्प


मेरे प्रश्न पर पृष्ठभूमि के लिए: svn एक फ़ाइल को अलग करता है जिसे लगता है कि द्विआधारी है एक हालिया स्टैक अतिप्रवाह उत्तर (एसवीएन अंतर: द्विआधारी प्रकार के रूप में चिह्नित फ़ाइल) से पता चला है कि आप माइम प्रकार को लागू कर सकते हैं: ध्यान दें कि पूर्व उत्तर अपूर्ण है। आपको यह भी करना होगा: अब मेरा नया प्रश्न यह है: क्या मैं एक डिफ़ॉल्ट सेट कर सकता हूं, इसलिए भविष्य के सभी vnd. google - earth. kmlxml फ़ाइलों को svn द्वारा पाठ के रूप में माना जाता है। redbook इस विषय पर चुप रहता है: svnbook. red-beanen1.2svn advanced. props. html केवल कह रहे हैं: क्या अपवाद क्या इन अपवादों को एसवीएन कोड में पकाया जाता है, या पहुंच योग्य एसवीएन क्लाइंट पर इसका उत्तर निर्भर करता है जो आप उपयोग कर रहे हैं। आधिकारिक एसवीएन ग्राहक में, आप जिस विकल्प को तलाश रहे हैं वह स्वचालित प्रॉपर्टी सेटिंग है। TLDR संस्करण आपको अपने उपयोगकर्ता या सिस्टम कॉन्फ़िग को अपडेट करने की आवश्यकता है। मिश्रित अनुभाग में हाँ-पर सक्षम-ऑटो-रपट सेटिंग सेट करें, और एक नया अनुभाग बनाएं जिसे ऑटो-प्रॉप्स कहा जाता है, जो कि आपके द्वारा मिलान करने के लिए इच्छित पैटर्न को परिभाषित करता है और जो गुण आप सेट करना चाहते हैं आपके के.एल. एल. फाइलों के उदाहरण के लिए: यह सुनिश्चित करेगा कि जब आप अपनी रक्षित सूची में.kml फ़ाइल जोड़ते हैं, तो इसमें एक माइम-प्रकार का टेक्स्टप्लेन होगा और क्लाइंट के प्लेटफॉर्म के लिए लाइन अंत का मूल इस्तेमाल करेगा। एपाचे सबवर्सन अकसर किये गए सवाल उपवर्ती क्या है यह सबवर्जन क्यों मौजूद है एक खुला स्रोत, केंद्रीकृत संस्करण नियंत्रण प्रणाली है पता करें कि सबवर्सन मौजूद क्यों है, हमारे सामने पृष्ठ पर हमारा विजन देखें। त्वरित देखें देखना त्वरित देखें देखना सबवर्सन मालिकाना सॉफ़्टवेयर पैरा नंबर, सबवर्जन ओपन सोर्स फ्री सॉफ़्टवेयर है। कई कंपनियों (कोलबानेट, वंडिस्को, विजुअलएसवीएन, एंगो।) कुछ पूर्णकालिक डेवलपर्स के वेतन या भुगतान करते हैं, लेकिन सॉफ्टवेयर में एक अपाचे लाइसेंस है जो कि डेबियन फ्री सॉफ़्टवेयर दिशानिर्देशों के साथ पूरी तरह से अनुपालन करता है। दूसरे शब्दों में, आप सबवर्जन को डाउनलोड करने, संशोधित करने और पुनर्वितरण करने के लिए स्वतंत्र हैं, क्योंकि आप किसी भी कंपनी से कोई अनुमति नहीं देते या किसी व्यक्ति की आवश्यकता नहीं है। उपवर्सन पैरा कितना स्थिर है सबवर्सन बहुत स्थिर है यह परिपक्व सॉफ्टवेयर है, जिसमें मजबूत अनुकूलता की गारंटी है। सबवर्सन डिवेलपमेंट कम्युनिटी अपनी स्थिरता और मजबूती के बारे में गहराई से परवाह करता है। उपखंड 2000 के बाद से विकास में रहा है, और एक वर्ष के बाद स्वयं-होस्टिंग बन गया है। एक साल बाद जब हमने अल्फा घोषित किया, तो सबवर्सन पहले से ही दर्जनों निजी डेवलपर्स और वास्तविक कार्य के लिए दुकानों द्वारा इस्तेमाल किया जा रहा था। इसके बाद, यह बग फिक्सिंग और स्थिरीकरण का दो साल था जब तक हम 1.0 तक नहीं पहुंच जाते। अधिकांश अन्य परियोजनाएं शायद उत्पाद 1.0 को बहुत पहले बुलाती हैं, लेकिन हमने जानबूझ कर उस लेबल को यथाशीघ्र देरी करने का निर्णय लिया है। हम जानते थे कि बहुत से लोगों ने सबवर्सन का उपयोग करने के पहले 1.0 का इंतजार किया था, और उस लेबल के अर्थ के बारे में बहुत विशिष्ट उम्मीदें थीं। तो हम उसी मानक के लिए फंस गए सबवर्सेंस क्लाइंटर्स इंटरऑपरेबिलिटी पॉलिसी पैरा क्या है क्लाइंट और सर्वर को तब तक काम करने के लिए डिज़ाइन किया गया है जब तक वे एक से अधिक प्रमुख रिलीज़ संस्करण के अलावा नहीं होते उदाहरण के लिए, कोई भी 1.X ग्राहक 1Y सर्वर के साथ काम करेगा। हालांकि, यदि क्लाइंट और सर्वर संस्करणों का मिलान नहीं होता है, तो हो सकता है कि कुछ सुविधाएं उपलब्ध न हों। ऐसी सीमाएं हमेशा हमारे रिलीज के रिलीज नोट्स में प्रलेखित होती हैं हमारे क्लाइंटर्स इंटरऑपरेबिलिटी पॉलिसी को सबवर्सियन कम्युनिटी गाइड के संगतता अनुभाग में दर्ज़ किया गया है। उप-ऑपरेटिंग सिस्टम पैरा पर कैसे चलाता है यूनिक्स, विन् 32, बीओओएस, ओएस 2, मैकोड एक्स। के सब आधुनिक फ्लेवर, एएनएसआई सी में लिखे गए हैं और एपरी पोर्टेबल रनटाइम लाइब्रेरी का इस्तेमाल पोर्टेबिलिटी परत के रूप में किया जाता है। सबवर्सियन क्लाइंट कहीं भी एपीआर चलाता है, जो कि अधिकांश स्थानों पर है। सबवर्सियन सर्वर (यानी रिपॉजिटरी पक्ष) एक समान है, सिवाय इसके कि वह Win9x प्लेटफ़ॉर्म (Win95Win98WinME) पर एक बर्कले डीबी रिपॉजिटरी होस्ट नहीं करेगा, क्योंकि बर्कले डीबी ने Win9x पर साझा-मेमोरी सेगमेंट समस्याएं हैं एफएसएफएस भंडार (संस्करण 1.1 में पेश किया गया) को इस प्रतिबंध का नहीं है, हालांकि Win9xs फ़ाइल लॉकिंग समर्थन में एक सीमा के कारण, वे Win9x में भी काम नहीं करते हैं। दोबारा व्यक्त करने के लिए, उपवर्तन क्लाइंट किसी भी प्लेटफ़ॉर्म पर चलाया जा सकता है जहां एपीआर चलाता है। सबवरेशन सर्वर किसी भी प्लेटफॉर्म पर चलाया जा सकता है जहां एपीआर चलाता है, लेकिन Win95Win98WinMe पर एक रिपॉजिटरी होस्ट नहीं कर सकता यह सब एक नई फाइल सिस्टम के बारे में है, क्या यह ext2 पैरा नहीं है। सबवर्जन फाइलसिस्टम एक कर्नेल-स्तरीय फाइल सिस्टम नहीं है जो एक ऑपरेटिंग सिस्टम में स्थापित होगा। इसके बजाय, यह सबवर्सेंस रिपॉज़िटरी इंटरफ़ेस है, जो एक संस्करणित फाइल सिस्टम है जिसका मतलब यह है कि वह एक डायरेक्टरी ट्री को संग्रहीत करता है जिसका राज्य संशोधन से लेकर पुनरीक्षण तक याद किया जाता है। रिपॉजिटरी तक पहुंचने के लिए प्रोग्राम लिखना समान रूप से लिखने वाले कार्यक्रम हैं जो अन्य फाइल सिस्टम API का उपयोग करते हैं। मुख्य अंतर यह है कि पुराने फाइलों को लिखे जाने पर यह विशेष रूप से फाइल सिस्टम डेटा खो नहीं लेता है क्योंकि यह आसानी से सबसे हाल के राज्य के रूप में प्राप्त किया जा सकता है। सर्वर की आवश्यकताओं को कई कारकों पर निर्भर करता है, जैसे कि उपयोगकर्ताओं की संख्या, प्रतिबद्धता की आवृत्ति और अन्य सर्वर संबंधित कार्यों, भंडार का आकार, और कस्टम रिपॉज़िटरी हुक द्वारा उत्पन्न लोड। अपाचे का उपयोग करते समय, यह संभावना है कि अपाचे खुद मेमोरी उपयोग में सबसे बड़ा कारक होगा। उदाहरण के लिए, एक ही सर्वर पर चल रहे अन्य अनुप्रयोगों को ध्यान में रखना याद रखें, रिपॉजिटरी ब्राउज़रों संसाधनों का उपयोग भी करती है, स्वतंत्र रूप से सबवर्जन की ही। सामान्य तौर पर, आप तुलनात्मक CVS खज़ाने के लिए जितनी कम सर्वर मेमोरी की अपेक्षा कर सकते हैं, अपेक्षा कर सकते हैं। मैंने सुना है कि सबवर्सन एक अपाचे एक्सटेंशन है जिसका उपयोग सर्वर पैरा नंबर के लिए किया जाता है। सबवर्जन पुस्तकालयों का एक समूह है यह उन कमांड लाइन क्लाइंट के साथ आता है जो उनका उपयोग करता है। दो भिन्न सब सर्वर सर्वर प्रक्रियाएं हैं: या तो svnserve जो सीवीएस pserver या Apache httpd-2.0 के समान एक छोटा मॉडल है जो एक विशेष moddavsvn मॉड्यूल का उपयोग कर रहा है। svnserve एक कस्टम प्रोटोकॉल बोलता है, जबकि moddavsvn WebDAV को इसके नेटवर्क प्रोटोकॉल के रूप में उपयोग करता है अधिक जानने के लिए सबवर्सन बुक में अध्याय 6 देखें। क्या इसका मतलब है कि मैं अपाचे को सबवर्जन पैरा का उपयोग करने के लिए सेट करना है संक्षिप्त जवाब: नहीं लंबे उत्तर: यदि आप केवल एक रिपॉजिटरी तक पहुँच चाहते हैं, तो आपको केवल एक सबवर्सन क्लाइंट बनाने की आवश्यकता है यदि आप एक नेटवर्क रिपॉज़िटरी होस्ट करना चाहते हैं, तो आपको अपाचे 2 या एक svnserve सर्वर को स्थापित करना होगा। एक नेटवर्क सुलभ उपवर्ती सर्वर सेट करने के बारे में अधिक जानकारी के लिए, सबवर्सन बुक में अध्याय 6 देखें। मैं अपाचे 1.x अभी चलाता हूं, और अपाचे 2.0 पर स्विच नहीं कर सकता बस सबवर्जन रिपॉजिटरी की सेवा के लिए। क्या इसका मतलब है कि मैं एक सबवर्सन सर्वर पैरा नहीं चला सकता, तो आप एक svversion सर्वर के रूप में svnserve चला सकते हैं यह बहुत अच्छी तरह से काम करता है यदि आप WebDAV और अपाचे सर्वर के साथ आने वाले अन्य सभी सामान चाहते हैं, तो हाँ, आपको अपाचे 2.0 की आवश्यकता होगी। अपाचे 2.0 को पोर्ट 80 पर चलाने के लिए अपाचे 2.0 को एक अलग पोर्ट पर चलाने का यह एक विकल्प है। अपाचे के विभिन्न संस्करण एक ही मशीन पर खुशी से एक साथ रह सकते हैं। बस सुनो डायरेक्टिव में httpd. conf में 80 से सुनो 8080 या जो भी पोर्ट नंबर आप चाहते हैं, और उस पोर्ट को निर्दिष्ट करने के लिए सुनिश्चित करें जब आप अपनी रिपॉजिटरी यूआरएल (उदा। Svn. mydomain: 8080reposblahtrunk) प्रकाशित करें। आप एक्स क्यों नहीं करते, बस एससीएम प्रणाली वाई पैरा सबवर्सियन की तरह हर एससीएम प्रणाली की सभी सुविधाओं की नकल करने का प्रयास नहीं कर रहा है। हमारा विजन देखें पूरे रिपॉजिटरी में एक ही संशोधन संख्या क्यों होती है, मैं चाहता हूं कि मेरी प्रत्येक प्रोजेक्ट को अपनी संशोधन संख्याएं मिलें। पैरा पहले, ध्यान दें कि उपवर्ग परियोजनाओं की कोई अवधारणा नहीं है। रिपॉजिटरी सिर्फ एक संस्करणित डायरेक्टरी पेड़ को संग्रहीत करता है mdash आप कुछ उप-पेड़ परियोजनाओं पर विचार कर सकते हैं, लेकिन सबवर्सन किसी अन्य उप-पेड़ से उन्हें अलग तरह से व्यवहार नहीं करता है इस प्रकार, रिपॉजिटरी में प्रोजेक्ट का गठन करने की व्याख्या उपयोगकर्ताओं को पूरी तरह से छोड़ दी जाती है। (यह कैसे शाखाओं और टैग सम्मिलित हैं, प्रतियों के शीर्ष पर बनाया गया सम्मेलनों, मूलभूत अवधारणाओं को स्वयं उपरोक्त में ही बनाया गया है।) हर बार जब आप कोई बदलाव करते हैं, तो रिपॉजिटरी उस कुल रिपॉज़िटरी के पेड़ के नए संशोधन को संग्रहीत करता है, और एक नया संशोधन संख्या के साथ नया पेड़ बेशक, अधिकांश पेड़ पहले के संशोधन के समान हैं, केवल उन हिस्सों को छोड़कर जिन्हें आप बदलते हैं नया संशोधन संख्या एक अनुक्रमिक लेबल है जो पूरे नये पेड़ पर लागू होती है, न कि फाइलों और निर्देशिकाओं में जो आपने उस संशोधन में छुआ था। हालांकि, बोलचाल में, एक संशोधन संख्या का उपयोग उस संशोधन में किए गए परिवर्तन को संदर्भित करने के लिए किया जाता है, उदाहरण के लिए, आर 588 में बदलाव (आर 588 संशोधन 588 के लिए लबादा है) वास्तव में रिपॉजिटरी के पेड़ों 587 और 588 के बीच का अंतर है, या किसी अन्य तरीके से, पेड़ 588 को पेड़ बनाने के लिए 587 के पेड़ को बदल दिया। इस प्रकार, अग्रिम संशोधन संख्या रिपॉजिटरी की प्रगति को चिह्नित करता है, जैसा कि आप आम तौर पर संशोधन संख्या देखकर रिपॉजिटरी के भीतर किसी विशेष परियोजना की प्रगति को माप सकते हैं। इसके अलावा, संशोधन संख्या को रिपॉजिटरी में किसी विशेष प्रोजेक्ट की सार्वजनिक रूप से दिखाई देने वाली संख्या के रूप में उपयोग नहीं किया जाना चाहिए। इसके लिए, आपको अलग-अलग प्रकाशनों के कुछ अन्य तंत्र विकसित करना चाहिए, जैसे कि टैग का उपयोग करना सबवर्सियन में बदलाव हैं पैरा क्या प्रश्न थोड़ा सा लोड होता है, क्योंकि हर किसी में परिवर्तनों की थोड़ी अलग परिभाषा होती है, या संस्करण नियंत्रण प्रणाली के लिए जिसका मतलब है कि परिवर्तनों के लिए सुविधाओं की थोड़ी भिन्न अपेक्षा है। इस चर्चा के प्रयोजनों के लिए, परिवर्तनों की एक साधारण परिभाषा है: यह एक अद्वितीय नाम के साथ परिवर्तनों का एक संग्रह है परिवर्तनों में सामग्री की सामग्री, वृक्ष संरचना के संशोधनों, या मेटाडेटा में बदलाव के लिए पाठ संपादन शामिल हो सकते हैं। अधिक आम बातों में, एक बदलाव सिर्फ नाम के साथ एक पैच है जिसे आप संदर्भित कर सकते हैं। वर्चुअलाइज्ड पेड़ को पहले ऑर्डर ऑब्जेक्ट्स (रिपोजिटरी पेड़ों की एक सरणी) के रूप में प्रबंधित करती है, और परिवर्तन करने वाले चीजें हैं जो सटे हुए पेड़ों की तुलना करते हैं। आर्क या बिटाकिपर जैसी प्रणालियों को दूसरे तरीके से बनाया गया है: वे बदलावों के प्रबंधन के लिए डिज़ाइन किए गए हैं पहले ऑर्डर ऑब्जेक्ट्स (रिपॉजिटरी पैच का एक बैग) के रूप में है, और पेड़ों को एक साथ पैच के सेट्स को बनाकर प्राप्त किया गया है। न तो दर्शन पूर्ण रूप से बेहतर है: वाद-विवाद कम से कम 30 साल बाद चला जाता है। विभिन्न प्रकार के सॉफ़्टवेयर विकास के लिए ये दो डिज़ाइन बेहतर या बदतर हैं। क्या यहां पर चर्चा नहीं हुई थी। इसके बदले, आप सबवर्जन के साथ क्या कर सकते हैं इसका स्पष्टीकरण देता है सबवर्जन में, एक वैश्विक संशोधन संख्या N नामक एक नाम को रेपॉजिटरी में रखा गया है: जिस तरह से रिपॉजिटरी ने एनटी प्रतिबद्ध के बाद देखा। इसका एक अंतर्निहित परिवर्तनों का नाम भी है: यदि आप वृक्ष एन -1 के साथ वृक्ष एन की तुलना करते हैं, तो आप सटीक पैच जो प्रतिबद्ध थे, प्राप्त कर सकते हैं। इस कारण से, संशोधन एन के बारे में सोचना आसान है, न केवल एक पेड़ के रूप में, बल्कि एक बदलाव के रूप में भी। यदि आप बगों का प्रबंधन करने के लिए एक समस्या ट्रैकर का उपयोग करते हैं, तो आप विशिष्ट पैच को संदर्भित करने के लिए संशोधनों की संख्या का उपयोग कर सकते हैं जो बग्स को ठीक करते हैं - उदाहरण के लिए, यह समस्या संशोधन 9238 द्वारा तय की गई थी। कोई व्यक्ति svn log - r9238 को सटीक परिवर्तनों ने बग को तय किया, और पैच को देखने के लिए svn diff - r9237: 9238 चलाएं। और svns मर्ज कमांड भी संशोधन संख्या का उपयोग करता है। आप विशिष्ट परिवर्तनों को एक शाखा से दूसरे विलय तर्कों में उनका नाम देकर विलय कर सकते हैं: svn merge - r9237: 9238 branchURL परिवर्तनशील 9238 को अपनी कार्यप्रणाली में विलय करेगा। यह प्राथमिक ऑब्जेक्ट के रूप में परिवर्तनों के आसपास निर्मित एक सिस्टम के रूप में जटिल नहीं है, लेकिन इसकी अभी भी सीवीएस पर एक विशाल सुविधा है। जब Subversion समर्थन सिमलिंक पैरा Subversion 1.1 (और बाद के संस्करण) में अगले रिलीज के लिए अगली रिलीज पैरामीटर को संस्करण नियंत्रण के तहत एक (यूनिक्स) सिमलिंक डाल करने की क्षमता है, सामान्य svn add कमांड के माध्यम से विवरण: सबवर्सन रिपॉजिटरी में सिमलिंक की कोई आंतरिक अवधारणा नहीं है यह एक संस्करणबद्ध सिमुलिंक को एक साधारण फ़ाइल के रूप में एक एसवीएन: विशेष संपत्ति संलग्न के साथ संग्रहीत करता है। Svn क्लाइंट (यूनिक्स पर) गुण देखता है और फ़ाइल को काम की प्रतिलिपि में सिमलिंक में अनुवाद करता है। विंडोज पर, एसवीएन क्लाइंट वर्तमान में एक संस्करण सिम्लिंक को विंडोज सिमलिंक वेरिएंट (जंक्शन बिंदु आदि) में से एक में अनुवाद करने के लिए कोई समर्थन नहीं करता है। चेक आउट ऑब्जेक्ट सामान्य फ़ाइल के रूप में दिखाई देता है आम तौर पर समर्थन करने वाले मुद्दों में से एक यह है कि डिफ़ॉल्ट रूप से केवल व्यवस्थापक विंडोज पर सिमलिंक बना सकते हैं। अधिक जानकारी के लिए, समस्या देखें एसवीएन -3570 मुझे सबवर्जन लोगो के एक उच्च संकल्प संस्करण की आवश्यकता है, जहां मैं उपवर्ती लोगो के वेक्टोरिज्ड संस्करणों को प्राप्त कर सकता हूं सबवर्जन रिपॉजिटरी के www ट्री के लोगो डायरेक्टरी में उपलब्ध है। मेरे पास अन्य प्रश्न हैं मैं अधिक जानकारी पैरा कहां प्राप्त कर सकता हूं यदि आप अकसर किये गए सवाल ब्राउज़ करने के बाद उत्तर नहीं देते हैं, तो कई अन्य संसाधन उपलब्ध हैं: मेलिंग सूची पर मेरी पोस्ट क्यों नहीं दिख रही है हमारी मेलिंग सूचियों को स्पैम को रोकने से रोकने के लिए मॉडरेट किया जाता है, इसलिए किसी भी सूची में पहले पोस्ट में देरी हो सकती है, जब तक मॉडरेटर को इसे जाने के लिए एक मौका नहीं मिलता है। एक बार उस पोस्ट के माध्यम से अनुमति दी जाती है, उसी पते से सभी बाद की पोस्ट स्वचालित रूप से अनुमोदित हो जाती है, इसलिए आपको अधिक देरी का अनुभव नहीं करना चाहिए। बेशक, यदि आपका प्रेषण पता बदलता है, तो आपको फिर से नियंत्रण के माध्यम से जाना होगा डीएसटी में परिवर्तन के लिए डेलाइट सेविंग टाइम (डीएसटी) पैरा में परिवर्तनों से कैसे बदले हुए हैं, उपवर्तन कोड में कोई विशेष बदलाव या सुधार की आवश्यकता नहीं है। उपखंड मुख्य रूप से रिकॉर्ड करने के लिए डेटास्टम्स का उपयोग करता है जब परिवर्तनों को रिपॉजिटरी के लिए प्रतिबद्ध किया गया हो। यह कोड सर्वर पर चलता है और ऑपरेटिंग सिस्टम से वर्तमान डेटटाइम को प्राप्त करता है और ऑपरेटिंग सिस्टम द्वारा प्रदत्त दिनचर्या का उपयोग करके यूटीसी में परिवर्तित करता है। सबवर्सन क्लाइंट को ये तिथियां सर्वर से प्राप्त होती हैं और क्लाइंट ऑपरेटिंग सिस्टम द्वारा प्रदान की गई दिनचर्या का उपयोग करके प्रदर्शन के लिए स्थानीय समय क्षेत्र में उन्हें परिवर्तित कर देती हैं। जैसे, आपको केवल अपने ऑपरेटिंग सिस्टम के लिए दिए गए पैच को स्थापित करना चाहिए और वास्तव में आपको केवल यह सुनिश्चित करना होगा कि सर्वर पर समय ठीक से डीएसटी के लिए समायोजित किया गया है। कैसे करें: पैरा मैं सबवर्सन क्लाइंट का प्रयोग कैसे कर सकता हूं: सबवर्सन क्लाइंट का उपयोग करें: यह सबवर्सन स्रोत ट्री की एक कॉपी को आपके स्थानीय मशीन पर उपनाम के नाम पर निर्देशिका की जांच करेगा। मैं एक रिपॉजिटरी कैसे बनाऊं? मैं इसे डेटा में कैसे आयात कर सकता हूँ? रिपॉजिटरी सेटअप और प्रशासन के बारे में और अधिक जानकारी के लिए, सबवर्सन बुक में अध्याय 5 पढ़िए। मैं cvs2svn रूपांतरण उपकरण को cvs2svn. tigris. org (इसकी फीचर सूची और दस्तावेज़ीकरण भी देखें) से एक मौजूदा सीवीएस भंडार को एक सबवर्जन रिपॉजिटरी में कैसे रूपांतरित कर सकता हूं। cvs2svn ऐसा लगता है कि ज्यादातर लोग इसका इस्तेमाल करते हैं, लेकिन अगर किसी कारण से आपकी ज़रूरतों को पूरा नहीं किया जाता है, तो कम से कम दो अन्य उपकरण हैं जो आप कोशिश कर सकते हैं: क्या होगा अगर मैं एक प्रॉक्सी पैरा के पीछे हूँ तो सबवर्सियन क्लाइंट प्रॉक्सी के माध्यम से जा सकता है, अगर आप कॉन्फ़िगर करते हैं ऐसा करने के लिए सबसे पहले, आपके सर्वर कॉन्फ़िगरेशन फ़ाइल को यह इंगित करने के लिए करें कि किस प्रॉक्सी का उपयोग करना है। फ़ाइलें स्थान आपके ऑपरेटिंग सिस्टम पर निर्भर करती है। लिनक्स या यूनिक्स पर यह निर्देशिका में स्थित है। विंडोज़ में यह APPDATASubversion में है। (APPDATA को गूंजने की कोशिश करें, यह एक छिपी हुई निर्देशिका है।) इस फ़ाइल में टिप्पणियां हैं जो बताएंगे कि क्या करना है। यदि आपके पास उस फ़ाइल नहीं है, तो नवीनतम सबवर्सियन क्लाइंट प्राप्त करें और कोई भी आदेश चलाएं जिससे कॉन्फ़िगरेशन निर्देशिका और टेम्प्लेट फ़ाइलें बन जाएंगी। अगला, आपको यह सुनिश्चित करने की आवश्यकता है कि प्रॉक्सी सर्वर स्वयं सभी HTTP विधियों सबवर्जन उपयोगों का समर्थन करता है। कुछ प्रॉक्सी सर्वर डिफ़ॉल्ट रूप से इन विधियों का समर्थन नहीं करते हैं: PROPFIND, रिपोर्ट, मर्ज, एमकेएक्टिवटी, चेकआउट। सामान्य तौर पर, इसे सुलझाना विशेष प्रॉक्सी सॉफ़्टवेयर पर निर्भर करता है। स्क्वीड के लिए, कॉन्फिग ऑप्शन है (स्क्वीड 2.4 और बाद में यह PROPFIND के बारे में पहले से ही जानता है।) यह भी देखें कि आपके प्रॉक्सी के माध्यम से अनुमति देने के लिए अतिरिक्त HTTP विधियों पर सलाह के लिए सभी HTTP विधियां उपवर्ती क्या हैं यदि उपकुंजी यातायात की अनुमति देने के लिए प्रॉक्सी प्राप्त करना मुश्किल या असंभव है, लेकिन आप सबवर्जन स्रोतों को देखना चाहते हैं, तो आप प्रॉक्सी के चारों ओर जा सकते हैं कुछ प्रॉक्सी जो पोर्ट 80 को फ़िल्टर करते हैं, फिर भी पोर्ट 81 पर कुछ भी अनुमति देते हैं। कई अन्य मामलों में प्रॉक्सी HT Svn. apache. org रिपॉजिटरी सर्वर https के साथ ही http पर सुनता है कोशिश करें: और हो सकता है कि प्रॉक्सी आपकी मदद करे। बेशक, आपके एसवीएन क्लाइंट को एसएसएल समर्थन के साथ बनाया गया होगा। आप यह देख सकते हैं कि क्या https स्कीम svn - version चलाकर समर्थित है या नहीं। मेरे व्यवस्थापक मुझे सबवर्जन के लिए एक HTTP सर्वर नहीं चाहते हैं यदि मुझे अब भी रिमोट उपयोग के लिए चाहिए तो मैं क्या कर सकता हूँ एक साधारण विकल्प अपाचे के बजाय svnserve सर्वर का उपयोग करना है I विवरण के लिए सबवर्सन बुक में अध्याय 6 देखें। हालांकि, यदि आपके व्यवस्थापक आप अपाचे को चलाने के लिए नहीं चाहते हैं, तो यह बहुत ही संभावना है कि आप पोर्ट 3690 पर एक कस्टम सर्वर प्रक्रिया चलाने के लिए न करें, या तो बाकी जवाब यह मानता है कि मौजूदा एसएसएच बुनियादी ढांचे का उपयोग करके आपके व्यवस्थापक ठीक हैं। अगर आपने पहले सीवीएस इस्तेमाल किया था, तो आपने सीवीएस सर्वर में लॉगिन करने के लिए एसएसएच का प्रयोग किया हो। रासन सबवर्जन एक्सेस विधि सबवर्सन के साथ ऐसा करने का एकमात्र तरीका है। बस अपने सबवर्सियन रिपॉज़िटरी यूआरएल पर svnssh उपसर्ग का उपयोग करें। यह आपके SSH प्रोग्राम को रिमोट बॉक्स पर एक निजी svnserve प्रक्रिया लॉन्च करता है, जो रिपॉजिटरी को आपकी यूआईडी के रूप में एक्सेस करता है और एन्क्रिप्ट किए गए लिंक पर जानकारी को सुरंगों में वापस करता है। हालांकि, एक अन्य समाधान जिसका उपयोग किया जा सकता है, रावत द्वारा संरक्षित सर्वर से कनेक्ट करने के लिए एसएसएच पोर्ट अग्रेषण का लाभ उठाने के लिए है। आप अपने फ़ायरवॉल के पीछे एक मशीन में SSH से जुड़ेंगे जो आपके सबवर्सियन सर्वर को एक्सेस कर सकते हैं। ध्यान दें कि यह SSH सर्वर ऐसा नहीं होना चाहिए जहां सबवर्सन स्थापित किया गया है। यह हो सकता है, लेकिन यह होना ही नहीं है। उसके बाद, आप एक स्थानीय पोर्ट अग्रेषित कर सकते हैं जो HTTP सर्वर से जोड़ता है जो आपके सबवर्सन रिपॉजिटरी को रखता है। तब आप सबवर्सन रिपॉजिटरी से इस स्थानीय पोर्ट के माध्यम से कनेक्ट होंगे। उसके बाद, अनुरोध को आपके सबवर्सियन सर्वर पर एसएसएच सर्वर के माध्यम से सुरंग भेजा जाएगा। एक उदाहरण: एक उपविन्यास रडोव सेटअप आपकी कंपनी फ़ायरवॉल के पीछे 10.1.1.50 (इसे एसवीएन-सर्वर। उदाहरण कॉल करें) पर है। आपकी कंपनी को सार्वजनिक रूप से सुलभ ssh-server. example के माध्यम से SSH पहुँच की अनुमति है आंतरिक रूप से, आप सबवर्सन रिपॉजिटरी को svn-server. examplereposours के माध्यम से एक्सेस कर सकते हैं। उदाहरण । ग्राहक पोर्ट-अग्रेषण के साथ ssh-server से कनेक्ट कर रहा है और बंदरगाह के माध्यम से बाहर की जाँच करता है ध्यान दें कि आपके svn-server. example में एक गैर-विश्वसनीय उपयोगकर्ता द्वारा अनुपयुक्त पोर्ट पर इसकी httpd उदाहरण भी हो सकती है। इससे आपके सबवर्सियन सर्वर को रूट एक्सेस की आवश्यकता नहीं होगी। जो ओरटन नोट एसएसएच पोर्ट फॉरवर्डिंग पर कुछ लिंक्स मैं सबवर्सन पैरा के तहत कई अलग-अलग परियोजनाओं का प्रबंधन कैसे कर सकता हूं यह इसमें शामिल परियोजनाओं पर निर्भर करता है। यदि परियोजनाएं संबंधित हैं, और डेटा साझा करने की संभावना है, तो इसके लिए कई उपनिर्देशिकाओं के साथ एक रिपोजिटरी बनाने का सबसे अच्छा तरीका है: यदि परियोजनाएं पूरी तरह से असंबंधित नहीं हैं, और उन दोनों के बीच डेटा साझा करने की संभावना नहीं है, तो संभवतः अलग और अलग बनाने के लिए असंबंधित भंडार इन दोनों दृष्टिकोणों के बीच का अंतर यह है (जैसा कि बेन कोलिन्स-सुस्मान लिट्ससनकॉलैगट द्वारा समझाया गया है): पहले मामले में, कोड को आसानी से कॉपी किया जा सकता है या परियोजनाओं के बीच में स्थानांतरित किया जा सकता है, और इतिहास संरक्षित है। (svn cpmv वर्तमान में केवल एक रिपोजिटरी के भीतर काम करता है।) क्योंकि संशोधन संख्या रिपोजिटरी-चौड़े हैं, पहले किसी भी प्रोजेक्ट में एक प्रतिबद्धता वैश्विक पुनरीक्षण टक्कर का कारण बनती है। तो यह थोड़ा अजीब लग सकता है अगर किसी ने ProjB की जाँच की है, नोटिस कि 10 संशोधन हो चुके हैं, लेकिन प्रोजेब पर सभी बदलाव नहीं हुआ है। एक बड़ा सौदा नहीं, वास्तव में पहली बार में थोड़ा अजीब यह हर बार जब लोग रैपिड्सविएन के लिए एक ही भंडार में थे, तब भी एसडीवीएन के लिए हुआ करता था। -) दूसरा मामला अपाचे पहुंच नियंत्रण का उपयोग करते हुए एक दूसरे से (उपयोगकर्ताओं और अनुमतियों के मामले में) परियोजनाओं को अलग रखने में आसान हो सकता है। 1 मामले में, आपको ऐसी प्रॉपर्टी में फैंसी हुक स्क्रिप्ट की आवश्यकता होगी जो प्रोजेक्ट्स को अलग करती है (इस उपयोगकर्ता को इस विशेष सबडीर पर काम करने की इजाजत है) बेशक, हमारे पास पहले से ऐसी एक स्क्रिप्ट है, जिसका उपयोग करने के लिए आपके लिए तैयार है। मैं दो पूरी तरह से अलग रिपॉजिटरी पैराग्राफ कैसे मर्ज कर सकता हूँ यदि आप किसी एक रिपॉजिटरी के सभी इतिहास को बनाए रखने की परवाह नहीं करते हैं, तो आप केवल एक प्रोजेक्ट्स रिपॉजिटरी के अंतर्गत एक नई निर्देशिका बना सकते हैं, फिर दूसरे को आयात कर सकते हैं यदि आप दोनों के इतिहास को बनाए रखने की परवाह करते हैं, तो आप svnadmin डंप को एक रिपॉजिटरी डंप करने के लिए उपयोग कर सकते हैं, और svnadmin लोड को अन्य रिपॉजिटरी में लोड कर सकते हैं। संशोधन संख्या बंद हो जाएगी, लेकिन अभी भी आपके पास इतिहास होगा पीटर डेविस ltpeterpdavis. cxgt भी एक सीवीएस मॉड्यूल के बराबर svns का उपयोग कर विधि बताते हैं: जब तक विलय अलग निर्देशिका पेड़ों में जगह लेता है, तब तक आप सीवीएस मॉड्यूल के svns संस्करण का उपयोग कर सकते हैं। जब भी मूल निर्देशिका की जाँच की जाती है, तो अन्य रिपॉजिटरी से चेकआउट निर्देशिकाओं के लिए निर्देशिका पर svn: बाहरी संपत्ति सेट करें। रिपॉजिटरी अलग रहती है, लेकिन कार्यशील प्रतिलिपि में ऐसा प्रतीत होता है कि उन्हें विलय कर दिया गया है। अगर आप आयातित निर्देशिका में काम करते हैं, तो यह बाह्य भंडार को प्रभावित करेगा। मर्ज पूरी तरह से साफ नहीं है: आयात केवल काम करने वाली प्रतियों को प्रभावित करता है, इसलिए आप दूसरे से आयात किए गए मॉड्यूल तक पहुंचने के लिए पहले रिपॉजिटरी में यूआरएल का इस्तेमाल नहीं कर पाएंगे। वे अलग यूआरएल रहे कई रिपॉजिटरी मर्ज करते समय संशोधनों का चयन और पुनर्क्रमित करने के लिए, कुछ सहायक उपकरण इंटरनेट पर चारों तरफ चल रहे हैं। उदाहरण के लिए उन्नत कार्यवाही के लिए svn - merge-repos. pl perl स्क्रिप्ट और उन्नत पुनर्गठन के लिए SvnDumpTool Python वर्ग। अगर मैं बर्कले डीबी बैक एंड (सबवर्सन 1.0 और 1.1 के साथ बनाया गया रिपॉजिटरी के लिए डिफ़ॉल्ट, इसके बाद डिफ़ॉल्ट नहीं) के साथ एक रिपॉजिटरी का उपयोग कर रहा हूं, तो हम रिपॉजिटरी को रिमोट पर भंडारण नहीं करने की सलाह देते हैं फाइलसिस्टम (उदाहरण के लिए, NFS) जबकि बर्कले डीबी डेटाबेस और लॉग फाइल दूरस्थ फाइलसिस्टम पर संग्रहीत की जा सकती है, बर्कले डीबी साझा क्षेत्र फ़ाइलों को रिमोट फाइल सिस्टम पर संग्रहीत नहीं किया जा सकता है, इसलिए रिपॉजिटरी को केवल एक फाइल सिस्टम क्लाइंट से सुरक्षित रूप से एक्सेस किया जा सकता है, और सबवर्सन कार्यक्षमता उपलब्ध नहीं होगी यहां तक ​​कि एक ग्राहक को भी यदि आप एफएसएफएस रिपॉज़िटरी बैक एंड का उपयोग कर रहे हैं, तो एक आधुनिक NFS सर्वर पर रिपॉजिटरी भंडारण (यानी लॉकिंग का समर्थन करने वाला एक) ठीक होना चाहिए। वर्किंग कॉपी्स को एनएफएस पर संग्रहीत किया जा सकता है (एक सामान्य परिदृश्य तब है जब आपका होम डायरेक्टरी एनएफएस सर्वर पर है)। लिनक्स एनएफएस सर्वर पर, फाइलों की जांच करते समय उपवर्तन में आंतरिक रूप से उपयोग किये जाने वाले नामों के वॉल्यूम के कारण, कुछ उपयोगकर्ताओं ने रिपोर्ट किया है कि उप-जांच जांच अक्षम होनी चाहिए (इसकी डिफ़ॉल्ट रूप से सक्षम)। सबट्री जांच को निष्क्रिय करने के बारे में अधिक जानकारी के लिए कृपया एनएफएस कैसेटो सर्वर गाइड और निर्यात (5) देखें। हमारे पास एसएमबी के माध्यम से पहुंचने के बाद काम करने वाली प्रतियां की कम से कम एक रिपोर्ट थी। प्रश्न में सर्वर सांबा (2.2.7 ए) का एक पुराना संस्करण चला रहा था। समस्या एक नए सांबा (3.0.6) के साथ फिर से नहीं हुई। मैं रिपॉजिटरी अनुमतियों को सही तरीके से कैसे सेट करूं? कुछ उपयोगकर्ताओं को संभवतः रिपॉजिटरी तक पहुँचने की कोशिश करें। उदाहरण के लिए, अपाचे या svnserve - d को एक विशिष्ट उपयोगकर्ता के रूप में चलाने के लिए, और उस उपयोगकर्ता द्वारा पूरी तरह से स्वामित्व भंडार बनाने के लिए किसी भी अन्य प्रयोक्ता को रिपॉजिटरी को फ़ाइल के माध्यम से अभिगम करने की अनुमति न दें: यूआरएल, और केवल svnlook और svnadmin को चलाने के लिए सुनिश्चित करें कि उपयोगकर्ता जो कि रिपॉजिटरी का मालिक है। यदि आपके क्लाइंट फाइल के माध्यम से प्रवेश कर रहे हैं: या svnssh:। तो कई उपयोगकर्ताओं द्वारा एक्सेस से बचने का कोई तरीका नहीं है। उस मामले में, अंतिम खंड 6 अध्याय में पढ़ें। और नीचे चेकलिस्ट साइडबार पर विशेष ध्यान दें। यह इस परिदृश्य को सुरक्षित बनाने के लिए कई कदमों की रूपरेखा है SELinux Fedora कोर 3 Red Hat एंटरप्राइज़ उपयोगकर्ताओं के लिए नोट: नियमित यूनिक्स अनुमति के अतिरिक्त, प्रत्येक फाइल, निर्देशिका, प्रक्रिया, आदि के अंतर्गत SELinux के अंतर्गत एक सुरक्षा संदर्भ है। जब कोई प्रक्रिया यूनिक्स अनुमतियों को जांचने के अलावा किसी फ़ाइल को एक्सेस करने का प्रयास करता है, तो सिस्टम यह भी जांचता है कि क्या इस प्रक्रिया का सुरक्षा संदर्भ फ़ाइल के सुरक्षा प्रसंग के साथ संगत है। फेडोरा कोर 3, अन्य सिस्टम के साथ, डिफ़ॉल्ट रूप से स्थापित SELinux के साथ आता है, कॉन्फ़िगर किया गया ताकि अपाचे एक काफी प्रतिबंधित सुरक्षा संदर्भ में चला सके। अपाचे के तहत सबवर्सन चलाने के लिए, आपको अपाचे एक्सेस (या अपाचे पर प्रतिबंध बंद करने के लिए, यदि आपको लगता है कि यह सब ओवरकिल है) को अनुमति देने के लिए रिपॉजिटरी के सुरक्षा प्रसंग को सेट करना होगा। Chcon कमांड फ़ाइलों के सुरक्षा प्रसंग को सेट करने के लिए उपयोग किया जाता है (इसी तरह से chmod पारंपरिक यूनिक्स अनुमतियों को कैसे सेट करता है)। उदाहरण के लिए, एक उपयोगकर्ता को सुरक्षा आदेश सेट करने के लिए इस आदेश को रिपॉजिटरी तक सफलतापूर्वक पहुंचने में सक्षम होना था। मैं रिपॉजिटरी इतिहास से पूरी तरह से एक फ़ाइल कैसे निकालूं? विशेष मामलों में, जहां आप फ़ाइल के सभी प्रमाणों को नष्ट करना चाहते हैं या कमिट कर सकते हैं (शायद किसी ने गलती से एक गोपनीय दस्तावेज बनाया है।) यह इतना आसान नहीं है, क्योंकि सबवर्सन को जानबूझकर जानकारी खोने के लिए डिज़ाइन नहीं किया गया है। संशोधन अस्थायी पेड़ हैं जो एक दूसरे पर निर्माण करते हैं। इतिहास से एक संशोधन को हटाने से एक डोमिनो प्रभाव पड़ सकता है, बाद के सभी संशोधनों में अराजकता पैदा कर सकता है और संभवत: सभी कामकाजी प्रतियां अवैध कर सकता है। प्रोजेक्ट की योजना है, हालांकि, किसी दिन एक svnadmin obliterate कमांड को लागू करने के लिए जो स्थायी रूप से जानकारी को हटाने का कार्य पूरा करेगा। (516 अंक देखें।) इस बीच, आपका एकमात्र रिवॉइस, svnadmin को अपनी रिपॉजिटरी डंप करना है, फिर डंपफ़ाइल को svndumpfilter (एक बुरा पथ को छोड़कर) के माध्यम से एक svnadmin लोड कमांड में पाइप करें। इसके बारे में विवरण के लिए सबवर्सन बुक का अध्याय 5 देखें। एक वैकल्पिक तरीका है पथ-आधारित प्रमाणीकरण नियमों को विन्यस्त करने के बाद svnsync के साथ रिपॉजिटरी को दोहराने के लिए जो इतिहास से फ़िल्टर्ड किए जाने वाले किसी भी पथ तक पहुंच को पढ़ने से इनकार करते हैं। Svndumpfilter के विपरीत svnsync स्वचालित रूप से सामान्य परिवर्धनों में एक अपठनीय स्रोत पथ के साथ प्रतिलिपि कार्यों का अनुवाद करेगा, जो उपयोगी है यदि प्रतिलिपि कार्यों को शामिल करने वाले इतिहास को फ़िल्टर्ड करना होगा। प्रत्येक संशोधन के साथ जुड़े गुणों के रूप में मैं लॉग संदेश को एक संशोधित करने के बाद कैसे संशोधित किया जाता है, इसके बाद लॉग संदेश को रिपॉजिटरी में रखा गया है। डिफ़ॉल्ट रूप से, लॉग संदेश प्रॉपर्टी (svn: log) एक बार प्रतिबद्ध होने के बाद संपादित नहीं की जा सकती। इसका कारण यह है कि संशोधन गुणों में परिवर्तन (जिनमें से svn: log एक है) ने गुणों को स्थायी रूप से छोड़े जाने वाले गुणों का कारण दिया है, और सबवर्सन आपको यह गलती से करने से रोकने की कोशिश करता है। हालांकि, पुनरीक्षण संपत्ति बदलने के लिए सबवर्सन प्राप्त करने के कुछ तरीके हैं पहला तरीका रिपोजिटरी प्रशासक के लिए संशोधन संपत्ति संशोधनों को सक्षम करने के लिए है यह पूर्व-संशोधित प्रॉप-परिवर्तन नामक हुक बनाकर किया जाता है (यह कैसे करें के बारे में अधिक विवरण के लिए सबवर्सन बुक में यह अनुभाग देखें) पूर्व-संशोधित परिवर्तन हुक को पुराने लॉग संदेश तक पहुंचने से पहले उपयोग किया जा सकता है, इसलिए इसे किसी तरह से संरक्षित किया जा सकता है (उदाहरण के लिए, कोई ईमेल भेजकर) एक बार संशोधित संपत्ति संशोधनों को सक्षम किया गया है, आप --revprop स्विच को svn propedit या svn propset पर जाकर एक संशोधन लॉग संदेश बदल सकते हैं। इनमें से किसी एक की तरह: जहां एन एक संशोधन संख्या है जिसका लॉग संदेश आप बदलना चाहते हैं, और यूआरएल रिपॉजिटरी का स्थान है। यदि आप इस आदेश को कार्यशील प्रतिलिपि के भीतर से चलाते हैं, तो आप यूआरएल को छोड़ सकते हैं। लॉग संदेश बदलने का दूसरा तरीका svnadmin setlog का उपयोग करना है यह फाइल सिस्टम पर रिपॉजिटरी स्थान का संदर्भ देकर किया जाना चाहिए। आप इस आदेश का उपयोग कर एक दूरस्थ रिपॉजिटरी को संशोधित नहीं कर सकते। जहां REPOSPATH रिपॉज़िटरी स्थान है, एन एक संशोधन संख्या है जिसका लॉग संदेश आप बदलना चाहते हैं, और FILE एक नई लॉग संदेश वाली फाइल है यदि पूर्व-संशोधित परिवर्तन हुक जगह में नहीं है (या आप किसी कारण के लिए हुक स्क्रिप्ट को बायपास करना चाहते हैं), तो आप - bypass-hooks विकल्प का भी उपयोग कर सकते हैं। हालांकि, यदि आप इस विकल्प का उपयोग करने का निर्णय लेते हैं, तो बहुत सावधान रहें आप परिवर्तन की ईमेल सूचनाएं या बैकअप सिस्टम जैसी ऐसी चीजों को बायपास कर सकते हैं जो संशोधनों के गुणों का ट्रैक रखते हैं। मैं सबवर्सन पैरा के लिए एक पैच कैसे सबमिट करूं, एक बार आपने पचाने के बाद, पॉश शब्द के साथ देव सूची में मेल भेजें और इस विषय में एक-एक पंक्ति का वर्णन करें, और अपने मेल में पैच इनलाइन को शामिल करें (जब तक कि आपका एमयूए इसे ऊपर डालता नहीं है पूरी तरह से)। इसके बाद एक कॉमिटेटर इसे उठाएंगे, इसे लागू करें (आवश्यक कोई फॉर्मेटिंग या सामग्री परिवर्तन आवश्यक है), और इसकी जांच करें। मूल प्रक्रिया इस तरह दिखती है: बेशक, आपके द्वारा भेजे गए ईमेल में पैच के बारे में एक अच्छा लंबा विवरण होना चाहिए , सबवर्सियन समुदाय गाइड के अनुसार लेकिन आप पहले से ही जानते हैं, क्योंकि वास्तव में कोड को ठीक करने से पहले आप इसे पूरी तरह से समझते हैं और समझते हैं, सही। ) कुछ करने के लिए खोज रहे हैं हमारे विचार पृष्ठ पर नज़र डालें मैं इन-प्लेस इंपोर्ट कैसे कर सकता हूं (जैसे कि सबवर्जन को एक पेड़ जोड़ना जैसे कि मूल डेटा एक कार्यशील प्रतिलिपि बन जाता है) उदाहरण के लिए, उदाहरण के लिए, आप कुछ को अपने नियंत्रण में संस्करण नियंत्रण के तहत रखना चाहते थे: svn चेकआउट की एक त्वरित-स्पष्ट सुविधा का लाभ नहीं। आप रिपॉजिटरी से डायरेक्टरी को सीधे किसी मौजूदा निर्देशिका में देख सकते हैं। यहां, हम पहले रिपॉजिटरी में एक नई खाली निर्देशिका बनाते हैं, और उसके बाद इसे आदि में जांचें। एक काम की नकल में आदि को बदलने एक बार ऐसा किया जाता है, तो आप रिपॉजिटरी में जोड़ने के लिए फ़ाइलों और उप-सातों का चयन करने के लिए सामान्य एसवीएन को कमांड का उपयोग कर सकते हैं। यदि निर्देशिका की पूरी सामग्री आयात की जाएगी, सामग्री के सबसेट के बजाय, कम से कम आदेशों का उपयोग आयात करने के लिए किया जा सकता है और फिर डायरेक्टरी को एक सबवर्सन कार्यशील प्रतिलिपि में रूपांतरित कर सकता है: एसवीएन आयात को बढ़ाने के लिए दायर कोई समस्या है आयातित पेड़ को एक कार्यशील प्रतिलिपि में स्वतः परिवर्तित करने में सक्षम होने के लिए मुद्दा 1328 देखें। यह डम्पप्लोड चक्र क्या है, कभी-कभी लोगों को कभी भी बात करते हैं जब सबवर्सेंस रिपॉज़िटरी डाटाबेस स्कीमा का नवीनीकरण करते समय कभी-कभी विकास के दौरान बदल जाता है। पुरानी खज़ाना, उप-संस्करण के पूर्व-1.0 विकास संस्करण के साथ निर्मित, नवीनीकरण करते समय निम्न ऑपरेशन की आवश्यकता हो सकती है। अगर सबवर्जन एक्स और वाई रिलीज़ होने के दौरान एक स्कीमा बदल होता है, तो वाई को अपग्रेड करने वाले रिपॉज़िटरी व्यवस्थापक निम्न कार्य कर सकते हैं: svnserve, Apache, और जो कुछ भी रिपॉजिटरी तक पहुंच रहे हो उसे बंद करें। svnadmin डंप पथटाइपोसटी डंपफ़ाइल। txt। svnadmin का संस्करण X का उपयोग करना एमवी पथटेरेसोपाथरी पथ-संरक्षित-पुराना-रिपॉजिटरी अब उपवर्सन वाई में अपग्रेड करें (यानी, निर्माण और वाई स्थापित करने, एक्स की जगह) svnadmin बना संस्करण वाई svnadmin का उपयोग करके svnadmin भार pathtorepository लेफ्टिनेंट dumpfile. txt। फिर संस्करण वाई svnadmin का उपयोग कर रहा है हुक स्क्रिप्ट, आदि की प्रतिलिपि, पुरानी रिपॉजिटरी से लेकर नए तक। Svnserve, Apache, आदि को पुनरारंभ करें। डंपिंग और लोडिंग के बारे में अधिक विवरण के लिए सबवर्सन बुक का यह खंड देखें। ध्यान दें । सबवर्सन के अधिकांश उन्नयन में एक डंप और लोड शामिल नहीं है। जब एक की आवश्यकता होती है, तो रिलीज की घोषणा और नए संस्करण के लिए परिवर्तन फ़ाइल इसके बारे में प्रमुख नोटिस जारी करेगी। यदि आप ऐसी सूचना नहीं देखते हैं, तो कोई स्कीमा परिवर्तन नहीं हुआ है, और कोई डंपप्लोड आवश्यक नहीं है। मैं ग्राहकों को एसएसपीआई प्रमाणीकरण पैरा TortoiseSVN का उपयोग कर विंडोज डोमेन नियंत्रक के खिलाफ प्रमाणीकरण कैसे कर सकता हूं, विंडोज़ पर एक सबवर्सियन सर्वर स्थापित करने का वर्णन करता है। कछुएस्वांडोक्रेसेसलिएर्टटोरोज़ एसवीएनटेंस - सर्वरेटअप_मास्टरस-सर्वर-अप-अपाचे -5 पर जाएं एसएसपीआई प्रमाणीकरण पर अनुभाग को देखने के लिए कॉन्फ़िगरेशन का एक महत्वपूर्ण हिस्सा रेखा है: इस लाइन के बिना, एसएसपीआई का समर्थन करने वाले ब्राउज़र उपयोगकर्ता के क्रेडेंशियल्स के लिए संकेत देंगे, लेकिन क्लाइंट जो एसएसपीआई जैसे Supversion नहीं करते जैसे कि सबवर्जन प्रॉम्प्ट नहीं करेगा (The current release of Neon - Subversions HTTP library - handles only basic authentication.) Because the client never asks for credentials, any action that requires authentication will fail. Adding this line tells modauthsspi to use basic authentication with the client, but to use the Windows domain controller to authenticate the credentials. I dont like the. svn directory name, and prefer SVN or something else. How do I change it para We recommend that you live with. svn if you possibly can. However, if you are using Visual Studio 2002 or 2003 under Windows, you might need to set the environment variable SVNASPDOTNETHACK, as described here . Or you could use a completely custom name for the administrative directory. We recommend against this, because your working copy would probably not work with Subversion clients other than the one you customized. However, if you absolutely must do this, just change this line in subversionincludesvnwc. h from then recompile your client. How do I change the case of a filename para This problem comes up in two situations. If youre adding files on an operating system with a case-insensitive filesystem, such as Windows, you might find you accidentally add a file with the wrong case in the filename. Alternatively, you may just decide to change the case of an existing file in the repository. If youre working in a case-sensitive file system, this is no problem at all. Just move the file to the new name, e. g., From Subversion 1.7 onwards, this also works on Windows, even though its using a case-insensitive filesystem. If you are using Subversion 1.6 or older on Windows, or if youre using a case-insensitive filesystem with an operating system other than Windows, this technique wont work. In this case, you can accomplish this by copying the file somewhere temporary, deleting the file from Subversion, then adding the copy with the correct case. Or a better way is to perform a move operation with Subversion URLs. Using URLs is recommended, because it will preserve history for the file, and will take effect immediately. Both ways will leave Windows working copies with problems, however, because Windows can still get confused when trying to update the conflicting filenames. (Youll get a message like svn: Failed to add file File. java: object of the same name already exists ). One way of fixing the problem is to delete your working copy and check out again. If you do not want to do this, you must perform a two step update. For each file with the wrong case, the following command will change the case: To update the working copy, change to the relevant directory and do: The first update will remove file. java from your working copy, the second update will add File. java . leaving you with a correct working copy. Or if you had a lot of problematic files, you can update the working copy this way: As you can see, adding a file with the wrong case is tricky to fix on an operating system that has a case insensitive filesystem. Do try to get it right when you add the file the first time To prevent the problem from occurring in the first place, you can create a pre-commit hook that calls the file check-case-insensitive. pl . That file lives in the Subversion source tarball, in the directory contribhook-scripts . I cant use tags to merge changes from a branch into the trunk like I used to with CVS, can I para As shown below it is possible to merge from a branch to the trunk without remembering one revision number. Or vice versa (not shown in the example). The example below presumes an existing repository in homerepos in which you want to start a branch named bar containing a file named foo you are going to edit. For the purpose of tracing branch merges, this repository has set up tagsbranchtraces to keep tags. Why doesnt the Revision keyword do what I want It expands to the files last-changed revision, but I want something that will expand to the files current revision. para Subversion increments the revision number of the repository as a whole, so it cant expand any keyword to be that number - it would have to search and possibly modify every file in your working copy on every update and commit. The information you want (the revision of your working copy) is available from the command svnversion it gives you information on the revision level of a working copy given a path (see svnversion --help for details). You can incorporate it into your build or release process to get the information you need into the source itself. For example, in a build environment based on GNU make . add something like this to your Makefile . (Note that this will not work on non-GNU versions of make . Dont use it if your build process needs to be portable.) Or try this recipe: Windows users may want to use SubWCRev. exe . available from the TortoiseSVN download page it replaces all WCREV tags in a given file with the current working copy revision. Another alternative is creating a wrapper for svn commit, which does some automatic replacement in files before commit (be careful not to mess things up though -- silent manipulation of files right before commit can be scary for a user). That way you can inject any metadata you want (and it will be committed with the regular content of the file into the repository). Does Subversion have a keyword which behaves like Log in CVS para No. There is no equivalent for the Log keyword in CVS. If you want to retrieve a log for a specific file, you can run svn log your-file-name or svn log url-to-your-file. From the mailing list some explanations why Log is bad: I dont care about that. I want to use it anyway. Will you implement it No. There are no plans to implement it ourselves or accept patches which implement this feature. If you want to distribute your files with some kind of changelog included, you might be able to work around this limitation in your build system. I have a file in my project that every developer must change, but I dont want those local mods to ever be committed. How can I make svn commit ignore the file para The answer is: dont put that file under version control. Instead, put a template of the file under version control, something like file. tmpl. Then, after the initial svn checkout, have your users (or your build system) do a normal OS copy of the template to the proper filename, and have users customize the copy. The file is unversioned, so it will never be committed. And if you wish, you can add the file to its parent directorys svn:ignore property, so it doesnt show up as in the svn status command. When I access a repository using svnssh, my password is not cached in. subversionauth. How do I avoid having to type it so often para ssh has its own passphrases and its own authentication-caching scheme. Its auth caching is external to Subversion, and must be set up independently of Subversion. OpenSSH includes ssh-keygen to create the keys, ssh-agent to cache passphrases, and ssh-add to add passphrases to the agents cache. A popular script to simplify usage of ssh-agent is keychain . On Windows, PuTTY is a popular alternative ssh client see PuTTYgen to import OpenSSH keys and pageant to cache passphrases. Setting up ssh-agent is outside the scope of this document, but a Google search for ssh-agent will quickly get you answers. Or if youre really impatient, try one of these: My svnserve binary is in a directory that isnt on my users default PATH s, they use svnssh, and I cant figure out how to modify their PATH so that they can run svnserve . para Note: this all assumes youre using OpenSSH. There are other ssh implementations out there, and presumably they will allow you to do something similar, but we dont yet know the details. Youve tried fiddling with their various login files, like. bashprofile . and nothing works Thats because ssh ignores those files when the Subversion client invokes it. But theres no need to modify PATH instead, you can directly give ssh the full name of the svnserve command. Heres how to do it: For each user who needs svnssh access, generate a new ssh public-key pair which they will use only for Subversionmdashnot for logging in normally. Have them give the keypair a distinctive name, like. sshiddsa. subversion . Add the public part of the key to their. sshauthorizedkeys file on the server machine, after first inserting a bit of magic at the beginning of the line before the word ssh-rsa or ssh-dss . like this: Deprecated FAQ Why is my repository taking up so much disk space para The repository stores all your data in a Berkeley DB environment in the reposdb subdirectory. The environment contains a collection of tables and bunch of logfiles (log.). Berkeley DB journals all changes made to the tables, so that the tables can be recovered to a consistent state in case of interruptions (more info ). The logfiles will grow forever, eating up disk space, unless you, (as the repository administrator) do something about it. At any given moment, Berkeley DB is only using a few logfiles actively (see this post and its associated thread) the rest can be safely deleted. If you keep all the logfiles around forever, then in theory Berkeley DB can replay every change to your repository from the day it was born. But in practice, if youre making backups, its probably not worth the cost in disk space. Use svnadmin to see which log files can be deleted. You may want a cron job to do this. You could instead use Berkeley DBs dbarchive command: See also svnadmin hotcopy or hotbackup. py . Note: If you use Berkeley DB 4.2, Subversion will create new repositories with automatic log file removal enabled. You can change this by passing the --bdb-log-keep option to svnadmin create. Refer to the section about the DBLOGAUTOREMOVE flag in the Berkeley DB manual. My repository seems to get stuck all the time, giving me errors about needing recovery (DBRUNRECOVERY). What could be the cause para The Berkeley DB database in your repository is sensitive to interruptions. If a process accessing the database exits without cleanly closing the environment, then the database is left in an inconsistent state. Common causes of this include: the process exiting when it hits a permission problem the process crashingsegfaulting the process being forcibly killed running out of disk space For most of these cases, you should run svnadmin recover, which rewinds the repository back to a consistent state see this question for details. Note that running out of disk space, combined with frequent checkouts or updates, can cause the repository to crash in a way where recovery is not possible (so keep backups). Segfaults, forced killings, and running out of disk space are pretty rare. Permission problems are far more common: one process accesses the repository and accidentally changes ownership or permissions, then another process tries to access and chokes on the permissions. The best way to prevent this is to get your repository permissions and ownership set up correctly. See here for our recommendations. Every time I try to access my repository, the process just hangs. Is my repository corrupt para Your repository is not corrupt, nor is your data lost. If your process accesses the repository directly (moddavsvn, svnlook, svnadmin, or if you access a file: URL), then its using Berkeley DB to access your data. Berkeley DB is a journaling system, meaning that it logs everything it is about to do before it does so. If your process is interrupted (Control-C, or segfault), then a lockfile is left behind, along with a logfile describing unfinished business. Any other process that attempts to access the database will just hang, waiting for the lockfile to disappear. To awaken your repository, you need to ask Berkeley DB to either finish the work, or rewind the database to a previous state that is known to be consistent. WARNING: you can seriously corrupt your repository if you run recover and another process accesses the repository. Make absolutely sure you disable all access to the repository before doing this (by shutting down Apache, removing executable permissions from svn). Make sure you run this command as the user that owns and manages the database, and not as root, else it will leave root-owned files in the db directory which cannot be opened by the non-root user that manages the database, which is typically either you or your Apache process. Also be sure to have the correct umask set when you run recover, since failing to do so will lock out users that are in the group allowed to access the repository. Once the command has completed, check the permissions in the db directory of the repository. Sometimes svnadmin recover doesnt work. You may see it give errors like this: In that case, try Berkeley DBs native dbrecover utility (see dbrecover documentation ). It usually lives in a bin subdirectory of the Berkeley DB installation, for example if you installed Berkeley DB from source, it might be usrlocalBerkeleyDB.4.2bindbrecover or on systems where Berkeley DB comes prepackaged it might just be usrbindbrecover . If you have multiple versions of Berkeley DB installed, make sure that the version of dbrecover you use matches the version of Berkeley DB with which your repository was created. Run dbrecover with the - c (catastrophic recovery) flag. You can also add - v for verbosity, and - h with an argument telling it what db environment to recover (so you dont have to cd into that directory). Thus: Run this command as the same user that owns the repository, and again, make absolutely sure that no other processes are accessing the repository while you do this (e. g. shut down svnserve or Apache). My repository keeps giving errors saying Cannot allocate memory. What should I do para If youre using access, Cannot allocate memory errors show up in the httpd error log and look something like this: It usually means that a Berkeley DB repository has run out of database locks (this does not happen with FSFS repositories). It shouldnt happen in the course of normal operations, but if it does, the solution is to run database recovery as described here. If it happens often, you probably need to raise the default lock parameters ( setlkmaxlocks . setlkmaxlockers . and setlkmaxobjects ) in the dbDBCONFIG file. When changing DBCONFIG in an existing repository, remember to run recovery afterwards. When I start Apache, moddavsvn complains about a bad database version, that it found db-3.X, rather than db-4.X. para Your apr-util linked against DB-3, and svn linked against DB-4. Unfortunately, the DB symbols arent different. When moddavsvn is loaded into Apaches process-space, it ends up resolving the symbol names against apr-utils DB-3 library. The solution is to make sure apr-util compiles against DB-4. You can do this by passing specific switches to either apr-utils or apaches configure: --with-dbmdb4 --with-berkeley-dbthedbprefix. Im getting Function not implemented errors on Red Hat 9, and nothing works. How do I fix this para This is not really a problem with Subversion, but it often affects Subversion users. Red Hat 9 and Fedora ship with a Berkeley DB library that relies on the kernel support for NPTL (the Native Posix Threads Library). The kernels that Red Hat provides have this support built in, but if you compile your own kernel, then you may well not have the NPTL support. If that is the case, then you will see errors like this: This can be fixed in one of several ways: Rebuild Berkeley DB for the kernel youre using. Use a Red Hat 9 kernel. Apply the NPTL patches to the kernel youre using. Use a recent (2.5.x) kernel with the NPTL support included. Check if environment variable LDASSUMEKERNEL is set to 2.2.5. and if so, unset it before starting Subversion (Apache). (You usually would set this variable to run Wine or Winex on Red Hat 9) To use the NPTL version of Berkeley DB you also need to use a glibc library with NPTL support, which probably means the i686 version. See svn. haxx. seusersarchive-2004-030488.shtml for details. Im getting the error svn: bdb: call implies an access method which is inconsistent with previous calls. How do I fix this para Berkeley DB 4.1 has shown itself to be rather unstable - both 4.0 and 4.2 are better. This error message is a symptom of one unique way in which 4.1 will sometimes break. The problem is that the database format field for one of the tables that make up a Subversion repository using the Berkeley DB backend has become corrupted. For unknown reasons, this is almost always the copies table, which switches from the btree type to the recno type. Simple recovery procedures are outlined below - if they do not succeed, you should contact the Subversion Users mailing list . Ensure that no other processes will attempt to access your repository. Now, back up your repository to a tar or zip file or similar. Change to the db subdirectory of your repository. rm db. log. dbdump - p - r copies gt copies. dump Now edit copies. dump . In the section near the top, change typerecno to typebtree , and delete the line beginning relen . rm copies dbload copies lt copies. dump svnadmin dump. जीटी। ..my-recovered. svndump Now create a new repository, reload the dump file just produced, and copy across any custom hooks or configuration. Verify that the highest revision number in the new repository is what you think it should be. After upgrading to Berkeley DB 4.3 or later, Im seeing repository errors. para Prior to Berkeley DB 4.3, svnadmin recover worked to upgrade a Berkeley DB repository in-place. However, due to a change in the behaviour of Berkeley DB in version 4.3, this now fails. Use this procedure to upgrade your repository in-place to Berkeley DB 4.3 or later: Make sure no process is accessing the repository (stop Apache, svnserve, restrict access via file:, svnlook, svnadmin, etc.) Using an older svnadmin binary (that is, linked to an older Berkeley DB): Recover the repository: svnadmin recover pathtorepository Make a backup of the repository. Delete all unused log files. You can see them by running svnadmin list-unused-dblogs pathtorepeository Delete the shared-memory files. These are files in the repositorys db directory, of the form db.00 The repository is now usable by Berkeley DB 4.3. Why do read-only operations still need repository write access para Certain client operations are read-only, like checkouts and updates. From an access-control standpoint, Apache treats them as such. But libsvnfs (the repository filesystem API) still has to write temporary data in order to produce tree-deltas. So the process accessing the repository always requires both read and write access to the Berkeley DB files in order to function. In particular, the repository responds to many read-only operations by comparing two trees. One tree is the usually the HEAD revision, and the other is often a temporary transaction-tree -- thus the need for write access. This limitation only applies to the Berkeley DB backend the FSFS backend does not exhibit this behaviour. Binary Files and Translation In the most general sense, Subversion handles binary files more gracefully than CVS does. Because CVS uses RCS, it can only store successive full copies of a changing binary file. Subversion, however, expresses differences between files using a binary differencing algorithm, regardless of whether they contain textual or binary data. That means all files are stored differentially (compressed) in the repository. CVS users have to mark binary files with - kb flags to prevent data from being garbled (due to keyword expansion and line-ending translations). They sometimes forget to do this. Subversion takes the more paranoid route. First, it never performs any kind of keyword or line-ending translation unless you explicitly ask it to do so (see the section called Keyword Substitution and the section called End-of-Line Character Sequences for more details). By default, Subversion treats all file data as literal byte strings, and files are always stored in the repository in an untranslated state. Second, Subversion maintains an internal notion of whether a file is text or binary data, but this notion is only extant in the working copy. During an svn update . Subversion will perform contextual merges on locally modified text files, but will not attempt to do so for binary files. To determine whether a contextual merge is possible, Subversion examines the svn:mime-type property. If the file has no svn:mime-type property, or has a MIME type that is textual (e. g. text ), Subversion assumes it is text. Otherwise, Subversion assumes the file is binary. Subversion also helps users by running a binary-detection algorithm in the svn import and svn add commands. These commands will make a good guess and then (possibly) set a binary svn:mime-type property on the file being added. (If Subversion guesses wrong, the user can always remove or hand-edit the property.) You are reading Version Control with Subversion (for Subversion 1.7), by Ben Collins-Sussman, Brian W. Fitzpatrick, and C. Michael Pilato. This work is licensed under the Creative Commons Attribution License v2.0 . To view a copy of this license, visit Creative Commons site or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. To submit comments, corrections, or other contributions to the text, please visit svnbook. Properties Weve already covered in detail how Subversion stores and retrieves various versions of files and directories in its repository. Whole chapters have been devoted to this most fundamental piece of functionality provided by the tool. And if the versioning support stopped there, Subversion would still be complete from a version control perspective. But it doesnt stop there. In addition to versioning your directories and files, Subversion provides interfaces for adding, modifying, and removing versioned metadata on each of your versioned directories and files. We refer to this metadata as properties . and they can be thought of as two-column tables that map property names to arbitrary values attached to each item in your working copy. Generally speaking, the names and values of the properties can be whatever you want them to be, with the constraint that the names must contain only ASCII characters. And the best part about these properties is that they, too, are versioned, just like the textual contents of your files. You can modify, commit, and revert property changes as easily as you can file content changes. And the sending and receiving of property changes occurs as part of your typical commit and update operationsyou dont have to change your basic processes to accommodate them. Subversion has reserved the set of properties whose names begin with svn: as its own. While there are only a handful of such properties in use today, you should avoid creating custom properties for your own needs whose names begin with this prefix. Otherwise, you run the risk that a future release of Subversion will grow support for a feature or behavior driven by a property of the same name but with perhaps an entirely different interpretation. Properties show up elsewhere in Subversion, too. Just as files and directories may have arbitrary property names and values attached to them, each revision as a whole may have arbitrary properties attached to it. The same constraints applyhuman-readable names and anything-you-want binary values. The main difference is that revision properties are not versioned. In other words, if you change the value of, or delete, a revision property, theres no way, within the scope of Subversions functionality, to recover the previous value. Subversion has no particular policy regarding the use of properties. It asks only that you do not use property names that begin with the prefix svn: as thats the namespace that it sets aside for its own use. And Subversion does, in fact, use propertiesboth the versioned and unversioned variety. Certain versioned properties have special meaning or effects when found on files and directories, or they house a particular bit of information about the revisions on which they are found. Certain revision properties are automatically attached to revisions by Subversions commit process, and they carry information about the revision. Most of these properties are mentioned elsewhere in this or other chapters as part of the more general topics to which they are related. For an exhaustive list of Subversions predefined properties, see the section called Subversion Properties in Chapter 9, Subversion Complete Reference . While Subversion automatically attaches properties ( svn:date. svn:author. svn:log. and so on) to revisions, it does not presume thereafter the existence of those properties, and neither should you or the tools you use to interact with your repository. Revision properties can be deleted programmatically or via the client (if allowed by the repository hooks) without damaging Subversions ability to function. So, when writing scripts which operate on your Subversion repository data, do not make the mistake of assuming that any particular revision property exists on a revision. In this section, we will examine the utilityboth to users of Subversion and to Subversion itselfof property support. Youll learn about the property-related svn subcommands and how property modifications affect your normal Subversion workflow. Why Properties Just as Subversion uses properties to store extra information about the files, directories, and revisions that it contains, you might also find properties to be of similar use. You might find it useful to have a place close to your versioned data to hang custom metadata about that data. Say you wish to design a web site that houses many digital photos and displays them with captions and a datestamp. Now, your set of photos is constantly changing, so youd like to have as much of this site automated as possible. These photos can be quite large, so as is common with sites of this nature, you want to provide smaller thumbnail images to your site visitors. Now, you can get this functionality using traditional files. That is, you can have your image123.jpg and an image123-thumbnail. jpg side by side in a directory. Or if you want to keep the filenames the same, you might have your thumbnails in a different directory, such as thumbnailsimage123.jpg. You can also store your captions and datestamps in a similar fashion, again separated from the original image file. But the problem here is that your collection of files multiplies with each new photo added to the site. Now consider the same web site deployed in a way that makes use of Subversions file properties. Imagine having a single image file, image123.jpg. with properties set on that file that are named caption. datestamp. and even thumbnail. Now your working copy directory looks much more manageablein fact, it looks to the casual browser like there are nothing but image files in it. But your automation scripts know better. They know that they can use svn (or better yet, they can use the Subversion language bindingssee the section called Using the APIs ) to dig out the extra information that your site needs to display without having to read an index file or play path manipulation games. While Subversion places few restrictions on the names and values you use for properties, it has not been designed to optimally carry large property values or large sets of properties on a given file or directory. Subversion commonly holds all the property names and values associated with a single item in memory at the same time, which can cause detrimental performance or failed operations when extremely large property sets are used. Custom revision properties are also frequently used. One common such use is a property whose value contains an issue tracker ID with which the revision is associated, perhaps because the change made in that revision fixes a bug filed in the tracker issue with that ID. Other uses include hanging more friendly names on the revisionit might be hard to remember that revision 1935 was a fully tested revision. But if theres, say, a test-results property on that revision with the value all passing. thats meaningful information to have. And Subversion allows you to easily do this via the --with-revprop option of the svn commit command: Searchability (or, Why Not Properties) For all their utility, Subversion propertiesor, more accurately, the available interfaces to themhave a major shortcoming: while it is a simple matter to set a custom property, finding that property later is a whole different ball of wax. Trying to locate a custom revision property generally involves performing a linear walk across all the revisions of the repository, asking of each revision, Do you have the property Im looking for Use the --with-all-revprops option with the svn log commands XML output mode to facilitate this search. Notice the presence of the custom revision property testresults in the following output: Trying to find a custom versioned property is painful, too, and often involves a recursive svn propget across an entire working copy. In your situation, that might not be as bad as a linear walk across all revisions. But it certainly leaves much to be desired in terms of both performance and likelihood of success, especially if the scope of your search would require a working copy from the root of your repository. For this reason, you might chooseespecially in the revision property use caseto simply add your metadata to the revisions log message using some policy-driven (and perhaps programmatically enforced) formatting that is designed to be quickly parsed from the output of svn log . It is quite common to see the following in Subversion log messages: But here again lies some misfortune. Subversion doesnt yet provide a log message templating mechanism, which would go a long way toward helping users be consistent with the formatting of their log-embedded revision metadata. Manipulating Properties The svn program affords a few ways to add or modify file and directory properties. For properties with short, human-readable values, perhaps the simplest way to add a new property is to specify the property name and value on the command line of the svn propset subcommand: But weve been touting the flexibility that Subversion offers for your property values. And if you are planning to have a multiline textual, or even binary, property value, you probably do not want to supply that value on the command line. So the svn propset subcommand takes a --file ( - F ) option for specifying the name of a file that contains the new property value. There are some restrictions on the names you can use for properties. A property name must start with a letter, a colon (. ), or an underscore ( ) after that, you can also use digits, hyphens ( - ), and periods (. ). 13 In addition to the propset command, the svn program supplies the propedit command. This command uses the configured editor program (see the section called Config ) to add or modify properties. When you run the command, svn invokes your editor program on a temporary file that contains the current value of the property (or that is empty, if you are adding a new property). Then, you just modify that value in your editor program until it represents the new value you wish to store for the property, save the temporary file, and then exit the editor program. If Subversion detects that youve actually changed the existing value of the property, it will accept that as the new property value. If you exit your editor without making any changes, no property modification will occur: We should note that, as with other svn subcommands, those related to properties can act on multiple paths at once. This enables you to modify properties on whole sets of files with a single command. For example, we could have done the following: All of this property adding and editing isnt really very useful if you cant easily get the stored property value. So the svn program supplies two subcommands for displaying the names and values of properties stored on files and directories. The svn proplist command will list the names of properties that exist on a path. Once you know the names of the properties on the node, you can request their values individually using svn propget . This command will, given a property name and a path (or set of paths), print the value of the property to the standard output stream. Theres even a variation of the proplist command that will list both the name and the value for all of the properties. Simply supply the --verbose ( - v ) option. The last property-related subcommand is propdel . Since Subversion allows you to store properties with empty values, you cant remove a property altogether using svn propedit or svn propset . For example, this command will not yield the desired effect: You need to use the propdel subcommand to delete properties altogether. The syntax is similar to the other property commands: Remember those unversioned revision properties You can modify those, too, using the same svn subcommands that we just described. Simply add the --revprop command-line parameter and specify the revision whose property you wish to modify. Since revisions are global, you dont need to specify a target path to these property-related commands so long as you are positioned in a working copy of the repository whose revision property you wish to modify. Otherwise, you can simply provide the URL of any path in the repository of interest (including the repositorys root URL). For example, you might want to replace the commit log message of an existing revision. 14 If your current working directory is part of a working copy of your repository, you can simply run the svn propset command with no target path: But even if you havent checked out a working copy from that repository, you can still effect the property change by providing the repositorys root URL: Note that the ability to modify these unversioned properties must be explicitly added by the repository administrator (see the section called Commit Log Message Correction ). Thats because the properties arent versioned, so you run the risk of losing information if you arent careful with your edits. The repository administrator can set up methods to protect against this loss, and by default, modification of unversioned properties is disabled. Users should, where possible, use svn propedit instead of svn propset . While the end result of the commands is identical, the former will allow them to see the current value of the property that they are about to change, which helps them to verify that they are, in fact, making the change they think they are making. This is especially true when modifying unversioned revision properties. Also, it is significantly easier to modify multiline property values in a text editor than at the command line. Properties and the Subversion Workflow Now that you are familiar with all of the property-related svn subcommands, lets see how property modifications affect the usual Subversion workflow. As we mentioned earlier, file and directory properties are versioned, just like your file contents. As a result, Subversion provides the same opportunities for mergingcleanly or with conflictssomeone elses modifications into your own. As with file contents, your property changes are local modifications, made permanent only when you commit them to the repository with svn commit . Your property changes can be easily unmade, toothe svn revert command will restore your files and directories to their unedited statescontents, properties, and all. Also, you can receive interesting information about the state of your file and directory properties by using the svn status and svn diff commands. Notice how the status subcommand displays M in the second column instead of the first. That is because we have modified the properties on calcbutton. c. but not its textual contents. Had we changed both, we would have seen M in the first column, too. (We cover svn status in the section called See an overview of your changes ). As with file contents, local property modifications can conflict with changes committed by someone else. If you update your working copy directory and receive property changes on a versioned object that clash with your own, Subversion will report that the object is in a conflicted state. Subversion will also create, in the same directory as the conflicted object, a file with a. prej extension that contains the details of the conflict. You should examine the contents of this file so you can decide how to resolve the conflict. Until the conflict is resolved, you will see a C in the second column of svn status output for that object, and attempts to commit your local modifications will fail. To resolve property conflicts, simply ensure that the conflicting properties contain the values that they should, and then use the svn resolve --acceptworking command to alert Subversion that you have manually resolved the problem. You might also have noticed the nonstandard way that Subversion currently displays property differences. You can still use svn diff and redirect its output to create a usable patch file. The patch program will ignore property patchesas a rule, it ignores any noise it cant understand. This does, unfortunately, mean that to fully apply a patch generated by svn diff using patch . any property modifications will need to be applied by hand. Subversion 1.7 improves this situation in two ways. First, its nonstandard display of property differences is at least machine-readablean improvement over the display of properties in versions prior to 1.7. But Subversion 1.7 also introduces the svn patch subcommand, designed specifically to handle the additional information which svn diff s output can carry, applying those changes to the Subversion working copy. Of specific relevance to our topic, property differences present in patch files generated by svn diff in Subversion 1.7 or better can be automatically applied to a working copy by the svn patch command. For more about svn patch . see svn patch in Chapter 9, Subversion Complete Reference . Theres one exception to how property changes are reported by svn diff . changes to Subversions special svn:mergeinfo propertyused to track information about merges which have been performed in your repositoryare described in a more human-readable fashion. This is quite helpful to the humans who have to read those descriptions. But it also serves to cause patching programs (including svn patch ) to skip those change descriptions as noise. This might sound like a bug, but it really isnt because this property is intended to be managed solely by the svn merge subcommand. For more about merge tracking, see Chapter 4, Branching and Merging . Automatic Property Setting Properties are a powerful feature of Subversion, acting as key components of many Subversion features discussed elsewhere in this and other chapterstextual diff and merge support, keyword substitution, newline translation, and so on. But to get the full benefit of properties, they must be set on the right files and directories. Unfortunately, that step can be easily forgotten in the routine of things, especially since failing to set a property doesnt usually result in an obvious error (at least compared to, say, failing to add a file to version control). To help your properties get applied to the places that need them, Subversion provides a couple of simple but useful features. Whenever you introduce a file to version control using the svn add or svn import commands, Subversion tries to assist by setting some common file properties automatically. First, on operating systems whose filesystems support an execute permission bit, Subversion will automatically set the svn:executable property on newly added or imported files whose execute bit is enabled. (See the section called File Executability later in this chapter for more about this property.) Second, Subversion tries to determine the files MIME type. If youve configured a mime-types-files runtime configuration parameter, Subversion will try to find a MIME type mapping in that file for your files extension. If it finds such a mapping, it will set your files svn:mime-type property to the MIME type it found. If no mapping file is configured, or no mapping for your files extension could be found, Subversion will fall back to heuristic algorithms to determine the files MIME type. Depending on how it is built, Subversion 1.7 can make use of file scanning libraries 15 to detect a files type based on its content. Failing all else, Subversion will employ its own very basic heuristic to determine whether the file contains nontextual content. If so, it automatically sets the svn:mime-type property on that file to applicationoctet-stream (the generic this is a collection of bytes MIME type). Of course, if Subversion guesses incorrectly, or if you wish to set the svn:mime-type property to something more preciseperhaps imagepng or applicationx-shockwave-flash you can always remove or edit that property. (For more on Subversions use of MIME types, see the section called File Content Type later in this chapter.) UTF-16 is commonly used to encode files whose semantic content is textual in nature, but the encoding itself makes heavy use of bytes which are outside the typical ASCII character byte range. As such, Subversion will tend to classify such files as binary files, much to the chagrin of users who desire line-based differencing and merging, keyword substitution, and other behaviors for those files. Subversion also provides, via its runtime configuration system (see the section called Runtime Configuration Area ), a more flexible automatic property setting feature that allows you to create mappings of filename patterns to property names and values. Once again, these mappings affect adds and imports, and can not only override the default MIME type decision made by Subversion during those operations, but can also set additional Subversion or custom properties, too. For example, you might create a mapping that says that anytime you add JPEG filesones whose names match the pattern. jpg Subversion should automatically set the svn:mime-type property on those files to imagejpeg. Or perhaps any files that match. cpp should have svn:eol-style set to native. and svn:keywords set to Id. Automatic property support is perhaps the handiest property-related tool in the Subversion toolbox. See the section called Config for more about configuring that support. Subversion administrators commonly ask if it is possible to configure, on the server side, a set of property definitions which all connecting clients will automatically consider when operating on working copies checked out from that server. Unfortunately, Subversion doesnt offer this feature. Administrators can use hook scripts to validate that the properties added to and modified on files and directories match the administrators preferred policies, rejecting commits which are non-compliant in this fashion. (See the section called Implementing Repository Hooks for more about hook scripts.) But theres no way to automatically dictate those preferences to Subversion clients beforehand. 13 If youre familiar with XML, this is pretty much the ASCII subset of the syntax for XML Name . 14 Fixing spelling errors, grammatical gotchas, and just-plain-wrongness in commit log messages is perhaps the most common use case for the --revprop option. 15 Currently, libmagic is the support library used to accomplish this.

No comments:

Post a Comment