Distinzione tra Stato e Aggiornamento

In Subversion, we've tried to erase a lot of the confusion between the cvs status and cvs update commands.

In Subversion, si è cercato di eliminare la grossa confusione tra i comandi cvs status e cvs update.

The cvs status command has two purposes: first, to show the user any local modifications in the working copy, and second, to show the user which files are out-of-date. Unfortunately, because of CVS's hard-to-read status output, many CVS users don't take advantage of this command at all. Instead, they've developed a habit of running cvs update or cvs -n update to quickly see their changes. If users forget to use the -n option, this has the side effect of merging repository changes they may not be ready to deal with.

Il comando cvs status ha due scopi: primo, mostrare all'utente ogni modifica locale nella copia di lavoro, e secondo, mostrare all'utente quali file sono non aggiornati. Sfortunatamente, dato che la visualizzazione di CVS è difficile da leggere, molti utenti CVS non ricevono affatto vantaggio da questo comando. Invece, hanno sviluppato l'abitudine di eseguire cvs update o cvs -n update per vedere velocemente i loro cambiamenti. Se gli utenti dimenticano di utilizzare l'opzione -n, questo ha l'effetto secondario di fondere cambiamenti del repository dei quali potrebbero non essere pronti ad occuparsi.

With Subversion, we've tried to remove this muddle by making the output of svn status easy to read for both humans and parsers. Also, svn update only prints information about files that are updated, not local modifications.

Con Subversion, si è provato a rimuovere questa confusione rendendo la visualizzazione di svn status facile da leggere sia per le persone che per i parser. Inoltre, svn update visualizza solamente informazioni sui file che sono stati aggiornati, non le modifiche locali.

Stato

svn status prints all files that have local modifications. By default, the repository is not contacted. While this subcommand accepts a fair number of options, the following are the most commonly used ones:

svn status stampa tutti i file che hanno modifiche locali. In modo predefinito, il repository non viene contattato. Mentre questo sottocomando accetta un bel numero di opzioni, le seguenti sono quelle maggiormente utilizzate:

-u

Contact the repository to determine, and then display, out-of-dateness information.

Contatta il repository per determinare, e poi mostrare, informazioni relative allo stato di aggiornamento.

-v

Show all entries under version control.

Mostra tutte le voci sotto controllo di versione.

-N

Run non-recursively (do not descend into subdirectories).

Esecuzione non ricorsiva (non discende all'interno delle sottodirectory).

The status command has two output formats. In the default short format, local modifications look like this:

Il comando status ha due formati di visualizzazione. Nel formato «corto» predefinito, le modifiche locali si presentano così:

$ svn status
M      foo.c
M      bar/baz.c

If you specify the --show-updates (-u) switch, a longer output format is used:

Se si specifica l'opzione --show-updates (-u), viene utilizzato un formato esteso:

$ svn status -u
M            1047   foo.c
       *     1045   faces.html
       *            bloo.png
M            1050   bar/baz.c
Status against revision:   1066

In this case, two new columns appear. The second column contains an asterisk if the file or directory is out-of-date. The third column shows the working-copy's revision number of the item. In the example above, the asterisk indicates that faces.html would be patched if we updated, and that bloo.png is a newly added file in the repository. (The absence of any revision number next to bloo.png means that it doesn't yet exist in the working copy.)

In questo caso, appaiono due nuove colonne. La seconda colonna contiene un asterisco se il file o la directory non sono aggiornati. La terza colonna mostra il numero di revisione della copia di lavoro dell'elemento. Nell'esempio sopra, l'asterisco indica che faces.html dovrebbe essere modificato se lo aggiorniamo, e che bloo.png è un file appena aggiunto al repository. (L'assenza di ogni numero di revisione accanto a bloo.png significa che non esiste ancora nella copia di lavoro.)

Lastly, here's a quick summary of the most common status codes that you may see:

Infine, ecco qui un sommario veloce dei codici di stato più comuni che si possono vedere:

A    Resource is scheduled for Addition
D    Resource is scheduled for Deletion
M    Resource has local Modifications
C    Resource has Conflicts (changes have not been completely merged
       between the repository and working copy version)
X    Resource is eXternal to this working copy (may come from another
       repository).  See sezione chiamata «svn:externals»
?    Resource is not under version control
!    Resource is missing or incomplete (removed by another tool than
       Subversion)
A    Risorsa pianificata per aggiunta
D    Risorsa pianificata per eliminazione
M    Risorsa con modifiche locali
C    Risorsa con conflitti (i cambiamenti non sono stati completamenti fusi
       tra il repository e la versione della copia di lavoro)
X    Risorsa esterna a questa copia di lavoro (può provenire da un altro
       repository).  Vedere sezione chiamata «svn:externals»
?    Risorsa non sotto controllo di versione
!    Risorsa mancante o incompleta (rimossa da uno strumento diverso da
       Subversion)

For a more detailed discussion of svn status, see sezione chiamata «svn status».

Per una discussione maggiormente dettagliata su svn status, vedere sezione chiamata «svn status».

Update

svn update updates your working copy, and only prints information about files that it updates.

svn update aggiorna la propria copia locale, e stampa informazioni solamente sui file che aggiorna.

Subversion has combined the CVS P and U codes into just U. When a merge or conflict occurs, Subversion simply prints G or C, rather than a whole sentence about it.

Subversion ha unito i codici CVS P e U nel codice U. Quando si verificano una unione o un conflitto, Subversion semplicemente stampa G o C, piuttosto che un'intera frase su di essi.

For a more detailed discussion of svn update, see sezione chiamata «Aggiornare la propria copia di lavoro».

Per una discussione maggiormente dettagliata su svn update, vedere sezione chiamata «Aggiornare la propria copia di lavoro».