Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/localrepo.py @ 1709:069129d24b26
Create default commit message in a more pythonic way.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Thu, 09 Feb 2006 07:24:34 +0100 |
parents | 4fdcfedf2a19 |
children | 21dcf38e5d7d |
line wrap: on
line diff
--- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -437,17 +437,18 @@ class localrepository(object): new.sort() if not text: - edittext = "\n" + edittext = [""] if p2 != nullid: - edittext += "HG: branch merge\n" - edittext += "".join(["HG: changed %s\n" % f for f in changed]) - edittext += "".join(["HG: removed %s\n" % f for f in remove]) + edittext.append("HG: branch merge") + edittext.extend(["HG: changed %s" % f for f in changed]) + edittext.extend(["HG: removed %s" % f for f in remove]) if not changed and not remove: - edittext += "HG: no files changed\n" + edittext.append("HG: no files changed") + edittext.append("") # run editor in the repository root olddir = os.getcwd() os.chdir(self.root) - edittext = self.ui.edit(edittext) + edittext = self.ui.edit("\n".join(edittext)) os.chdir(olddir) if not edittext.rstrip(): return None