dpkg (1.18.25) stretch; urgency=medium
[dpkg] / man / dpkg-mergechangelogs.man
1 .\" dpkg manual page - dpkg-mergechangelogs(1)
2 .\"
3 .\" Copyright © 2009-2010 Raphaël Hertzog <hertzog@debian.org>
4 .\"
5 .\" This is free software; you can redistribute it and/or modify
6 .\" it under the terms of the GNU General Public License as published by
7 .\" the Free Software Foundation; either version 2 of the License, or
8 .\" (at your option) any later version.
9 .\"
10 .\" This is distributed in the hope that it will be useful,
11 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
12 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 .\" GNU General Public License for more details.
14 .\"
15 .\" You should have received a copy of the GNU General Public License
16 .\" along with this program. If not, see <https://www.gnu.org/licenses/>.
17 .
18 .TH dpkg\-mergechangelogs 1 "%RELEASE_DATE%" "%VERSION%" "dpkg suite"
19 .nh
20 .SH NAME
21 dpkg\-mergechangelogs \- 3-way merge of debian/changelog files
22 .
23 .SH SYNOPSIS
24 .B dpkg\-mergechangelogs
25 .RI [ option "...] " old " " new-a " " new-b " [" out ]
26 .
27 .SH DESCRIPTION
28 .P
29 This program will use the 3 provided versions of the Debian changelog to
30 generate a merged changelog file. The resulting changelog is stored
31 in the file \fIout\fP or output to the standard output if that parameter is
32 not given.
33 .P
34 Each entry is identified by its version number and they are assumed to
35 be not conflicting, they are simply merged in the right order (by
36 decreasing version number). When \fB\-\-merge\-prereleases\fP is used, the
37 part of the version number after the last tilde is dropped so that
38 1.0\-1~exp1 and 1.0\-1~exp5 are considered to be the same entry. When the
39 same version is available in both \fInew-a\fP and \fInew-b\fP, a standard
40 line-based 3-way merge is attempted (provided that the module
41 Algorithm::Merge is available — it's part of the package
42 libalgorithm\-merge\-perl — otherwise you get a global conflict on the
43 content of the entry).
44 .
45 .SH OPTIONS
46 .TP
47 .BR \-m ", " \-\-merge\-prereleases
48 Drop the part after the last tilde in the version number when doing
49 version comparison to identify if two entries are supposed to be
50 the same or not.
51 .sp
52 This is useful when you keep using the same changelog entry but you
53 increase its version number regularly. For instance, you might have
54 2.3\-1~exp1, 2.3\-1~exp2, ... until the official release 2.3\-1 and they
55 are all the same changelog entry that has evolved over time.
56 .TP
57 .B \-\-help
58 Show the usage message and exit.
59 .TP
60 .B \-\-version
61 Show the version and exit.
62 .
63 .SH LIMITATIONS
64 .P
65 Anything that is not parsed by Dpkg::Changelog is lost during the merge.
66 This might include stuff like vim modelines, comments which were not
67 supposed to be there, etc.
68 .
69 .SH INTEGRATION WITH GIT
70 .P
71 If you want to use this program to merge Debian changelog files in a git
72 repository, you have first to register a new merge driver in
73 \fB.git/config\fP or \fB~/.gitconfig\fP:
74 .P
75 [merge "dpkg\-mergechangelogs"]
76 name = debian/changelog merge driver
77 driver = dpkg\-mergechangelogs \-m %O %A %B %A
78 .P
79 Then you have to setup the merge attribute for the debian/changelog file
80 either in \fB.gitattributes\fP in the repository itself, or in
81 \fB.git/info/attributes\fP:
82 .P
83 debian/changelog merge=dpkg\-mergechangelogs