Mercurial > hg4j
comparison src/org/tmatesoft/hg/repo/HgInternals.java @ 608:e1b29756f901
Clean, organize and resolve some TODOs and FIXMEs: minor refactorings and comments
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Tue, 07 May 2013 21:27:51 +0200 |
parents | ba36f66c32b4 |
children | 545b1d4cc11d |
comparison
equal
deleted
inserted
replaced
607:66f1cc23b906 | 608:e1b29756f901 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2011-2012 TMate Software Ltd | 2 * Copyright (c) 2011-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 * |
142 File repoRoot = repo.getWorkingDir(); | 142 File repoRoot = repo.getWorkingDir(); |
143 Path.Source pathSrc = new Path.SimpleSource(new PathRewrite.Composite(new RelativePathRewrite(repoRoot), repo.getToRepoPathHelper())); | 143 Path.Source pathSrc = new Path.SimpleSource(new PathRewrite.Composite(new RelativePathRewrite(repoRoot), repo.getToRepoPathHelper())); |
144 // Impl note: simple source is enough as files in the working dir are all unique | 144 // Impl note: simple source is enough as files in the working dir are all unique |
145 // even if they might get reused (i.e. after FileIterator#reset() and walking once again), | 145 // even if they might get reused (i.e. after FileIterator#reset() and walking once again), |
146 // path caching is better to be done in the code which knows that path are being reused | 146 // path caching is better to be done in the code which knows that path are being reused |
147 return new FileWalker(repo.getSessionContext(), repoRoot, pathSrc, workindDirScope); | 147 return new FileWalker(repo, repoRoot, pathSrc, workindDirScope); |
148 } | 148 } |
149 | 149 |
150 // Convenient check of revision index for validity (not all negative values are wrong as long as we use negative constants) | 150 // Convenient check of revision index for validity (not all negative values are wrong as long as we use negative constants) |
151 public static boolean wrongRevisionIndex(int rev) { | 151 public static boolean wrongRevisionIndex(int rev) { |
152 // TODO Another method to check,throw and expand TIP at once (check[Revision|Revlog]Index() | 152 // TODO Another method to check,throw and expand TIP at once (check[Revision|Revlog]Index() |