navaneeth.suresh added inline comments.
navaneeth.suresh marked 2 inline comments as done.

INLINE COMMENTS

> navaneeth.suresh wrote in exchange.py:1044
> `ctx = pushop.repo[node]` is needed to check the phase of the ctx. also, 
> iiuc, if i write `if a and b: pass` in python, both a and b are evaluated 
> before performing the comparison. iiuc, when ctx is `None`, `ctx.phase()` 
> won't exist as `ctx = repo[None]` is not actually a changeset but, the 
> uncommitted changes in the working directory instead. if we need to skip the 
> return, we need to have the `ctx = pushop.repo[node]` inside the `if` 
> statement. but, for me, skipping the further evaluation earlier using a 
> `return` without the nested `if` with more alignment sounds good.

@pulkit i have updated as you suggested to get rid of all returns. sorry for 
being vague, thanks for the suggestion.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6731/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6731

To: navaneeth.suresh, #hg-reviewers
Cc: pulkit, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to