svn diff — Mostra le differenze tra due percorsi.
diff [-r N[:M]] [TARGET[@REV]...]
diff [-r N[:M]] --old OLD-TGT[@OLDREV] [--new NEW-TGT[@NEWREV]] [PATH...]
diff OLD-URL[@OLDREV] NEW-URL[@NEWREV]
Display the differences between two paths. The three different ways you can use svn diff are:
Mostra le differenze tra due percorsi. I tre modi differenti in cui si può usare svn diff sono:
svn diff [-r N[:M]] [--old OLD-TGT] [--new
NEW-TGT] [PATH...] displays the differences
between OLD-TGT
and
NEW-TGT
. If
PATH
s are given, they are
treated as relative to OLD-TGT
and NEW-TGT
and the output is
restricted to differences in only those paths.
OLD-TGT
and
NEW-TGT
may be working copy
paths or
URL
[@
REV
]
.
OLD-TGT
defaults to the current
working directory and NEW-TGT
defaults to OLD-TGT
.
N
defaults to
BASE
or, if
OLD-TGT
is a URL, to
HEAD
. M
defaults to the current working version or, if
NEW-TGT
is a URL, to
HEAD
. svn diff -r N
sets the revision of OLD-TGT
to
N
, svn diff -r
N:M also sets the revision of
NEW-TGT
to
M
.
svn diff [-r N[:M]] [--old OLD-TGT] [--new
NEW-TGT] [PATH...] mostra le differenze
tra OLD-TGT
e
NEW-TGT
. Se sono forniti i
PATH
, sono trattati come
relativi a OLD-TGT
e NEW-TGT
e l'uscita sono
limitati alle differenze solo in questi percorsi.
OLD-TGT
e
NEW-TGT
possono essere percorsi di una
copia di lavoro o
URL
[@
REV
]
.
Il valore predefinito per OLD-TGT
è
la copia di lavoro corrente e per
NEW-TGT
è OLD-TGT
.
Il valore predefinito per N
è
BASE
oppure HEAD
, se
OLD-TGT
è un URL.
Il valore predefinito per M
è la copia di lavoro corrente oppure HEAD
, se
NEW-TGT
è un URL.
svn diff -r N
imposta la revisione di OLD-TGT
a
N
, svn diff -r
N:M imposta anche la revisione di
NEW-TGT
a
M
.
svn diff -r N:M URL is shorthand for svn diff -r N:M --old=URL --new=URL.
svn diff -r N:M URL è l'abbreviazione per svn diff -r N:M --old=URL --new=URL.
svn diff [-r N[:M]] URL1[@N] URL2[@M] is shorthand for svn diff [-r N[:M]] --old=URL1 --new=URL2.
svn diff [-r N[:M]] URL1[@N] URL2[@M] è l'abbreviazione per svn diff [-r N[:M]] --old=URL1 --new=URL2.
If TARGET
is a URL, then
revs N and M can be given either via the
--revision
or by using
“@” notation as described earlier.
Se TARGET
è un URL,
allora revisioni N e M possono essere indicati sia con
--revision
o usando la notazione
«@» come descritto prima.
If TARGET
is a working copy
path, then the --revision
switch
means:
Se TARGET
è un percorso di una copia
di lavoro, allora l'opzione --revision
significa:
--revision N:M
The server compares
TARGET
@N
and
TARGET
@M
.
Il server compara
TARGET
@N
e
TARGET
@M
.
--revision N
The client compares
TARGET
@N
against working copy.
Il cliente compara
TARGET
@N
contro la copia di lavoro.
--revision
),
(nessuna --revision
)
The client compares base and working copies of
TARGET
.
Il cliente compara base e copia di lavoro di
TARGET
.
If the alternate syntax is used, the server compares
URL1
and
URL2
at revisions
N
and
M
respectively. If either
N
or
M
are omitted, a value of
HEAD
is assumed.
Se viene usata la sintassi alternativa, il server compara
URL1
e
URL2
alla revisione
N
e
M
rispettivamente. Se
N
o
M
sono omessi, si assume il valore di
HEAD
.
By default, svn diff ignores the
ancestry of files and merely compares the contents of the
two files being compared. If you use
--notice-ancestry
, the ancestry of the
paths in question will be taken into consideration when
comparing revisions (that is, if you run svn
diff on two files with identical contents but
different ancestry you will see the entire contents of the
file as having been removed and added again).
Come comportamento predefinito, svn diff ignora
l'ascendenza dei file e compara soltanto i contenuti dei due
file comparati. Se si usa l'opzione
--notice-ancestry
, l'ascendenza dei percorsi
in questione sarà presa in considerazione durante la comparazione
delle revisioni
(proprio così, se si esegue svn
diff su due file con contenuti identici ma
con ascendenza diversa si vedrà che tutti i contenuti saranno
prima rimossi e poi di nuovo aggiunti).
For obtaining differences against anything but
BASE
revision in your working copy.
Per avere le differenze riguardo qualsiasi cosa tranne la revisione
BASE
della propria copia di lavoro.
--revision (-r) REV --old OLD-TARGET --new NEW-TARGET --extensions (-x) "ARGS" --non-recursive (-N) --diff-cmd CMD --notice-ancestry --username USER --password PASS --no-auth-cache --non-interactive --no-diff-deleted --config-dir DIR
Compare BASE
and your working copy
(one of the most popular uses of svn
diff):
Compara BASE
e la propria copia di lavoro
(uno degli usi più popolari di svn
diff):
$ svn diff COMMITTERS Index: COMMITTERS =================================================================== --- COMMITTERS (revision 4404) +++ COMMITTERS (working copy) …
See how your working copy's modifications compare against an older revision:
Vedere come le modifiche della propria copia di lavoro comparano contro una revisione più vecchia:
$ svn diff -r 3900 COMMITTERS Index: COMMITTERS =================================================================== --- COMMITTERS (revision 3900) +++ COMMITTERS (working copy) …
Compare revision 3000 to revision 3500 using “@” syntax:
Compara la revisione 3000 con la revisione 3500 usando la sintassi «@»:
$ svn diff http://svn.collab.net/repos/svn/trunk/COMMITTERS@3000 http://svn.collab.net/repos/svn/trunk/COMMITTERS@3500 Index: COMMITTERS =================================================================== --- COMMITTERS (revision 3000) +++ COMMITTERS (revision 3500) …
Compare revision 3000 to revision 3500 using range notation (you only pass the one URL in this case):
Compara la revisione 3000 con la revisione 3500 usando la notazione intervallo (in questo caso si passa solamente un URL)
$ svn diff -r 3000:3500 http://svn.collab.net/repos/svn/trunk/COMMITTERS Index: COMMITTERS =================================================================== --- COMMITTERS (revision 3000) +++ COMMITTERS (revision 3500)
Compare revision 3000 to revision 3500 of all files in
trunk
using range notation:
Compara la revisione 3000 con la revisione 3500 di tutti i file nel
trunk
usando la notazione intervallo:
$ svn diff -r 3000:3500 http://svn.collab.net/repos/svn/trunk
Compare revision 3000 to revision 3500 of only three
files in trunk
using range
notation:
Compara la revisione 3000 con la revisione 3500 di soli tre
file nel trunk
usando la notazione intervallo:
$ svn diff -r 3000:3500 --old http://svn.collab.net/repos/svn/trunk COMMITTERS README HACKING
If you have a working copy, you can obtain the differences without typing in the long URLs:
Se si ha una copia di lavoro, si può verificare le differenze senza digitare le URL lunghe:
$ svn diff -r 3000:3500 COMMITTERS Index: COMMITTERS =================================================================== --- COMMITTERS (revision 3000) +++ COMMITTERS (revision 3500)
Use --diff-cmd
CMD
-x
to
pass arguments directly to the external diff
program
Utilizzare --diff-cmd
CMD
-x
per
passare argomenti direttamente al programma diff
esterno
$ svn diff --diff-cmd /usr/bin/diff -x "-i -b" COMMITTERS Index: COMMITTERS =================================================================== 0a1,2 > This is a test >