public HgJournal(HgStore hgStore) { this.hgStore = hgStore; Entries = new List<HgJournalEntry>(); FullPath = Path.Combine(hgStore.StoreBasePath, "journal"); journalWriter = new StreamWriter(new FileStream(FullPath, FileMode.Create, FileAccess.Write)); }
internal HgTransaction(HgStore hgStore, HgJournal hgJournal) { // TODO: /* # abort here if the journal already exists if os.path.exists(self.sjoin("journal")): raise error.RepoError( _("abandoned transaction found - run hg recover")) */ this.hgStore = hgStore; this.hgJournal = hgJournal; log.Info("starting transaction"); transactionState = HgTransactionState.Active; }
public HgRepository(string path, HgEncoder hgEncoder) { Encoder = hgEncoder; basePath = path.ToLowerInvariant().EndsWith(".hg") ? path : Path.Combine(path, ".hg"); var storeBasePath = Path.Combine(basePath, "store"); FullPath = new Alphaleonis.Win32.Filesystem.DirectoryInfo(basePath).Parent.FullName; fileSystem = new HgFileSystem(); atomicFileSystem = new HgTransactionalFileSystem(); Requirements = new HgRequirementsReader(fileSystem).ReadRequirements(Path.Combine(basePath, "requires")); store = new HgStoreFactory().CreateInstance(storeBasePath, Requirements, fileSystem, Encoder); branchManager = new HgBranchManager(this, fileSystem); bookmarkManager = new HgBookmarkManager(this, fileSystem); // // Make sure it looks more or less like a repository. if(!Directory.Exists(basePath)) throw new IOException(basePath); var hgRcReader = new HgRcReader(); var hgRc = hgRcReader.ReadHgRc(Path.Combine(basePath, "hgrc")); Rc = hgRc; tagManager = new HgTagManager(this, fileSystem); }
public HgLargefileEnabledStore(HgStore underlyingStore) : base(underlyingStore.Encoder, underlyingStore.StoreBasePath, underlyingStore.FileSystem) { this.underlyingStore = underlyingStore; }