You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <d....@daniel.shahaf.name> on 2013/01/27 09:06:59 UTC

Fwd: [Janos Gyerik: Re: [PATCH] minor change to mailer.py for subject formatting]

Forwarding back to the list
(@Janos I'll have a look later when I check my svn-dev mailbox, rather
than my personal one)

----- Forwarded message from Janos Gyerik <ja...@gmail.com> -----

> From: Janos Gyerik <ja...@gmail.com>
> Subject: Re: [PATCH] minor change to mailer.py for subject formatting
> To: Daniel Shahaf <d....@daniel.shahaf.name>
> Date: Sat, 26 Jan 2013 21:37:39 +0100
> Message-ID: <CA...@mail.gmail.com>
> 
> Hi Daniel,
> 
> Thanks a lot for your comments!
> 
> Please check the new patch I attached, I hope it's good now.
> 
> Thanks,
> Janos
> 
> On Sat, Jan 26, 2013 at 9:03 PM, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> > Please attach patches as MIME text/plain (usually naming them *.txt does
> > that).  More below.
> >
> >> +    if prefix and re.search(r'REPONAME', prefix):
> >
> > Needlessly complicated, ('REPONAME' in prefix) would do.
> >
> > Also I think you should use the %() syntax like mailer.conf.example
> > does.  Is that possible?
> >
> >> +        reponame = os.path.basename(os.path.dirname(os.path.dirname(__file__)))
> >
> > That's outright wrong.  You can't assume that post-commit is a symlink
> > to mailer.py.  (Just read post-commit.tmpl for a counterexample.)
> >
> >> +        prefix = re.sub(r'REPONAME', reponame, prefix)
> >
> > Daniel
> > (very brief review, and the setup I help maintain uses svnmailer not
> > mailer.py, so if the above doesn't make sense sorry and please correct me)
> 
> 
> 
> -- 
> Janos Gyerik
> http://www.janosgyerik.com/
> https://twitter.com/janosgyerik/

> Index: tools/hook-scripts/mailer/mailer.py
> ===================================================================
> --- tools/hook-scripts/mailer/mailer.py	(revision 1438886)
> +++ tools/hook-scripts/mailer/mailer.py	(working copy)
> @@ -98,7 +98,7 @@ def main(pool, cmd, config_fname, repos_dir, cmd_a
>    if cmd == 'commit':
>      revision = int(cmd_args[0])
>      repos = Repository(repos_dir, revision, pool)
> -    cfg = Config(config_fname, repos, { 'author' : repos.author })
> +    cfg = Config(config_fname, repos, { 'author' : repos.author, 'repodir' : os.path.basename(repos.repos_dir) })
>      messenger = Commit(pool, cfg, repos)
>    elif cmd == 'propchange' or cmd == 'propchange2':
>      revision = int(cmd_args[0])


----- End forwarded message -----

RE: [Janos Gyerik: Re: [PATCH] minor change to mailer.py for subject formatting]

Posted by Gavin Baumanis <ga...@thespidernet.com>.
Hi Janos,
Thanks for the reply - 
I have obviously missed the commit message for the patch.

I'll remove it from my watch List.

Gavin.

> -----Original Message-----
> From: Janos Gyerik [mailto:janos.gyerik@gmail.com]
> Sent: Thursday, 7 March 2013 10:56
> To: Gavin Baumanis
> Cc: Daniel Shahaf; dev@subversion.apache.org
> Subject: Re: [Janos Gyerik: Re: [PATCH] minor change to mailer.py for subject
> formatting]
> 
> The patch has been merged a long time ago. Unfortunately there was a bug in
> it, but to my knowledge that has also been fixed and committed in the trunk.
> 
> On Thu, Mar 7, 2013 at 3:58 PM, Gavin Baumanis
> <ga...@thespidernet.com> wrote:
> > Ping.
> > This thread has received no new comments.
> >
> >
> >> -----Original Message-----
> >> From: Daniel Shahaf [mailto:d.s@daniel.shahaf.name]
> >> Sent: Sunday, 27 January 2013 03:07
> >> To: dev@subversion.apache.org
> >> Cc: Janos Gyerik
> >> Subject: Fwd: [Janos Gyerik: Re: [PATCH] minor change to mailer.py
> >> for subject formatting]
> >>
> >> Forwarding back to the list
> >> (@Janos I'll have a look later when I check my svn-dev mailbox,
> >> rather
> > than my
> >> personal one)
> >>
> >> ----- Forwarded message from Janos Gyerik <ja...@gmail.com>
> >> -----
> >>
> >> > From: Janos Gyerik <ja...@gmail.com>
> >> > Subject: Re: [PATCH] minor change to mailer.py for subject
> >> > formatting
> >> > To: Daniel Shahaf <d....@daniel.shahaf.name>
> >> > Date: Sat, 26 Jan 2013 21:37:39 +0100
> >> > Message-ID:
> >> >
> >>
> <CAAhxzX+epbB6+4FbhXvB7PK8NtEOx4fC+59HpRtkGEXMCADO5Q@mail.gm
> >> ail.com>
> >> >
> >> > Hi Daniel,
> >> >
> >> > Thanks a lot for your comments!
> >> >
> >> > Please check the new patch I attached, I hope it's good now.
> >> >
> >> > Thanks,
> >> > Janos
> >> >
> >> > On Sat, Jan 26, 2013 at 9:03 PM, Daniel Shahaf
> >> > <d....@daniel.shahaf.name>
> >> wrote:
> >> > > Please attach patches as MIME text/plain (usually naming them
> >> > > *.txt does that).  More below.
> >> > >
> >> > >> +    if prefix and re.search(r'REPONAME', prefix):
> >> > >
> >> > > Needlessly complicated, ('REPONAME' in prefix) would do.
> >> > >
> >> > > Also I think you should use the %() syntax like
> >> > > mailer.conf.example does.  Is that possible?
> >> > >
> >> > >> +        reponame =
> >> > >> + os.path.basename(os.path.dirname(os.path.dirname(__file__)))
> >> > >
> >> > > That's outright wrong.  You can't assume that post-commit is a
> >> > > symlink to mailer.py.  (Just read post-commit.tmpl for a
> >> > > counterexample.)
> >> > >
> >> > >> +        prefix = re.sub(r'REPONAME', reponame, prefix)
> >> > >
> >> > > Daniel
> >> > > (very brief review, and the setup I help maintain uses svnmailer
> >> > > not mailer.py, so if the above doesn't make sense sorry and
> >> > > please correct me)
> >> >
> >> >
> >> >
> >> > --
> >> > Janos Gyerik
> >> > http://www.janosgyerik.com/
> >> > https://twitter.com/janosgyerik/
> >>
> >> > Index: tools/hook-scripts/mailer/mailer.py
> >> >
> >>
> ============================================================
> >> =======
> >> > --- tools/hook-scripts/mailer/mailer.py     (revision 1438886)
> >> > +++ tools/hook-scripts/mailer/mailer.py     (working copy)
> >> > @@ -98,7 +98,7 @@ def main(pool, cmd, config_fname, repos_dir,
> cmd_a
> >> >    if cmd == 'commit':
> >> >      revision = int(cmd_args[0])
> >> >      repos = Repository(repos_dir, revision, pool)
> >> > -    cfg = Config(config_fname, repos, { 'author' : repos.author })
> >> > +    cfg = Config(config_fname, repos, { 'author' : repos.author,
> >> > + 'repodir' : os.path.basename(repos.repos_dir) })
> >> >      messenger = Commit(pool, cfg, repos)
> >> >    elif cmd == 'propchange' or cmd == 'propchange2':
> >> >      revision = int(cmd_args[0])
> >>
> >>
> >> ----- End forwarded message -----
> >
> 
> 
> 
> --
> Janos Gyerik
> http://www.janosgyerik.com/
> https://twitter.com/janosgyerik/


Re: [Janos Gyerik: Re: [PATCH] minor change to mailer.py for subject formatting]

Posted by Janos Gyerik <ja...@gmail.com>.
The patch has been merged a long time ago. Unfortunately there was a
bug in it, but to my knowledge that has also been fixed and committed
in the trunk.

On Thu, Mar 7, 2013 at 3:58 PM, Gavin Baumanis <ga...@thespidernet.com> wrote:
> Ping.
> This thread has received no new comments.
>
>
>> -----Original Message-----
>> From: Daniel Shahaf [mailto:d.s@daniel.shahaf.name]
>> Sent: Sunday, 27 January 2013 03:07
>> To: dev@subversion.apache.org
>> Cc: Janos Gyerik
>> Subject: Fwd: [Janos Gyerik: Re: [PATCH] minor change to mailer.py for
>> subject formatting]
>>
>> Forwarding back to the list
>> (@Janos I'll have a look later when I check my svn-dev mailbox, rather
> than my
>> personal one)
>>
>> ----- Forwarded message from Janos Gyerik <ja...@gmail.com> -----
>>
>> > From: Janos Gyerik <ja...@gmail.com>
>> > Subject: Re: [PATCH] minor change to mailer.py for subject formatting
>> > To: Daniel Shahaf <d....@daniel.shahaf.name>
>> > Date: Sat, 26 Jan 2013 21:37:39 +0100
>> > Message-ID:
>> >
>> <CAAhxzX+epbB6+4FbhXvB7PK8NtEOx4fC+59HpRtkGEXMCADO5Q@mail.gm
>> ail.com>
>> >
>> > Hi Daniel,
>> >
>> > Thanks a lot for your comments!
>> >
>> > Please check the new patch I attached, I hope it's good now.
>> >
>> > Thanks,
>> > Janos
>> >
>> > On Sat, Jan 26, 2013 at 9:03 PM, Daniel Shahaf <d....@daniel.shahaf.name>
>> wrote:
>> > > Please attach patches as MIME text/plain (usually naming them *.txt
>> > > does that).  More below.
>> > >
>> > >> +    if prefix and re.search(r'REPONAME', prefix):
>> > >
>> > > Needlessly complicated, ('REPONAME' in prefix) would do.
>> > >
>> > > Also I think you should use the %() syntax like mailer.conf.example
>> > > does.  Is that possible?
>> > >
>> > >> +        reponame =
>> > >> + os.path.basename(os.path.dirname(os.path.dirname(__file__)))
>> > >
>> > > That's outright wrong.  You can't assume that post-commit is a
>> > > symlink to mailer.py.  (Just read post-commit.tmpl for a
>> > > counterexample.)
>> > >
>> > >> +        prefix = re.sub(r'REPONAME', reponame, prefix)
>> > >
>> > > Daniel
>> > > (very brief review, and the setup I help maintain uses svnmailer not
>> > > mailer.py, so if the above doesn't make sense sorry and please
>> > > correct me)
>> >
>> >
>> >
>> > --
>> > Janos Gyerik
>> > http://www.janosgyerik.com/
>> > https://twitter.com/janosgyerik/
>>
>> > Index: tools/hook-scripts/mailer/mailer.py
>> >
>> ============================================================
>> =======
>> > --- tools/hook-scripts/mailer/mailer.py     (revision 1438886)
>> > +++ tools/hook-scripts/mailer/mailer.py     (working copy)
>> > @@ -98,7 +98,7 @@ def main(pool, cmd, config_fname, repos_dir, cmd_a
>> >    if cmd == 'commit':
>> >      revision = int(cmd_args[0])
>> >      repos = Repository(repos_dir, revision, pool)
>> > -    cfg = Config(config_fname, repos, { 'author' : repos.author })
>> > +    cfg = Config(config_fname, repos, { 'author' : repos.author,
>> > + 'repodir' : os.path.basename(repos.repos_dir) })
>> >      messenger = Commit(pool, cfg, repos)
>> >    elif cmd == 'propchange' or cmd == 'propchange2':
>> >      revision = int(cmd_args[0])
>>
>>
>> ----- End forwarded message -----
>



--
Janos Gyerik
http://www.janosgyerik.com/
https://twitter.com/janosgyerik/

RE: [Janos Gyerik: Re: [PATCH] minor change to mailer.py for subject formatting]

Posted by Gavin Baumanis <ga...@thespidernet.com>.
Ping.
This thread has received no new comments.


> -----Original Message-----
> From: Daniel Shahaf [mailto:d.s@daniel.shahaf.name]
> Sent: Sunday, 27 January 2013 03:07
> To: dev@subversion.apache.org
> Cc: Janos Gyerik
> Subject: Fwd: [Janos Gyerik: Re: [PATCH] minor change to mailer.py for
> subject formatting]
> 
> Forwarding back to the list
> (@Janos I'll have a look later when I check my svn-dev mailbox, rather
than my
> personal one)
> 
> ----- Forwarded message from Janos Gyerik <ja...@gmail.com> -----
> 
> > From: Janos Gyerik <ja...@gmail.com>
> > Subject: Re: [PATCH] minor change to mailer.py for subject formatting
> > To: Daniel Shahaf <d....@daniel.shahaf.name>
> > Date: Sat, 26 Jan 2013 21:37:39 +0100
> > Message-ID:
> >
> <CAAhxzX+epbB6+4FbhXvB7PK8NtEOx4fC+59HpRtkGEXMCADO5Q@mail.gm
> ail.com>
> >
> > Hi Daniel,
> >
> > Thanks a lot for your comments!
> >
> > Please check the new patch I attached, I hope it's good now.
> >
> > Thanks,
> > Janos
> >
> > On Sat, Jan 26, 2013 at 9:03 PM, Daniel Shahaf <d....@daniel.shahaf.name>
> wrote:
> > > Please attach patches as MIME text/plain (usually naming them *.txt
> > > does that).  More below.
> > >
> > >> +    if prefix and re.search(r'REPONAME', prefix):
> > >
> > > Needlessly complicated, ('REPONAME' in prefix) would do.
> > >
> > > Also I think you should use the %() syntax like mailer.conf.example
> > > does.  Is that possible?
> > >
> > >> +        reponame =
> > >> + os.path.basename(os.path.dirname(os.path.dirname(__file__)))
> > >
> > > That's outright wrong.  You can't assume that post-commit is a
> > > symlink to mailer.py.  (Just read post-commit.tmpl for a
> > > counterexample.)
> > >
> > >> +        prefix = re.sub(r'REPONAME', reponame, prefix)
> > >
> > > Daniel
> > > (very brief review, and the setup I help maintain uses svnmailer not
> > > mailer.py, so if the above doesn't make sense sorry and please
> > > correct me)
> >
> >
> >
> > --
> > Janos Gyerik
> > http://www.janosgyerik.com/
> > https://twitter.com/janosgyerik/
> 
> > Index: tools/hook-scripts/mailer/mailer.py
> >
> ============================================================
> =======
> > --- tools/hook-scripts/mailer/mailer.py	(revision 1438886)
> > +++ tools/hook-scripts/mailer/mailer.py	(working copy)
> > @@ -98,7 +98,7 @@ def main(pool, cmd, config_fname, repos_dir, cmd_a
> >    if cmd == 'commit':
> >      revision = int(cmd_args[0])
> >      repos = Repository(repos_dir, revision, pool)
> > -    cfg = Config(config_fname, repos, { 'author' : repos.author })
> > +    cfg = Config(config_fname, repos, { 'author' : repos.author,
> > + 'repodir' : os.path.basename(repos.repos_dir) })
> >      messenger = Commit(pool, cfg, repos)
> >    elif cmd == 'propchange' or cmd == 'propchange2':
> >      revision = int(cmd_args[0])
> 
> 
> ----- End forwarded message -----


Re: [Janos Gyerik: Re: [PATCH] minor change to mailer.py for subject formatting]

Posted by Janos Gyerik <ja...@gmail.com>.
I already sent a newer patch to the list, with more fixes based on
comments by Michael and Ben. Attaching the new patch here again just
in case.

On Sun, Jan 27, 2013 at 9:06 AM, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> Forwarding back to the list
> (@Janos I'll have a look later when I check my svn-dev mailbox, rather
> than my personal one)
>
> ----- Forwarded message from Janos Gyerik <ja...@gmail.com> -----
>
>> From: Janos Gyerik <ja...@gmail.com>
>> Subject: Re: [PATCH] minor change to mailer.py for subject formatting
>> To: Daniel Shahaf <d....@daniel.shahaf.name>
>> Date: Sat, 26 Jan 2013 21:37:39 +0100
>> Message-ID: <CA...@mail.gmail.com>
>>
>> Hi Daniel,
>>
>> Thanks a lot for your comments!
>>
>> Please check the new patch I attached, I hope it's good now.
>>
>> Thanks,
>> Janos
>>
>> On Sat, Jan 26, 2013 at 9:03 PM, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
>> > Please attach patches as MIME text/plain (usually naming them *.txt does
>> > that).  More below.
>> >
>> >> +    if prefix and re.search(r'REPONAME', prefix):
>> >
>> > Needlessly complicated, ('REPONAME' in prefix) would do.
>> >
>> > Also I think you should use the %() syntax like mailer.conf.example
>> > does.  Is that possible?
>> >
>> >> +        reponame = os.path.basename(os.path.dirname(os.path.dirname(__file__)))
>> >
>> > That's outright wrong.  You can't assume that post-commit is a symlink
>> > to mailer.py.  (Just read post-commit.tmpl for a counterexample.)
>> >
>> >> +        prefix = re.sub(r'REPONAME', reponame, prefix)
>> >
>> > Daniel
>> > (very brief review, and the setup I help maintain uses svnmailer not
>> > mailer.py, so if the above doesn't make sense sorry and please correct me)
>>
>>
>>
>> --
>> Janos Gyerik
>> http://www.janosgyerik.com/
>> https://twitter.com/janosgyerik/
>
>> Index: tools/hook-scripts/mailer/mailer.py
>> ===================================================================
>> --- tools/hook-scripts/mailer/mailer.py       (revision 1438886)
>> +++ tools/hook-scripts/mailer/mailer.py       (working copy)
>> @@ -98,7 +98,7 @@ def main(pool, cmd, config_fname, repos_dir, cmd_a
>>    if cmd == 'commit':
>>      revision = int(cmd_args[0])
>>      repos = Repository(repos_dir, revision, pool)
>> -    cfg = Config(config_fname, repos, { 'author' : repos.author })
>> +    cfg = Config(config_fname, repos, { 'author' : repos.author, 'repodir' : os.path.basename(repos.repos_dir) })
>>      messenger = Commit(pool, cfg, repos)
>>    elif cmd == 'propchange' or cmd == 'propchange2':
>>      revision = int(cmd_args[0])
>
>
> ----- End forwarded message -----



-- 
Janos Gyerik
http://www.janosgyerik.com/
https://twitter.com/janosgyerik/