Tue Oct 19 23:09:34 MST 2004 Will <will@xxxxxxxxxx>
* clean up 'use strict' warnings in cgi
Tue Oct 19 23:32:38 MST 2004 Will <will@xxxxxxxxxx>
* use creator hash and original file name in file annotate links
New patches:
[clean up 'use strict' warnings in cgi
Will <will@xxxxxxxxxx>**20041020060934] {
hunk ./cgi/darcs.cgi.in 32
-require strict;
+use strict;
hunk ./cgi/darcs.cgi.in 50
-$darcs_program = read_conf("darcs", "darcs");
-$xslt_program = read_conf("xsltproc", "xsltproc");
+my $darcs_program = read_conf("darcs", "darcs");
+my $xslt_program = read_conf("xsltproc", "xsltproc");
hunk ./cgi/darcs.cgi.in 54
-$repository_root = read_conf("reposdir", "/var/www");
+my $repository_root = read_conf("reposdir", "/var/www");
hunk ./cgi/darcs.cgi.in 57
-$template_root = read_conf("xslt_dir", "@datadir@/darcs/xslt");
+my $template_root = read_conf("xslt_dir", "@datadir@/darcs/xslt");
hunk ./cgi/darcs.cgi.in 59
-$xslt_annotate = "$template_root/annotate.xslt";
-$xslt_browse = "$template_root/browse.xslt";
-$xslt_patches = "$template_root/patches.xslt";
-$xslt_repos = "$template_root/repos.xslt";
+my $xslt_annotate = "$template_root/annotate.xslt";
+my $xslt_browse = "$template_root/browse.xslt";
+my $xslt_patches = "$template_root/patches.xslt";
+my $xslt_repos = "$template_root/repos.xslt";
hunk ./cgi/darcs.cgi.in 64
-$xslt_errors = "$template_root/errors.xslt";
+my $xslt_errors = "$template_root/errors.xslt";
hunk ./cgi/darcs.cgi.in 69
-$stylesheet = read_conf("stylesheet", "/cgi-bin/darcs.cgi/styles.css");
+my $stylesheet = read_conf("stylesheet", "/cgi-bin/darcs.cgi/styles.css");
hunk ./cgi/darcs.cgi.in 73
-$css_styles = read_conf("css_styles", "@sysconfdir@/darcs/styles.css");
+my $css_styles = read_conf("css_styles", "@sysconfdir@/darcs/styles.css");
hunk ./cgi/darcs.cgi.in 76
-$xml_errors = "$template_root/errors.xml";
+my $xml_errors = "$template_root/errors.xml";
hunk ./cgi/darcs.cgi.in 85
- my $flag, $val;
+ my ($flag, $val);
hunk ./cgi/darcs.cgi.in 182
+ my $file;
hunk ./cgi/darcs.cgi.in 208
+ my ($repo, $name);
hunk ./cgi/darcs.cgi.in 231
+# common regular expressions for validating passed parameters
+my $hash_regex = /^([\w\-.]+)$/;
+my $path_regex = qr@^([^\\!\$\^&*()\[\]{}<>~`|';"?\r\n]+)$@;
+
hunk ./cgi/darcs.cgi.in 271
- $fh = repo_listing();
+ my $fh = repo_listing();
hunk ./cgi/darcs.cgi.in 277
- $path =~ qr@^([^\\!\$\^&*()\[\]{}<>~`|';"?\r\n]+)$@ or \
- die qq(bad path_info "$path");
- @path = split('/', substr($1, 1));
+ $path =~ $path_regex or die qq(bad path_info "$path");
+ my @path = split('/', substr($1, 1));
hunk ./cgi/darcs.cgi.in 312
- my $patch = safe_param('p', '^([\w\-.]+)$');
+ my $patch = safe_param('p', $hash_regex);
hunk ./cgi/darcs.cgi.in 319
- my $fn;
-
hunk ./cgi/darcs.cgi.in 321
- $fh = dir_listing($repo, $dir);
+ my $fh = dir_listing($repo, $dir);
hunk ./cgi/darcs.cgi.in 324
- $fh = darcs_xml($repo, "changes", $darcs_args, $dir, $file);
+ my $fh = darcs_xml($repo, "changes", $darcs_args, $dir, $file);
hunk ./cgi/darcs.cgi.in 333
- darcs(STDOUT, $repo, "diff", $darcs_args, $dir, $file);
+ darcs(\*STDOUT, $repo, "diff", $darcs_args, $dir, $file);
}
[use creator hash and original file name in file annotate links
Will <will@xxxxxxxxxx>**20041020063238] {
hunk ./cgi/darcs.cgi.in 327
- $darcs_args .= " --summary ";
- $fh = darcs_xml($repo, "annotate", $darcs_args, $dir, $file);
+ $darcs_args .= " --summary --xml-output ";
+
+ my $creator_hash = safe_param('ch', $hash_regex);
+ my $original_path = safe_param('o', $path_regex);
+
+ my $fh = make_xml($repo, $dir, $file);
+
+ # use the creator hash and original file name when available so
+ # annotations can span renames
+ if ($creator_hash ne '' && $original_path ne '') {
+ $darcs_args .= " --creator-hash '$creator_hash' ";
+ darcs($fh, $repo, "annotate", $darcs_args, '', $original_path);
+ } else {
+ darcs($fh, $repo, "annotate", $darcs_args, $dir, $file);
+ }
+
+ finish_xml($fh);
hunk ./cgi/xslt/annotate.xslt 16
-
+
hunk ./cgi/xslt/annotate.xslt 219
- <xsl:variable name="hash" select="modified/patch/@hash" />
hunk ./cgi/xslt/annotate.xslt 220
+
+ <xsl:variable name="annotate-href">
+ <xsl:call-template name="make-annotate-href">
+ <xsl:with-param name="hash" select="modified/patch/@hash"/>
+ </xsl:call-template>
+ </xsl:variable>
hunk ./cgi/xslt/annotate.xslt 244
- <td><a href="{$command}?c=annotate&p={$hash}">annotate</a></td>
+ <td><a href="{$annotate-href}">annotate</a></td>
hunk ./cgi/xslt/annotate.xslt 256
- <xsl:variable name="hash" select="*/patch/@hash"/>
+ <xsl:variable name="annotate-href">
+ <xsl:call-template name="make-annotate-href">
+ <xsl:with-param name="hash" select="preceding::modified/patch/@hash"/>
+ </xsl:call-template>
+ </xsl:variable>
hunk ./cgi/xslt/annotate.xslt 262
- <a class="added-line" href="{$command}?c=annotate&p={$hash}">
+ <a class="added-line" href="{$annotate-href}">
hunk ./cgi/xslt/annotate.xslt 265
- <xsl:call-template name="check_removed_by"/>
+ <xsl:call-template name="check-removed-by"/>
hunk ./cgi/xslt/annotate.xslt 269
- <xsl:variable name="hash" select="*/patch/@hash"/>
+ <xsl:variable name="annotate-href">
+ <xsl:call-template name="make-annotate-href">
+ <xsl:with-param name="hash" select="*/patch/@hash"/>
+ </xsl:call-template>
+ </xsl:variable>
hunk ./cgi/xslt/annotate.xslt 275
- <a class="normal-line" href="{$command}?c=annotate&p={$hash}">
+ <a class="normal-line" href="{$annotate-href}">
hunk ./cgi/xslt/annotate.xslt 278
- <xsl:call-template name="check_removed_by"/>
+ <xsl:call-template name="check-removed-by"/>
hunk ./cgi/xslt/annotate.xslt 282
- <xsl:variable name="hash" select="*/patch/@hash"/>
+ <xsl:variable name="annotate-href">
+ <xsl:call-template name="make-annotate-href">
+ <xsl:with-param name="hash" select="*/patch/@hash"/>
+ </xsl:call-template>
+ </xsl:variable>
hunk ./cgi/xslt/annotate.xslt 290
- <a class="removed-line" href="{$command}?c=annotate&p={$hash}">
+
+ <a class="removed-line" href="{$annotate-href}">
hunk ./cgi/xslt/annotate.xslt 294
- <xsl:call-template name="check_removed_by"/>
+ <xsl:call-template name="check-removed-by"/>
hunk ./cgi/xslt/annotate.xslt 298
- <xsl:template name="check_removed_by">
+ <xsl:template name="check-removed-by">
hunk ./cgi/xslt/annotate.xslt 300
-
+
+ <xsl:variable name="annotate-href">
+ <xsl:call-template name="make-annotate-href">
+ <xsl:with-param name="hash" select="$hash"/>
+ </xsl:call-template>
+ </xsl:variable>
+
hunk ./cgi/xslt/annotate.xslt 309
- <a class="removed-by" href="{$command}?c=annotate&p={$hash}">-</a>
+ <a class="removed-by" href="{$annotate-href}">-</a>
hunk ./cgi/xslt/annotate.xslt 341
+ </xsl:template>
+
+ <xsl:template name="make-annotate-href" xml:space="default">
+ <xsl:param name="hash"/>
+
+ <xsl:variable name="created-as" select="/darcs/*/created_as"/>
+ <xsl:variable name="creator-hash" select="$created-as/patch/@hash"/>
+ <xsl:variable name="original-name" select="$created-as/@original_name"/>
+
+ <xsl:value-of select="$command"/>?c=annotate&p=<xsl:value-of
select="$hash"/>&ch=<xsl:value-of
select="$creator-hash"/>&o=<xsl:value-of select="$original-name"/>
}
Context:
[don't mmap on windows-semantics filesystems.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041019102101]
[add symlink to tarball as darcs-latest.tar.gz on make dist.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041019085945]
[link to darcs.css stylesheet
Mark Stosberg <mark@xxxxxxxxxxxxxxx>**20041018120816]
[rerecord shouldn't fail when the patch becomes an empty patch.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041017124826]
[darcs init is now silent on success.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041017122851]
[initial test for rerecord
Mark Stosberg <mark@xxxxxxxxxxxxxxx>**20041017013403
I noticed that there appeared to be no tests at all for 'rerecord', so I added
a
very basic one. Now at least if the command is completely broken there will
some
indication from the test suite.
I did break from convention by coding the test in Perl rather than 'sh'. Perl
has a much more flexible and powerful testing system. Since Perl is used in a
few other places in the project, I thought I could sneak this in here. :)
I think Perl could be provide a better long term solution for the automated
test suite.
I believe I adjusted the Makefile appropriately so this will get run. However,
I'm having trouble getting my environment set up so that "make test" works at
all,
so I wasn't able to test this.
The test should be easy to translate to a 'sh' script if you want to keep that
consistency for now.
Mark
]
[use DIV rather than verbatim when compiling docs to HTML.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041017121413]
[fix option/options typo in docs.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041017121319]
[add style for darcs command option headers
Mark Stosberg <mark@xxxxxxxxxxxxxxx>**20041016212736]
[add extra "options" markers
Mark Stosberg <mark@xxxxxxxxxxxxxxx>**20041016210257
These are used to highlight the places when command options
are explained in the descriptive text. For the web-based manual
these could be turned into CSS classes that can be styled,
and perhaps also HTML anchors.
]
[improve syntax consistency, add "options" sections
Mark Stosberg <mark@xxxxxxxxxxxxxxx>**20041016205515
- Sometimes it would say the "'compress' flag" and other times:
"--compress option".
(with dashes and s/flag/option). I made it consistent.
- Some \begin{option} sections appear as well since darcs thought
it was the same patch.
]
[move extra "--reply" documentation closer to the first chunk.
Mark Stosberg <mark@xxxxxxxxxxxxxxx>**20041016202638]
[canonize self
Mark Stosberg <mark@xxxxxxxxxxxxxxx>**20041016201245]
[typo fix
Mark Stosberg <mark@xxxxxxxxxxxxxxx>**20041016200011]
[add --creator-hash to annotate.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041016184220
This change is intended to make it possible to fix darcs.cgi behavior when
there are file renames. Currently, it's not possible to view with
darcs.cgi versions of file prior to a rename event. By specifying the file
name *when it was created*, we can avoid that difficulty.
]
[use new darcs.css with manual as well.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041016171201]
[adding darcs.css
Mark Stosberg <mark@xxxxxxxxxxxxxxx>**20041016160355
This is the one stylesheet to unify them all. At least, the intent is that it
would be used
on the main darcs set, the online manual, and the wiki, to unify the darcs
online presence.
]
[use anonymous file handle for temporary files in darcs.cgi.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041016165802]
[improve error message when push gets a bad repo as argument.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041016155515]
[Add explicit --dont-look-for-adds to tests, because they
simons@xxxxxxx**20041015150115
fail if the user has set
whatsnew look-for-adds
in his ~/.darcs/defaults file. "make check" should probably
ignore this config file altogether.
]
[IORef is now in Data hierarchy
simons@xxxxxxx**20041015145538]
[System.Time exports all this module needs
simons@xxxxxxx**20041015145524]
[remove trailing whitespace
simons@xxxxxxx**20041015145447]
[foreign exports withArray0
simons@xxxxxxx**20041015145329]
[prelude exports elem
simons@xxxxxxx**20041015145226]
[don't import bug twice in darcs_cgi.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041016144821]
[add new \begin{options} module to documentation.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041016135437]
[eliminate "David's Advanced Revision Control System" from manual and web page.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041016122054]
[partial docs spruce up to highlight long flag descriptions
Mark Stosberg <mark@xxxxxxxxxxxxxxx>**20041016024829
I can't decide whether this update (if applied to the rest of the docs) would
really add much. Give it a whirl and let me know. If it seems good, I can work
on update the rest of the docs.
Mark
]
[remove redundent docs for 'trackdown'
Mark Stosberg <mark@xxxxxxxxxxxxxxx>**20041016025325
The description was how to run 'trackdown' was repeated in slightly different
words. I removed
one copy.
]
[add --summary option to commands that accept --dry-run.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041015112027]
[remove vestigial sentence from web page.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041015105008]
[make changes accept --verbose as a synonymn for --summary.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041014120604]
[add 'cvs -n update' equivalence
mark@xxxxxxxxxxxxxxx**20041014030202
I use '-n update' nearly as much as plain 'update', so I thought this was
worth including for reference.
]
[bring ChangeLog up to date.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041014114923]
[don't accept newlines in patch names.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041014114833]
[quote conflict attribute values in xml output
Will <will@xxxxxxxxxx>**20041013161333]
[clarify that boringfile is a repository path
andrew@xxxxxxxxxxx**20041012205127]
[fix bug where new files didn't show up in darcs diff.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041013111107]
[fix bug in slurp_recorded_and_unrecorded when called from a different
directory.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041013110922]
[make pull prompt for confirmation when there is a conflict with unrecorded
changes.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041013111327]
[make unrevert interactive.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041012111740]
[Fix compilation errors if HAVE_MAPI and HAVE_CURSES are both unset
mklooster@xxxxxxx**20041011095851]
[update ChangeLog a bit.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041011111827]
[don't try to generate a new name on get if name was given explicitely.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041010123829]
[fixed a bug in changes --from-tag.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041010123136]
[when remaking website, also remake docs.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041010105157]
[Beatify, er, canonise myself in authors.hs.
Juliusz Chroboczek <jch@xxxxxxxxxxxxxx>**20041009171340]
[always mark conflicts, even if there's an obvious solution.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041009115131]
[when rerecording conflicted patch, remove the conflict.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041009104906]
[when matching patch names, include "UNDO: " in rolled-back patches.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041008111510]
[handle better the case where unrevert context doesn't make sense.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041008104452]
[remove unused read_patch function.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041007120450]
[add new slurp_recorded_and_unrecorded function.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041007120513]
[have cgi preserve whitespace in comments
Will <will@xxxxxxxxxx>**20041007181910]
[make cgi stylesheet location configurable
Will <will@xxxxxxxxxx>**20041007180619]
[Clean up stringify calls in configure.ac (take 3)
Taral <taral@xxxxxxxxx>**20041005173835]
[Clean up SignalHandler.lhs warnings
Taral <taral@xxxxxxxxx>**20041005172302]
[Clean up External.hs warnings
Taral <taral@xxxxxxxxx>**20041005172251]
[Use -Werror
Taral <taral@xxxxxxxxx>**20041004190657]
[make clean didn't remove authors executable
ijones@xxxxxxxxxx**20041005031319]
[fix linking problem with --disable-optimize
Tomasz Zielonka <t.zielonka@xxxxxxxxxxxxxxxxxxxxx>**20041005075950]
[fix overwriting of c_context.c in tarball source.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041005112445]
[Add RTSFLAGS to GNUmakefile
Taral <taral@xxxxxxxxx>**20041004192542]
[Clean up Patch.lhs warnings (take 2)
Taral <taral@xxxxxxxxx>**20041004192505]
[Make stringify put string in .rodata
Taral <taral@xxxxxxxxx>**20041004190637]
[fix replace documentation.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041005111328]
[really fix newlines in whatsnew -u
andrew@xxxxxxxxxxx**20041005030757]
[fix bug in defaults processing of options with -- in them.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041005105533]
[more win32 build fixes
Will <will@xxxxxxxxxx>**20041004173323]
[Make clear author can be a commented email address.
Ralph Corderoy <ralph@xxxxxxxxxxxxxxx>**20041004120404
I didn't realise that I could enter a commented email address when
prompted. Hence my authors.hs addition to fix up my existing patches.
These documentation and prompt changes try to avoid this for others.
]
[Remove unused var in Tag.lhs
Taral <taral@xxxxxxxxx>**20041003162732]
[Clean up FastPackedString.hs warnings
Taral <taral@xxxxxxxxx>**20040928232322]
[Clean up Context.lhs warnings
Taral <taral@xxxxxxxxx>**20040928232212]
[Move file-specific options out of GNUmakefile
Taral <taral@xxxxxxxxx>**20040928224635]
[can't make AUTHORS in predist, since history isn't available.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041004105119]
[fix win32 build problem
Will <will@xxxxxxxxxx>**20041003213706]
[TAG 1.0.0rc3
David Roundy <droundy@xxxxxxxxxxxxxxx>**20041003114608]
Patch bundle hash:
cc1104162c5de4e4b52a90be6431b3815d0cf9d7
_______________________________________________
darcs-devel mailing list
darcs-devel@xxxxxxxxxxxxxxx
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel
|