mercurial: Implement rcs_diff. (Daniel Andersson)

master
Joey Hess 2011-07-19 11:44:09 -04:00
parent 339b95e719
commit e04cb1ffd3
4 changed files with 25 additions and 6 deletions

View File

@ -307,7 +307,23 @@ sub rcs_recentchanges ($) {
}
sub rcs_diff ($;$) {
# TODO
my $rev=shift;
my $maxlines=shift;
my @lines;
my $addlines=sub {
my $line=shift;
return if defined $maxlines && @lines == $maxlines;
push @lines, $line."\n"
if (@lines || $line=~/^diff --git/);
return 1;
};
safe_hg(undef, $addlines, "hg", "diff", "-c", $rev, "-g");
if (wantarray) {
return @lines;
}
else {
return join("", @lines);
}
}
{

9
debian/changelog vendored
View File

@ -1,12 +1,13 @@
ikiwiki (3.20110716) UNRELEASED; urgency=low
* mercurial: openid nicknames are now used when committing. (Daniel Andersson)
* mercurial: implement rcs_commit_staged so comments, attachments, etc
* mercurial: Openid nicknames are now used when committing. (Daniel Andersson)
* mercurial: Implement rcs_commit_staged so comments, attachments, etc
can be used. (Daniel Andersson)
* mercurial: implement rcs_rename and rcs_remove. (Daniel Andersson)
* mercurial: fix viewing of a diff containing non-utf8 changes.
* mercurial: Implement rcs_rename, rcs_remove. (Daniel Andersson)
* mercurial: Fix viewing of a diff containing non-utf8 changes.
(Daniel Andersson)
* mercurial: Make both rcs_getctime and rcs_getmtime fast. (Daniel Andersson)
* mercurial: Implement rcs_diff. (Daniel Andersson)
-- Joey Hess <joeyh@debian.org> Tue, 19 Jul 2011 11:22:52 -0400

View File

@ -20,7 +20,7 @@ auto.setup |yes |yes |incomplete|yes |incomplete |yes
`rcs_commit_staged` |yes |yes |yes |yes |yes |yes |no |yes
`rcs_rename` |yes |yes |yes |yes |yes |yes |no |yes
`rcs_remove` |yes |yes |yes |yes |yes |yes |no |yes
`rcs_diff` |yes |yes |yes |yes |no |yes |yes |yes
`rcs_diff` |yes |yes |yes |yes |yes |yes |yes |yes
`rcs_getctime` |fast |slow |slow |slow |fast |slow |slow |slow
`rcs_getmtime` |fast |slow |slow |slow |fast |no |no |no
`rcs_preprevert` |yes |no |no |no |no |no |no |no

View File

@ -6,6 +6,8 @@ CC of `rcs_diff` implementation in `git.pm` with few changes. Mercurial provides
--[[Daniel Andersson]]
> Guess that makes sense, [[done]] --[[Joey]]
---
diff -r 1b6c46b62a28 -r cc73d670bf99 Plugin/mercurial.pm