Skip to content

Commits

Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Commits on Dec 5, 2018

  1. Copy the full SHA
    043d9f5 View commit details
    Browse the repository at this point in the history
  2. get-gtest.sh: googletest moved to git repo

    googletest isn't maintained in svn any more.
    mwilck committed Dec 5, 2018
    Copy the full SHA
    8134b07 View commit details
    Browse the repository at this point in the history
  3. unit tests: fix non-void functions returning void

    This causes compiler warnings which are considered fatal
    by rpmlint.
    mwilck committed Dec 5, 2018
    Copy the full SHA
    83e693e View commit details
    Browse the repository at this point in the history
  4. testutils/yes: don't ignore SIGPIPE

    In rpm build environments, the inherited signal settings may be
    such that SIGPIPE is ignored. That would cause the "yes" tool
    to never terminate.
    mwilck committed Dec 5, 2018
    Copy the full SHA
    0f5c987 View commit details
    Browse the repository at this point in the history
  5. sccs.1: fix undefined macro

    ".om" is not defined in groff. I haven't found it anywhere in the
    docs.I believe this is a typo.
    mwilck committed Dec 5, 2018
    Copy the full SHA
    b532830 View commit details
    Browse the repository at this point in the history
  6. sccs: comply with POSIX POS36-C rule

    POS36-C compliance requires that setgid() is called before
    setuid(), and both called after relinquishing extra groups
    with setgroups().
    
    See
    https://wiki.sei.cmu.edu/confluence/display/c/POS36-C.+Observe+correct+revocation+order+while+relinquishing+privileges
    mwilck committed Dec 5, 2018
    Copy the full SHA
    31b9213 View commit details
    Browse the repository at this point in the history
  7. configure.ac: check for setgroups()

    This is required for the follow-up patch.
    mwilck committed Dec 5, 2018
    Copy the full SHA
    6ddddaf View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2016

  1. Add tests covering p-file validity checks in sact.

    * src/pfile.cc (sccs_pfile): Validate the delta SID (instead of
    only the gotten SID).  When rejecting an invalid date, say
    "date/time", since it may in fact be the time field which is
    incorrect.
    * tests/common/test-common: New options to docommand,
    --stderr_regex and stdout_regex, allowing regex (egrep) matching
    of tool output.  Each has a --no* counterpart which turns the
    option off again (this is useful for deteating the defaults
    provided by functions which wrap docommand).
    * tests/sact/pfile_corruption.sh: New test, covering the p-file
    validity checks in sact.
    jamesyoungman committed Feb 28, 2016
    Copy the full SHA
    b67bc70 View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2016

  1. Don't use unique_ptr on the result of strdup, and other cleanup.

    * src/sccsdate.cc (y2k_window): move all year windowing
    calculations into this new function.
    (is_leapyear): fix typo in comment.
    (get_two_digits): Add specialization which takes a constr
    string&.
    (sccs_date::sccs_date): Use y2k_window.  Also, instead of using
    unique_ptr on a pointer returned by strdup, just use a std::string
    instance.
    * src/sccsdate.h (class sccs_date): Remove the daysecond field.
    jamesyoungman committed Feb 24, 2016
    Copy the full SHA
    317bda1 View commit details
    Browse the repository at this point in the history
  2. Fix a number of problems identified by "make syntax-check".

    * src/get.cc: Remove trailing blanks.
    * src/Makefile.am: Likewise.
    * src/l-split.cc: Likewise.
    * src/get.cc: Likewise.
    * src/prs.cc: Likewise.
    * src/run.cc: Likewise.
    * src/sccsfile.cc: Likewise.
    * src/sccsfile.h: Likewise.
    * Makefile.am (distcheck-hook): Remove trailing blank.
    * src/sccs.c (gstrncat): Avoid spurious warning about reference to
    strncpy() in a comment.
    * tests/val/historical.sh: Remove empty lines at EOF.
    * unit-tests/test_linebuf.cc: Likewise.
    * build-aux/check-googletest-files.sh: Remove empty lines at EOF.
    (deleteprefix): Remove trailing blanks.
    * NEWS: Change "the the" to "the" in item for CSSC-1.3.2.  Remove
    trailing blanks.
    * src/sccsdate.cc (sccs_date::sccs_date): Avoid the use of strncpy.
    * docs/cssc.texi (Admin Options): Don't say "see also @Xref".
    (Executable File Support): Remove trailing blanks.
    * src/sf-prs.cc (prs): Don't use the space-tab combination.
    * src/file.cc (get_mode_bits): Remove trailing blanks.
    (is_writable): Likewise.
    jamesyoungman committed Feb 24, 2016
    Copy the full SHA
    b11620b View commit details
    Browse the repository at this point in the history
  3. Make mylist a simple synonym for std::vector.

    * src/mylist.h: Make mylist a simple synonym for std::vector.
    jamesyoungman committed Feb 24, 2016
    Copy the full SHA
    23f523b View commit details
    Browse the repository at this point in the history
  4. Don't require mylist<T>::operator[] to assert on index errors.

    * unit-tests/test_mylist.cc: Remove tests which verify that
    mylist<T>::operator[] assert-fails when an index is out of range
    (since std::vector does not do this).
    jamesyoungman committed Feb 24, 2016
    Copy the full SHA
    d4c2e52 View commit details
    Browse the repository at this point in the history
  5. Stop depending on mylist not actually being a synonym for std::vector.

    * src/sf-prs.cc (print_string_list): Remove the two versions of
    this function for std::vector<string> and mylist<string>.
    Instead, implement a single template function which takes a range
    of iterators.  This allows us not to care wither mylist is simply
    compatible with std::vector, or actually is std::vector.
    (print_delta): Update callers of print_string_list.
    jamesyoungman committed Feb 24, 2016
    Copy the full SHA
    fb6d614 View commit details
    Browse the repository at this point in the history
  6. Include <algorithm> where it is needed, and not where it is not.

    * src/sf-rmdel.cc: include the <algorithm> header since we use
    std::find.
    * src/mylist.h: Don't include <algorithm>, the transitive
    inclusion of which sf-rmsel.cc was previously takign advantage
    of.
    jamesyoungman committed Feb 24, 2016
    Copy the full SHA
    3ebdaa0 View commit details
    Browse the repository at this point in the history
  7. Replace constructor from const set& with a range of iterators.

    * src/mylist.h (mylist::mylist): Add constructor from a range of
    input iterators, allowing initialization from any container.
    Remove the special-purpose constructor from const set&.  This
    change provides closer compatibility with std::vector<T>,
    * src/delta.h (delta::delat): Initialize included_ and excluded
    using the iterator range instead of plain const set&.
    jamesyoungman committed Feb 24, 2016
    Copy the full SHA
    478539d View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2016

  1. Remove mylist<T>::operator+=(), implementing insert() instead.

    * src/mylist.h (mylist::insert): add insert() method, forwarding
    to std::vector<T>::insert(), as a replacement for
    mylist::operator+=() (and that method is removed).
    (mylist::cbegin): add, forwarding to items_.cbegin().
    (mylist::cend): add, forwarding to items_.cend().
    * src/delta.h (delta::prepend_comments): Implement.
    * src/sf-cdc.cc (sccs_file::cdc): Call mylist::insert() instead of
    the removed mylist<T>::operator+=().  Also use
    delta::prepend_comments() to prepend comments instead of copying
    the old comments, modifying the list and callign set_comments().
    * unit-tests/test_mylist.cc (MylistTest::Catenate::TestBody): use
    the new insert method to perform the concatenation, instead of the
    removed method operator+=.
    jamesyoungman committed Feb 23, 2016
    Copy the full SHA
    5dcea3c View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2016

  1. Avoid unnecessary for loop in mylist::operator+=(const mylist&).

    * src/mylist.h (mylist): Implement operator+= with a range insert
    on the underlying vector.
    jamesyoungman committed Feb 21, 2016
    Copy the full SHA
    3da6d3f View commit details
    Browse the repository at this point in the history
  2. Remove mylist<T>::operator-=(const mylist<T>&).

    * src/mylist.h (mylist): remove mylist<T>::operator-=(const
    mylist<T>&).
    * unit-tests/test_mylist.cc: Remove tests of
    mylist<T>::operator-=(const mylist<T>&).
    * src/sccsfile.h (sccs_file::admin): change the type of
    erase_users from mylist<string> to
    std::unordered_set<std::string>.  This allows the implementation
    to be more efficient without affecting the ordering of the
    resulting user list.
    * src/admin.cc (main): Update the type of erase_users
    accordingly.
    * src/sf-admin.cc (admin): take advantage of the efficiency of
    std::unordered_set<T>::find() when computing the updated
    authorized user list.  Hence we no longer need to call
    mylist<T>::operator-=(const mylist<T>&).
    jamesyoungman committed Feb 21, 2016
    Copy the full SHA
    b7770b3 View commit details
    Browse the repository at this point in the history
  3. Remove mylist<T>::add(), preferring push_back() instead.

    * src/mylist.h (mylist): Delete mylist<T>::add() since we prefer
    push_back().
    * unit-tests/test_mylist.cc: Don't use or test .add(), but use or
    test .push_back() there was previously .add().
    * unit-tests/test_delta.cc: Don't use mylist<T>::add(), use
    mylist<T>::push_back() instead.
    * src/rl-merge.cc (merge): Use mylist<T>::push_back() instead of
    mylist<T>::add().
    * src/delta.h (delta::add_include): Likewise.
    (delta::add_exclude): Likewise.
    (delta::add_ignore): Likewise.
    (delta::add_comment): Likewise.
    * src/l-split.cc (split_comments): Likewise.
    * src/rel_list.cc (release_list): Likewise.
    * src/fileiter.cc (sccs_file_iterator): Likewise.
    * src/sccsfile.cc (sccs_file::sccs_file): Likewise.
    * src/sf-get2.cc (sccs_file::get): Likewise.
    * src/sf-delta.cc (sccs_file::add_delta): Likewise.
    * src/sf-admin.cc (sccs_file::admin): Likewise.
    (sccs_file::create): Likewise.
    * src/sf-cdc.cc (process_mrs): Likewise.
    (sccs_file::cdc): Likewise.
    * src/admin.cc (main): Likewise.
    jamesyoungman committed Feb 21, 2016
    Copy the full SHA
    428719f View commit details
    Browse the repository at this point in the history
  4. Remove mylist<T>::select(size_type).

    * src/mylist.h (mylist): remove mylist<T>::select().
    * unit-tests/test_mylist.cc: remove tests for mylist<T>::select().
    jamesyoungman committed Feb 21, 2016
    Copy the full SHA
    ae0fba0 View commit details
    Browse the repository at this point in the history
  5. Remove mylist<T>::operator=(void*).

    * src/mylist.h (mylist): remove mylist<T>::operator=(void*).  The
    effect of this method was to clear the list, so add a clear()
    method instead, for closer matching to std::vector.n
    * unit-tests/test_mylist.cc: remove tests for
    mylist<T>::operator=(void*).
    * src/sf-admin.cc (sccs_file::admin): use clear() to clear an
    instance of mylist<T>, not assignment to NULL.
    jamesyoungman committed Feb 21, 2016
    Copy the full SHA
    f2d36df View commit details
    Browse the repository at this point in the history
  6. Remove mylist<T>::length().

    * src/mylist.h (mylist::length): delete this method (size() should
    be used instead).
    jamesyoungman committed Feb 21, 2016
    Copy the full SHA
    4442cfb View commit details
    Browse the repository at this point in the history
  7. Avoid using mylist<T>::length().

    * src/sf-get2.cc (get): Use a range-based for loop instead of
    indexing up to mylist<T>::length().
    * src/sf-cdc.cc (cdc): Use mylist<T>::empty() rather than
    comparing the result of length() against 0.
    * src/sf-get3.cc (authorised): Use a range-based for loop instead
    of indexing up to mylist<T>::length().
    * src/sf-prs.cc (print_seq_list): Prefer mylist::size() to
    mylist::length().
    (print_delta): Use mylist<T>::empty() rather than comparing the
    result of length() against 0.
    * src/fileiter.cc (next): Prefer mylist::size() to
    mylist::length().
    * src/sf-admin.cc (sccs_file): Likewise.
    * src/sf-val.cc (validate_seq_lists): Likewise, factoring repeated
    code out into a new function, validate_seq_numbers.
    * src/sf-rmdel.cc (is_seqlist_member): use std::find instead of
    iterating over list members ourselves.
    * src/sf-prt.cc (print_seq_list): use a range-based for loop
    rather than iterating over the indexes in a mylist<seq_no>.
    (sccs_file): Instead of checking mylist<T>::length() against 0,
    use the empty() method.
    jamesyoungman committed Feb 21, 2016
    Copy the full SHA
    32aa633 View commit details
    Browse the repository at this point in the history
  8. Prefer mylist::size() to mylist::length().

    * unit-tests/test_delta.cc: Don't use mylist::length().
    * unit-tests/test_bigfile.cc (emit_comments_or_mrs): Don't use
    mylist::length().
    jamesyoungman committed Feb 21, 2016
    Copy the full SHA
    a699ed1 View commit details
    Browse the repository at this point in the history
  9. Prefer mylist::size() to mylist::length().

    * unit-tests/test_mylist.cc: Use the size() method instead of the
    length() method, for better compatibility with (and so simpler
    transition to) std::vector.
    jamesyoungman committed Feb 21, 2016
    Copy the full SHA
    91ebd67 View commit details
    Browse the repository at this point in the history
  10. Don't gratuitously count elements of mylist<T>.

    * src/sf-admin.cc (create): Prefer !mylist<T>::empty() over
    mylist<T>::length() != 0.
    jamesyoungman committed Feb 21, 2016
    Copy the full SHA
    20427d0 View commit details
    Browse the repository at this point in the history
  11. Use range-based for in get.cc.

    * src/get.cc (print_id_list): Use a range-based for loop to print
    a sid list.
    jamesyoungman committed Feb 21, 2016
    Copy the full SHA
    12bf19d View commit details
    Browse the repository at this point in the history
  12. Use range-based for loops in the release_list implementation.

    * src/rel_list.cc (member): Search with std::find, rather
    than coding it manually.
    (print): Use a range-based for loop.
    jamesyoungman committed Feb 21, 2016
    Copy the full SHA
    a92e847 View commit details
    Browse the repository at this point in the history
  13. Use mylist<T>::size() in preference to .length().

    * src/sf-get.cc (prepare_seqstate_1): Use the size() method of
    mylist, instead of length(), for better std::vector
    compatibility.
    jamesyoungman committed Feb 21, 2016
    Copy the full SHA
    073ee74 View commit details
    Browse the repository at this point in the history
  14. Use range-based for loops in print_seqs and sccs_file::write.

    * src/sf-write.cc (print_seqs): Iterate over sequence numbers with
    a range-based for loop.
    (sccs_file::write): Iterate over users with a range-based for loop.
    (sccs_file::write): Iterate over comments with a range-based for
    loop.
    jamesyoungman committed Feb 21, 2016
    Copy the full SHA
    f72cd39 View commit details
    Browse the repository at this point in the history
  15. Support and use range-based for for release_list instances.

    * src/rl-merge.cc (merge): Use a range-based for loop to iterate
    over release_list instances.
    (remove): Likewise.
    * src/rel_list.h (release_list): Implement begin() and end() and
    empty().
    jamesyoungman committed Feb 21, 2016
    Copy the full SHA
    c6054dc View commit details
    Browse the repository at this point in the history
  16. Use a range-based for loop for iterating over deltas.

    * src/sf-get.cc (prepare_seqstate_1): Use a range-based for loop
    for iterating over included/excluded/ignored deltas.
    jamesyoungman committed Feb 21, 2016
    Copy the full SHA
    4cdf150 View commit details
    Browse the repository at this point in the history
  17. sccs_delta: Use empty() to find out if a mylist is empty.

    * src/delta.h: use mylist<T>.empty() instead of .length() == 0.
    jamesyoungman committed Feb 21, 2016
    Copy the full SHA
    0881e50 View commit details
    Browse the repository at this point in the history
  18. Implement mylist<T>::push_back.

    * src/mylist.h (mylist): Implement a push_back method and add TODO
    comments for methods which aren't shared by std::vector.
    jamesyoungman committed Feb 21, 2016
    Copy the full SHA
    ef2bc17 View commit details
    Browse the repository at this point in the history
  19. Avoid bash-specific [[...]].

    * build-aux/check-googletest-files.sh (findproblems): Avoid
    [[...]] since that is a Bash feature, and this is a /bin/sh
    script.
    jamesyoungman committed Feb 21, 2016
    Copy the full SHA
    648e201 View commit details
    Browse the repository at this point in the history
Older