Hi Kirstine,

By default, `git diff` will generate diffs with a short SHA1 (which will be
7 characters), but almost no service out there can use short SHA1s to look
up files in a repository. You'll need to instead generate a diff using `git
diff --full-index`, which will generate the full SHA1s.

Even better, you could use RBTools, which will not only generate suitable
diffs and work around various issues in Git diffs, but will also make it
easier to both post and update review requests when you make changes. We
recommend this to all users, instead of using the New Review Request page,
if you're able to. You can learn more about that here:

https://www.reviewboard.org/downloads/rbtools/

As for the length, short SHA1s are just an abbreviation. They can be 7
characters, 8, 10, whatever. 7 is typical, but some services will show 8.
So long as there aren't any conflicts (no two SHAs with the same 7, 8, etc.
initial characters), it can be used in place of a full SHA if you have the
entire repository on hand. But again, most services like GitLab will not
accept short SHAs in their API, so a full SHA is required in the diff.

Christian

On Thu, Aug 23, 2018 at 7:30 AM Kirstine Christensen <
[email protected]> wrote:

> I've just set up a new gitlab repository on a reviewboard version 3.08 -
> however when I try to make a "New Review Request" via the browser-gui I get
> this error:
> "There was an error fetching extended information for this repository."
>
> In the log from reviewboard it says:
>
> File "/usr/local/lib/python2.7/dist-packages/reviewboard/scmtools/git.py",
> line 666, in validate_sha1_format
>    raise ShortSHA1Error(path, sha1)
> ShortSHA1Error: The revision '47b8cdf' for 'accession.js' isn't in a valid
> format: The SHA1 is too short. Make sure the diff is generated with `git
> diff --full-index`.
>
> The SHA1 is also missing a char - it should be 8 characters long (when I
> look at the SHA1 in my gitlab repo). The too short SHA1's are actually
> visible in the browser-gui, where I can see that all the SHA1's are a char
> too short when I look at the possible commits to choose from in the "New
> review request" window .
>
> Is this a problem with reviewboard cutting away the last char for some
> reason, or with Gitlab not providing the correct SHA1?
>
>
>
>
>
> --
> 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
> "Review Board Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Christian Hammond
President/CEO of Beanbag <https://www.beanbaginc.com/>
Makers of Review Board <https://www.reviewboard.org/>

-- 
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 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to