Example #1
0
        public BasePackFetchConnection(IPackTransport packTransport)
            : base(packTransport)
        {
            RepositoryConfig cfg = local.Config;

            _includeTags   = transport.TagOpt != TagOpt.NO_TAGS;
            _thinPack      = transport.FetchThin;
            _allowOfsDelta = cfg.getBoolean("repack", "usedeltabaseoffset", true);

            _walk             = new RevWalk.RevWalk(local);
            _reachableCommits = new RevCommitList <RevCommit>();
            REACHABLE         = _walk.newFlag("REACHABLE");
            COMMON            = _walk.newFlag("COMMON");
            ADVERTISED        = _walk.newFlag("ADVERTISED");

            _walk.carry(COMMON);
            _walk.carry(REACHABLE);
            _walk.carry(ADVERTISED);
        }
        public BasePackFetchConnection(IPackTransport packTransport)
            : base(packTransport)
        {
            FetchConfig cfg = local.Config.get(FetchConfig.KEY);

            _includeTags   = transport.TagOpt != TagOpt.NO_TAGS;
            _thinPack      = transport.FetchThin;
            _allowOfsDelta = cfg.AllowOfsDelta;

            _walk             = new RevWalk.RevWalk(local);
            _reachableCommits = new RevCommitList <RevCommit>();
            REACHABLE         = _walk.newFlag("REACHABLE");
            COMMON            = _walk.newFlag("COMMON");
            ADVERTISED        = _walk.newFlag("ADVERTISED");

            _walk.carry(COMMON);
            _walk.carry(REACHABLE);
            _walk.carry(ADVERTISED);
        }
Example #3
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;
        }
Example #4
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
            };
        }
Example #5
0
        public UploadPack(Repository copyFrom)
        {
            db = copyFrom;
            walk = new RevWalk.RevWalk(db);

            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();
            SAVE.Add(ADVERTISED);
            SAVE.Add(WANT);
            SAVE.Add(PEER_HAS);
        }
        public BasePackFetchConnection(IPackTransport packTransport) : base(packTransport)
        {
            RepositoryConfig cfg = local.Config;
            includeTags = transport.TagOpt != TagOpt.NO_TAGS;
            thinPack = transport.FetchThin;
            allowOfsDelta = cfg.GetBoolean("repack", "usedeltabaseoffset", true);

            walk = new RevWalk.RevWalk(local);
            reachableCommits = new RevCommitList<RevCommit>();
            REACHABLE = walk.newFlag("REACHABLE");
            COMMON = walk.newFlag("COMMON");
            ADVERTISED = walk.newFlag("ADVERTISED");

            walk.carry(COMMON);
            walk.carry(REACHABLE);
            walk.carry(ADVERTISED);
        }
Example #7
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;
        }
Example #8
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 };
        }