-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 There's only superficial changes required to the commit message required -- capitalise the message, s/This changes/change/ in the description -- it looks good otherwise.
However, I don't know whether this patch is *desired*. Doug, do you have a bug report, a forum thread, anything where people actually want this? I'm asking, not because I doubt that you find it valuable, nor because I don't think it's a useful patch, but because changing anything that devs interface with is typically very controversial. I'll leave the merging to you, Brian, as repoman is in a somewhat tender state -- newly merged and all. On 12/04/16 01:01, Doug Goldstein wrote: > This changes the way the temporary file for the commit message is > generated to make a temporary directory and create a file called > COMMIT_EDITMSG inside of it. This is to cause various editors to > treat this as a git style commit message by default. > > Signed-off-by: Doug Goldstein <car...@cardoe.com> --- > pym/repoman/actions.py | 18 ++++++++++-------- 1 file changed, 10 > insertions(+), 8 deletions(-) > > diff --git a/pym/repoman/actions.py b/pym/repoman/actions.py index > 4f3f195..dc3c2e4 100644 --- a/pym/repoman/actions.py +++ > b/pym/repoman/actions.py @@ -646,10 +646,10 @@ class > Actions(object): myfiles += myremoved myfiles.sort() > > - fd, commitmessagefile = tempfile.mkstemp(".repoman.msg") - > mymsg = os.fdopen(fd, "wb") - > mymsg.write(_unicode_encode(commitmessage)) - mymsg.close() + > commitmessagedir = tempfile.mkdtemp(".repoman.msg") + > commitmessagefile = os.path.join(commitmessagedir, > "COMMIT_EDITMSG") + with open(commitmessagefile, "wb") as > mymsg: + mymsg.write(_unicode_encode(commitmessage)) > > commit_cmd = [] if self.options.pretend and self.vcs_settings.vcs > is None: @@ -687,16 +687,17 @@ class Actions(object): finally: > try: os.unlink(commitmessagefile) + > os.rmdir(commitmessagedir) > except OSError: pass > > > def priming_commit(self, myupdates, myremoved, commitmessage): > myfiles = myupdates + myremoved - fd, commitmessagefile = > tempfile.mkstemp(".repoman.msg") - mymsg = os.fdopen(fd, "wb") - > mymsg.write(_unicode_encode(commitmessage)) - mymsg.close() + > commitmessagedir = tempfile.mkdtemp(".repoman.msg") + > commitmessagefile = os.path.join(commitmessagedir, > "COMMIT_EDITMSG") + with open(commitmessagefile, "wb") as > mymsg: + mymsg.write(_unicode_encode(commitmessage)) > > separator = '-' * 78 > > @@ -733,6 +734,7 @@ class Actions(object): finally: try: > os.unlink(commitmessagefile) + > os.rmdir(commitmessagedir) except OSError: pass > > - -- Alexander berna...@gentoo.org https://secure.plaimi.net/~alexander -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJXDJSqAAoJENQqWdRUGk8BOckQAM+yD/pXRyBiIbYpmKHkJGEx Wx1SvrH6IeNitXrIKlvACNKnODUxY7CiTdBA1/DpyckrbJjr3VGAfP+YjEsJItgF eaIKQAnQL1fDVHgni2dezJEpzXXLIb5omgWBFOFEPh02t8IBKl1te4RT8gaKALPQ E+MZBKrfOSO5u3cj+hL+8i6GXmvWqcHIrURny4iGnx/wEf27pN+9+wt2Qb7IlbWc enE3K2ChnpryQP5zypPjbr1tprukGdwkPvFWN2FqBJR4pSlNIfATtdYQLKG9ypL4 /Pgbdth000a3y8IWXFcsLOt1AxEr5LyDRjJwBUMvtM7jGRyXj1dzvqStufV/7XKX t1wjiQPpi4Bgdbwp3g0NkYzwhS8L1o0y02Z6sWAm4ZhA5wMPptB93psv4OZTSvmW vKtsrfALtjmFiB05yPmmM78eGHrJ+nZ5bHTfFv21x4QJoT4V5wbhkvvcH3FS5zc7 iAwriczCcmGSSvOtuvjHHZV+nQuyUTeG724yYlVkxH+0h5r9AAuZEKCacW3l9eQx fRkoJV+XRmktbUY3tJY3wfcrzmsGWx0IFKRpRzdAf92UKez60KtLvtlCC5r99aL7 jt9weFiK33+r+jSca1BV3ZJQEHNuabB/x5cUdOHq5v/cBbyRHd4HhAZzwbxBJqmr G28bBVctSBIzWQx+lu/4 =Rkcx -----END PGP SIGNATURE-----