graph view does not show lines with ---
Martin Geisler
mg at lazybytes.net
Wed Dec 2 03:38:47 CST 2009
Fabian <bona+google at fabian-kreutz.de> writes:
> Moi!
>
> Here's a patch:
>
> *** /usr/bin/hgk 2009-12-02 10:07:50.000000000 +0200
> --- /tmp/hgk 2009-12-02 10:08:17.000000000 +0200
> ***************
> *** 3154,3161 ****
> set pad [string range
> "----------------------------------------" 1 $l]
> $ctext insert end "$pad $header $pad\n" filesep
> set diffinhdr 1
> ! } elseif {[regexp {^(---|\+\+\+)} $line]} {
> ! set diffinhdr 0
> } elseif {[regexp {^@@ -([0-9]+),([0-9]+) \+([0-9]+),([0-9]+) @@
> (.*)} \
> $line match f1l f1c f2l f2c rest]} {
> if {$gaudydiff} {
> --- 3154,3161 ----
> set pad [string range
> "----------------------------------------" 1 $l]
> $ctext insert end "$pad $header $pad\n" filesep
> set diffinhdr 1
> ! } elseif {[regexp {^(---|\+\+\+)} $line] && $diffinhdr} {
> ! set diffinhdr 1
> } elseif {[regexp {^@@ -([0-9]+),([0-9]+) \+([0-9]+),([0-9]+) @@
> (.*)} \
> $line match f1l f1c f2l f2c rest]} {
> if {$gaudydiff} {
Could you please resubmit the patch according to the guidelines here:
http://mercurial.selenic.com/wiki/ContributingChanges
Basically I would like to see a patch from 'hg export' so that we get a
proper commit message and can credit you correctly.
> There already is this global state variable "diffinhdr", which is set
> to 1 by the "diff --git a/... b/..." line and to false by the "@@pos
> pos@@" line. The regexp (---|\+\+\+) should only match if found in
> header and not set the header to be finished.
> Here is an example input to the above processing loop:
>
> fabian at aten: hg --config ui.report_untrusted=false debug-diff-tree -r -
> p -C da3271fcc95e 5d9dc59a8f49
> diff --git a/.be/bugs/7d8f854b-7722-4d86-876f-f38e68068823/values
> b/.be/bugs/7d8f854b-7722-4d86-876f-f38e68068823/values
> new file mode 100644
> --- /dev/null
> +++ b/.be/bugs/7d8f854b-7722-4d86-876f-f38e68068823/values
> @@ -0,0 +1,17 @@
> +creator: Fabian Kreutz
> ...
Is this something we can put into a test case? If so, then please
include that in your patch :-)
--
Martin Geisler
VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
More information about the Mercurial-devel
mailing list