has() public method

Test to see if the flag has been set on this object.
public has ( RevFlag flag ) : bool
flag RevFlag the flag to test.
return bool
示例#1
0
 private void advertiseAnyOnce(RevObject obj, string refName)
 {
     if (!obj.has(ADVERTISED))
     {
         advertiseAny(obj, refName);
     }
 }
示例#2
0
 private void AddCommonBase(RevObject o)
 {
     if (o.has(COMMON)) return;
     o.add(COMMON);
     _commonBase.Add(o);
     okToGiveUp = null;
 }
示例#3
0
        private void Want(RevObject o)
        {
            if (o.has(WANT)) return;

            o.add(WANT);
            _wantAll.Add(o);

            if (o is RevCommit)
                _wantCommits.Add((RevCommit)o);

            else if (o is RevTag)
            {
                do
                {
                    o = ((RevTag)o).getObject();
                } while (o is RevTag);
                if (o is RevCommit)
                    Want(o);
            }

        }
示例#4
0
        private void Needs(RevObject obj)
        {
            if (obj.has(COMPLETE)) return;

            if (!obj.has(IN_WORK_QUEUE))
            {
                obj.add(IN_WORK_QUEUE);
                _workQueue.AddLast(obj);
            }
        }
示例#5
0
        private void MarkTreeComplete(RevObject tree)
        {
            if (tree.has(COMPLETE)) return;

            tree.add(COMPLETE);
            _treeWalk.reset(tree);
            while (_treeWalk.next())
            {
                FileMode mode = _treeWalk.getFileMode(0);
                int sType = mode.Bits;

                switch (sType)
                {
                    case Constants.OBJ_BLOB:
                        _treeWalk.getObjectId(_idBuffer, 0);
                        _revWalk.lookupAny(_idBuffer, sType).add(COMPLETE);
                        continue;

                    case Constants.OBJ_TREE:
                        {
                            _treeWalk.getObjectId(_idBuffer, 0);
                            RevObject o = _revWalk.lookupAny(_idBuffer, sType);
                            if (!o.has(COMPLETE))
                            {
                                o.add(COMPLETE);
                                _treeWalk.enterSubtree();
                            }
                            continue;
                        }

                    default:
                        if (FileMode.GitLink.Equals(sType))
                            continue;
                        _treeWalk.getObjectId(_idBuffer, 0);
                        throw new CorruptObjectException("Invalid mode " + mode + " for " + _idBuffer.Name + " " +
                                                         _treeWalk.getPathString() + " in " + tree.Name);
                }
            }
        }
示例#6
0
        private void Want(RevObject o)
        {
            if (o.has(WANT)) return;

            o.add(WANT);
            _wantAll.Add(o);

            RevTag oTag = (o as RevTag);
            while (oTag != null)
            {
                o = oTag.getObject();
                oTag = (o as RevTag);
            }

            RevCommit oComm = (o as RevCommit);
            if (oComm != null)
            {
                _wantCommits.Add(oComm);
            }
        }