Skip to content
Snippets Groups Projects
Commit 20b62115 authored by Thomas Arendsen Hein's avatar Thomas Arendsen Hein
Browse files

Run commit message editor in the repo root (like hooks).

This makes the hgeditor script work with hg commit -R path/to/repo
parent 4b5725a4
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,6 @@
}
(
cd "`hg root`"
grep '^HG: changed' "$1" | cut -b 13- | while read changed; do
hg diff "$changed" >> "$HGTMP/diff"
done
......
......@@ -445,4 +445,7 @@
edittext += "".join(["HG: removed %s\n" % f for f in remove])
if not changed and not remove:
edittext += "HG: no files changed\n"
# run editor in the repository root
olddir = os.getcwd()
os.chdir(self.root)
edittext = self.ui.edit(edittext)
......@@ -448,4 +451,5 @@
edittext = self.ui.edit(edittext)
os.chdir(olddir)
if not edittext.rstrip():
return None
text = edittext
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment