Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
octobus
mercurial-devel
Commits
4ccf3de52989
Commit
9aa90e68
authored
Jul 11, 2005
by
Matt Mackall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turn off signing with hgeditor by default
manifest hash: f2732475351ee22d78e0dab629db03f1f215b21f
parent
104d2aee3b44
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
hgeditor
hgeditor
+14
-6
No files found.
hgeditor
View file @
4ccf3de5
...
...
@@ -3,6 +3,9 @@
# This is an example of using HGEDITOR to automate the signing of
# commits and so on.
# change this to one to turn on GPG support
SIGN
=
0
T1
=
""
;
T2
=
""
cleanup_exit
()
{
rm
-f
"
$T1
"
"
$T2
"
...
...
@@ -40,12 +43,17 @@ else
CHECKSUM
=
`
md5sum
"
$T1
"
`
$EDITOR
"
$T1
"
"
$T2
"
||
cleanup_exit
$?
echo
"
$CHECKSUM
"
|
md5sum
-c
2>/dev/null
&&
cleanup_exit 13
{
head
-n
1
"
$T1
"
echo
grep
-v
"^HG:"
"
$T1
"
| gpg
-t
-a
-u
"
${
HGUSER
}
"
--clearsign
}
>
"
$T2
"
&&
mv
"
$T2
"
"
$1
"
if
[
"
$SIGN
"
==
"1"
]
;
then
echo
"
$CHECKSUM
"
|
md5sum
-c
2>/dev/null
&&
cleanup_exit 13
{
head
-n
1
"
$T1
"
echo
grep
-v
"^HG:"
"
$T1
"
| gpg
-t
-a
-u
"
${
HGUSER
}
"
--clearsign
}
>
"
$T2
"
&&
mv
"
$T2
"
"
$1
"
else
mv
"
$T1
"
"
$1
"
fi
cleanup_exit
$?
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment