コード例 #1
0
ファイル: HgStore.cs プロジェクト: cornelius90/InnovatorAdmin
        internal virtual void Enlist(HgFilelog hgFilelog, HgTransaction hgTransaction)
        {
            log.Debug("enlisting filelog '{0}'", hgFilelog.Path.FullPath);

            hgTransaction.AddJournalEntry("data/" + hgFilelog.Path.FullPath.TrimStart('/') + ".i", hgFilelog.Revlog.IndexPath);

            if(!hgFilelog.Revlog.InlineData)
                hgTransaction.AddJournalEntry("data/" + hgFilelog.Path.FullPath.TrimStart('/') + ".d", hgFilelog.Revlog.DataPath);
        }
コード例 #2
0
 internal override void Enlist(HgFilelog hgFilelog, HgTransaction hgTransaction)
 {
     underlyingStore.Enlist(hgFilelog, hgTransaction);
 }
コード例 #3
0
        private IEnumerable<uint> GetFileHistory(HgFilelog filelog, HgNodeID startNodeID)
        {
            var entries = 
                filelog.Revlog.Entries.
                    OrderByDescending(e => e.Revision).
                    SkipWhile(e => e.NodeID != startNodeID).
                    ToList();

            foreach(var entry in entries)
            {
                
                yield return entry.LinkRevision;

                var file = GetFile(new HgManifestFileEntry(filelog.Path, entry.NodeID));
                if(file.CopyInfo != null)
                {
                    var sourceFilelog = GetFilelog(file.CopyInfo.Path);
                    if(sourceFilelog == null) yield break;

                    foreach(var changeset in GetFileHistory(sourceFilelog, file.CopyInfo.NodeID))
                        yield return changeset;

                    yield break;
                }   
            
                if(entry.FirstParentRevisionNodeID == HgNodeID.Null)
                    yield break;

            } // foreach
        }
コード例 #4
0
 public void Enlist(HgFilelog hgFilelog)
 {
     hgStore.Enlist(hgFilelog, this);
 }