1 # dpkg manual page - dpkg-mergechangelogs(1)
3 # Copyright © 2009-2010 Raphaël Hertzog <hertzog@debian.org>
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.
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.
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/>.
22 dpkg-mergechangelogs - 3-way merge of debian/changelog files
26 B<dpkg-mergechangelogs>
27 [I<option>...] I<old> I<new-a> I<new-b> [I<out>]
31 This program will use the 3 provided versions of the Debian changelog to
32 generate a merged changelog file. The resulting changelog is stored
33 in the file I<out> or output to the standard output if that parameter is
36 Each entry is identified by its version number and they are assumed to
37 be not conflicting, they are simply merged in the right order (by
38 decreasing version number). When B<--merge-prereleases> is used, the
39 part of the version number after the last tilde is dropped so that
40 1.0-1~exp1 and 1.0-1~exp5 are considered to be the same entry. When the
41 same version is available in both I<new-a> and I<new-b>, a standard
42 line-based 3-way merge is attempted (provided that the module
43 Algorithm::Merge is available — it's part of the package
44 libalgorithm-merge-perl — otherwise you get a global conflict on the
45 content of the entry).
51 =item B<--merge-unreleased>
53 Ignore the version number when the entries are marked as B<UNRELEASED>
56 This is useful when you have diverging development for versions that have
57 not yet been released. For instance 2.1-1 is released, then development
58 happens for the new 2.2-1 and then for 2.3-1, where it makes sense to just
59 end with a coalesced entry for 2.3-1 including all the development done in
62 =item B<-m>, B<--merge-prereleases>
64 Drop the part after the last tilde in the version number when doing
65 version comparison to identify if two entries are supposed to be
68 This is useful when you keep using the same changelog entry but you
69 increase its version number regularly. For instance, you might have
70 2.3-1~exp1, 2.3-1~exp2, ... until the official release 2.3-1 and they
71 are all the same changelog entry that has evolved over time.
75 Show the usage message and exit.
79 Show the version and exit.
89 Sets the color mode (since dpkg 1.18.5).
90 The currently accepted values are: B<auto> (default), B<always> and
95 If set, it will be used to decide whether to activate Native Language Support,
96 also known as internationalization (or i18n) support (since dpkg 1.19.0).
97 The accepted values are: B<0> and B<1> (default).
103 Anything that is not parsed by Dpkg::Changelog is lost during the merge.
104 This might include stuff like comments which were not supposed to be
107 =head1 INTEGRATION WITH GIT
109 If you want to use this program to merge Debian changelog files in a git
110 repository, you have first to register a new merge driver in
111 B<.git/config> or B<~/.gitconfig>:
113 [merge "dpkg-mergechangelogs"]
114 name = debian/changelog merge driver
115 driver = dpkg-mergechangelogs -m %O %A %B %A
117 Then you have to setup the merge attribute for the debian/changelog file
118 either in B<.gitattributes> in the repository itself, or in
119 B<.git/info/attributes>:
121 debian/changelog merge=dpkg-mergechangelogs