Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Gitorious repositories #38

Conversation

bigkraig
Copy link

Adds support for generate links for Gitorious repositories.

public URL getDiffLink(Path path) throws IOException {
final GitChangeSet changeSet = path.getChangeSet();
// gitorious does not show diffs on single files so we create a link to the commit
return new URL(url, "commit/" + changeSet.getId().toString());
Copy link
Member

Choose a reason for hiding this comment

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

Hello Kraig,

I see there is no method to jump directly to a specific file in the inline view, however something like:

https://gitorious.org/jenkinsci/jenkins/commit/bf2f214983517bc1656fa560e50e5e4df84eba95/diffs?diffmode=sidebyside&fragment=1#test/src/test/java/hudson/tasks/junit/TestResultTest.java
does work, so maybe changing this would be good.

`return new URL(url, "commit/" + changeSet.getId().toString() + "/diffs?diffmode=sidebyside&fragment=1#" + path);``

Regards
Mirko

@bigkraig
Copy link
Author

Thanks Mirko, how is that?

@mfriedenhagen
Copy link
Member

Strange enough, neither on http://huschteguzzel.de/hudson/job/jenkinsci-git-plugin/org.jenkinsci.plugins$git/484/testReport/ the master does build without test failures nor on my local machine. Do the tests run fine on your machine?

@mfriedenhagen
Copy link
Member

Master built cleanly on my Mac, so maybe this is due to older versions of git on the other machines. Pulled your request, built flawlessly. I will try it in huschteguzzel.

@mfriedenhagen
Copy link
Member

Links work successfully, now merging.

@mfriedenhagen
Copy link
Member

Merged and pushed to master, automatic merge was still referencing old commit 5706ede, so merge was done manually.

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