comparison src/org/tmatesoft/hg/repo/HgPhase.java @ 649:e79cf9a8130b

Push: phase4 - update local and remote phase information
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 26 Jun 2013 20:52:38 +0200
parents 5afc7eedb3dd
children cd77bf51b562
comparison
equal deleted inserted replaced
648:690e71d29bf6 649:e79cf9a8130b
1 /* 1 /*
2 * Copyright (c) 2012 TMate Software Ltd 2 * Copyright (c) 2012-2013 TMate Software Ltd
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License. 6 * the Free Software Foundation; version 2 of the License.
7 * 7 *
56 if (Secret.hgString.equals(value)) { 56 if (Secret.hgString.equals(value)) {
57 return Secret; 57 return Secret;
58 } 58 }
59 throw new IllegalArgumentException(String.format("Bad phase name: %d", value)); 59 throw new IllegalArgumentException(String.format("Bad phase name: %d", value));
60 } 60 }
61
62 /**
63 * @return integer value Mercurial uses to identify the phase
64 */
65 public int mercurialOrdinal() {
66 if (this == Undefined) {
67 throw new IllegalStateException("Undefined phase is an artifical value, which doesn't possess a valid native mercurial ordinal");
68 }
69 return ordinal(); // what a coincidence
70 }
61 } 71 }