Mercurial > hg4j
diff src/org/tmatesoft/hg/internal/SubrepoManager.java @ 571:e4ee4bf4c7d0
Let session context control creation of Path instances
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 11 Apr 2013 16:27:06 +0200 |
parents | 6865eb742883 |
children |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/SubrepoManager.java Thu Apr 11 16:07:17 2013 +0200 +++ b/src/org/tmatesoft/hg/internal/SubrepoManager.java Thu Apr 11 16:27:06 2013 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2012 TMate Software Ltd + * Copyright (c) 2011-2013 TMate Software Ltd * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -81,6 +81,7 @@ String line; LinkedList<HgSubrepoLocation> res = new LinkedList<HgSubrepoLocation>(); HgInternals hgRepoInternal = new HgInternals(repo); + final Path.Source pathFactory = repo.getSessionContext().getPathFactory(); while ((line = br.readLine()) != null) { int sep = line.indexOf('='); if (sep == -1) { @@ -109,7 +110,7 @@ // // apparently, key value can't end with '/', `hg commit` fails if it does: // abort: path ends in directory separator: fourth/ - Path p = Path.create(key.charAt(key.length()-1) == '/' ? key : key + '/'); + Path p = pathFactory.path(key.charAt(key.length()-1) == '/' ? key : key + '/'); String revValue = substate.get(key); HgSubrepoLocation loc = hgRepoInternal.newSubrepo(p, value, kind, revValue == null ? null : Nodeid.fromAscii(revValue)); res.add(loc);