dpkg-mergechangelogs.1 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 "2011-08-14" "Debian Project" "dpkg suite"
  19. .SH NAME
  20. dpkg\-mergechangelogs \- 3-way merge of debian/changelog files
  21. .
  22. .SH SYNOPSIS
  23. .B dpkg\-mergechangelogs
  24. .RI [ option "...] " old " " new-a " " new-b " [" out ]
  25. .
  26. .SH DESCRIPTION
  27. .P
  28. This program will use the 3 provided versions of the Debian changelog to
  29. generate a merged changelog file. The resulting changelog is stored
  30. in the file \fIout\fP or output to the standard output if that parameter is
  31. not given.
  32. .P
  33. Each entry is identified by its version number and they are assumed to
  34. be not conflicting, they are simply merged in the right order (by
  35. decreasing version number). When \fB\-\-merge\-prereleases\fP is used, the
  36. part of the version number after the last tilde is dropped so that
  37. 1.0\-1~exp1 and 1.0\-1~exp5 are considered to be the same entry. When the
  38. same version is available in both \fInew-a\fP and \fInew-b\fP, a standard
  39. line-based 3-way merge is attempted (provided that the module
  40. Algorithm::Merge is available \[em] it's part of the package
  41. libalgorithm\-merge\-perl \[em] otherwise you get a global conflict on the
  42. content of the entry).
  43. .
  44. .SH OPTIONS
  45. .TP
  46. .BR \-\-merge\-prereleases ", " \-m
  47. Drop the part after the last tilde in the version number when doing
  48. version comparison to identify if two entries are supposed to be
  49. the same or not.
  50. .sp
  51. This is useful when you keep using the same changelog entry but you
  52. increase its version number regularly. For instance, you might have
  53. 2.3\-1~exp1, 2.3\-1~exp2, ... until the official release 2.3\-1 and they
  54. are all the same changelog entry that has evolved over time.
  55. .TP
  56. .B \-\-help
  57. Show the usage message and exit.
  58. .TP
  59. .B \-\-version
  60. Show the version and exit.
  61. .
  62. .SH LIMITATIONS
  63. .P
  64. Anything that is not parsed by Dpkg::Changelog is lost during the merge.
  65. This might include stuff like vim modelines, comments which were not
  66. supposed to be there, etc.
  67. .
  68. .SH INTEGRATION WITH GIT
  69. .P
  70. If you want to use this program to merge Debian changelog files in a git
  71. repository, you have first to register a new merge driver in
  72. \fB.git/config\fP or \fB~/.gitconfig\fP:
  73. .P
  74. [merge "dpkg\-mergechangelogs"]
  75. name = debian/changelog merge driver
  76. driver = dpkg\-mergechangelogs \-m %O %A %B %A
  77. .P
  78. Then you have to setup the merge attribute for the debian/changelog file
  79. either in \fB.gitattributes\fP in the repository itself, or in
  80. \fB.git/info/attributes\fP:
  81. .P
  82. debian/changelog merge=dpkg\-mergechangelogs