[PATCH] Solved issue4039
Stephen Lee
sphen.lee at gmail.com
Tue Mar 11 03:50:50 CDT 2014
On Tue, Mar 11, 2014 at 7:41 AM, Cristian Zamfir <cristi_zmf at yahoo.com> wrote:
>
>
> Good evening!
>
> My name is Cristi Zamfir.
>
> This is my first time contributing to an open source project. I have read the guide on how to send a patch for Mercurial. If I did anything wrong in the sending process i would like to apologize now for any inconvenience created.
>
> Patch Description:
>
> `hg log -r 0:null` is like `hg log -r null`(issue4039)
>
>
> The command hg log -r 0:null would show only one revision (the first one -1) instead of showing the first 2 revisions. This was caused by an if condition in "scmutil.py" file at line at lines 509 - 510:
>
>>if end == nullrev and start <= 0:
>> start = nullrev
>
> Commenting these 2 instructions solved the problem. I also modified test-log.t, test-glog.t to check for the right output.
>
> The Patch:
>
> # HG changeset patch
> # User Cristian Zamfir <cristi_zmf at yahoo.com>
> # Date 1394481280 -7200
> # Mon Mar 10 21:54:40 2014 +0200
> # Node ID 386c34467d86668c8fdbc1de4a54eabdb2ca227e
> # Parent 19e9478c1a2245b6b5b4b2882efee5261d7df963
> issue4039
This description doesn't match the format required for contributing:
topic: what the change does (issue12345)
>
> diff -r 19e9478c1a22 -r 386c34467d86 mercurial/scmutil.py
> --- a/mercurial/scmutil.pyThu Mar 06 17:26:49 2014 -0600
> +++ b/mercurial/scmutil.pyMon Mar 10 21:54:40 2014 +0200
> @@ -506,8 +506,8 @@
> start, end = spec.split(_revrangesep, 1)
> start = revfix(repo, start, 0)
> end = revfix(repo, end, len(repo) - 1)
> - if end == nullrev and start <= 0:
> - start = nullrev
> + #if end == nullrev and start <= 0:
> + #start = nullrev
Please remove code rather than commenting out - seeing the old code is
what a VCS like Mercurial is for!
A good first attempt - please don't get discouraged!
Steve
More information about the Mercurial-devel
mailing list