test: Refactor ar handling into m4 macros
[dpkg.git] / man / dpkg-mergechangelogs.pod
blob1eefcce070832c04937bf230112429db0179adaa
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/>.
18 =encoding utf8
20 =head1 NAME
22 dpkg-mergechangelogs - 3-way merge of debian/changelog files
24 =head1 SYNOPSIS
26 B<dpkg-mergechangelogs>
27 [I<option>...] I<old> I<new-a> I<new-b> [I<out>]
29 =head1 DESCRIPTION
31 This program will use the 3 provided versions of the Debian changelog to
32 generate a merged changelog file.
33 The resulting changelog is stored
34 in the file I<out> or output to the standard output if that parameter is
35 not given.
37 Each entry is identified by its version number and they are assumed to
38 be not conflicting, they are simply merged in the right order (by
39 decreasing version number).
40 When B<--merge-prereleases> is used, the
41 part of the version number after the last tilde is dropped so that
42 1.0-1~exp1 and 1.0-1~exp5 are considered to be the same entry.
43 When the
44 same version is available in both I<new-a> and I<new-b>, a standard
45 line-based 3-way merge is attempted (provided that the module
46 Algorithm::Merge is available — it's part of the package
47 libalgorithm-merge-perl — otherwise you get a global conflict on the
48 content of the entry).
50 This program was introduced in dpkg 1.15.7.
52 =head1 OPTIONS
54 =over
56 =item B<--merge-unreleased>
58 Ignore the version number when the entries are marked as B<UNRELEASED>
59 (since dpkg 1.21.0).
61 This is useful when you have diverging development for versions that have
62 not yet been released.
63 For instance 2.1-1 is released, then development
64 happens for the new 2.2-1 and then for 2.3-1, where it makes sense to just
65 end with a coalesced entry for 2.3-1 including all the development done in
66 2.2-1.
68 =item B<-m>, B<--merge-prereleases>
70 Drop the part after the last tilde in the version number when doing
71 version comparison to identify if two entries are supposed to be
72 the same or not.
74 This is useful when you keep using the same changelog entry but you
75 increase its version number regularly.
76 For instance, you might have
77 2.3-1~exp1, 2.3-1~exp2, ... until the official release 2.3-1 and they
78 are all the same changelog entry that has evolved over time.
80 =item B<--help>
82 Show the usage message and exit.
84 =item B<--version>
86 Show the version and exit.
88 =back
90 =head1 ENVIRONMENT
92 =over
94 =item B<DPKG_COLORS>
96 Sets the color mode (since dpkg 1.18.5).
97 The currently accepted values are: B<auto> (default), B<always> and
98 B<never>.
100 =item B<DPKG_NLS>
102 If set, it will be used to decide whether to activate Native Language Support,
103 also known as internationalization (or i18n) support (since dpkg 1.19.0).
104 The accepted values are: B<0> and B<1> (default).
106 =back
108 =head1 LIMITATIONS
110 Anything that is not parsed by L<Dpkg::Changelog> is lost during the merge.
111 This might include stuff like comments which were not supposed to be
112 there, etc.
114 =head1 INTEGRATION WITH GIT
116 If you want to use this program to merge Debian changelog files in a git
117 repository, you have first to register a new merge driver in
118 B<.git/config> or B<~/.gitconfig>:
120  [merge "dpkg-mergechangelogs"]
121     name = debian/changelog merge driver
122     driver = dpkg-mergechangelogs -m %O %A %B %A
124 Then you have to setup the merge attribute for the debian/changelog file
125 either in B<.gitattributes> in the repository itself, or in
126 B<.git/info/attributes>:
128  debian/changelog merge=dpkg-mergechangelogs