equal
deleted
inserted
replaced
5 # This software may be used and distributed according to the terms of the |
5 # This software may be used and distributed according to the terms of the |
6 # GNU General Public License version 2, incorporated herein by reference. |
6 # GNU General Public License version 2, incorporated herein by reference. |
7 |
7 |
8 from node import hex, nullid, nullrev, short |
8 from node import hex, nullid, nullrev, short |
9 from i18n import _ |
9 from i18n import _ |
10 import os, sys, bisect, stat, errno |
10 import os, sys, bisect, stat, errno, re |
11 import mdiff, bdiff, util, templater, patch, error, encoding |
11 import mdiff, bdiff, util, templater, patch, error, encoding |
12 import match as _match |
12 import match as _match |
13 |
13 |
14 revrangesep = ':' |
14 revrangesep = ':' |
15 |
15 |
1250 edittext.append("") |
1250 edittext.append("") |
1251 # run editor in the repository root |
1251 # run editor in the repository root |
1252 olddir = os.getcwd() |
1252 olddir = os.getcwd() |
1253 os.chdir(repo.root) |
1253 os.chdir(repo.root) |
1254 text = repo.ui.edit("\n".join(edittext), ctx.user()) |
1254 text = repo.ui.edit("\n".join(edittext), ctx.user()) |
|
1255 text = re.sub("(?m)^HG:.*\n", "", text) |
1255 os.chdir(olddir) |
1256 os.chdir(olddir) |
1256 |
1257 |
1257 if not text.strip(): |
1258 if not text.strip(): |
1258 raise util.Abort(_("empty commit message")) |
1259 raise util.Abort(_("empty commit message")) |
1259 |
1260 |