public WalkFetchConnection(IWalkTransport t, WalkRemoteObjectDatabase w)
        {
            var wt = (Transport)t;

            _local    = wt.Local;
            _objCheck = wt.CheckFetchedObjects ? new ObjectChecker() : null;

            _remotes = new List <WalkRemoteObjectDatabase> {
                w
            };

            _unfetchedPacks  = new LinkedList <RemotePack>();
            _packsConsidered = new List <string>();

            _noPacksYet = new LinkedList <WalkRemoteObjectDatabase>();
            _noPacksYet.AddLast(w);

            _noAlternatesYet = new LinkedList <WalkRemoteObjectDatabase>();
            _noAlternatesYet.AddLast(w);

            _fetchErrors = new Dictionary <ObjectId, List <Exception> >();
            _packLocks   = new List <PackLock>(4);

            _revWalk = new RevWalk.RevWalk(_local);
            _revWalk.setRetainBody(false);
            _treeWalk = new TreeWalk.TreeWalk(_local);

            COMPLETE      = _revWalk.newFlag("COMPLETE");
            IN_WORK_QUEUE = _revWalk.newFlag("IN_WORK_QUEUE");
            LOCALLY_SEEN  = _revWalk.newFlag("LOCALLY_SEEN");

            _localCommitQueue = new DateRevQueue();
            _workQueue        = new LinkedList <ObjectId>();
        }
Ejemplo n.º 2
0
        ///	<summary>
        /// Create a new pack upload for an open repository.
        /// </summary>
        /// <param name="copyFrom">the source repository.</param>
        public UploadPack(Repository copyFrom)
        {
            _db   = copyFrom;
            _walk = new RevWalk.RevWalk(_db);
            _walk.setRetainBody(false);

            ADVERTISED = _walk.newFlag("ADVERTISED");
            WANT       = _walk.newFlag("WANT");
            PEER_HAS   = _walk.newFlag("PEER_HAS");
            COMMON     = _walk.newFlag("COMMON");
            _walk.carry(PEER_HAS);

            SAVE = new RevFlagSet {
                ADVERTISED, WANT, PEER_HAS
            };
            _refFilter = RefFilterContants.DEFAULT;
        }
Ejemplo n.º 3
0
        ///	<summary>
        /// Create a new pack upload for an open repository.
        /// </summary>
        /// <param name="copyFrom">the source repository.</param>
        public UploadPack(Repository copyFrom)
        {
            _options     = new List <string>();
            _wantAll     = new List <RevObject>();
            _wantCommits = new List <RevCommit>();
            _commonBase  = new List <RevObject>();

            _db   = copyFrom;
            _walk = new RevWalk.RevWalk(_db);
            _walk.setRetainBody(false);

            ADVERTISED = _walk.newFlag("ADVERTISED");
            WANT       = _walk.newFlag("WANT");
            PEER_HAS   = _walk.newFlag("PEER_HAS");
            COMMON     = _walk.newFlag("COMMON");
            _walk.carry(PEER_HAS);

            SAVE = new RevFlagSet {
                ADVERTISED, WANT, PEER_HAS
            };
        }
Ejemplo n.º 4
0
        ///	<summary>
        /// Create a new pack upload for an open repository.
        /// </summary>
        /// <param name="copyFrom">the source repository.</param>
        public UploadPack(Repository copyFrom)
        {
            _db = copyFrom;
            _walk = new RevWalk.RevWalk(_db);
            _walk.setRetainBody(false);

            ADVERTISED = _walk.newFlag("ADVERTISED");
            WANT = _walk.newFlag("WANT");
            PEER_HAS = _walk.newFlag("PEER_HAS");
            COMMON = _walk.newFlag("COMMON");
            _walk.carry(PEER_HAS);

            SAVE = new RevFlagSet { ADVERTISED, WANT, PEER_HAS };
            _refFilter = RefFilterContants.DEFAULT;
        }
Ejemplo n.º 5
0
        ///	<summary>
        /// Create a new pack upload for an open repository.
        /// </summary>
        /// <param name="copyFrom">the source repository.</param>
        public UploadPack(Repository copyFrom)
        {
            _options = new List<string>();
            _wantAll = new List<RevObject>();
            _wantCommits = new List<RevCommit>();
            _commonBase = new List<RevObject>();

            _db = copyFrom;
            _walk = new RevWalk.RevWalk(_db);
            _walk.setRetainBody(false);

            ADVERTISED = _walk.newFlag("ADVERTISED");
            WANT = _walk.newFlag("WANT");
            PEER_HAS = _walk.newFlag("PEER_HAS");
            COMMON = _walk.newFlag("COMMON");
            _walk.carry(PEER_HAS);

            SAVE = new RevFlagSet { ADVERTISED, WANT, PEER_HAS };
        }
Ejemplo n.º 6
0
        public WalkFetchConnection(IWalkTransport t, WalkRemoteObjectDatabase w)
        {
            var wt = (Transport)t;
            _local = wt.Local;
            _objCheck = wt.CheckFetchedObjects ? new ObjectChecker() : null;

            _remotes = new List<WalkRemoteObjectDatabase> { w };

            _unfetchedPacks = new LinkedList<RemotePack>();
            _packsConsidered = new List<string>();

            _noPacksYet = new LinkedList<WalkRemoteObjectDatabase>();
            _noPacksYet.AddLast(w);

            _noAlternatesYet = new LinkedList<WalkRemoteObjectDatabase>();
            _noAlternatesYet.AddLast(w);

            _fetchErrors = new Dictionary<ObjectId, List<Exception>>();
            _packLocks = new List<PackLock>(4);

            _revWalk = new RevWalk.RevWalk(_local);
            _revWalk.setRetainBody(false);
            _treeWalk = new TreeWalk.TreeWalk(_local);

            COMPLETE = _revWalk.newFlag("COMPLETE");
            IN_WORK_QUEUE = _revWalk.newFlag("IN_WORK_QUEUE");
            LOCALLY_SEEN = _revWalk.newFlag("LOCALLY_SEEN");

            _localCommitQueue = new DateRevQueue();
            _workQueue = new LinkedList<ObjectId>();
        }