Commit Graph

321 Commits

Author SHA1 Message Date
Darragh Bailey a4062de4ae Switch to using fixtures-git for testing
Use library to handle setup of fixtures for testing with git.

Change-Id: I5b39f8d52beca848adb20d646c26d91c4b977b92
2020-01-23 11:23:49 +00:00
Darragh Bailey 25f950e0e4 Update requirements to align
Change-Id: I8af89a361458f3222fe924532697b8596f659d32
2020-01-14 12:02:57 +00:00
Jon-Paul Sullivan 5c6e9bad1a Use better email for myself
Change-Id: I764fe6c613e275ef00398e226fcaaeb4ef73e2b7
2020-01-13 12:12:06 +00:00
Andreas Jaeger 1c6ac903da Update docs jobs
Replace obsolete build-sphinx job with tox-docs which runs "tox -e docs"
directly.

Update sphinx requirements for python 3.

Depends-On: https://review.opendev.org/660026
Change-Id: Ibb22861e7b1e0e1e40f155043db8b3e554eaf246
2019-05-20 09:14:47 +02:00
OpenDev Sysadmins e500ba04d3 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:51:36 +00:00
Darragh Bailey 82083c4353 Migrate to managing job config in-repo
Change-Id: Ia5dd012d8f6debd0e7cbd7b19747d6b5b43521a6
2018-07-21 08:58:26 +01:00
Darragh Bailey 95e6c5bea5 Align with openstack check-requirements
Replace loremipsum with faker, drop discover as unneeded and ensure any
remaining requirements match the minimum requirements.

Change-Id: Ia5c5b033173c09e899e52b23f548ff822af998f0
2018-06-29 20:19:35 +01:00
Zuul 954604e8fe Merge "Support recent git changes to merge options" 2018-04-27 17:59:00 +00:00
Zuul 70c844ba9d Merge "Handle explicit merges" 2018-04-27 17:55:43 +00:00
melissaml e0289362b8 Trivial: Update pypi url to new url
Pypi url changed from [1] to [2]

[1] https://pypi.python.org/pypi/<package>
[2] https://pypi.org/project/<package>

Change-Id: Iedb00886e132326e1c3617893d2898d97dc70d03
2018-04-21 04:47:05 +08:00
Darragh Bailey f54e0d120d Support recent git changes to merge options
Git 2.9+ requires an explicit option to merge unrelated
histories together. Switch all the merge commands to try
to merge without this option and call it if the stderr
indicates that it is explicitly needed.

Change-Id: I929b310126ed0ae4d6c9726e81d86c0609c3b6e2
2018-03-10 10:17:04 +00:00
Darragh Bailey 350be21af3 Handle explicit merges
GitHub projects commonly include explicit merges even when not
necessary, make sure to skip these as candidates of a previous import.

After checking the other parents of an import to see if any were an
empty merge of an obsolete commit, test whether the parents are
themselves a subset of the ancestry commits and ignore should this be
true.

Change-Id: I8b8f0b0689301cedb8b4352c3decb569c94a0e33
2018-03-06 13:51:35 +00:00
Darragh Bailey 0c33431d2e Correct typo and add a few additional debug statements
Make it easier to see what section of the code a verbose log corresponds
to.

Change-Id: I78431b45d3f78bea689cd19f4cabd127b7e8373c
2018-03-06 13:39:27 +00:00
Jenkins 3e1718f87c Merge "Consolidate some author email addresses" 2017-06-26 11:04:13 +00:00
Jenkins c9e66d7de8 Merge "Update to latest Sphinx for documentation" 2017-04-14 09:25:29 +00:00
Darragh Bailey f60d242137 Update to latest Sphinx for documentation
Roll forward to recent version of sphinx for documentation generation.

Change-Id: I9dadd6304cad15b58d39a1014c6804b4e32363ad
2017-04-11 18:03:20 +01:00
Darragh Bailey 6c7d1b50b9 Consolidate some author email addresses
Change-Id: Ie3aa2ac2f8549a06503c4df0d1168e88523e3c05
2017-04-10 15:39:15 +01:00
Darragh Bailey 6415738c1c Handle multiple non-contributing commits being merged
When encountering multiple non-contributing commits included in a merge
that is TREESAME to the existing contents, ensure a list of all commits
being brought in by that merge are included in the list to be pruned
from history.

Change-Id: I643e0923f8967f9b70d10b8796688b782681bfe0
Closes-Bug: #1648029
2017-03-31 10:33:18 +00:00
Darragh Bailey ccae7b1a63 Handle non contributing merges where no import
Catch a non-contributing merge of a commit where it's parent is within
the ancestry path to the previous upstream imported.

Add it to a list of commits to be stripped to ensure when encountered
it is removed from being attempted to be re-played.

Change-Id: Ibf5034a4eec5a92097cc38120959fcc12a44af74
Related-Bug: #1648029
2017-03-31 10:32:25 +00:00
Darragh Bailey 0100a7e1d5 Find better import merge commit candidate
Continue checking until the last possible candidate has been inspected
in case we encountered a merge commit that looks a lot like an import
merge commit does.

It is possible for a merge to occur where the commit brought in does
not contribute anything to the resulting tree. In such cases the merge
commit will appear TREESAME to the previous state of the branch, and
will be mistaken to be an import merge. Ensure if there is an
additional merge commit to be considered that it is also checked.

Change-Id: If5694506b59e1288e23aecbe6e0bf8297574c72a
Related-Bug: #1648029
2017-03-27 11:47:30 +01:00
Darragh Bailey 7cffd9dc0b Include merge commit being examined in debug log
Change-Id: I3ff5dd806c076c78bfaf8afd687f2b8bf1ec31e0
2017-03-16 10:56:15 +00:00
Jenkins cba4bdaefa Merge "Exclude some unnecessary merge commits from history" 2017-03-16 10:48:50 +00:00
Darragh Bailey 7220bd7994 Exclude some unnecessary merge commits from history
Removing merge commits that do not contribute to the tree during
listing, reduces the number of merge commits to be subsequently pruned.

In future any remaining merges may indicate a problem, or be used to
reduce conflict cases by preserving them should users be utilizing
manual merges to resolve patch conflicts.

Change-Id: I8118db5acace6cb5d3b056c3d2cdaf398026c84c
2017-03-09 18:26:10 +00:00
Paul Bourke 5de57e8b26 Add docs on how the import branch is named
Change-Id: I86020cb0a9a828953bca69fccea957682ae94696
2017-02-17 15:48:40 +00:00
Darragh Bailey e4190ff279 Fix test and resulting random failures
Ensure the test for checking "change merge result is identical from
both upstream with carried patches and current" can be handled
correctly is building the test tree correctly using 'cherry-pick' to
duplicate the tree state.

For cherry-pick of changes to work correct, enable use of 'force
cherry-pick' through the '-x' option, to ensure a new commit is always
made instead of allowing for the possibility of a fast-forward to occur.

Include a modification to the commit message to insert the new node name
in the message (e.g "[C] Add file change" is cherry-picked as "[C1] Add
file change")

This changes exposed a random bug where the walking of the graph results
in the same node being visited twice. This in turn causes the wrong
commit id to be stored and reused to checkout the desired node when
building the tree resulting in a very broken graph.

Add a check for the _FINISHED flag being set to spot this scenario and
use this to avoid returning the same node twice in the topological
sorted graph, which in turn ensures that we do not accidentally
recreate a second commit for the same node, replacing the original node.

Change-Id: Ie1ae27196b3616979826e2df72df3cb7a517475d
2017-02-13 15:46:10 +00:00
Darragh Bailey b23fcdf571 Clean up basic inaccuracies in documentation
Correct various mistakes in documentation and remove unnecessary
paragraphs.

Change-Id: Ia16095c88e7873bd815791a32ae3e93ed4ac6d54
2017-02-10 15:38:33 +00:00
Darragh Bailey e85a2bad98 Tidy up subcommands page title
Shorten subcommands page title by removing 'Git-Upstream '
to avoid line wrapping in sidebar display.

Change-Id: I6d742e846065c624579e567c1435c53b3946ae8c
2017-02-10 15:23:23 +00:00
Jenkins fe410ecf2f Merge "Update README and better divide inclusion into main docs" 2017-02-10 13:48:19 +00:00
Darragh Bailey dd9c80d3fe Update README and better divide inclusion into main docs
* Clean up README
* Add some info for developers/unit tests/support to README for GitHub
* Split up inclusion of contents from README

Change-Id: I91abfedce06827d5111370750c55384d7aff1a8e
2017-02-02 10:35:09 +00:00
Jenkins 2d04fcdb7f Merge "Fix searcher debug output" 2017-01-31 18:13:28 +00:00
Darragh Bailey caa7b5270d Switch to range from xrange for python 3 compatibility
xrange no longer exists in python 3, and since it is a small number of
iterations there is a limited performance impact under python 2 by
using range instead.

Add check to ensure linearisation exception does not occur under python
3, due to exception in attempting to use a non existing function.

Change-Id: I3e6165b8bce14a44459fc9419792784f64636f5e
2016-12-08 11:06:29 +00:00
Manuel Desbonnet 2c3a1d2bcf Fix searcher debug output
Convert output from git.transform_kwargs to string before intepolation.

Change-Id: Ibf3c17ea326c983343d334fe5a4c4e3623fcb4b9
2016-12-07 10:46:58 +00:00
Jenkins 34c72e9e39 Merge "Regression test for sequence editor causing hang" 2016-11-28 11:23:44 +00:00
Jenkins dc0ee3549f Merge "Simplify custom logging classes" 2016-11-22 11:54:48 +00:00
Darragh Bailey dfa212ffd0 Regression test for sequence editor causing hang
Add simple regression test to ensure that setting sequence.editor will
not cause a hang, and add a timeout to interactive mode tests to ensure
they are terminated with an error should they fail to complete
reasonably quickly (suggesting a hang).

Early release 0.9.0 had an issue where setting sequence.editor would
cause git-upstream to hang, due to git-rebase attempting to launch the
editor specified, while the console was being redirected by python's
subprocess.

At some point a behaviour change meant the config setting
sequence.editor was no longer used by the python subprocess calling
git-rebase. Instead the tool would launch the user specified editor
directly (checking the git config settings for sequence.editor, then
core.editor, and falling back to the environment variable EDITOR if
neither were set), and would instead ensure that when finally calling
git-rebase it would only use the special editor provided by
git-upstream.

However it's still important to check that setting sequence.editor
does not cause any future problems such the code be refactored again.

Change-Id: I303dced0d1a52791d18b39e8e6d342374e3d2eeb
Related-Bug: #1394553
2016-11-18 17:49:43 +00:00
Jenkins 7f8a63be12 Merge "Expand on ambiguous arguments in test description" 2016-11-18 17:25:44 +00:00
Darragh Bailey 1f10853f24 Support GitHub cross references using source files
Allow links to be specified to the source files, which will be
converted correctly by GitHub, by ensuring the sphinx generation then
transforms the link from the source file to the correct output file
depending on the builder used.

Change-Id: I18ac055fc6d44982048365cad819f891786484a8
2016-11-18 10:44:36 +00:00
Jenkins a52f01f894 Merge "Use sphinxcontrib-fulltoc" 2016-11-17 15:30:48 +00:00
Jenkins 9d8c428441 Merge "Modify README to allow partial include" 2016-11-16 15:22:39 +00:00
Darragh Bailey 363a88bf22 Use sphinxcontrib-fulltoc
Change side bar toc to a full toc to show both global and local toc
simultaneously.

Change-Id: Ied595bab97bccb8cd942c2a0b35a429d7ee88bfb
Depends-On: I8dced20b036c267799b609a6fa719f6afde89a10
2016-11-16 15:19:41 +00:00
Jenkins 508409a43f Merge "Ensure logging is checked by most tests" 2016-11-16 10:00:05 +00:00
Darragh Bailey adc18a19db Expand on ambiguous arguments in test description
Make the reason to test for ambiguous arguments clearer as well as
better explain why creating a file with a name the same as a SHA1 that
will be examined by the searcher code will check that the code is
correctly delimiting between commit and path arguments.

Change-Id: I43e07d282fc3db86a1753fdbbfa395cdcc12727e
2016-11-16 09:56:41 +00:00
Darragh Bailey 4af052ae8f Modify README to allow partial include
Change README to follow similar sections to allow partial inclusion of
pieces into sphinx generated docs to prevent duplication of same
information in multiple places.

Change-Id: I834d4dcf5d9e0bede3840812eb12e1d670421cc5
2016-11-15 15:34:42 +00:00
Darragh Bailey 65cb8e2004 Add basic documentation and migrate README & USAGE
Where documentation is being moved about, corrections will be avoided
to allow for easier following of conversion separated from rewriting.

* Set up some simple documentation to describe basic details of
  git-upstream and installation.
* Migrate details from README into dedicated subcommands rst doc.
* Consolidate installation instructions from USAGE into
  installation rst page.
* Move remainder of USAGE into dedicated workflows rst and match the
  existing markdown layout.

Change-Id: Ie73d64ae7cb0e96060729638da382c901d5d68e7
2016-11-14 15:18:54 +00:00
Darragh Bailey 360d839abe Switch to ReSTructured text from markdown
Change-Id: I94a16df2a766b36c690c0af948f00a714e047bd9
2016-11-11 15:24:07 +00:00
Jenkins 4e7c1fe0f9 Merge "Fix read-the-docs doc building" 2016-11-11 15:22:04 +00:00
Darragh Bailey e3867dcea4 Fix read-the-docs doc building
Read-the-docs requires the application module to be available via the
PYTHONPATH to build correctly as it does not install a virtualenv and
configuring it to do so results in it failing to find the custom
readthedocs sphinx builder.

Change-Id: Ic4a650fdbc8db1c8aeb7027121b3e0340d39b686
2016-11-11 12:54:58 +00:00
Darragh Bailey d45998bf05 Add tox env for checking links in docs
Change-Id: I99c924c7cdec488475f32099193cba53ed6afb4c
2016-11-08 12:13:32 +00:00
Darragh Bailey abb34a9a61 Fix docs build manpage on python3
Change-Id: I4142873e25ff6d311eb8c80a73a47b73861a61b8
2016-11-08 12:11:51 +00:00
Darragh Bailey bbf251148c Update ChangeLog for 0.12.1
Change-Id: I2fa848e6f80fa6b0062e5fe400750f796c899034
2016-11-02 15:38:24 +00:00