Here is a fix for bug #544, which looks like a pretty safe fix.
Sun Oct 9 07:49:14 EDT 2005 David Roundy <droundy@xxxxxxxxx>
* add test for bug #544
Sun Oct 9 07:49:41 EDT 2005 David Roundy <droundy@xxxxxxxxx>
* fix bug #544, caused by outputing changes --context with escaping and
coloring.
Sun Oct 9 07:51:43 EDT 2005 David Roundy <droundy@xxxxxxxxx>
* add changelog entry for #544.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
New patches:
[add test for bug #544
David Roundy <droundy@xxxxxxxxx>**20051009114914]
<
> {
addfile ./tests/changes_send_context.pl
hunk ./tests/changes_send_context.pl 1
+#!/usr/bin/env perl
+
+use lib 'lib/perl';
+use Test::More qw/no_plan/;
+use Shell::Command;
+use Test::Darcs;
+use Shell::Command;
+use strict;
+
+cleanup 'temp1';
+mkpath 'temp1';
+chdir 'temp1';
+darcs 'init';
+open (DEF, ">_darcs/prefs/defaults") || die "Couldn't write to defaults.";
+print DEF "ALL --author tester";
+print DEF "ALL --ignore-times";
+close(DEF);
+
+{
+ my $testname = "RT#544 using context created with 8-bit chars";
+ touch 'foo';
+ like ( darcs("record -la -m 'add\212 foo'"), qr/Finished record/,
+ 'recorded patch adding foo');
+ my $context = darcs('changes --context');
+ open(CON, ">context");
+ print CON $context;
+ close(CON);
+ system 'date > foo';
+ like ( darcs("record -a -m 'date foo'"), qr/Finished record/,
+ 'recorded patch modifying foo');
+ like ( darcs('send -a -o patch --context context .'), qr/^$/, $testname );
+}
+
+chdir '../';
+cleanup('temp1');
+ok((!-d 'temp1'), 'temp1 directory was deleted');
+
+
+
+
}
[fix bug #544, caused by outputing changes --context with escaping and coloring.
David Roundy <droundy@xxxxxxxxx>**20051009114941]
<
> {
hunk ./Changes.lhs 25
import Depends ( slightly_optimize_patchset )
import DarcsCommands ( DarcsCommand(..), nodefaults )
- -import DarcsArguments ( DarcsFlag(Context, MachineReadable, HumanReadable,
+import DarcsArguments ( DarcsFlag(Context, MachineReadable,
XMLOutput, Summary, Reverse, Verbose),
fix_filepath, changes_format,
possibly_remote_repo_dir, get_repodir,
hunk ./Changes.lhs 45
import Annotate ( created_as_xml )
import DarcsUtils ( catchall, formatPath )
import FastPackedString ( linesPS )
- -import Printer ( Doc, putDocLnWith, renderPS, renderString, prefix,
+import Printer ( Doc, putDocLnWith, simplePrinters, renderPS,
+ renderString, prefix,
packedString, text, vcat, vsep, ($$), empty, errorDoc )
import ColourPrinter ( fancyPrinters )
#include "impossible.h"
hunk ./Changes.lhs 219
r <- identifyRepository (get_repodir opts) >>= read_repo
putStrLn "\nContext:\n"
when (not $ null r || null (head r)) $
- - putDocLnWith fancyPrinters $ changelog opts' $ get_changes_info opts' []
- - [head $ slightly_optimize_patchset r]
- - where opts' = if HumanReadable `elem` opts || XMLOutput `elem` opts
- - then opts
- - else MachineReadable : opts
+ putDocLnWith simplePrinters $ changelog [MachineReadable] $
+ get_changes_info [MachineReadable] []
+ [head $ slightly_optimize_patchset r]
\end{code}
}
[add changelog entry for #544.
David Roundy <droundy@xxxxxxxxx>**20051009115143]
<
> {
hunk ./changelog.in/entries/droundy 12
# If other developers prefer, they could also create a new file for each
# change. I'm still working out how best to handle this new changelog
# scheme.
+
+match: name "fix bug .544, caused by outputing"
+
+> Fixed bug where 'darcs changes --context' created a context that
+> contained escapes that prevented its use with send. (bug #544, David
+> Roundy)
match: name "make --summary have effect in interactive commands"
}
Context:
[TAG 1.0.4rc1
Tommy Pettersson <ptp@xxxxxxxxxxxxxx>**20051008101653]
Patch bundle hash:
bf367fb5d609e7b53c7af312dc4155da38f7f47f
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFDSQR6Q6uZI9PVvOwRAiruAJ9FYlVQVnqXJRxL3LTcZ8rltY2qtgCgtbic
Vd6hhEY9Twr9RfxlevhqE3o=
=rfsO
-----END PGP SIGNATURE-----
_______________________________________________
darcs-devel mailing list
darcs-devel@xxxxxxxxx
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel
|