Lines Matching +full:commit +full:- +full:message
5 Add changelog entries to the first level-2 section.
6 Create a new level-2 section for unreleased changes if needed.
7 Remove the input files unless --keep-entries is specified.
9 In each level-3 section, entries are sorted in chronological order
12 the merge commit that brought the commit that created the file into
15 of the commit that adds them.
22 # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
35 def __init__(self, filename, line_number, message, *args, **kwargs): argument
36 message = '{}:{}: {}'.format(filename, line_number,
37 message.format(*args, **kwargs))
38 super().__init__(message)
48 message = ('Lost content from {}: "{}"'.format(filename, line))
49 super().__init__(message)
53 message = ('Changelog filenames do not end with .txt: {}'.format(", ".join(filenames)))
54 super().__init__(message)
118 _unreleased_version_text = '= {} x.x.x branch released xxxx-xx-xx'
122 return not re.search(r'[0-9x]{4}-[0-9x]{2}-[0-9x]?x', title)
126 _name_re = re.compile(r'=\s(.*)\s[0-9x]+\.', re.DOTALL)
197 _version_number_re = re.compile(r'[0-9]+\.[0-9A-Za-z.]+')
198 _incomplete_version_number_re = re.compile(r'.*\.[A-Za-z]')
263 with open(filename, 'w', encoding='utf-8') as out:
278 the merge commit that brought the commit that created the file into
281 of the commit that adds them.
295 """Return the git commit id at which the given file was created.
299 hashes = subprocess.check_output(['git', 'log', '--format=%H',
300 '--follow',
301 '--', filename])
307 # The last commit in the log is the oldest one, which is when the
317 text = subprocess.check_output(['git', 'rev-list',
318 '--merges', *options,
324 """Return the git commit id at which the given commit was merged.
326 Return None if the given commit was never merged.
333 '--ancestry-path'))
337 '--first-parent', '--reverse')
338 # Look for the oldest merge commit that's both on the direct path
341 … # https://stackoverflow.com/questions/8475448/find-merge-commit-which-include-a-specific-commit
342 for commit in first_parents:
343 if commit in ancestry:
344 return commit
349 """Return the timestamp of the given commit."""
350 text = subprocess.check_output(['git', 'show', '-s',
351 '--format=%ct',
406 with open(generated_output_file, 'r', encoding='utf-8') as fd:
408 for line in open(main_input_file, 'r', encoding='utf-8'):
412 for line in open(merged_file, 'r', encoding='utf-8'):
423 # The output is a non-regular file (e.g. pipe). Write to it directly.
469 with open(options.input, 'r', encoding='utf-8') as input_file:
476 with open(filename, 'r', encoding='utf-8') as input_file:
503 parser.add_argument('--dir', '-d', metavar='DIR',
507 parser.add_argument('--input', '-i', metavar='FILE',
511 parser.add_argument('--keep-entries',
514 ' (default: remove them if --output/-o is not specified)')
515 parser.add_argument('--no-keep-entries',
518 ' (default: remove them if --output/-o is not specified)')
519 parser.add_argument('--output', '-o', metavar='FILE',
522 parser.add_argument('--list-files-only',