Commits
master
Name already in use
Commits on Dec 5, 2018
-
-
get-gtest.sh: googletest moved to git repo
googletest isn't maintained in svn any more.
-
unit tests: fix non-void functions returning void
This causes compiler warnings which are considered fatal by rpmlint.
-
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.
-
".om" is not defined in groff. I haven't found it anywhere in the docs.I believe this is a typo.
-
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
-
configure.ac: check for setgroups()
This is required for the follow-up patch.
Commits on Feb 28, 2016
-
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.
Commits on Feb 24, 2016
-
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.
-
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.
-
Make mylist a simple synonym for std::vector.
* src/mylist.h: Make mylist a simple synonym for std::vector.
-
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).
-
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.
-
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.
-
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&.
Commits on Feb 23, 2016
-
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+=.
Commits on Feb 21, 2016
-
Avoid unnecessary for loop in mylist::operator+=(const mylist&).
* src/mylist.h (mylist): Implement operator+= with a range insert on the underlying vector.
-
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>&).
-
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.
-
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().
-
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.
-
* src/mylist.h (mylist::length): delete this method (size() should be used instead).
-
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.
-
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().
-
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.
-
Don't gratuitously count elements of mylist<T>.
* src/sf-admin.cc (create): Prefer !mylist<T>::empty() over mylist<T>::length() != 0.
-
Use range-based for in get.cc.
* src/get.cc (print_id_list): Use a range-based for loop to print a sid list.
-
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.
-
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.
-
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.
-
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().
-
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.
-
sccs_delta: Use empty() to find out if a mylist is empty.
* src/delta.h: use mylist<T>.empty() instead of .length() == 0.
-
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.
-
* build-aux/check-googletest-files.sh (findproblems): Avoid [[...]] since that is a Bash feature, and this is a /bin/sh script.