Mercurial > hg4j
diff src/org/tmatesoft/hg/repo/HgRepository.java @ 115:c0cc2535462c
Introduced channels to pipeline (and easily filter) data streams
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 03 Feb 2011 23:32:08 +0100 |
parents | 46291ec605a0 |
children | 4a948ec83980 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgRepository.java Thu Feb 03 22:13:55 2011 +0100 +++ b/src/org/tmatesoft/hg/repo/HgRepository.java Thu Feb 03 23:32:08 2011 +0100 @@ -139,13 +139,20 @@ String nPath = normalizePath.rewrite(path); String storagePath = dataPathHelper.rewrite(nPath); RevlogStream content = resolve(Path.create(storagePath)); - return new HgDataFile(this, Path.create(nPath), content); + Path p = Path.create(nPath); + if (content == null) { + return new HgDataFile(this, p); + } + return new HgDataFile(this, p, content); } public HgDataFile getFileNode(Path path) { String storagePath = dataPathHelper.rewrite(path.toString()); RevlogStream content = resolve(Path.create(storagePath)); - // XXX no content when no file? or HgDataFile.exists() to detect that? How about files that were removed in previous releases? + // XXX no content when no file? or HgDataFile.exists() to detect that? + if (content == null) { + return new HgDataFile(this, path); + } return new HgDataFile(this, path, content); }