Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
SCM commit message #4877
Retrieve last commit message (Git and SVN). We can use this feature in CPT (Conan Package Tools).
@tags: svn, slow, git
Changelog: Feature: Get commit message
Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.
I can't reproduce the error from Jenkins.
The error is:
The command used to test:
Any idea how to create an environment which I can reproduce the same error?
I cannot reproduce it in my machine, but having a look at the code this is my diagnosis:
When the test is calling to
status = self.run("status") if "No commits yet" in status: return None
Nevertheless, it is failing with
message = self.run("log -1 --format=%s%n%b")
and it fails (return non-zero).
Btw, I'm not sure if we can rely on the
def get_commit_message(self): self.check_repo() try: return self.run("log -1 --format=%s%n%b") except Exception as error: return None
Or do you think that the command could fail for other reasons other than
@jgsogo thanks for helping!
No, I just wanted to avoid an ugly error message when trying to retrieve the log when there is no commit there. I'll update this PR to ignore the status step.