[ditrack commit] r1430 - in src/trunk: DITrack tests/cmd-commit/comment.tc tests/i65.tc

Ivan Glushkov gli.work at gmail.com
Mon Mar 12 23:11:09 PST 2007


On 3/13/07, Vlad Skvortsov <vss at 73rus.com> wrote:
> gli at ditrack.org wrote:
>
> [skipped]
> > Log:
> > fixing i#114. Smart commit log. changes in tests.
> >
> > Modified: src/trunk/DITrack/DB.py
> > ===================================================================
> > --- src/trunk/DITrack/DB.py   2007-03-08 22:42:06 UTC (rev 1429)
> > +++ src/trunk/DITrack/DB.py   2007-03-12 16:10:44 UTC (rev 1430)
> > @@ -293,7 +293,9 @@
> >          number, changes = self.wc.new_comment(issue_number, comment)
> >
> >          # XXX: if the commit has failed, we need to revert the changes back.
> > -        self.wc.commit(changes, "i#%s: %s" % (issue_number, comment.logmsg))
> > +        self.wc.commit(changes, "i#%s: %s\n%s" %
> > +            (issue_number, self.wc[issue_number].info['Title'],
> >
>
> Runaway single quotes again! :-)
:)

>
> > +            comment.logmsg))
> >
> >          # Now, when the changes are committed, remove the comment from the LMA.
> >          self.lma.remove_comment(issue_number, comment_name)
> > @@ -476,8 +478,10 @@
> >              logmsg.append("comment added")
> >
> >
> > +        #logmsg_str = "".join ([" * %s\n" % k for k in logmsg])
> > +        logmsg_str = reduce (lambda x,y: x+y, [" * %s\n" % k for k in logmsg], "")
> >
>
> First, please do not retain commented out code. If we ever need it, we
> can always fetch it from the repository. Second, I don't see the
> difference between these two lines (besides that the first one seems
> more readable for me).
You are right, there's no difference between them. But i don't want to
use "Deprecated string functions"
(http://www.python.org/doc/2.4.1/lib/node110.html) therefore i used
the second one.
Btw, the commented string didn't exist in repository.

single quotes replaced with double quotes, comment deleted in r1468.


More information about the Dev mailing list