Mercurial > hg
changeset 28174:f16b84b1e40e
phases: use constants for phase values
Magic numbers hinder readability.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 15 Feb 2016 16:49:52 -0800 |
parents | 1ff28873830e |
children | c25e3fd38ff1 |
files | mercurial/phases.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/phases.py Wed Jan 20 22:10:17 2016 -0500 +++ b/mercurial/phases.py Mon Feb 15 16:49:52 2016 -0800 @@ -435,11 +435,11 @@ continue node = bin(nhex) phase = int(phase) - if phase == 0: + if phase == public: if node != nullid: repo.ui.warn(_('ignoring inconsistent public root' ' from remote: %s\n') % nhex) - elif phase == 1: + elif phase == draft: if node in nodemap: draftroots.append(node) else: