RFR: 1452: Can never notify on first commit [v7]

Guoxiong Li gli at openjdk.org
Fri Oct 7 16:45:43 UTC 2022

On Fri, 7 Oct 2022 16:38:52 GMT, Zhao Song <zsong at openjdk.org> wrote:

>> I changed the logic when there is no notify history.
>> Originally, on the first commit of a new repo, the bot would find no notify history, so it will make the first commit as an initial state and it will not make any notification.
>> Now, on the first commit of a new repo, the bot would find no notify history too, but it will make the initial git hash as the initial state of the repo, so it will treat the first commit as an 'update' operation and will make notifications.
> Zhao Song has updated the pull request incrementally with two additional commits since the last revision:
>  - fix a bug
>  - add a method ReadOnlyRepository#initialHash

Looks good.

vcs/src/main/java/org/openjdk/skara/vcs/hg/HgRepository.java line 53:

> 51:     private final Logger log = Logger.getLogger("org.openjdk.skara.vcs.hg");
> 52: 
> 53:     private static final Hash NULL_REVISION = new Hash("0000000000000000000000000000000000000000");

Maybe it is better to use `“0”.repeat(40)` to construct such string so that the unnecessary count error can be avoided. But it is also ok now.


Marked as reviewed by gli (Committer).

PR: https://git.openjdk.org/skara/pull/1385

More information about the skara-dev mailing list