comparison cmdline/org/tmatesoft/hg/console/Main.java @ 415:ee8264d80747

Explicit constant for regular file flags, access to flags for a given file revision
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 22 Mar 2012 18:54:11 +0100
parents 2fadf8695f8a
children d30083c80d52
comparison
equal deleted inserted replaced
414:bb278ccf9866 415:ee8264d80747
1 /* 1 /*
2 * Copyright (c) 2011 TMate Software Ltd 2 * Copyright (c) 2011-2012 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 *
91 System.out.println("REPO:" + hgRepo.getLocation()); 91 System.out.println("REPO:" + hgRepo.getLocation());
92 } 92 }
93 93
94 public static void main(String[] args) throws Exception { 94 public static void main(String[] args) throws Exception {
95 Main m = new Main(args); 95 Main m = new Main(args);
96 m.checkFileFlags();
96 // m.buildFileLog(); 97 // m.buildFileLog();
97 // m.testConsoleLog(); 98 // m.testConsoleLog();
98 // m.testTreeTraversal(); 99 // m.testTreeTraversal();
99 // m.testRevisionMap(); 100 // m.testRevisionMap();
100 // m.testSubrepos(); 101 // m.testSubrepos();
109 // m.dumpIgnored(); 110 // m.dumpIgnored();
110 // m.dumpDirstate(); 111 // m.dumpDirstate();
111 // m.testStatusInternals(); 112 // m.testStatusInternals();
112 // m.catCompleteHistory(); 113 // m.catCompleteHistory();
113 // m.dumpCompleteManifestLow(); 114 // m.dumpCompleteManifestLow();
114 m.dumpCompleteManifestHigh(); 115 // m.dumpCompleteManifestHigh();
115 // m.bunchOfTests(); 116 // m.bunchOfTests();
116 } 117 }
117 118
119 private void checkFileFlags() throws Exception {
120 // ~/hg/test-flags repo
121 // TODO transform to a test once I keep test-flags in test-repos.jar
122 HgDataFile link = hgRepo.getFileNode("file-link");
123 HgDataFile exec = hgRepo.getFileNode("file-exec");
124 HgDataFile file = hgRepo.getFileNode("regular-file");
125 System.out.println("Link: " + link.getFlags(TIP));
126 System.out.println("Exec: " + exec.getFlags(TIP));
127 System.out.println("File: " + file.getFlags(TIP));
128 }
129
118 private void buildFileLog() throws Exception { 130 private void buildFileLog() throws Exception {
119 HgLogCommand cmd = new HgLogCommand(hgRepo); 131 HgLogCommand cmd = new HgLogCommand(hgRepo);
120 cmd.file("file1", false); 132 cmd.file("file1", false);
121 cmd.execute(new HgChangesetTreeHandler() { 133 cmd.execute(new HgChangesetTreeHandler() {
122 public void next(HgChangesetTreeHandler.TreeElement entry) { 134 public void next(HgChangesetTreeHandler.TreeElement entry) {