Skip to content

Add git_changlog_by_date directive + tests + docs#36

Open
nanuxbe wants to merge 2 commits intoOddBloke:masterfrom
nanuxbe:list-by-date
Open

Add git_changlog_by_date directive + tests + docs#36
nanuxbe wants to merge 2 commits intoOddBloke:masterfrom
nanuxbe:list-by-date

Conversation

@nanuxbe
Copy link
Copy Markdown
Contributor

@nanuxbe nanuxbe commented May 17, 2016

Hello,

another need I've ran into is being able to group commits by date (in a chronological way). With features like rebase, it often happens that commits are not in a chronological orders. This allows for a "better understanding" of the order in which decisions/changes happened.

This PR introduces the directive git_changelog_by_date which does just that.

Copy link
Copy Markdown
Owner

@OddBloke OddBloke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @nanuxbe, thanks so much for the contribution! Sorry it's taken me such a long time to review it. I've got a couple of comments inline on the tests, but this otherwise looks pretty good.

(I know it's been ages since you submitted this, so let me know if you aren't interested in these changes any more.)

datetime.now() + timedelta(days=1)
).split('.')[0]
os.environ['GIT_AUTHOR_DATE'] = tomorrow
os.environ['GIT_COMMITER_DATE'] = tomorrow
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect the modifying the environment wholesale might cause problems for other tests that run after this one, if they rely on the commit date being today. Could we modify this to restore the environment to its previous state?

self._set_username('Test User')


class TestGroupByDate(ChangelogByDateTestCase):
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests look good, but I'd also like to see one for the rebase/cherry-pick case, checking that the ordering is as we expect it to be.

@nanuxbe
Copy link
Copy Markdown
Contributor Author

nanuxbe commented Feb 7, 2018

Hi @OddBloke ,
Thanks for the reply
I have currently not much free time but I'll try to make the requested changes in a couple of weeks or so.
And no worries about time, I know what it's like to manage projects and it's not easy ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants