Wednesday, 20 December 2017

Svn mime type binära alternativ


För bakgrund till min fråga: svn wont diff en fil som den tycker är binär Ett nytt stapel-överflödessvar (svn diff: fil markerad som binär typ) visade att du kan tvinga en mime-typ: Observera att tidigare svar är ofullständigt. du måste också: Nu är min nya fråga: Kan jag ställa in en standard, så alla framtida vnd. google-earth. kmlxml-filer behandlas som text av svn Redbooken tystnar på detta ämne: svnbook. red-beanen1.2svn. advanced. props. html säger bara: Vilka undantag är dessa undantag bakade in i svn-koden eller tillgänglig? Svaret beror på svn-klienten du använder. I den officiella svn-klienten är det alternativ du söker efter Automatisk egenskapsinställning. Tldr-versionen behöver du uppdatera din användare eller systemkonfiguration. ställ in inställningen för auto-rekvisita till ja i avsnittet Miscellany och skapa ett nytt avsnitt som kallas auto-props som definierar de mönster du vill matcha och de egenskaper du vill ställa in. För ditt exempel på kml-filer: Detta kommer att se till att när du lägger till en. kml-fil i ditt förråd, kommer den att ha en mime-typ av textruta och kommer att använda linjeländningar som är inbyggda i klientens plattform. Binära filer och översättning i Generellt sett hanterar Subversion binära filer mer graciöst än CVS gör. Eftersom CVS använder RCS, kan den bara lagra successiva fullständiga kopior av en ändrings binär fil. Subversion uttrycker emellertid skillnader mellan filer som använder en binär differentieringsalgoritm, oavsett om de innehåller text - eller binär data. Det betyder att alla filer lagras differensiellt (komprimerad) i förvaret. CVS-användare måste markera binära filer med - kb-flaggor för att förhindra att data skrämmas (på grund av sökordsexpansion och översättningsändningar på rad). De glömmer ibland att göra det här. Subversion tar den mer paranoida vägen. För det första utförs det aldrig någon form av nyckelord eller radbrytning om du inte uttryckligen begär det (se avsnittet "Nyckelordsbyte" och avsnittet "End-of-line Character Sequences" för mer information). Som standard behandlar Subversion all fildata som bokstavsbyte strängar, och filer lagras alltid i förvaret i ett otranslated state. För det andra upprätthåller Subversion ett internt begrepp om en fil är text eller binär data, men detta begrepp finns bara i arbetskopia. Under en svn-uppdatering. Subversion kommer att utföra kontextuella sammanslagningar på lokalt modifierade textfiler, men försöker inte göra det för binära filer. För att avgöra om en kontextuell sammanfogning är möjlig undersöker Subversion egenskapen svn: mime-typ. Om filen inte har någon svn: mime-typegenskap eller har en MIME-typ som är textlig (t. ex. text) antar Subversion att det är text. Annars förutsätter Subversion att filen är binär. Subversion hjälper även användare att köra en binär detekteringsalgoritm i svn import och svn add kommandon. Dessa kommandon kommer att göra en bra gissning och sedan (möjligen) ange en binär svn: mime-typegenskap på filen som läggs till. (Om Subversion gissar fel kan användaren alltid ta bort eller redigera egenskapen.) Du läser Version Control med Subversion (för Subversion 1.7), av Ben Collins-Sussman, Brian W. Fitzpatrick och C. Michael Pilato. Detta arbete är licensierat under Creative Commons Attribution License v2.0. För att se en kopia av denna licens, besök Creative Commons webbplats eller skicka ett brev till Creative Commons, 559 Nathan Abbott Way, Stanford, Kalifornien 94305, USA. För att skicka kommentarer, korrigeringar eller andra bidrag till texten, besök svnbook. Properties Weve har redan omtalt i detalj hur Subversion lagrar och hämtar olika versioner av filer och kataloger i sitt förråd. Hela kapitlen har ägnats åt denna mest grundläggande funktion som tillhandahålls av verktyget. Och om versionsuppdateringen stannade där, skulle Subversion fortfarande vara komplett från ett versionskontrollperspektiv. Men det slutar inte där. Förutom att versionera dina kataloger och filer, tillhandahåller Subversion gränssnitt för att lägga till, ändra och ta bort versionad metadata på var och en av dina versionerade kataloger och filer. Vi hänvisar till denna metadata som egenskaper. och de kan betraktas som tabeller med två kolumner som kartar egenskapsnamn till godtyckliga värden som är kopplade till varje objekt i din arbetsexempel. Generellt sett kan egenskapernas namn och värden vara vad du vill att de ska vara, med den begränsning att namnen endast innehåller ASCII-tecken. Och det bästa med dessa egenskaper är att de också är versionerade, precis som textinnehållet i dina filer. Du kan ändra, begå och återställa egenskapsändringar lika enkelt som du kan ändra innehållsändringar. Och sändning och mottagande av egendomsändringar sker som en del av dina typiska förpliktelser och uppdateringar, du behöver inte ändra dina grundläggande processer för att rymma dem. Subversion har reserverat uppsättningen egenskaper vars namn börjar med svn: som sin egen. Medan det bara finns en handfull sådana egenskaper som används idag bör du undvika att skapa anpassade egenskaper för dina egna behov vars namn börjar med detta prefix. Annars riskerar du att en framtida version av Subversion kommer att öka stöd för en funktion eller beteende som drivs av en egenskap med samma namn men kanske med en helt annan tolkning. Egenskaper visas annarsstans i Subversion också. Precis som filer och kataloger kan ha godtyckliga egenskapsnamn och värden kopplade till dem, kan varje revision som helhet ha godtyckliga egenskaper kopplade till den. Samma begränsningar gäller mänskliga läsbara namn och vad som helst - du vill ha binära värden. Huvudskillnaden är att revisionsegenskaperna inte är versionerade. Med andra ord, om du ändrar värdet på eller raderar en revisionsegenskap, finns det ingen möjlighet, inom ramen för Subversions-funktionalitet, att återställa tidigare värde. Subversion har ingen särskild politik angående användningen av egenskaper. Det frågar bara att du inte använder fastighetsnamn som börjar med prefixet svn: det är namnsutrymmet som den lägger åt sidan för eget bruk. Och Subversion använder faktiskt egenskaper, men den versionerade och oförändrade sorten. Vissa versionerade egenskaper har speciell betydelse eller effekter när de hittas på filer och kataloger, eller de innehåller en viss information om de ändringar som de finns på. Vissa revisionsegenskaper bifogas automatiskt till revisioner genom Subversions commit process, och de bär information om revisionen. De flesta av dessa egenskaper nämns någon annanstans i detta eller andra kapitel som en del av de mer allmänna ämnen som de är relaterade till. För en uttömmande lista över fördefinierade egenskaper för Subversions, se avsnittet "Subversion Properties" i kapitel 9, Fullständig referensversion. Medan Subversion automatiskt bifogar egenskaper (svn: datum. Svn: författare. Svn: logg och så vidare) till revisioner antar det inte att de här egenskaperna existerar och inte heller de verktyg du använder för att interagera med ditt förråd . Revisionsegenskaper kan raderas programmatiskt eller via klienten (om de tillåts av förvarets krokar) utan att skada Subversions förmåga att fungera. Så, när du skriver skript som fungerar på din Subversion-arkivdata, gör det inte fel att anta att någon särskild revisionsegenskap finns vid en revision. I det här avsnittet kommer vi att undersöka verktyget för användare av Subversion och Subversion själv av fastighetsstöd. Du lär dig om de egendomsrelaterade svn-underkommandona och hur egenskapsändringar påverkar ditt normala Subversion-arbetsflöde. Varför Egenskaper Precis som Subversion använder egenskaper för att lagra extra information om filerna, katalogerna och revisionerna som den innehåller kan du också hitta egenskaper som är av likartad användning. Du kan tycka att det är användbart att ha en plats nära din versionsdata för att hänga anpassade metadata om den data. Säg att du vill skapa en webbplats som rymmer många digitala foton och visar dem med bildtexter och en datastämpel. Nu ändras din uppsättning bilder ständigt, så du vill ha så mycket av den här sajten som möjligt. Dessa bilder kan vara ganska stora, så det är vanligt med webbplatser av denna typ, du vill ge mindre miniatyrbilder till dina besökare på webbplatsen. Nu kan du få denna funktionalitet med hjälp av traditionella filer. Det betyder att du kan få din bild123.jpg och en bild123-thumbnail. jpg sida vid sida i en katalog. Eller om du vill behålla samma filnamn kan du ha miniatyrbilderna i en annan katalog, till exempel miniatyrbilderna123.jpg. Du kan också lagra dina bildtexter och datastämplar på liknande sätt, igen separerade från den ursprungliga bildfilen. Men problemet här är att din samling av filer multipliceras med varje nytt foto som läggs till på webbplatsen. Överväga nu samma webbplats som distribueras på ett sätt som använder Subversions-filegenskaper. Tänk dig att ha en enda bildfil, image123.jpg. med egenskaper som är inställda på den filen som heter namnet. datumstämpel. och till och med miniatyrbild. Nu ser din arbetskatalog katalog mycket mer hanterbar, det ser ut till den lediga webbläsaren som att det bara finns bildfiler i det. Men dina automationsskript vet bättre. De vet att de kan använda svn (eller bättre än, de kan använda Subversion-språkbindningarna se avsnittet "Använda API: erna") för att gräva ut den extra informationen som din webbplats behöver visas utan att behöva läsa en indexfil eller spela spelmanövreringsspel . Medan Subversion lägger några begränsningar på namnen och värdena du använder för egenskaper, har den inte utformats för att bäst ha stora fastighetsvärden eller stora uppsättningar av egenskaper på en viss fil eller katalog. Subversion innehåller vanligtvis alla egenskapsnamn och värden som är förknippade med ett enda objekt i minnet samtidigt som kan orsaka skadliga prestanda eller misslyckade operationer när extremt stora fastighetssatser används. Anpassade revisionsegenskaper används också ofta. En vanlig sådan användning är en egenskap vars värde innehåller ett spårningsidentifikationsnummer med vilket revisionen är associerad, kanske för att ändringen som gjorts i den översynen fixar ett fel som är arkiverat i spårningsfrågan med det ID-numret. Andra användningsområden inkluderar att hänga mer vänliga namn på revisionit kan vara svårt att komma ihåg att revisionen 1935 var en fullständigt testad revision. Men om det finns en testresultatresultat på den revisionen med värdet som passerar alla. det är meningsfullt information att ha. Med Subversion kan du enkelt göra detta via alternativet --with-revprop för svn commit-kommandot: Sökbarhet (eller, varför inte egenskaper) För alla deras verktyg, Subversion propertiesor, mer exakt, de tillgängliga gränssnitten till dem har en stor brist: medan det är en enkel sak att ställa en egen fastighet, är det en helt annan boll av vax att hitta den egenskapen senare. Att försöka hitta en egen revisionsegenskap innebär i allmänhet att man utför en linjär promenad över alla revisioner av förvaret, frågar om varje revision, har du egenskapen jag letar efter. Använd alternativet --with-all-revprops med svn-loggkommandon XML utgångsläge för att underlätta denna sökning. Lägg märke till närvaron av de anpassade revisionsegenskapens testresultat i följande utmatning: Att försöka hitta en anpassad versionad egenskap är också smärtsam, och innebär ofta en rekursiv svn som sprids över en hel arbetskopia. I din situation kan det inte vara så illa som en linjär promenad över alla ändringar. Men det lämnar visserligen mycket att önska både vad gäller prestanda och sannolikhet för framgång, särskilt om omfattningen av din sökning skulle kräva en arbetskopia från roten till ditt förråd. Av den anledningen kan du välja speciellt i revisionsegenskapsanvändningen. Lägg bara till dina metadata i revisionsloggmeddelandet med hjälp av vissa policydrivna (och kanske programmatiskt verkställda) formateringar som är utformade för att snabbt analyseras från utsignalen från svn logg. Det är ganska vanligt att se följande i Subversion loggmeddelanden: Men här ligger det lite olycka igen. Subversion tillhandahåller emellertid ännu inte en loggmembranmekanism, vilket skulle gå långt mot att hjälpa användare att överensstämma med formateringen av sin loggade inbäddade revisionsmetadata. Manipulera egenskaper Svn-programmet ger några sätt att lägga till eller ändra fil - och katalogegenskaper. För egenskaper med korta, läsbara värden är kanske det enklaste sättet att lägga till en ny egenskap att ange egenskapens namn och värde på kommandoraden i svn-propset-underkommandot: Men vi har utnyttjat den flexibilitet som Subversion erbjuder för dina fastighetsvärden . Och om du planerar att ha ett multilinskt textligt eller till och med binärt fastighetsvärde, vill du förmodligen inte ge det värdet på kommandoraden. Så underkommandot svn propset tar ett --file (-F) alternativ för att ange namnet på en fil som innehåller det nya egenskapsvärdet. Det finns några begränsningar för de namn du kan använda för egenskaper. Ett fastighetsnamn måste börja med ett bokstav, ett kolon (.) Eller ett understreck () efter det kan du också använda siffror, bindestreck (-) och perioder (.). 13 Förutom propset-kommandot levererar svn-programmet propedit-kommandot. Detta kommando använder det konfigurerade redigeringsprogrammet (se avsnittet kallat Config) för att lägga till eller ändra egenskaper. När du kör kommandot aktiverar svn ditt redigeringsprogram i en temporär fil som innehåller egenskapens nuvarande värde (eller det är tomt om du lägger till en ny egenskap). Då ändrar du bara det värdet i ditt redigeringsprogram tills det representerar det nya värdet du vill lagra för egenskapen, spara den temporära filen och avsluta sedan redigeringsprogrammet. Om Subversion upptäcker att du faktiskt har ändrat det befintliga värdet av fastigheten, kommer det att acceptera det som det nya egendomsvärdet. Om du lämnar din redaktör utan att göra några ändringar kommer ingen egenskapsändring att inträffa: Vi bör notera att, som med andra svn-underkommandon, kan de som är relaterade till egenskaper fungera på flera banor samtidigt. Detta gör att du kan ändra egenskaper på hela uppsättningar av filer med ett enda kommando. Till exempel kan vi ha gjort följande: All den här egenskapen att lägga till och redigera är inte riktigt väldigt användbar om du inte kan enkelt hämta det sparade egendomsvärdet. Således tillhandahåller svn-programmet två underkommandon för att visa namn och värden för egenskaper som är lagrade på filer och kataloger. Kommandot svn proplist listar namnen på egenskaper som finns på en sökväg. När du väl vet namnen på egenskaperna på noden kan du begära sina värden individuellt med svn propget. Detta kommando kommer, med ett fastighetsnamn och en sökväg (eller ett antal sökvägar), skriva ut värdet av egenskapen till standardutflödet. Det finns även en variant av proplist-kommandot som kommer att lista både namnet och värdet för alla egenskaper. Ange bara --verbose (-v) alternativet. Den sista egenskapsrelaterade underkommandot är propdel. Eftersom Subversion tillåter dig att lagra egenskaper med tomma värden, kan du inte ta bort en egendom helt och hållet med svn propedit eller svn propset. Till exempel kommer det här kommandot inte att ge önskad effekt: Du måste använda propdel-underkommandot för att radera egenskaper helt och hållet. Syntaxen liknar de andra egenskapskommandon: Kom ihåg de oöverträffade revisionsegenskaperna Du kan också ändra dem med samma svn-underkommandon som vi just beskrivit. Lägg bara till kommandoradsparametern --revprop och ange den revision vars egenskap du vill ändra. Eftersom revisioner är globala behöver du inte ange en målsökväg till dessa egenskapsrelaterade kommandon så länge du är placerad i en arbetskopia av förvaret vars revisionsegenskap du vill ändra. Annars kan du helt enkelt ge webbadressen till en sökvägen i intresseförteckningen (inklusive repositorys root-URL). Du kanske till exempel vill ersätta commit-meddelandet för en befintlig revision. 14 Om din nuvarande arbetsförteckning är en del av en arbetskopia av ditt förråd, kan du helt enkelt köra kommandot svn propset utan målväg: Men även om du inte har kontrollerat en arbetskopia från det här förrådet, kan du ändå ändra egenskapsändringen genom att tillhandahålla repositorys root-URL: Observera att förmågan att modifiera dessa outnyttjade egenskaper måste uttryckligen läggas till av förvaringsadministratören (se avsnittet kallat Commit Log Message Correction). Det beror på att egenskaperna är avvikande, så du riskerar att förlora information om du inte är försiktig med dina ändringar. Förvaringsadministratören kan ställa in metoder för att skydda mot denna förlust, och som standard är modifieringen av oöverförda egenskaper inaktiverad. Användare ska, om möjligt, använda svn propedit istället för svn propset. Medan slutresultatet av kommandona är identiskt kan de tidigare låta dem se det nuvarande värdet av den egendom som de kommer att ändra, vilket hjälper dem att verifiera att de faktiskt gör förändringen som de tror att de gör . Detta är särskilt sant när man ändrar unversioned revisionsegenskaper. Det är också betydligt lättare att ändra multilinska egenskapsvärden i en textredigerare än på kommandoraden. Egenskaper och Subversion Workflow Nu när du är bekant med alla egenskapsrelaterade svn-underkommandon kan vi se hur egenskapsändringar påverkar det vanliga Subversion-arbetsflödet. Som vi nämnde tidigare, är fil - och katalogegenskaper versioned, precis som filinnehållet. Som ett resultat ger Subversion samma möjligheter för att smälta ihop eller med konfliktförändringar i sig själv. Som med filinnehåll är dina ändringar av fastigheter lokala ändringar, endast permanenta när du förplikter dem till förvaret med svn commit. Dina ändringar i fastigheten kan enkelt skapas, för att kommandot svn returnera kommer dina filer och kataloger att återställas till sina oförändrade statescontents, egenskaper och allt. Du kan också få intressant information om tillståndet för din fil och katalogegenskaper genom att använda svn-status och svn diff-kommandon. Lägg märke till hur status underkommandot visar M i den andra kolumnen i stället för den första. Det beror på att vi har ändrat egenskaperna på calcbutton. c. men inte dess textinnehåll. Hade vi ändrat båda, skulle vi ha sett M i den första kolumnen också. (Vi täcker svn status i avsnittet kallat Se en översikt över dina ändringar). Precis som för filinnehåll kan ändringar i lokal egendom strida mot förändringar som begås av någon annan. Om du uppdaterar din arbetsbokskatalog och tar emot egenskapsändringar på ett versionsversion som kolliderar med din egen, rapporterar Subversion att objektet befinner sig i ett konfliktläge. Subversion skapar också, i samma katalog som det motsatta objektet, en fil med en. prej-förlängning som innehåller detaljerna i konflikten. Du bör undersöka innehållet i den här filen så att du kan bestämma hur du löser konflikten. Fram till konflikten är löst, kommer du att se en C i den andra kolumnen av svn-statusutdata för det objektet, och försök att begå dina lokala ändringar misslyckas. För att lösa egendomskonflikter, se till att de motstridiga egenskaperna innehåller de värden som de borde och använd sedan kommandot svn-lösa --acceptworking för att varna Subversion som du har löst problemet manuellt. Du kanske också har märkt det icke-standardiserade sättet som Subversion visar för närvarande egendomsskillnader. Du kan fortfarande använda svn diff och omdirigera dess output för att skapa en användbar patch-fil. Plåstret kommer att ignorera egenskapen patchesas en regel, det ignorerar eventuellt buller som det inte kan förstå. Det innebär tyvärr att det är fullt att tillämpa en patch som genereras av svn diff genom att använda plåstret. eventuella egendomsändringar måste tillämpas manuellt. Subversion 1.7 förbättrar denna situation på två sätt. För det första är dess icke-standardiserade visning av egenskapsskillnader åtminstone maskinläsbar och förbättring över visning av egenskaper i versioner före 1.7. Men Subversion 1.7 introducerar också underkommandot svn-patch, som är utformat speciellt för att hantera den extra information som svn diff s-utdata kan bära, tillämpa de förändringarna i Subversion-arbetskopia. Av särskild relevans för vårt ämne kan egenskapsskillnader som finns i patchfiler genererade av svn diff i Subversion 1.7 eller better automatiskt appliceras på en arbets kopia av svn-patch-kommandot. För mer om svn patch. se svn-korrigeringsfilen i kapitel 9, fullständig referensversion. Det finns ett undantag till hur egenskapsändringar rapporteras av svn diff. ändras till Subversions special svn: mergeinfo propertyused för att spåra information om sammanslagningar som har utförts i din förteckning beskriven på ett mer mänskligt läsbart sätt. Detta är ganska användbart för de människor som måste läsa dessa beskrivningar. Men det tjänar också till att orsaka patchprogram (inklusive svn-patch) för att hoppa över de ändrade beskrivningarna som brus. Det här låter som en bugg, men det är verkligen inte eftersom den här egenskapen är avsedd att hanteras enbart av svn-fusionen underkommandot. Mer information om sammanslagningsspårning finns i Kapitel 4, Förgrening och Sammanslagning. Egenskapsinställningar Egenskaper är en kraftfull funktion av Subversion, som fungerar som nyckelkomponenter i många Subversion-funktioner som diskuteras annorstädes i detta och andra kapitelstextuella diff och fusionstöd, nyckelordsubstitution, newline-översättning och så vidare. Men för att få full nytta av egenskaper måste de ställas in på rätt filer och kataloger. Tyvärr kan det steget lätt glömmas i rutin av saker, speciellt eftersom det inte är ett uppenbart fel (åtminstone i jämförelse med att man inte lägger till en fil i versionskontrollen) eftersom det inte går att ställa in en egenskap. För att hjälpa dina egenskaper att tillämpas på de platser som behöver dem, erbjuder Subversion ett par enkla men användbara funktioner. När du introducerar en fil till versionskontroll med kommandona svn add eller svn, försöker Subversion att hjälpa till genom att ställa in några vanliga filegenskaper automatiskt. Först, på operativsystem vars filsystem stödjer en exekverad behörighetsbit, ställer Subversion automatiskt svn: exekverbar egenskap på nya eller importerade filer vars exekveringsbit är aktiverad. (Se avsnittet File Executability senare i det här kapitlet för mer om den här egenskapen.) För det andra försöker Subversion att bestämma filerna MIME-typ. Om du har konfigurerat en runtime-konfigurationsparameter för mime-typer-filer, försöker Subversion att hitta en MIME-typ-mappning i den filen för din filtillägg. Om den hittar en sådan kartläggning, kommer den att ställa in dina filer svn: mime-typegenskap till MIME-typen som den hittat. Om ingen mappfil är konfigurerad eller ingen mappning för filförlängningen kunde hittas, kommer Subversion att återgå till heuristiska algoritmer för att bestämma filerna MIME-typ. Beroende på hur det är byggt kan Subversion 1.7 använda filsökningsbibliotek 15 för att upptäcka en filtyp baserat på dess innehåll. Underlåtenhet allt annat, Subversion kommer att använda sin egen mycket grundläggande heuristiska för att avgöra om filen innehåller icke-innehållsinnehåll. Om så är fallet sätter det automatiskt egenskapen svn: mime-typ på den filen till applicationoctet-stream (den generiska det här är en samling av bytes MIME-typ). Självklart, om Subversion gissar felaktigt, eller om du vill ställa in egenskapen svn: mime-typ till något mer preciserande imagepng eller applicationx-shockwave-flash kan du alltid ta bort eller redigera den egenskapen. (Mer information om Subversions-användning av MIME-typer finns i avsnittet Filinnehållstyp senare i det här kapitlet.) UTF-16 används vanligtvis för att koda filer vars semantiska innehåll är textual i naturen, men kodningen använder sig ofta av byte som ligger utanför det typiska ASCII-teckenbyteområdet. Som sådan kommer Subversion att tendera att klassificera sådana filer som binära filer, mycket till chagrin hos användare som önskar linjebaserad differentiering och sammanslagning, nyckelordsutbyte och andra beteenden för dessa filer. Subversion tillhandahåller också, via sitt runtime-konfigurationssystem (se avsnittet Runtime Configuration Area), en mer flexibel automatisk egenskapsinställningsfunktion som låter dig skapa mappings av filnamnsmönster till egenskapsnamn och värden. Återigen påverkar dessa mappings tillägg och import, och kan inte bara åsidosätta det vanliga MIME-typbeslutet som gjorts av Subversion under dessa operationer, men kan också ställa in ytterligare Subversion eller anpassade egenskaper. Du kan till exempel skapa en kartläggning som säger att när som helst lägger du till JPEG-filer, vars namn matchar mönstret. jpg Subversion ska automatiskt ställa in egenskapen svn: mime-typ på dessa filer till imagejpeg. Eller kanske några filer som matchar. cpp ska ha svn: eol-style set to native. och svn: nyckelord som är inställda på id. Automatiskt fastighetsstöd är kanske det mest praktiska fastighetsrelaterade verktyget i verktyget Subversion. Se avsnittet kallat Config för mer om att konfigurera det här stödet. Subversion-administratörer frågar vanligtvis om det är möjligt att konfigurera en ser av fastighetsdefinitioner på serverns sida som alla anslutande klienter automatiskt kommer att överväga när de arbetar på arbetande kopior checkade ut från den servern. Tyvärr erbjuder Subversion inte den här funktionen. Administratörer kan använda krokskript för att validera att egenskaperna som läggs till och ändras på filer och kataloger matchar administratörens föredragna policy, avvisande förpliktelser som inte uppfyller kraven på detta sätt. (Se avsnittet "Implementing Repository Hooks" för mer om hakskript.) Men det finns inget sätt att automatiskt diktera dessa preferenser till Subversion-klienter på förhand. 13 Om du är bekant med XML, är det ganska mycket ASCII-delmängden i syntaxen för XML-namn. 14 Det är kanske det vanligaste användningsfallet för alternativet --revprop att fixa stavfel, grammatiska gotchas och rättvisa fel i commit-loggmeddelanden. 15 För närvarande är libmagic det stödbibliotek som används för att uppnå detta. Den här dialogrutan låter dig ange ditt språk och de Subversion-specifika inställningarna. Väljer ditt användargränssnitt. Naturligtvis måste du installera motsvarande språkpaket först för att få ett annat använd språk än standard engelska. Kontrollera efter uppdateringar TortoiseSVN kommer regelbundet att kontakta sin nedladdningssida för att se om det finns en nyare version av programmet tillgängligt. Om det finns det kommer det att visas en meddelande länk i commit dialogrutan. Använd Kontrollera nu om du vill ha ett svar direkt. Den nya versionen laddas inte ner, du får bara en informationsdialog som säger att den nya versionen är tillgänglig. SköldpaddaSVN har tre anpassade ljud som installeras som standard. Du kan välja olika ljud (eller stänga av dessa ljud helt) med hjälp av Windows Kontrollpanel. Konfigurera är en genväg till kontrollpanelen. Använd Aero-dialogrutor I Windows Vista och senare system kontrollerar detta om dialogrutor använder Aero-styling. I Windows 7 kan du skapa ett bibliotek där du kan gruppera arbetsexemplar som sprids på olika ställen i ditt system. Global ignore mönster Global ignore mönster används för att förhindra att odefinierade filer visas upp t. ex. i commit dialogrutan. Filer som matchar mönstren ignoreras också av en import. Ignorera filer eller kataloger genom att skriva in namnen eller tilläggen. Mönster separeras av utrymmen, t. ex. bin obj. bak..jar. Ttmp. Dessa mönster bör inte innehålla några separatorer. Observera också att det inte finns något sätt att skilja mellan filer och kataloger. Läs avsnittet Mönsterpassning i Ignorera listor för mer information om syntaxen för mönster. Observera att ignoreringsmönstren du anger här kommer att påverka andra Subversion-klienter som körs på din dator, inklusive kommandoraden. Om du använder konfigurationsfilen Subversion för att ställa in ett globalt ignoreringsmönster, kommer det att åsidosätta de inställningar du gör här. Subversion-konfigurationsfilen är tillgänglig med hjälp av Redigera som beskrivs nedan. Detta ignorera mönstret kommer att påverka alla dina projekt. Det är inte versioned, så det påverkar inte andra användare. Däremot kan du också använda den versionerade svn: ignore eller svn: Global-ignores-egenskapen för att utesluta filer eller kataloger från versionskontroll. Läs avsnittet "Ignorera filer och kataloger" för mer information. Ange fildatum till den sista committiden Det här alternativet säger att TortoiseSVN ska ställa in fildatum till den sista förlovningstiden när en checkout eller en uppdatering görs. Annars kommer TortoiseSVN att använda det aktuella datumet. Om du utvecklar programvara är det vanligtvis bäst att använda det aktuella datumet eftersom byggsystem normalt tittar på datumfrimärken för att bestämma vilka filer som behöver sammanställas. Om du använder senaste förlovningstid och återgår till en äldre filrevision, kanske ditt projekt kanske inte sammanställs som du förväntar dig. Subversion-konfigurationsfil Använd Redigera för att redigera Subversion-konfigurationsfilen direkt. Vissa inställningar kan inte ändras direkt av TortoiseSVN, och måste ställas in här istället. Mer information om Subversion config-filen finns i Runtime Configuration Area. Avsnittet om automatisk egenskapsinställning är av särskilt intresse, och det är konfigurerat här. Observera att Subversion kan läsa konfigurationsinformation från flera ställen, och du behöver veta vilken som prioriterar. Mer information finns i Konfiguration och Windows-registret. Använd lokala ändringar av svn: externals vid uppdatering Det här alternativet säger att TortoiseSVN alltid ska tillämpa lokala ändringar på egenskapen svn: externals när uppdateringen av arbetskopia uppdateras. Kontextmenyinställningar I den här dialogrutan kan du konfigurera några av TortoiseSVNs-dialogrutorna som du tycker om dem. Standard antal loggmeddelanden Begränsar antalet loggmeddelanden som TortoiseSVN hämtar när du först väljer TortoiseSVN Show Log Användbar för långsamma servernsanslutningar. Du kan alltid använda Visa alla eller Nästa 100 för att få fler meddelanden. Teckensnitt för loggmeddelanden Väljer teckensnittets ansikte och storlek som används för att visa loggmeddelandet i mellanskärmen i dialogrutan Revisionslogg och när du komponerar loggmeddelanden i kommandotialogen. Kort datumformat i loggmeddelanden Om de standarda långa meddelandena använder för mycket utrymme på skärmen använder du kortformatet. Kan dubbelklicka i logglistan för att jämföra med tidigare revision Om du ofta hittar dig själv i jämförelse med revisioner i den övre rutan i loggdialogrutan, kan du använda det här alternativet för att tillåta den åtgärden med dubbelklick. Det är inte aktiverat som standard eftersom hämtning av diff ofta är en lång process, och många föredrar att undvika väntan efter ett oavsiktligt dubbelklick, varför det här alternativet inte är aktiverat som standard. SköldpaddaSVN kan automatiskt stänga alla framdriftsdialoger när åtgärden är klar utan fel. Med den här inställningen kan du välja villkoren för att stänga dialogrutorna. Standardinställningen (rekommenderad) är Stäng manuellt vilket gör att du kan granska alla meddelanden och kontrollera vad som har hänt. Du kan dock bestämma att du vill ignorera vissa typer av meddelanden och stäng dialogrutan automatiskt om det inte finns några kritiska ändringar. Auto-close if no merges, adds or deletes means that the progress dialog will close if there were simple updates, but if changes from the repository were merged with yours, or if any files were added or deleted, the dialog will remain open. It will also stay open if there were any conflicts or errors during the operation. Auto-close if no conflicts relaxes the criteria further and will close the dialog even if there were merges, adds or deletes. However, if there were any conflicts or errors, the dialog remains open. Auto-close if no errors always closes the dialog even if there were conflicts. The only condition that keeps the dialog open is an error condition, which occurs when Subversion is unable to complete the task. For example, an update fails because the server is inaccessible, or a commit fails because the working copy is out-of-date. Always close dialogs for local operations Local operations like adding files or reverting changes do not need to contact the repository and complete quickly, so the progress dialog is often of little interest. Select this option if you want the progress dialog to close automatically after these operations, unless there are errors. Use recycle bin when reverting When you revert local modifications, your changes are discarded. TortoiseSVN gives you an extra safety net by sending the modified file to the recycle bin before bringing back the pristine copy. If you prefer to skip the recycle bin, uncheck this option. Use URL of WC as the default From: URL In the merge dialog, the default behaviour is for the From: URL to be remembered between merges. However, some people like to perform merges from many different points in their hierarchy, and find it easier to start out with the URL of the current working copy. This can then be edited to refer to a parallel path on another branch. Default checkout path You can specify the default path for checkouts. If you keep all your checkouts in one place, it is useful to have the drive and folder pre-filled so you only have to add the new folder name to the end. Default checkout URL You can also specify the default URL for checkouts. If you often checkout sub-projects of some very large project, it can be useful to have the URL pre-filled so you only have to add the sub-project name to the end. The revision graph attempts to show a clearer picture of your repository structure by distinguishing between trunk, branches and tags. As there is no such classification built into Subversion, this information is extracted from the path names. The default settings assume that you use the conventional English names as suggested in the Subversion documentation, but of course your usage may vary. Specify the patterns used to recognise these paths in the three boxes provided. The patterns will be matched case-insensitively, but you must specify them in lower case. Wild cards and. will work as usual, and you can use to separate multiple patterns. Do not include any extra white space as it will be included in the matching specification. Commit tag detection Please note that these patterns are also used to detect commits to a tag, not just for the revision graph. Colors are used in the revision graph to indicate the node type, i. e. whether a node is added, deleted, renamed. In order to help pick out node classifications, you can allow the revision graph to blend colors to give an indication of both node type and classification. If the box is checked, blending is used. If the box is unchecked, color is used to indicate node type only. Use the color selection dialog to allocate the specific colors used. Revision Graph Colors This page allows you to choose the items for which TortoiseSVN will display icon overlays. Since it takes quite a while to fetch the status of a working copy, TortoiseSVN uses a cache to store the status so the explorer doesnt get hogged too much when showing the overlays. You can choose which type of cache TortoiseSVN should use according to your system and working copy size here: Caches all status information in a separate process ( TSVNCache. exe ). That process watches all drives for changes and fetches the status again if files inside a working copy get modified. The process runs with the least possible priority so other programs dont get hogged because of it. That also means that the status information is not real time but it can take a few seconds for the overlays to change. Advantage: the overlays show the status recursively, i. e. if a file deep inside a working copy is modified, all folders up to the working copy root will also show the modified overlay. And since the process can send notifications to the shell, the overlays on the left tree view usually change too. Disadvantage: the process runs constantly, even if youre not working on your projects. It also uses around 10-50 MB of RAM depending on number and size of your working copies. Caching is done directly inside the shell extension dll, but only for the currently visible folder. Each time you navigate to another folder, the status information is fetched again. Advantage: needs only very little memory (around 1 MB of RAM) and can show the status in real time . Disadvantage: Since only one folder is cached, the overlays dont show the status recursively. For big working copies, it can take more time to show a folder in explorer than with the default cache. Also the mime-type column is not available. With this setting, the TortoiseSVN does not fetch the status at all in Explorer. Because of that, files dont get an overlay and folders only get a normal overlay if theyre versioned. No other overlays are shown, and no extra columns are available either. Advantage: uses absolutely no additional memory and does not slow down the Explorer at all while browsing. Disadvantage: Status information of files and folders is not shown in Explorer. To see if your working copies are modified, you have to use the Check for modifications dialog. By default, overlay icons and context menus will appear in all opensave dialogs as well as in Windows Explorer. If you want them to appear only in Windows Explorer, check the Show overlays and context menu only in explorer box. You can also choose to mark folders as modified if they contain unversioned items. This could be useful for reminding you that you have created new files which are not yet versioned. This option is only available when you use the default status cache option (see below). If you have files in the ignore-on-commit changelist, you can chose to make those files not propagate their status to the parent folder. That way if only files in that changelist are modified, the parent folder still shows the unmodified overlay icon. The next group allows you to select which classes of storage should show overlays. By default, only hard drives are selected. You can even disable all icon overlays, but wheres the fun in that Network drives can be very slow, so by default icons are not shown for working copies located on network shares. USB Flash drives appear to be a special case in that the drive type is identified by the device itself. Some appear as fixed drives, and some as removable drives. The Exclude Paths are used to tell TortoiseSVN those paths for which it should not show icon overlays and status columns. This is useful if you have some very big working copies containing only libraries which you wont change at all and therefore dont need the overlays, or if you only want TortoiseSVN to look in specific folders. Any path you specify here is assumed to apply recursively, so none of the child folders will show overlays either. If you want to exclude only the named folder, append. after the path. The same applies to the Include Paths. Except that for those paths the overlays are shown even if the overlays are disabled for that specific drive type, or by an exclude path specified above. Users sometimes ask how these three settings interact. For any given path check the include and exclude lists, seeking upwards through the directory structure until a match is found. When the first match is found, obey that include or exclude rule. If there is a conflict, a single directory spec takes precedence over a recursive spec, then inclusion takes precedence over exclusion. An example will help here: These settings disable icon overlays for the C: drive, except for c:develop. All projects below that directory will show overlays, except the c:develop folder itself, which is specifically ignored. The high-churn binary folders are also excluded. TSVNCache. exe also uses these paths to restrict its scanning. If you want it to look only in particular folders, disable all drive types and include only the folders you specifically want to be scanned. Exclude SUBST Drives It is often convenient to use a SUBST drive to access your working copies, e. g. using the command However this can cause the overlays not to update, as TSVNCache will only receive one notification when a file changes, and that is normally for the original path. This means that your overlays on the subst path may never be updated. An easy way to work around this is to exclude the original path from showing overlays, so that the overlays show up on the subst path instead. Sometimes you will exclude areas that contain working copies, which saves TSVNCache from scanning and monitoring for changes, but you still want a visual indication that a folder contains a working copy. The Show excluded root folders as normal checkbox allows you to do this. With this option, working copy root folders in any excluded area (drive type not checked, or specifically excluded) will show up as normal and up-to-date, with a green check mark. This reminds you that you are looking at a working copy, even though the folder overlays may not be correct. Files do not get an overlay at all. Note that the context menus still work, even though the overlays are not shown. As a special exception to this, drives A: and B: are never considered for the Show excluded folders as normal option. This is because Windows is forced to look on the drive, which can result in a delay of several seconds when starting Explorer, even if your PC does have a floppy drive. Icon Set Selection Here you can configure your proxy server, if you need one to get through your companys firewall. If you need to set up per-repository proxy settings, you will need to use the Subversion servers file to configure this. Use Edit to get there directly. Consult the Runtime Configuration Area for details on how to use this file. You can also specify which program TortoiseSVN should use to establish a secure connection to a svnssh repository. We recommend that you use TortoisePlink. exe. This is a version of the popular Plink program, and is included with TortoiseSVN, but it is compiled as a Windowless app, so you dont get a DOS box popping up every time you authenticate. You must specify the full path to the executable. For TortoisePlink. exe this is the standard TortoiseSVN bin directory. Use the Browse button to help locate it. Note that if the path contains spaces, you must enclose it in quotes, e. g. One side-effect of not having a window is that there is nowhere for any error messages to go, so if authentication fails you will simply get a message saying something like Unable to write to standard output . For this reason we recommend that you first set up using standard Plink. When everything is working, you can use TortoisePlink with exactly the same parameters. TortoisePlink does not have any documentation of its own because it is just a minor variant of Plink. Find out about command line parameters from the PuTTY website . To avoid being prompted for a password repeatedly, you might also consider using a password caching tool such as Pageant. This is also available for download from the PuTTY website. Finally, setting up SSH on server and clients is a non-trivial process which is beyond the scope of this help file. However, you can find a guide in the TortoiseSVN FAQ listed under SubversionTortoiseSVN SSH How-To . External Program Settings Figure 4.81. The Settings Dialog, Diff Viewer Page Here you can define your own diffmerge programs that TortoiseSVN should use. The default setting is to use TortoiseMerge which is installed alongside TortoiseSVN. Read the section called External DiffMerge Tools for a list of some of the external diffmerge programs that people are using with TortoiseSVN. Diff Viewer An external diff program may be used for comparing different revisions of files. The external program will need to obtain the filenames from the command line, along with any other command line options. TortoiseSVN uses substitution parameters prefixed with . When it encounters one of these it will substitute the appropriate value. The order of the parameters will depend on the Diff program you use. The original file without your changes The window title for the base file The window title for the base file, without quotes Your own file, with your changes The window title for your file The window title for your file, without quotes The URL of the original file, if available The URL of the original file, if available, without quotes The URL of the second file, if available The URL of the second file, if available, without quotes The revision of the original file, if available The revision of the original file, if available, without quotes The revision of the second file, if available The revision of the second file, if available, without quotes The peg revision, if available The peg revision, if available, without quotes The name of the conflicted file The name of the conflicted file, without quotes The window titles are not pure filenames. TortoiseSVN treats that as a name to display and creates the names accordingly. So e. g. if youre doing a diff from a file in revision 123 with a file in your working copy, the names will be filename. revision 123 and filename. working copy. For example, with ExamDiff Pro: or with WinMerge: or with UltraCompare: or with DiffMerge: If you use the svn:keywords property to expand keywords, and in particular the revision of a file, then there may be a difference between files which is purely due to the current value of the keyword. Also if you use svn:eol-style native the BASE file will have pure LF line endings whereas your file will have CR-LF line endings. TortoiseSVN will normally hide these differences automatically by first parsing the BASE file to expand keywords and line endings before doing the diff operation. However, this can take a long time with large files. If Convert files when diffing against BASE is unchecked then TortoiseSVN will skip pre-processing the files. You can also specify a different diff tool to use on Subversion properties. Since these tend to be short simple text strings, you may want to use a simpler more compact viewer. If you have configured an alternate diff tool, you can access TortoiseMerge and the third party tool from the context menus. Context menu Diff uses the primary diff tool, and Shift Context menu Diff uses the secondary diff tool. At the bottom of the dialog you can configure a viewer program for unified-diff files (patch files). No parameters are required. The Default setting is to use TortoiseUDiff which is installed alongside TortoiseSVN, and colour-codes the added and removed lines. Since Unified Diff is just a text format, you can use your favourite text editor if you prefer. Merge Tool An external merge program used to resolve conflicted files. Parameter substitution is used in the same way as with the Diff Program. the original file without your or the others changes The window title for the base file The window title for the base file, without quotes your own file, with your changes The window title for your file The window title for your file, without quotes the file as it is in the repository The window title for the file in the repository The window title for the file in the repository, without quotes the conflicted file, the result of the merge operation The window title for the merged file The window title for the merged file, without quotes The name of the file. This is an empty string if two different files are diffed instead of two states of the same file. The name of the file, without quotes For example, with Perforce Merge: or with WinMerge (2.8 or later): or with DiffMerge: DiffMerge Advanced Settings Figure 4.82. The Settings Dialog, DiffMerge Advanced Dialog In the advanced settings, you can define a different diff and merge program for every file extension. For instance you could associate Photoshop as the Diff Program for. jpg files :-) You can also associate the svn:mime-type property with a diff or merge program. To associate using a file extension, you need to specify the extension. Use. bmp to describe Windows bitmap files. To associate using the svn:mime-type property, specify the mime type, including a slash, for example textxml. Saved Data Settings Figure 4.83. The Settings Dialog, Saved Data Page For your convenience, TortoiseSVN saves many of the settings you use, and remembers where you have been lately. If you want to clear out that cache of data, you can do it here. Whenever you checkout a working copy, merge changes or use the repository browser, TortoiseSVN keeps a record of recently used URLs and offers them in a combo box. Sometimes that list gets cluttered with outdated URLs so it is useful to flush it out periodically. If you want to remove a single item from one of the combo boxes you can do that in-place. Just click on the arrow to drop the combo box down, move the mouse over the item you want to remove and type ShiftDel . Log messages (Input dialog) TortoiseSVN stores recent commit log messages that you enter. These are stored per repository, so if you access many repositories this list can grow quite large. Log messages (Show log dialog) TortoiseSVN caches log messages fetched by the Show Log dialog to save time when you next show the log. If someone else edits a log message and you already have that message cached, you will not see the change until you clear the cache. Log message caching is enabled on the Log Cache tab. Dialog sizes and positions Many dialogs remember the size and screen position that you last used. When you authenticate with a Subversion server, the username and password are cached locally so you dont have to keep entering them. You may want to clear this for security reasons, or because you want to access the repository under a different username. does John know you are using his PC If you want to clear authentication data for one particular server only, use the Clear. instead of the Clear all button. TortoiseSVN keeps a log of everything written to its progress dialogs. This can be useful when, for example, you want to check what happened in a recent update command. The log file is limited in length and when it grows too big the oldest content is discarded. By default 4000 lines are kept, but you can customize that number. From here you can view the log file content, and also clear it. Log Caching Figure 4.84. The Settings Dialog, Log Cache Page This dialog allows you to configure the log caching feature of TortoiseSVN, which retains a local copy of log messages and changed paths to avoid time-consuming downloads from the server. Using the log cache can dramatically speed up the log dialog and the revision graph. Another useful feature is that the log messages can still be accessed when offline. Enable log caching Enables log caching whenever log data is requested. If checked, data will be retrieved from the cache when available, and any messages not in the cache will be retrieved from the server and added to the cache. If caching is disabled, data will always be retrieved directly from the server and not stored locally. Allow ambiguous URLs Occasionally you may have to connect to a server which uses the same URL for all repositories. Older versions of svnbridge would do this. If you need to access such repositories you will have to check this option. If you dont, leave it unchecked to improve performance. Allow ambiguous UUIDs Some hosting services give all their repositories the same UUID. You may even have done this yourself by copying a repository folder to create a new one. For all sorts of reasons this is a bad idea - a UUID should be unique . However, the log cache will still work in this situation if you check this box. If you dont need it, leave it unchecked to improve performance. If the repository cannot be contacted If you are working offline, or if the repository server is down, the log cache can still be used to supply log messages already held in the cache. Of course the cache may not be up-to-date, so there are options to allow you to select whether this feature should be used. When log data is being taken from the cache without contacting the server, the dialog using those message will show the offline state in its title bar. Timeout before updating the HEAD revision When you invoke the log dialog you will normally want to contact the server to check for any newer log messages. If the timeout set here is non-zero then the server will only be contacted when the timeout has elapsed since the last time contact. This can reduce server round-trips if you open the log dialog frequently and the server is slow, but the data shown may not be completely up-to-date. If you want to use this feature we suggest using a value of 300 (5 minutes) as a compromise. Days of inactivity until small caches get removed If you browse around a lot of repositories you will accumulate a lot of log caches. If youre not actively using them, the cache will not grow very big, so TortoiseSVN purges them after a set time by default. Use this item to control cache purging. Maximum size of removed inactive caches Larger caches are more expensive to reacquire, so TortoiseSVN only purges small caches. Fine tune the threshold with this value. Maximum number of tool failures before cache removal Occasionally something goes wrong with the caching and causes a crash. If this happens the cache is normally deleted automatically to prevent a recurrence of the problem. If you use the less stable nightly build you may opt to keep the cache anyway. Cached Repositories On this page you can see a list of the repositories that are cached locally, and the space used for the cache. If you select one of the repositories you can then use the buttons underneath. Click on the Update to completely refresh the cache and fill in any holes. For a large repository this could be very time consuming, but useful if you are about to go offline and want the best available cache. Click on the Export button to export the entire cache as a set of CSV files. This could be useful if you want to process the log data using an external program, although it is mainly useful to the developers. Click on Delete to remove all cached data for the selected repositories. This does not disable caching for the repository so the next time you request log data, a new cache will be created. Log Cache Statistics Click on the Details button to see detailed statistics for a particular cache. Many of the fields shown here are mainly of interest to the developers of TortoiseSVN, so they are not all described in detail. The amount of memory required to service this cache. The amount of disk space used for the cache. Data is compressed, so disk usage is generally fairly modest. Shows whether the repository was available last time the cache was used. The last time the cache content was changed. Last head update The last time we requested the HEAD revision from the server. The number of different authors with messages recorded in the cache. The number of paths listed, as you would see using svn log - v. The number of revision ranges which we have not fetched, simply because they havent been requested. This is a measure of the number of holes in the cache. The highest revision number stored in the cache. The number of revisions stored in the cache. This is another measure of cache completeness. Client Side Hook Scripts Figure 4.86. The Settings Dialog, Hook Scripts Page This dialog allows you to set up hook scripts which will be executed automatically when certain Subversion actions are performed. As opposed to the hook scripts explained in the section called Server side hook scripts. these scripts are executed locally on the client. One application for such hooks might be to call a program like SubWCRev. exe to update version numbers after a commit, and perhaps to trigger a rebuild. Note that you can also specify such hook scripts using special properties on your working copy. See the section the section called TortoiseSVN Project Properties for details. Figure 4.87. The Settings Dialog, Configure Hook Scripts To add a new hook script, simply click Add and fill in the details. There are currently these types of hook script available Called before the commit dialog is shown. You might want to use this if the hook modifies a versioned file and affects the list of files that need to be committed andor commit message. However you should note that because the hook is called at an early stage, the full list of objects selected for commit is not available. If this is specified, the commit dialog shows a button Run Hook which when clicked runs the specified hook script. The hook script receives a list of all checkec files and folders and the commit message if there was one entered. Called after the user clicks OK in the commit dialog, and before the commit dialog closes. This hook gets a list of all the checked files. If the hook returns an error, the commit dialog stays open. If the returned error message contains paths on newline separated lines, those paths will get selected in the commit dialog after the error message is shown. Called after the user clicks OK in the commit dialog, and before the actual commit begins. This hook has a list of exactly what will be committed. Called after the commit finishes (whether successful or not). Called before the update-to-revision dialog is shown. Called before the actual Subversion update or switch begins. Called after the update, switch or checkout finishes (whether successful or not). Called before an attempt to contact the repository. Called at most once in five minutes. A hook is defined for a particular working copy path. You only need to specify the top level path if you perform an operation in a sub-folder, TortoiseSVN will automatically search upwards for a matching path. Next you must specify the command line to execute, starting with the path to the hook script or executable. This could be a batch file, an executable file or any other file which has a valid windows file association, e. g. a perl script. Note that the script must not be specified using a UNC path as Windows shell execute will not allow such scripts to run due to security restrictions. The command line includes several parameters which get filled in by TortoiseSVN. The parameters passed depend upon which hook is called. Each hook has its own parameters which are passed in the following order: PATH MESSAGEFILE CWD PATH MESSAGEFILE CWD PATH DEPTH MESSAGEFILE CWD PATH DEPTH MESSAGEFILE REVISION ERROR CWD Path to a file containing the log message for the commit. The file contains the text in UTF-8 encoding. After successful execution of the start-commit hook, the log message is read back, giving the hook a chance to modify it. The repository revision to which the update should be done or after a commit completes. Path to a file containing the error message. If there was no error, the file will be empty. The current working directory with which the script is run. This is set to the common root directory of all affected paths. A path to a temporary file which contains all the paths which were somehow touched by the operation. Each path is on a separate line in the temp file. Note that although we have given these parameters names for convenience, you do not have to refer to those names in the hook settings. All parameters listed for a particular hook are always passed, whether you want them or not -) If you want the Subversion operation to hold off until the hook has completed, check Wait for the script to finish. Normally you will want to hide ugly DOS boxes when the script runs, so Hide the script while running is checked by default. Sample client hook scripts can be found in the contrib folder in the TortoiseSVN repository . (the section called License explains how to access the repository.) When debugging hook scripts you may want to echo progress lines to the DOS console, or insert a pause to stop the console window disappearing when the script completes. Because IO is redirected this will not normally work. However you can redirect input and output explicitly to CON to overcome this. t. ex. A small tool is included in the TortoiseSVN installation folder named ConnectVPN. exe. You can use this tool configured as a pre-connect hook to connect automatically to your VPN before TortoiseSVN tries to connect to a repository. Just pass the name of the VPN connection as the first parameter to the tool. Issue Tracker Integration TortoiseSVN can use a COM plugin to query issue trackers when in the commit dialog. The use of such plugins is described in the section called Getting Information from the Issue Tracker. If your system administrator has provided you with a plugin, which you have already installed and registered, this is the place to specify how it integrates with your working copy. Figure 4.88. The Settings Dialog, Issue Tracker Integration Page Click on Add. to use the plugin with a particular working copy. Here you can specify the working copy path, choose which plugin to use from a drop down list of all registered issue tracker plugins, and any parameters to pass. The parameters will be specific to the plugin, but might include your user name on the issue tracker so that the plugin can query for issues which are assigned to you. If you want all users to use the same COM plugin for your project, you can specify the plugin also with the properties bugtraq:provideruuid. bugtraq:provideruuid64 and bugtraq:providerparams. This property specifies the COM UUID of the IBugtraqProvider, for example . (This example is the UUID of the Gurtle bugtraq provider . which is a provider for the Google Code issue tracker.) This is the same as bugtraq:provideruuid. but for the 64-bit version of the IBugtraqProvider. This property specifies the parameters passed to the IBugtraqProvider. Please check the documentation of your IBugtraqProvider plugin to find out what to specify in these two properties. TortoiseBlame Settings Figure 4.89. The Settings Dialog, TortoiseBlame Page The settings used by TortoiseBlame are controlled from the main context menu, not directly with TortoiseBlame itself. TortoiseBlame can use the background colour to indicate the age of lines in a file. You set the endpoints by specifying the colours for the newest and oldest revisions, and TortoiseBlame uses a linear interpolation between these colours according to the repository revision indicated for each line. You can specify different colours to use for the locator bar. The default is to use strong contrast on the locator bar while keeping the main window background light so that you can still read the text. You can select the font used to display the text, and the point size to use. This applies both to the file content, and to the author and revision information shown in the left pane. Defines how many spaces to use for expansion when a tab character is found in the file content. TortoiseUDiff Settings Figure 4.90. The Settings Dialog, TortoiseUDiff Page The settings used by TortoiseUDiff are controlled from the main context menu, not directly with TortoiseUDiff itself. The default colors used by TortoiseUDiff are usually ok, but you can configure them here. You can select the font used to display the text, and the point size to use. Defines how many spaces to use for expansion when a tab character is found in the file diff. Exporting TSVN Settings Figure 4.91. The Settings Dialog, Sync Page You can sync all TortoiseSVN settings to and from an encrypted file. The file is encrpyted with the password you enter so you dont have to worry if you store that file on a cloud folder like OneDrive, GDrive, DropBox. When a path and password is specified, TortoiseSVN will sync all settings automatically and keep them in sync. You can also exportimport an encrypted files with all the settings manually. When you do that, youre asked for the path of the file and the password to encryptdecrypt the settings file. When exporting the settings manually, you can also optionally include all local settings which are not included in a normal export or in a sync. Local settings are settings which include local paths which usually vary between computers. These local settings include the configured diff and merge tools and hook scripts. Advanced Settings A few infrequently used settings are available only in the advanced page of the settings dialog. These settings modify the registry directly and you have to know what each of these settings is used for and what it does. Do not modify these settings unless you are sure you need to change them. Sometimes multiple users use the same account on the same computer. In such situations its not really wanted to save the authentication data. Setting this value to false disables the save authentication button in the authentication dialog. If an update adds a new file from the repository which already exists in the local working copy as an unversioned file, the default action is to keep the local file, showing it as a (possibly) modified version of the new file from the repository. If you would prefer TortoiseSVN to create a conflict in such situations, set this value to false. As with the explorer, TortoiseSVN shows additional commands if the Shift key is pressed while the context menu is opened. To force TortoiseSVN to always show those extended commands, set this value to true. The minimum amount of chars from which the editor shows an auto-completion popup. The default value is 3. The auto-completion list shown in the commit message editor displays the names of files listed for commit. To also include these names with extensions removed, set this value to true. File externals that are pegged to a specific revision are blocked by default from being selected for a commit. This is because a subsequent update would revert those changes again unless the pegged revision of the external is adjusted. Set this value to false in case you still want to commit changes to such external files. If you dont want the explorer to update the status overlays while another TortoiseSVN command is running (e. g. Update, Commit. ) then set this value to true. To add a cache tray icon for the TSVNCache program, set this value to true. This is really only useful for developers as it allows you to terminate the program gracefully. The extra columns the TortoiseSVN adds to the details view in Windows Explorer are normally only active in a working copy. If you want those to be accessible everywhere, not just in working copies, set this value to true. Note that the extra columns are only available in XP. Vista and later doesnt support that feature any more. However some third-party explorer replacements do support those even on Windows versions later than XP. You can specify a different location for the Subversion configuration file here. This will affect all TortoiseSVN operations. In most dialogs in TortoiseSVN, you can use CtrlEnter to dismiss the dialog as if you clicked on the OK button. If you dont want this, set this value to false. Set this to true if you want a dialog to pop up for every command showing the command line used to start TortoiseProc. exe. Set this to true if you want TortoiseSVN to print out debug messages during execution. The messages can be captured with special debugging tools only. The default format (value of 0) of dialog titles is urlpath - name of dialog - TortoiseSVN. If you set this value to 1, the format changes to name of dialog - urlpath - TortoiseSVN. TortoiseSVN allows you to assign an external diff viewer. Most such viewers, however, are not suited for change blaming (the section called Blame Differences ), so you might wish to fall back to TortoiseMerge in this case. To do so, set this value to true. This value specifies the number of pixels a dialog has to be near a border before the dialog sticks to it. The default value is 3. To disable this value set the value to zero. Some apps change the case of filenames without notice but those changes arent really necessary nor wanted. For example a change from file. txt to FILE. TXT wouldnt bother normal Windows applications, but Subversion is case sensitive in these situations. So TortoiseSVN automatically fixes such case changes. If you dont want TortoiseSVN to automatically fix such case changes for you, you can set this value to false. The status list control which is used in various dialogs (e. g. commit, check-for-modifications, add, revert. ) uses full row selection (i. e. if you select an entry, the full row is selected, not just the first column). This is fine, but the selected row then also covers the background image on the bottom right, which can look ugly. To disable full row select, set this value to false. This option determines how the Win7 taskbar icons of the various TortoiseSVN dialogs and windows are grouped together. This option has no effect on Vista The default value is 0. With this setting, the icons are grouped together by application type. All dialogs from TortoiseSVN are grouped together, all windows from TortoiseMerge are grouped together. Figure 4.92. Taskbar with default grouping If set to 1, then instead of all dialogs in one single group per application, theyre grouped together by repository. For example, if you have a log dialog and a commit dialog open for repository A. and a check-for-modifications dialog and a log dialog for repository B. then there are two application icon groups shown in the Win7 taskbar, one group for each repository. But TortoiseMerge windows are not grouped together with TortoiseSVN dialogs. Figure 4.93. Taskbar with repository grouping If set to 2, then the grouping works as with the setting set to 1, except that TortoiseSVN, TortoiseMerge, TortoiseBlame, TortoiseIDiff and TortoiseUDiff windows are all grouped together. For example, if you have the commit dialog open and then double click on a modified file, the opened TortoiseMerge diff window will be put in the same icon group on the taskbar as the commit dialog icon. Figure 4.94. Taskbar with repository grouping If set to 3, then the grouping works as with the setting set to 1, but the grouping isnt done according to the repository but according to the working copy. This is useful if you have all your projects in the same repository but different working copies for each project. If set to 4, then the grouping works as with the setting set to 2, but the grouping isnt done according to the repository but according to the working copy. If this is set to false. then every svn:externals is shown during an update separately. If it is set to true (the default), then update information for externals is only shown if the externals are affected by the update, i. e. changed in some way. Otherwise nothing is shown as with normal files and folders. This has no effect if the option GroupTaskbarIconsPerRepo is set to 0 (see above). If this option is set to true. then every icon on the Win7 taskbar shows a small colored rectangle overlay, indicating the repository the dialogswindows are used for. Figure 4.95. Taskbar grouping with repository color overlays By default, TortoiseSVN always runs an update with externals included. This avoids problems with inconsistent working copies. If you have however a lot of externals set, an update can take quite a while. Set this value to false to run the default update with externals excluded. To update with externals included, either run the Update to revision. dialog or set this value to true again. When the log dialog is started from the merge wizard, already merged revisions are shown in gray, but revisions beyond the point where the branch was created are also shown. These revisions are shown in black because those cant be merged. If this option is set to true then TortoiseSVN tries to find the revision where the branch was created from and hide all the revisions that are beyond that revision. Since this can take quite a while, this option is disabled by default. Also this option doesnt work with some SVN servers (e. g. Google Code Hosting, see issue 5471 ). A format string for the log messages when multiple revisions are selected in the log dialog. You can use the following placeholders in your format string: 1ld gets replaced with the revision number text 2s gets replaced with the short log message of the revision The log dialog shows the revision the working copy path is at in bold. But this requires that the log dialog fetches the status of that path. Since for very big working copies this can take a while, you can set this value to false to deactivate this feature. When you merge revisions from another branch, and merge tracking information is available, the log messages from the revisions you merge will be collected to make up a commit log message. A pre-defined string is used to separate the individual log messages of the merged revisions. If you prefer, you can set this to a value containing a separator string of your choice. If you want to show the diff at once for more items than specified with this settings, a warning dialog is shown first. The default is 10. TortoiseSVN checks whether theres a new version available about once a week. If an updated version is found, the commit dialog shows a link control with that info. If you prefer the old behavior back where a dialog pops up notifying you about the update, set this value to true. The repository browser tries to fetch the web page thats generated by an SVN server configured with the SVNParentPath directive to get a list of all repositories. To disable that behavior, set this value to false. This option enables the use of Direct2D accelerated drawing in the Scintilla control which is used as the edit box in e. g. the commit dialog, and also for the unified diff viewer. With some graphic cards however this sometimes doesnt work properly so that the cursor to enter text isnt always visible. If that happens, you can turn this feature off by setting this value to false. If you dont want TortoiseSVN to ask you to update the working copy automatically after an Out of date error, set this value to false. TortoiseSVN uses accelerators for its explorer context menu entries. Since this can lead to doubled accelerators (e. g. the SVN Commit has the Alt-C accelerator, but so does the Copy entry of explorer). If you dont want or need the accelerators of the TortoiseSVN entries, set this value to false. This can be useful if you use something other than the windows explorer or if you get problems with the context menu displaying incorrectly. Set this value to false if you dont want TortoiseSVN to show icons for the shell context menu items. Set this value to true to show the icons again. If you dont want TortoiseSVN to show icons for the context menus in its own dialogs, set this value to false. The commit and log dialog use styling (e. g. bold, italic) in commit messages (see the section called Commit Log Messages for details). If you dont want to do this, set the value to false. This value contains the URL from which TortoiseSVN tries to download a text file to find out if there are updates available. This might be useful for company admins who dont want their users to update TortoiseSVN until they approve it. TortoiseSVN checks whether theres a new version available about once a week. If you dont want TortoiseSVN to do this check, set this value to false.

No comments:

Post a Comment