Changeset 72d120e in mainline for contrib/bazaar/bzreml/__init__.py


Ignore:
Timestamp:
2014-06-16T20:17:44Z (10 years ago)
Author:
Agnieszka Tabaka <nufcia@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5a78e4e
Parents:
9d653e3 (diff), 334bf28 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Integrate from mainline.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/bazaar/bzreml/__init__.py

    r9d653e3 r72d120e  
    4040import smtplib
    4141import time
     42import os
    4243
    4344from StringIO import StringIO
     
    133134                                revision_ac_no = branch.revision_id_to_revno(revision_ac_id)
    134135                               
     136                                repo_name = os.path.basename(branch.base)
     137                                if (repo_name == ''):
     138                                        repo_name = os.path.basename(os.path.dirname(branch.base))
     139                               
    135140                                committer = revision_ac.committer
    136141                                authors = revision_ac.get_apparent_authors()
    137142                                date = time.strftime("%Y-%m-%d %H:%M:%S %Z (%a, %d %b %Y)", time.localtime(revision_ac.timestamp))
     143                               
     144                                body.write("Repo: %s\n" % repo_name)
    138145                               
    139146                                if (authors != [committer]):
     
    208215                                        tree_prev.unlock()
    209216                               
    210                                 subject = "r%d - %s" % (revision_ac_no, commit_message)
     217                                subject = "[%s] r%d - %s" % (repo_name, revision_ac_no, commit_message)
    211218                                send_smtp("localhost", config_sender(config), config_to(config), subject, body.getvalue())
    212219                               
Note: See TracChangeset for help on using the changeset viewer.