Mercurial > p > roundup > code
comparison roundup/roundupdb.py @ 439:6e27cb83aacb
only insert the -------- change note marker if there is a change note
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 10 Dec 2001 21:02:53 +0000 |
| parents | 2441743e335b |
| children | de5bf4191f11 |
comparison
equal
deleted
inserted
replaced
| 438:9d97c1a4ddad | 439:6e27cb83aacb |
|---|---|
| 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 17 # | 17 # |
| 18 # $Id: roundupdb.py,v 1.26 2001-12-05 14:26:44 rochecompaan Exp $ | 18 # $Id: roundupdb.py,v 1.27 2001-12-10 21:02:53 richard Exp $ |
| 19 | 19 |
| 20 __doc__ = """ | 20 __doc__ = """ |
| 21 Extending hyperdb with types specific to issue-tracking. | 21 Extending hyperdb with types specific to issue-tracking. |
| 22 """ | 22 """ |
| 23 | 23 |
| 437 changed[key] = new_value | 437 changed[key] = new_value |
| 438 except: | 438 except: |
| 439 changed[key] = new_value | 439 changed[key] = new_value |
| 440 | 440 |
| 441 # list the changes | 441 # list the changes |
| 442 m = ['','----------'] | |
| 443 for propname, value in changed.items(): | 442 for propname, value in changed.items(): |
| 444 prop = cl.properties[propname] | 443 prop = cl.properties[propname] |
| 445 oldvalue = cl.get(nodeid, propname, None) | 444 oldvalue = cl.get(nodeid, propname, None) |
| 446 change = '%s -> %s'%(oldvalue, value) | 445 change = '%s -> %s'%(oldvalue, value) |
| 447 if isinstance(prop, hyperdb.Link): | 446 if isinstance(prop, hyperdb.Link): |
| 482 else: | 481 else: |
| 483 l.append(entry) | 482 l.append(entry) |
| 484 if l: | 483 if l: |
| 485 change += ' -%s'%(', '.join(l)) | 484 change += ' -%s'%(', '.join(l)) |
| 486 m.append('%s: %s'%(propname, change)) | 485 m.append('%s: %s'%(propname, change)) |
| 486 if m: | |
| 487 m.insert(0, '') | |
| 488 m.insert(0, '----------') | |
| 487 return '\n'.join(m) | 489 return '\n'.join(m) |
| 488 | 490 |
| 489 # | 491 # |
| 490 # $Log: not supported by cvs2svn $ | 492 # $Log: not supported by cvs2svn $ |
| 493 # Revision 1.26 2001/12/05 14:26:44 rochecompaan | |
| 494 # Removed generation of change note from "sendmessage" in roundupdb.py. | |
| 495 # The change note is now generated when the message is created. | |
| 496 # | |
| 491 # Revision 1.25 2001/11/30 20:28:10 rochecompaan | 497 # Revision 1.25 2001/11/30 20:28:10 rochecompaan |
| 492 # Property changes are now completely traceable, whether changes are | 498 # Property changes are now completely traceable, whether changes are |
| 493 # made through the web or by email | 499 # made through the web or by email |
| 494 # | 500 # |
| 495 # Revision 1.24 2001/11/30 11:29:04 rochecompaan | 501 # Revision 1.24 2001/11/30 11:29:04 rochecompaan |
