Martin, can it be done without history editing, e.g. in third commit?<br><br><div class="gmail_quote">2012/2/6 Martin Geisler <span dir="ltr"><<a href="mailto:mg@aragost.com">mg@aragost.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Constantine <<a href="mailto:theaspect@gmail.com">theaspect@gmail.com</a>> writes:<br>
<br>
> Martin, Linus said "Just for fun". Are You think resending simple<br>
> patch eight times funny?<br>
<br>
</div>Sorry about that -- we (core developers) often forget that it's not fun<br>
to submit patches again and again... some people really appreciate the<br>
feedback, but others have better things to do.<br>
<br>
Overall, we want really pretty code in Mercurial and so the bar is a<br>
little high for getting patches accepted.<br>
<div><div class="h5"><br>
> If my contribution worth somesing, you can fix it yourself, otherwise<br>
> throw it away. But bear in mind, "graph" visualisation in hgweb<br>
> completely broken: try to compare high-branched tree with tortoisehg's<br>
> version.<br>
><br>
> 2012/2/2 Martin Geisler <<a href="mailto:mg@aragost.com">mg@aragost.com</a>><br>
><br>
>> Constantine Linnick <<a href="mailto:theaspect@gmail.com">theaspect@gmail.com</a>> writes:<br>
>><br>
>> > # HG changeset patch<br>
>> > # User Constantine Linnick <<a href="mailto:theaspect@gmail.com">theaspect@gmail.com</a>><br>
>> > # Date 1327235726 -25200<br>
>> > # Node ID 537733973603cb4f974f01aecd51923da17e314f<br>
>> > # Parent  878bc4a62a735a1624e9b69c672d5fb5074d4855<br>
>> > graph: in hgrc specify line width for main branch<br>
>> ><br>
>> > You can specify width to visually distinguish main branch (trunk)<br>
>> > on hgweb's graph page. Settings format is branch_name.width = value,<br>
>> > where width in px e.g.:<br>
>> > [graph]<br>
>> > default.width = 3<br>
>> ><br>
>> > diff -r 878bc4a62a73 -r 537733973603 mercurial/graphmod.py<br>
>> > --- a/mercurial/graphmod.py   Thu Jan 19 14:31:05 2012 -0600<br>
>> > +++ b/mercurial/graphmod.py   Sun Jan 22 19:35:26 2012 +0700<br>
>> > @@ -18,6 +18,7 @@<br>
>> >  """<br>
>> ><br>
>> >  from mercurial.node import nullrev<br>
>> > +import re<br>
>> ><br>
>> >  CHANGESET = 'C'<br>
>> ><br>
>> > @@ -67,7 +68,7 @@<br>
>> >          parents = set([p.rev() for p in ctx.parents() if p.node() in<br>
>> include])<br>
>> >          yield (ctx.rev(), CHANGESET, ctx, sorted(parents))<br>
>> ><br>
>> > -def colored(dag):<br>
>> > +def colored(dag, repo):<br>
>> >      """annotates a DAG with colored edge information<br>
>> ><br>
>> >      For each DAG node this function emits tuples::<br>
>> > @@ -83,6 +84,21 @@<br>
>> >      seen = []<br>
>> >      colors = {}<br>
>> >      newcolor = 1<br>
>> > +    config = dict()<br>
>><br>
>> There is another empty dict just above and it uses {}. I'm not sure<br>
>> which I prefer myself, but it's important to be consistent. You<br>
>> should therefore use {} here too so that you keep the coding style<br>
>> consistent.<br>
><br>
> Here:<br>
> <a href="http://www.selenic.com/pipermail/mercurial-devel/2012-January/036816.html" target="_blank">http://www.selenic.com/pipermail/mercurial-devel/2012-January/036816.html</a><br>
> Mark said "No bug fixes, no spelling fixes, no coding style fixes, no<br>
> whitespace fiddling, nothing."<br>
<br>
</div></div>I meant that I think you should use '{}' above to keep the overall style<br>
more consistent. That's all.<br>
<br>
(Btw, his name is Matt, not Mark.)<br></blockquote><div>Just typo <br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im"><br>
>> +    for key, val in repo.ui.configitems('graph'):<br>
>> > +        if '.' not in key:<br>
>> > +            continue<br>
>> > +        branch, setting = key.rsplit('.',1)<br>
>><br>
>> We use PEP 8 formatting in Mercurial. Please remember to run the full<br>
>> test suite before submitting patches -- test-check-code-hg.t should<br>
>> have caught the missing spaces around ','.<br>
><br>
> I've run All tests. Your particular test case:<br>
><br>
> ~/workspace/mercurial-repo/tests$ ./run-tests.py test-check-code-hg.t<br>
> .<br>
> # Ran 1 tests, 0 skipped, 0 failed.<br>
<br>
</div>Okay, I'm sorry the check-code script didn't catch this mistake.<br>
<div class="im"><br>
>> > +                (setting == "width" and not re.match('[0-9]{1,2}',<br>
>> val))):<br>
>><br>
>> Please don't use regular expressions for something that can be<br>
>> checked with simpler string functions:<br>
><br>
> I test not digit, I test digit between 0 and 99. Small regexp simplier<br>
> then two tests<br>
<br>
</div>I did see that you check for a number in the range 0..100. I think<br>
that's best done with a simple<br>
<br>
  0 < int(val) < 100<br>
<br>
Here I would actually just check that 0 < int(val) and avoid the<br>
arbitrary restriction on the line width. Unless it isn't arbitrary? I<br>
guess the graph look really weird with a 100px wide line. I guess it<br>
also looks pretty bad with a 30px line width?<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div>Ok<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="HOEnZb">
<div class="h5">
--<br>
Martin Geisler<br>
<br>
aragost Trifork<br>
Professional Mercurial support<br>
<a href="http://www.aragost.com/mercurial/customer-projects/" target="_blank">http://www.aragost.com/mercurial/customer-projects/</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>With Best Regards,<br>Constantine<br>