4 # Steve 'Ashcrow' Milner <smilner+buildbot@redhat.com>
6 # This software may be freely redistributed under the terms of the GNU
7 # general public license.
9 # You should have received a copy of the GNU General Public License
10 # along with this program; if not, write to the Free Software
11 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
13 Generates changelog information using git.
16 __docformat__
= 'restructuredtext'
25 Wrapper to make printing to stderr nicer.
28 - `msg`: the message to print.
31 sys
.stderr
.write('\n')
36 Prints out usage information to stderr.
38 print_err('Usage: %s git-binary since' % sys
.argv
[0])
39 print_err(('Example: %s /usr/bin/git f5067523dfae9c7cdefc82'
40 '8721ec593ac7be62db' % sys
.argv
[0]))
48 - `args`: same as sys.argv[1:]
50 # Make sure we have the arguments we need, else show usage
54 except IndexError, ie
:
58 if not os
.access(git_bin
, os
.X_OK
):
59 print_err('Can not access %s' % git_bin
)
62 # Open a pipe and force the format
63 pipe
= os
.popen((git_bin
+ ' log --pretty="format:%ad %ae%n'
64 ' * %s" ' + since
+ '..'))
70 if __name__
== '__main__':
71 raise SystemExit(main(sys
.argv
[1:]))