Mercurial > hg4j
comparison src/org/tmatesoft/hg/core/HgUpdateConfigCommand.java @ 490:b3c16d1aede0
Refactoring: move HgRepository's implementation aspects to Internals (which is now its imlementation counterpart and primary repository class to be used by other parts of the library)
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Thu, 16 Aug 2012 17:08:34 +0200 |
| parents | e31e85cf4d4c |
| children | ba36f66c32b4 |
comparison
equal
deleted
inserted
replaced
| 489:9c0138cda59a | 490:b3c16d1aede0 |
|---|---|
| 49 sessionCtx = sessionContext; | 49 sessionCtx = sessionContext; |
| 50 configFile = configurationFile; | 50 configFile = configurationFile; |
| 51 } | 51 } |
| 52 | 52 |
| 53 public static HgUpdateConfigCommand forRepository(HgRepository hgRepo) { | 53 public static HgUpdateConfigCommand forRepository(HgRepository hgRepo) { |
| 54 // XXX HgRepository to implement SessionContextProvider (with getContext())? | 54 // XXX HgRepository to implement SessionContext.Provider (with getContext())? |
| 55 return new HgUpdateConfigCommand(HgInternals.getContext(hgRepo), new File(HgInternals.getRepositoryDir(hgRepo), "hgrc")); | 55 return new HgUpdateConfigCommand(hgRepo.getSessionContext(), new File(HgInternals.getRepositoryDir(hgRepo), "hgrc")); |
| 56 } | 56 } |
| 57 | 57 |
| 58 public static HgUpdateConfigCommand forUser(SessionContext ctx) { | 58 public static HgUpdateConfigCommand forUser(SessionContext ctx) { |
| 59 return new HgUpdateConfigCommand(ctx, Internals.getUserConfigurationFileToWrite(ctx)); | 59 return new HgUpdateConfigCommand(ctx, Internals.getUserConfigurationFileToWrite(ctx)); |
| 60 } | 60 } |
