Per informazioni generali sulla mia domanda: svn diff solito un file binario che pensa è una recente risposta di overflow dello stack (svn diff: file contrassegnato come tipo binario) ha mostrato è possibile forzare un tipo MIME: Si noti che la risposta precedente è incompleta. si hanno anche per: Ora la mia nuova domanda è: posso impostare un valore predefinito, in modo che tutti i file vnd. google-earth. kmlxml futuri sono trattati come testo da svn Il Redbook appare in silenzio su questo argomento: svnbook. red-beanen1.2svn. advanced. props. html dicendo solo: Quali eccezioni sono queste eccezioni cotti nel codice svn, o accessibile la risposta dipende dal client svn che si sta utilizzando. Nel client ufficiale svn, l'opzione che si sta cercando è automatica Ambito. La versione TLDR è necessario aggiornare il vostro utente o di configurazione del sistema. impostare i enable-auto-props impostazione su Sì nella sezione miscellany, e creare una nuova sezione chiamata auto-props, che definisce i modelli che si desidera abbinare e le proprietà si sta cercando di impostare. Per il vostro esempio di file KML: Questo farà sì che quando si aggiunge un file. kml al repository, si avrà un tipo MIME di textplain e utilizzerà fine riga nativi per la piattaforma del file client. Binary e traduzione Nel più senso generale, Subversion gestisce i file binari con più garbo di CVS fa. Perché CVS utilizza RCS, può memorizzare solo successive copie complete di un file binario che cambia. Subversion, tuttavia, le differenze tra i file utilizzando un algoritmo di differenziazione binario, indipendentemente dal fatto che contengono dati testuali o binari. Ciò significa che tutti i file sono memorizzati in modo differenziale (compressi) nel repository. gli utenti CVS devono marcare i file binari con bandiere - kb per evitare che i dati vengano incomprensibili (a causa dell'espansione parola chiave e traduzioni line-fine). A volte dimenticano di fare questo. Subversion prende la via più paranoico. In primo luogo, non è mai effettua alcun tipo di parola chiave o la traduzione di fine riga a meno che non si chiede esplicitamente di farlo (vedi la sezione chiamata chiave di sostituzione e la sezione chiamata end-of-line le sequenze di caratteri per maggiori dettagli). Per impostazione predefinita, Subversion tratta tutti i dati dei file come stringhe di byte letterali, ei file vengono sempre archiviati nel repository in uno stato non tradotto. In secondo luogo, Subversion mantiene una nozione interna di se un file è di testo o dati binari, ma questa nozione è esistente solo nella copia di lavoro. Durante un aggiornamento svn. Subversion si esibirà merge contestuali su file di testo modificati localmente, ma non tenterà di farlo per i file binari. Per determinare se una fusione contestuale sia possibile, Subversion esamina la proprietà svn: mime-type di proprietà. Se il file non ha svn: mime-type di proprietà, o ha un tipo MIME che è testuale (ad esempio testo), Subversion assume è di testo. In caso contrario, Subversion assume il file è binario. Subversion aiuta anche gli utenti eseguendo un algoritmo binario di rilevamento nell'importazione svn e svn aggiungere comandi. Questi comandi fare una buona congettura e poi (forse) impostare un svn binario: mime-type di proprietà sul file da aggiungere. (Se Subversion indovina sbagliato, l'utente può sempre togliere a mano o modificare la proprietà.) Stai leggendo Controllo di Versione con Subversion (per Subversion 1.7), da Ben Collins-Sussman, Brian W. Fitzpatrick, e C. Michael Pilato. Questo lavoro è sotto la licenza v2.0 Licenza Creative Commons Attribution. Per leggere una copia della licenza visita il sito Creative Commons o inviare una lettera a Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, Stati Uniti d'America. Per inviare commenti, correzioni o altri contributi al testo, si prega di visitare svnbook. Properties Weve già coperto in dettaglio come Subversion memorizza e recupera varie versioni di file e directory nel suo repository. i capitoli sono stati dedicati a questo pezzo più fondamentale di funzionalità fornite dallo strumento. E se il supporto delle versioni fermato lì, Subversion sarebbe ancora completa dal punto di vista del controllo di versione. Ma non si ferma lì. Oltre alle versioni le directory e file, Subversion fornisce interfacce per aggiungere, modificare, e la rimozione dei metadati di versione su ciascun file e directory di versione. Ci riferiamo a questi metadati come proprietà. e possono essere pensati come tabelle a due colonne che mappa i nomi delle proprietà ai valori arbitrari collegati a ogni elemento nella copia di lavoro. In generale, i nomi ei valori delle proprietà possono essere quello che vuoi che siano, con il vincolo che i nomi devono contenere solo caratteri ASCII. E la parte migliore di queste proprietà è che anche loro, sono di versione, proprio come i contenuti testuali dei file. È possibile modificare, si impegnano, e annullare le modifiche di proprietà stessa facilità con cui è possibile presentare modifiche al contenuto. E l'invio e la ricezione di modifiche alle proprietà si verifica come parte del vostro tipico impegnare e di aggiornare operationsyou non ha a modificare i processi di base per accoglierli. Subversion ha riservato l'insieme delle proprietà cui nomi iniziano con svn: come propria. Mentre ci sono solo una manciata di tali proprietà in uso oggi, si dovrebbe evitare la creazione di proprietà personalizzate per le proprie esigenze cui nomi iniziano con questo prefisso. In caso contrario, si corre il rischio che una futura versione di Subversion crescerà il supporto per una funzione o un comportamento guidato da una proprietà con lo stesso nome, ma forse con una interpretazione completamente diversa. Proprietà appaiono altrove in Subversion, anche. Proprio come i file e le directory possono avere nomi di proprietà arbitrari e valori ad essi, ogni revisione nel suo complesso può avere proprietà arbitrarie che fanno riferimento ad esso. Gli stessi vincoli nomi leggibili applyhuman-e qualsiasi cosa-si-vogliono valori binari. La differenza principale è che le proprietà di revisione non sono di versione. In altre parole, se si modifica il valore di, o cancellare, una proprietà di revisione, non c'è nessun modo, nell'ambito delle funzionalità Sovvertimenti, di recuperare il valore precedente. Subversion non ha una politica particolare per quanto riguarda l'uso della proprietà. Si chiede solo che non si utilizzano nomi di proprietà che iniziano con il prefisso svn: come questo è lo spazio dei nomi che mette da parte per il proprio uso. E Subversion fa, infatti, utilizzare propertiesboth la varietà di versione e sotto controllo di versione. Alcune proprietà di versione hanno un significato speciale o effetti quando si trova su file e directory, o ospitano un particolare po 'di informazioni circa le revisioni su cui si trovano. Alcune proprietà di revisione vengono automaticamente collegati a revisioni di Sovvertimenti processo di commettere, e portano le informazioni relative alla revisione. La maggior parte di queste proprietà sono menzionati altrove in questo o in altri capitoli, come parte dei temi più generali a cui sono collegati. Per un elenco esaustivo di Sovvertimenti proprietà predefinite, consultare la sezione chiamata Subversion Proprietà nel capitolo 9, Subversion completa di riferimento. Mentre Subversion attribuisce automaticamente le proprietà (svn: Data svn:. Autore svn:.. Log e così via) per revisioni, esso non pretende da allora in poi l'esistenza di tali proprietà, e nemmeno si dovrebbe o gli strumenti utilizzati per interagire con il repository . proprietà di revisione possono essere eliminati a livello di codice o tramite il client (se consentito dai ganci repository) senza danneggiare Sovvertimenti capacità di funzionare. Così, quando la scrittura di script che operano sul tuo dati repository Subversion, non fare l'errore di credere che qualsiasi proprietà di revisione particolare esiste una revisione. In questa sezione, esamineremo il utilityboth per gli utenti di Subversion e per Subversion itselfof supporto proprietà. Youll conoscere i sottocomandi svn attinenti alla proprietà e come modifiche alle proprietà influenzano il flusso di lavoro di Subversion normale. Perché Proprietà Proprio come Subversion utilizza le proprietà per memorizzare le informazioni supplementari sui file, directory e revisioni che esso contenuti, si potrebbe anche trovare oggetti da essere di uso simile. Si potrebbe trovare utile avere un posto vicino ai dati di versione di appendere metadati personalizzati su tali dati. Diciamo che desidera per la progettazione di un sito web che ospita molte foto digitali e li visualizza con didascalie e un marcatore temporale. Ora, il set di foto è in continua evoluzione, così youd piace avere come gran parte di questo sito automatizzato possibile. Le foto possono essere piuttosto grandi, come avviene normalmente con siti di questa natura, si vuole fornire immagini in miniatura piccole per i visitatori del sito. Ora, è possibile ottenere questa funzionalità utilizzando i file tradizionali. Cioè, si può avere la image123.jpg e una squadra image123-thumbnail. jpg a fianco in una directory. Oppure, se si desidera mantenere il nome del file stesso, si potrebbe avere le miniature in una directory diversa, come ad esempio thumbnailsimage123.jpg. È anche possibile memorizzare le didascalie ei marcatori temporali in modo simile, magari separati dal file immagine originale. Ma il problema qui è che la vostra collezione di file moltiplica ad ogni nuova foto aggiunto al sito. Consideriamo ora lo stesso sito web schierato in un modo che fa uso di sovversioni proprietà del file. Immagina di avere un singolo file immagine, image123.jpg. con proprietà impostate su quel file che sono chiamato didascalia. il timbro della data. e anche delle miniature. Ora la directory di lavoro appare infatti molto più manageablein, sembra al browser casuale come se non ci sono altro che file di immagini in esso. Ma i vostri script di automazione conoscono meglio. Essi sanno che possono usare svn (o ancora meglio, possono usare il linguaggio Subversion bindingssee la sezione chiamata Utilizzando le API) per scavare le informazioni supplementari che il vostro sito ha bisogno di visualizzare senza dover leggere un file di indice o giocare percorso giochi di manipolazione . Mentre Subversion pone alcune restrizioni sui nomi e valori si utilizza per le proprietà, non è stato progettato per trasportare in modo ottimale i valori di proprietà di grandi dimensioni o grandi insiemi di proprietà su un determinato file o una directory. Subversion comunemente contiene tutti i nomi ei valori associati ad un singolo elemento in memoria, allo stesso tempo, che può causare operazioni prestazioni dannosi o non riuscite quando si usano molto grandi insiemi di proprietà immobiliari. Proprietà personalizzate di revisione sono anche spesso utilizzate. Un tale uso comune è una struttura il cui valore contiene un problema ID inseguitore a cui è associata la revisione, forse perché la modifica apportata nell'ambito di tale revisione corregge un bug depositata in questione inseguitore con tale ID. Altri usi includono appesi i nomi più amichevoli sul revisionit potrebbe essere difficile ricordare che la revisione 1935 era una revisione completamente testato. Ma se ci sono, per esempio, una proprietà test-risultati su quella revisione, con il valore di tutto passa. questo è informazioni significative di avere. E Subversion permette di fare facilmente questo tramite l'opzione --with-revprop del svn comando commit: Ricercabilità (o, perché no Beni) Per tutta la loro utilità, Subversion propertiesor, più precisamente, le interfacce disponibili per themhave una grave lacuna: mentre si tratta di una semplice questione di impostare una proprietà personalizzata, trovando che la proprietà poi è tutta una sfera diversa di cera. Cercando di individuare una proprietà di revisione personalizzata in genere comporta l'esecuzione di una passeggiata lineare attraverso tutte le revisioni del repository, chiedendo di ogni revisione, Avete la proprietà Im che cerca Utilizzare il --with-all-revprops opzione con il svn log comandi XML modalità di uscita per facilitare questa ricerca. Si noti la presenza dei testresults proprietà di revisione personalizzato nel seguente output: Cercando di trovare una proprietà di versione personalizzata è doloroso, troppo, e spesso comporta un propget svn ricorsiva in un intero copia di lavoro. Nella tua situazione, che potrebbe non essere così male come una passeggiata lineare di tutte le revisioni. Ma lascia certamente molto a desiderare in termini di prestazioni e probabilità di successo, soprattutto se l'ambito della ricerca richiederebbe una copia di lavoro dalla radice del repository. Per questo motivo, si potrebbe chooseespecially nella revisione alcune stanze Caseto è sufficiente aggiungere i metadati alle revisioni log dei messaggi utilizzando alcuni formattazione policy-driven (e forse a livello di codice forzata) che è stato progettato per essere rapidamente analizzato dall'uscita del svn log. E 'abbastanza comune vedere quanto segue in messaggi di log Subversion: Ma qui si trova ancora qualche disgrazia. Subversion doesnt ancora fornire un meccanismo di template messaggio di registro, che sarebbe andare un lungo cammino verso aiutare gli utenti ad essere coerenti con la formattazione del loro metadati revisione log-embedded. Manipolazione Proprietà Il programma svn permette un paio di modi per aggiungere o modificare le proprietà di file e directory. Per le proprietà con valori leggibili brevi, forse il modo più semplice per aggiungere una nuova proprietà è specificare il nome della proprietà e il valore nella riga di comando del sottocomando svn propset: Ma weve touting la flessibilità che Subversion offre per i vostri valori delle proprietà . E se avete intenzione di avere un testo multilinea, o anche binario, il valore della proprietà, probabilmente non si vuole fornire tale valore nella riga di comando. Così il sottocomando svn propset prende un --file opzione (-F) per specificare il nome di un file che contiene il nuovo valore della proprietà. Ci sono alcune restrizioni sui nomi che è possibile utilizzare per le proprietà. (.) A nome della proprietà deve iniziare con una lettera, due punti, o un carattere di sottolineatura () dopo che, è anche possibile utilizzare cifre, trattini (-) e punti (.). 13 Oltre al comando propset, il programma svn fornisce il comando propedit. Questo comando utilizza il programma di editor di configurazione (si veda la sezione di configurazione) per aggiungere o modificare le proprietà. Quando si esegue il comando, svn invoca il programma di editor di su un file temporaneo che contiene il valore corrente della proprietà (o che è vuota, se si sta aggiungendo una nuova proprietà). Quindi, basta modificare il valore nel programma di editor di fino a che non rappresenta il nuovo valore che si desidera memorizzare per la proprietà, salvare il file temporaneo, e quindi uscire dal programma di editor. Se Subversion rileva che youve effettivamente cambiato il valore attuale della proprietà, la volontà di accettare che il nuovo valore della proprietà. Se si esce il vostro editor senza apportare alcuna modifica, si verificherà nessuna modifica proprietà: Dobbiamo notare che, come con altri sottocomandi svn, quelle relative alla proprietà possono agire su più percorsi in una sola volta. Ciò consente di modificare le proprietà di un intero insieme di file con un unico comando. Per esempio, abbiamo potuto fare la seguente: Tutto di questa proprietà aggiunta e la modifica non è realmente molto utile se non puoi facilmente ottenere il valore della proprietà memorizzato. Così il programma svn fornisce due sottocomandi per visualizzare i nomi ei valori delle proprietà memorizzati su file e directory. Il comando svn proplist elencherà i nomi delle proprietà che esistono in un percorso. Una volta che si conoscono i nomi delle proprietà sul nodo, è possibile chiedere i singoli valori usando svn propget. Questo comando, dato un nome di proprietà e un percorso (o un insieme di percorsi), stampare il valore della proprietà nel flusso di output standard. C'è anche una variazione del comando proplist che elenca sia il nome e il valore per tutte le proprietà. È sufficiente fornire il (-v) l'opzione --verbose. L'ultimo sottocomando proprietà correlate è propdel. Dal momento che Subversion permette di memorizzare le proprietà con valori vuoti, non puoi rimuovere una proprietà del tutto utilizzando propedit svn o svn propset. Ad esempio, questo comando non produrrà l'effetto desiderato: È necessario utilizzare il sottocomando propdel per eliminare le proprietà del tutto. La sintassi è simile agli altri comandi di proprietà: Ricordati di queste proprietà non revisionate È possibile modificare tali, anche, utilizzando gli stessi sottocomandi svn che abbiamo appena descritto. È sufficiente aggiungere il parametro della riga di comando --revprop e specificare la revisione la cui proprietà si desidera modificare. Dal momento che le revisioni sono globali, non avete bisogno di specificare un percorso target per questi comandi di proprietà legate fino a quando ci si trova in una copia di lavoro del repository la cui proprietà di revisione che si desidera modificare. In caso contrario, si può semplicemente fornire l'URL di qualsiasi percorso nel repository di interesse (tra cui l'URL principale repositorys). Ad esempio, si potrebbe voler sostituire il messaggio di commit log di una revisione esistente. 14 Se la directory di lavoro corrente è parte di una copia di lavoro del repository, si può semplicemente eseguire il comando svn propset senza percorso di destinazione: Ma anche se si havent estratto un copia di lavoro da quel repository, è ancora possibile effettuare il cambio di proprietà fornendo l'URL principale repositorys: si noti che la possibilità di modificare queste proprietà non revisionate deve essere esplicitamente aggiunta dall'amministratore repository (si veda la sezione Commit correzione Messaggio di log). Ecco perché le proprietà arent di versione, per cui si corre il rischio di perdere le informazioni se arent attenti con le modifiche. L'amministratore del repository può impostare i metodi per proteggere contro queste perdite, e di default, la modifica delle proprietà non revisionate è disabilitata. Gli utenti dovrebbero, ove possibile, l'uso svn propedit invece di svn propset. Mentre il risultato finale dei comandi è identica, l'ex permetterà loro di vedere il valore corrente della proprietà che stanno per cambiare, che li aiuta a verificare che essi sono, infatti, fare il cambiamento che pensano che stanno facendo . Questo è particolarmente vero quando si modificano le proprietà non revisionate. Inoltre, è molto più facile da modificare i valori delle proprietà multilinea in un editor di testo rispetto alla riga di comando. Proprietà e il flusso di lavoro di Subversion Ora che si ha familiarità con tutti i sottocomandi svn attinenti alla proprietà, permette di vedere come le modifiche di proprietà influenzano il normale flusso di lavoro di Subversion. Come abbiamo accennato in precedenza, le proprietà di file e directory sono di versione, proprio come il contenuto del file. Come risultato, Subversion fornisce le stesse opportunità di mergingcleanly o con qualcun'altro conflictssomeone modifiche nel proprio. Come con i contenuti dei file, i cambiamenti di proprietà sono modifiche locali, rese permanenti solo quando li si impegnano al repository svn con commit. Le modifiche di proprietà possono anche essere facilmente cancellate, Toothe comando svn revert ripristinerà i file e le directory ai loro statescontents inediti, proprietà e tutti. Inoltre, è possibile ricevere informazioni interessanti sullo stato delle vostre proprietà di file e directory utilizzando i comandi svn status e svn diff. Si noti come i display di stato sottocomando M nella seconda colonna invece del primo. Questo perché abbiamo modificato le proprietà calcbutton. c. ma non il suo contenuto testuale. Se avessimo cambiato sia, avremmo visto M nella prima colonna, troppo. (Copriamo svn stato nella sezione chiamata Vedere una panoramica delle modifiche). Come con i contenuti dei file, le modifiche di proprietà locali possono entrare in conflitto con i cambiamenti registrati da qualcun altro. Se si aggiorna la directory di copia di lavoro e ricevere le modifiche alle proprietà di un oggetto di versione che si scontrano con le proprie, Subversion riporterà che l'oggetto è in uno stato di conflitto. Subversion creerà anche, nella stessa directory in cui l'oggetto in conflitto, un file con estensione. prej che contiene i dettagli del conflitto. Si dovrebbe esaminare il contenuto di questo file in modo da poter decidere come risolvere il conflitto. Fino a quando il conflitto è risolto, si vedrà un C nella seconda colonna del comando svn status per quell'oggetto, e tenta di commettere le modifiche locali non riuscirà. Per risolvere i conflitti di proprietà, semplicemente assicurarsi che le proprietà in conflitto contengano i valori che dovrebbero, e quindi utilizzare la determinazione svn comando --acceptworking per avvisare Subversion che è stato risolto il problema manualmente. Si potrebbe anche aver notato il modo non standard che Subversion mostra le differenze di proprietà. È comunque possibile utilizzare svn diff e reindirizzare la sua uscita per creare un file di patch utilizzabile. Il programma patch ignorerà proprietà patchesas una regola, ignora qualsiasi rumore che riesco a capire. Ciò, purtroppo, significa che per applicare pienamente una patch generata dal diff svn utilizzando patch. eventuali modifiche di proprietà dovranno essere applicate a mano. Subversion 1.7 migliora questa situazione in due modi. In primo luogo, il suo display non standard delle differenze di proprietà è il miglioramento di almeno macchina readablean sopra la visualizzazione delle proprietà nelle versioni precedenti alla 1.7. Ma Subversion 1.7 introduce anche il sottocomando cerotto svn, progettato specificamente per gestire le informazioni complementari che svn diff di uscita s può trasportare, l'applicazione di tali modifiche alla copia di lavoro di Subversion. Di rilevanza specifica al nostro tema, le differenze di proprietà presenti nei file di patch generati da svn diff in Subversion 1.7 o meglio possono essere applicate automaticamente a una copia di lavoro da parte del comando patch svn. Per maggiori informazioni su di patch svn. vedi cerotto svn nel Capitolo 9, Subversion riferimento completo. Theres unica eccezione a come i cambiamenti di proprietà sono riportati da svn diff. modifiche al Sovvertimenti svn speciale: mergeinfo propertyused per tenere traccia delle informazioni relative unioni che sono state eseguite in repositoryare descritto in modo più leggibile. Questo è molto utile per gli esseri umani che devono leggere quelle descrizioni. Ma serve anche a causare programmi (incluso il cerotto SVN) patch per saltare queste descrizioni cambiano come rumore. Questo potrebbe sembrare come un insetto, ma in realtà isnt perché questa proprietà è destinata ad essere gestita unicamente dal sottocomando svn merge. Per informazioni sul monitoraggio unione, vedere il Capitolo 4, ramificazione e la fusione. Immobili in automatico di impostazione sono una potente funzionalità di Subversion, in qualità di componenti chiave di molte caratteristiche di Subversion discusse altrove in questo e altri diff chapterstextual e si fondono il supporto, la sostituzione di parole chiave, traduzione ritorno a capo, e così via. Ma per ottenere il beneficio completo di proprietà, devono essere impostati sui file e le directory di destra. Purtroppo, questo passo può essere facilmente dimenticata nella routine delle cose, soprattutto perché non riuscendo a impostare una proprietà pretende di solito comporta un evidente errore (almeno rispetto a, diciamo, non riuscendo a aggiungere un file al controllo di versione). Per aiutare le proprietà applicate ai luoghi che ne hanno bisogno, Subversion fornisce un paio di caratteristiche semplici ma utili. Ogni volta che si introduce un file al controllo di versione utilizzando i comandi di importazione svn add o svn, Subversion cerca di aiutare impostando automaticamente alcune proprietà di file comuni. In primo luogo, sui sistemi operativi i cui file system supportano un po permesso di esecuzione, Subversion imposta automaticamente la proprietà svn: eseguibile proprietà su file aggiunti o importati i cui bit di esecuzione è abilitata. (Si veda la sezione Executability file più avanti in questo capitolo per più su questa proprietà.) In secondo luogo, Subversion cerca di determinare i file di tipo MIME. Se youve configurato un parametro di configurazione MIME-types-files runtime, Subversion cercherà di trovare una mappatura tipo MIME in quel file per l'estensione dei file. Se trova una tale mappatura, che fisserà i file svn: mime-type di proprietà per il tipo MIME ha trovato. Se nessun file di mapping è configurato, o nessun mapping per l'estensione dei file potrebbe essere trovato, Subversion ricadere algoritmi euristici per determinare il tipo di file MIME. A seconda di come è costruito, Subversion 1.7 può fare uso di file di librerie di scansione 15 per rilevare un tipo di file in base al suo contenuto. In mancanza di tutto il resto, Subversion impiegherà il proprio euristica molto di base per determinare se il file contiene contenuti non testuale. Se è così, si imposta automaticamente la proprietà svn: mime-type su quel file a applicationoctet-stream (il generico questo è un insieme di bytes tipo MIME). Naturalmente, se Subversion indovina in modo errato, o se si desidera impostare la proprietà svn: mime-type di proprietà a qualcosa di più preciseperhaps imagepng o applicationx-shockwave-flash è sempre possibile rimuovere o modificare quella proprietà. (Per ulteriori informazioni su Sovvertimenti uso di tipi MIME, consultare la sezione chiamata file di contenuto di tipo più avanti in questo capitolo.) UTF-16 è comunemente usato per codificare i file il cui contenuto semantico è testuale in natura, ma la codifica si fa pesante uso di byte che sono al di fuori del range tipico di byte di caratteri ASCII. Come tale, Subversion tenderà a classificare tali file come file binari, con grande dispiacere degli utenti che desiderano differenziazione line-based e la fusione, la sostituzione di parole chiave, e altri comportamenti di quei file. Subversion fornisce anche, attraverso il suo sistema di configurazione runtime (si veda la sezione Configurazione di Runtime Area), una funzione di impostazione di proprietà automatica più flessibile che permette di creare mappature di modelli di nomi di file per i nomi ei valori delle proprietà. Ancora una volta, questi mapping influenzano aggiunge e le importazioni, e non può che ignorare il tipo di decisione di default MIME fatta da Subversion durante queste operazioni, ma può anche impostare ulteriori proprietà di Subversion o personalizzati, troppo. Ad esempio, è possibile creare una mappatura che dice che ogni volta che si aggiunge filesones JPEG cui nomi corrispondono al modello. jpg Subversion dovrebbe impostare automaticamente la proprietà svn: mime-type su quei file per imagejpeg. O forse tutti i file che corrispondono cpp dovrebbero avere svn: eol-style impostata nativo. e svn: parole chiave con ID. supporto proprietà automatica è forse lo strumento di proprietà legate più comodo nella casella degli strumenti di Subversion. Vedere la sezione chiamata Config per informazioni sulla configurazione di questo sostegno. Gli amministratori Subversion comunemente chiedono se è possibile configurare, sul lato server, un insieme di definizioni di proprietà che tutti i clienti che collegano verranno considerare automaticamente quando si opera sulle copie estratti dal server di lavoro. Purtroppo, Subversion doesnt offrono questa funzione. Gli amministratori possono utilizzare script di aggancio per convalidare che le proprietà aggiunti e modificati sui file e le directory corrispondono gli amministratori hanno preferito politiche, rifiutando commit che sono non conformi in questo modo. (Si veda la sezione Implementazione Repository Ganci per di più su script hook). Ma non c'è nessun modo per dettare automaticamente tali preferenze ai clienti Subversion in anticipo. 13 Se sei familiarità con XML, questo è praticamente il sottoinsieme ASCII della sintassi per nome XML. 14 errori di ortografia, di fissaggio trucchi grammaticali, e just-plain-erroneità in commettere messaggi di log è forse il caso d'uso più comune per l'opzione --revprop. 15 Attualmente, libmagic è la libreria di supporto utilizzato per realizzare this. This dialogo consente di specificare la lingua preferita, e le impostazioni specifiche Subversion. Seleziona la lingua dell'interfaccia utente. Naturalmente, è necessario installare il pacchetto lingua corrispondente prima di ottenere un altro lingua dell'interfaccia utente rispetto a quello inglese predefinito. Controlla aggiornamenti TortoiseSVN si metterà in contatto il suo sito di download periodicamente per vedere se c'è una nuova versione del programma disponibile. Se c'è mostrerà un link di notifica nella finestra di commettere. Utilizzare Verifica subito se si vuole una risposta subito. La nuova versione non sarà scaricato semplicemente visualizza una finestra di informazioni che indica che la nuova versione è disponibile. TortoiseSVN ha tre suoni personalizzati che sono installati di default. È possibile selezionare diversi suoni (o girare questi suoni fuori completamente) utilizzando il Pannello di controllo di Windows. Configurare è una scorciatoia per il Pannello di controllo. Utilizzare Aero finestre di dialogo In Windows Vista e versioni successive questo controlla se le finestre di dialogo usano lo stile Aero. In Windows 7 è possibile creare una libreria in cui copie di lavoro dei gruppi che sono sparsi in vari punti del sistema. Globale ignorare modello globale ignorare i modelli vengono utilizzati per evitare che i file senza versione da presentarsi ad esempio Nella finestra di dialogo commettere. File corrispondenti ai modelli sono anche ignorati da un'importazione. Ignora i file o le directory digitando i nomi o estensioni. I modelli sono separate da spazi ad esempio bin obj. bak..jar. Ttmp. Questi modelli non dovrebbero includere separatori di percorso. Si noti anche che non vi è alcun modo per distinguere tra file e directory. Leggere la sezione Pattern Matching in liste ignora per ulteriori informazioni sulla sintassi pattern-matching. Si noti che i modelli di ignorare specificati qui influirà anche altri client di Subversion in esecuzione sul PC, compreso il client a riga di comando. Se si utilizza il file di configurazione di Subversion per impostare un modello globale ignora, sarà sostituire le impostazioni effettuate qui. Il file di configurazione di Subversion si accede usando il comando Modifica, come descritto di seguito. Questo modello ignora avrà effetto su tutti i vostri progetti. Non è di versione, in modo da non influenzare gli altri utenti. Al contrario si può anche utilizzare il svn di versione: ignorare o svn: global-ignora proprietà per escludere file o directory dal controllo di versione. Leggere la sezione chiamata Ignorare file e directory per ulteriori informazioni. Impostare le date di file per l'ultima volta commettere Questa opzione dice TortoiseSVN per impostare le date di file per l'ultima commit quando si fa un checkout o un aggiornamento. In caso contrario, TortoiseSVN utilizzerà la data corrente. Se si sta sviluppando un software in genere è meglio usare la data corrente perché i sistemi di compilazione normalmente guardare la data francobolli per decidere quali file hanno bisogno di compilazione. Se si utilizza l'ultima impegnano tempo e ripristinare una revisione del file più vecchio, il progetto non può compilare come ci si aspetta che. file di configurazione di Subversion Utilizzare Modifica per modificare direttamente il file di configurazione di Subversion. Alcune impostazioni non possono essere modificate direttamente da TortoiseSVN, e devono essere impostati qui invece. Per ulteriori informazioni sul file di configurazione di Subversion vedere l'area di configurazione runtime. La sezione sulla Ambito automatica è di particolare interesse, e che si configura qui. Si noti che Subversion può leggere le informazioni di configurazione da diversi luoghi, e avete bisogno di sapere quale ha la priorità. Fare riferimento alla configurazione e il Registro di Windows per saperne di più. Applicare modifiche locali a svn: gli esterni quando l'aggiornamento di questa opzione dice TortoiseSVN di applicare sempre le modifiche locali per la svn: gli esterni quando l'aggiornamento della copia di lavoro. Impostazioni menu contestuale Questa finestra di dialogo consente di configurare alcuni dei TortoiseSVNs finestre di dialogo nel modo che piace. numero predefinito di messaggi di log Limita il numero di messaggi di log che TortoiseSVN recupera quando si seleziona prima TortoiseSVN Mostra registro utile per le connessioni server lento. È sempre possibile utilizzare Mostra tutto o Avanti 100 per ottenere più messaggi. Font dei messaggi di log di selezionare il tipo di font e la dimensione utilizzata per visualizzare il messaggio di log in sé nel riquadro centrale della finestra di log di revisione, e durante la composizione di messaggi di log nella finestra di commit. Data breve formato di ora in messaggi di log Se i messaggi lunghi standard di usare troppo spazio sullo schermo utilizzare il formato breve. Fare doppio click nella lista del registro per confrontare con la versione precedente Se vi trovate spesso da soli il confronto revisioni nel riquadro superiore della finestra di log, è possibile utilizzare questa opzione per consentire che l'azione sul doppio clic. E non è abilitato per default, perché andare a prendere il diff è spesso un processo lungo, e molte persone preferiscono evitare l'attesa dopo un doppio click accidentale, che è il motivo per cui questa opzione non è abilitata di default. TortoiseSVN può chiudere automaticamente tutti i dialoghi di avanzamento quando l'azione è terminata senza errori. Questa impostazione consente di selezionare le condizioni per la chiusura delle finestre di dialogo. L'impostazione di default (consigliata) è chiudere manualmente, che consente di rivedere tutti i messaggi e verificare quanto è successo. Tuttavia, si può decidere che si desidera ignorare alcuni tipi di messaggio e hanno la finestra di dialogo si chiudono automaticamente se non ci sono cambiamenti critici. 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. per esempio. 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