aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoridl0r <idl0r@gentoo.org>2009-05-07 13:46:32 +0000
committeridl0r <idl0r@gentoo.org>2009-05-07 13:46:32 +0000
commitbea0beeb039db318c146994a393ed1b51bd3658d (patch)
treed5265c0527284011b5125c2aaac0b5bc50eff5c5
parentRe-add files (git) if the copyright has been updated, thanks to Justin Lecher... (diff)
downloadgentoolkit-bea0beeb039db318c146994a393ed1b51bd3658d.tar.gz
gentoolkit-bea0beeb039db318c146994a393ed1b51bd3658d.tar.bz2
gentoolkit-bea0beeb039db318c146994a393ed1b51bd3658d.zip
Add hg/mercurial support.
svn path=/trunk/gentoolkit-dev/; revision=618
-rwxr-xr-xsrc/echangelog/echangelog17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/echangelog/echangelog b/src/echangelog/echangelog
index c27834d..9b71f8b 100755
--- a/src/echangelog/echangelog
+++ b/src/echangelog/echangelog
@@ -53,6 +53,15 @@ my %vcs = (
skip => 4,
regex => qr/^diff \-\-git \S*\/((\S*)\.ebuild)/
},
+ hg => {
+ diff => "hg diff",
+ status => "hg status .",
+ add => "hg add",
+ skip => 3,
+ # hg diff is relative to the root.
+ # TODO: Write a proper regex :)
+ regex => qr/diff \-r \S+ \S+\/\S+\/((\S+)\.ebuild)/
+ },
);
sub usage {
@@ -166,7 +175,13 @@ if ( -d "CVS" ) {
open(GIT, '-|', "git rev-parse --git-dir 2>/dev/null");
$vcs = "git" if defined(<GIT>);
close(GIT);
- last;
+ last if $vcs;
+ }
+ if ( -X "$path/hg" ) {
+ open(HG, '-|', "hg root 2>/dev/null");
+ $vcs = "hg" if defined(<HG>);
+ close(HG);
+ last if $vcs;
}
}
}