Bitbucket server repository + raw file url mask

444 views
Skip to first unread message

Heinz Wiesinger

unread,
Feb 2, 2016, 10:30:50 AM2/2/16
to revie...@googlegroups.com
Hi!

We're currently evaluating bitbucket server (formerly stash, not to be
confused with the bitbucket cloud hosting) and are having troubles coming up
with a usable raw file URL mask. What we found so far is this:

http://www.example.org/projects/KEY/repos/foo/browse/<filename>?at=<revision>&raw

This works (with basic http authentication), but doesn't find the file because
it expects <revision> to be a commit hash, not an object hash. As far as I can
see at the moment Bitbucket server doesn't seem to have a way to retrieve files
by object hash.

Does anyone else have experience with Bitbucket server / Stash? Or is there a
way to tell reviewboard to use commit hashes instead of object hashes?

Grs,
Heinz
signature.asc

Heinz Wiesinger

unread,
Feb 26, 2016, 6:18:08 AM2/26/16
to revie...@googlegroups.com
I came back to this after a while to try again, but no dice. Even looked at
the code to see how easy it would be to add support for base_commit_id to
custom hosting repositories, but something seems to escape me.

I filed a feature request for now
(https://hellosplat.com/s/beanbag/tickets/4195/). Like I mentioned there as
well, I'm more than happy to supply a patch for this myself, if someone can
help me figure out what needs to be adapted :)

Grs,
Heinz

Christian Hammond

unread,
Feb 26, 2016, 5:33:56 PM2/26/16
to revie...@googlegroups.com
Hi Heinz,

The proper solution would be to implement a hosting service backend for this, or augment the existing one if the API is at all compatible.

It should be possible to extend the raw file URL stuff to take in a commit ID, optionally, but it's a lot more work, as it impacts the SCMTool API. Currently, only hosting services have any support for base_commit_id.

Christian

--
Christian Hammond
President/CEO of Beanbag
Makers of Review Board


Grs,
Heinz

--
Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups "reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

se...@m2mobi.com

unread,
Apr 15, 2016, 9:33:43 AM4/15/16
to reviewboard, chi...@chipx86.com
Hello to both,

I'm currently giving this a try as we'd really like to get it to connect. But both options are currently failing for the following reasons:
 - hosting backend:
Despite the name suggesting something along those lines, the API is actually not at all compatible. (diffs are JSON objects and other silly unexpected things)
So this is not a simple copy and paste and would someone who isn't as knowledgable in python (me) quite some time to complete.
 -  SCMTool API:
This initially seemed like it would be easier than the bitbucket server approach as bitbucket already uses it. But I can't seem to get the commit ID to be passed to the eventual function.

If you have any insights on the best way to proceed, I'd be happy to hear them.

Regards,
Sean Molenaar 

se...@m2mobi.com

unread,
May 2, 2016, 4:08:12 AM5/2/16
to reviewboard, chi...@chipx86.com
Bump?

se...@m2mobi.com

unread,
May 4, 2016, 4:49:53 AM5/4/16
to reviewboard, chi...@chipx86.com
Anyone?
Reply all
Reply to author
Forward
0 new messages