Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Version Control with Subversion phần 8 pps
Nội dung xem thử
Mô tả chi tiết
…
When you're concatenating the results of multiple calls to the log command, you may want to
use the --incremental option. svn log normally prints out a dashed line at the beginning of
a log message, after each subsequent log message, and following the final log message. If
you ran svn log on a range of two revisions, you would get this:
$ svn log -r 14:15
------------------------------------------------------------------------
r14 | …
------------------------------------------------------------------------
r15 | …
------------------------------------------------------------------------
However, if you wanted to gather 2 non-sequential log messages into a file, you might do
something like this:
$ svn log -r 14 > mylog
$ svn log -r 19 >> mylog
$ svn log -r 27 >> mylog
$ cat mylog
------------------------------------------------------------------------
r14 | …
------------------------------------------------------------------------
------------------------------------------------------------------------
r19 | …
------------------------------------------------------------------------
------------------------------------------------------------------------
r27 | …
------------------------------------------------------------------------
You can avoid the clutter of the double dashed lines in your output by using the incremental
option:
$ svn log --incremental -r 14 > mylog
$ svn log --incremental -r 19 >> mylog
$ svn log --incremental -r 27 >> mylog
$ cat mylog
------------------------------------------------------------------------
r14 | …
------------------------------------------------------------------------
r19 | …
------------------------------------------------------------------------
r27 | …
The --incremental option provides similar output control when using the --xml option.
Subversion Complete Reference
238
If you run svn log on a specific path and provide a specific revision and get no
output at all
$ svn log -r 20 http://svn.red-bean.com/untouched.txt
------------------------------------------------------------------------
That just means that the path was not modified in that revision. If you log from the
top of the repository, or know the file that changed in that revision, you can specify
it explicitly:
$ svn log -r 20 touched.txt
------------------------------------------------------------------------
r20 | sally | 2003-01-17 22:56:19 -0600 (Fri, 17 Jan 2003) | 1 line
Made a change.
------------------------------------------------------------------------
Subversion Complete Reference
239
Name
svn merge — Apply the differences between two sources to a working copy path.
Synopsis
svn merge [-c M | -r N:M] SOURCE[@REV] [WCPATH]
svn merge sourceURL1[@N] sourceURL2[@M] [WCPATH]
svn merge sourceWCPATH1@N sourceWCPATH2@M [WCPATH]
Description
In the first and second forms, the source paths (URLs in the first form, working copy paths in
the second) are specified at revisions N and M. These are the two sources to be compared.
The revisions default to HEAD if omitted.
The -c M option is equivalent to -r N:M where N = M-1. Using -c -M does the reverse: -r
M:N where N = M-1.
In the third form, SOURCE can be a URL or working copy item, in which case the corresponding
URL is used. This URL, at revisions N and M, defines the two sources to be compared.
WCPATH is the working copy path that will receive the changes. If WCPATH is omitted, a default
value of “.” is assumed, unless the sources have identical basenames that match a file within
“.”: in which case, the differences will be applied to that file.
Unlike svn diff, the merge command takes the ancestry of a file into consideration when performing a merge operation. This is very important when you're merging changes from one
branch into another and you've renamed a file on one branch but not the other.
Alternate Names
None
Changes
Working copy
Accesses Repository
Only if working with URLs
Options
--revision (-r) REV
--change (-c) REV
--non-recursive (-N)
--quiet (-q)
--force
--dry-run
--diff3-cmd CMD
--extensions (-x) ARG
Subversion Complete Reference
240