After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 781813 - Can't push simple-scan branches due pre-receive hook
Can't push simple-scan branches due pre-receive hook
Status: RESOLVED INVALID
Product: sysadmin
Classification: Infrastructure
Component: Git
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Sysadmins
GNOME Sysadmins
Depends on:
Blocks:
 
 
Reported: 2017-04-27 04:43 UTC by Robert Ancell
Modified: 2017-04-27 09:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Robert Ancell 2017-04-27 04:43:18 UTC
I imported simple-scan into git from bzr. However I didn't import the branches. If I try and push them now I get:

 git push
Counting objects: 8, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 865 bytes | 0 bytes/s, done.
Total 8 (delta 6), reused 0 (delta 0)
remote: ---
remote: The following translation (.po) file appears to be invalid. (When updating branch 'gnome-3-24'.)
remote: 
remote: help/ar/ar.po
remote: 
remote: The results of the validation follow. Please correct the errors on the line numbers mentioned and try to push again.
remote: 
remote: <stdin>:1:2: syntax error
remote: <stdin>:1: keyword "ar" unknown
remote: msgfmt: (null): warning: PO file header missing or invalid
remote:                 warning: charset conversion will not work
remote: msgfmt: found 3 fatal errors
remote: 
remote: To check this locally before attempting to push again, you can use the following command:
remote: 
remote: msgfmt -c ar.po
remote: 
remote: After making fixes, modify your commit to include them, by doing:
remote: 
remote: git add ar.po
remote: git commit --amend
remote: 
remote: If you have any further problems or questions, please contact the GNOME Translation Project mailing list <gnome-i18n@gnome.org>. Thank you.
remote: ---
To ssh://git.gnome.org/git/simple-scan
 ! [remote rejected] gnome-3-24 -> gnome-3-24 (pre-receive hook declined)
error: failed to push some refs to 'ssh://rancell@git.gnome.org/git/simple-scan'

I think I need to get back to import mode to push these?
Comment 1 Daniel Mustieles 2017-04-27 07:31:06 UTC
It's the first time I see this... why do you have individual PO files in the /help folder, and /help/<lang> folders contain a link to he previous PO file?

Help translations should be in the format of /help/<lang>/lang.po. It seems the pre-commit hook is not able to follow links, so it complain with the format of the softlink link, since it isn't a valid PO file structure.

Yo should move each PO file to its own language folder, and then try to commit again.

Hope this helps
Comment 2 Robert Ancell 2017-04-27 08:54:41 UTC
I had to put them there so Launchpad would do the translation integration. I will fix the commits now but I was wondering if there was a way to import the git tree as-is before fixing issues like this.
Comment 3 Robert Ancell 2017-04-27 09:03:57 UTC
OK, I worked it out, thanks!