Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 12900:4ff61287bde2 stable
commit: handle missing newline on last commit comment
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 30 Oct 2010 12:13:52 -0500 |
parents | bb7bf43b72fb |
children | 6eab8f0df2ca 15390d1a3cfc |
comparison
equal
deleted
inserted
replaced
12899:fabe61418a53 | 12900:4ff61287bde2 |
---|---|
1354 edittext.append("") | 1354 edittext.append("") |
1355 # run editor in the repository root | 1355 # run editor in the repository root |
1356 olddir = os.getcwd() | 1356 olddir = os.getcwd() |
1357 os.chdir(repo.root) | 1357 os.chdir(repo.root) |
1358 text = repo.ui.edit("\n".join(edittext), ctx.user()) | 1358 text = repo.ui.edit("\n".join(edittext), ctx.user()) |
1359 text = re.sub("(?m)^HG:.*\n", "", text) | 1359 text = re.sub("(?m)^HG:.*(\n|$)", "", text) |
1360 os.chdir(olddir) | 1360 os.chdir(olddir) |
1361 | 1361 |
1362 if not text.strip(): | 1362 if not text.strip(): |
1363 raise util.Abort(_("empty commit message")) | 1363 raise util.Abort(_("empty commit message")) |
1364 | 1364 |