|
Zf1 translated files use <!-- EN-Revision: xxx --> pseudotag at the
start of the file to keep track of relevant english versions and to easily find outdated translations. But as git haven't revision number (not as in svn at least) we need another way to do this. While googling for revnum equivalent I found this command: > git ls-files --stage documentation/manual/en/module_specs It lists files and hashes. As i understand those hashes used to track changes in git and they can be used to retrieve specific version of file. It looks like valid replacement for revision number as it can be easily scripted to detect outdated translations and we can easily get changes between that hash and head. So should we use something like <!-- EN-Githash: 978374a3dc50d782586f0884201d1db9b4484d7d --> or there is better way? Ps: looks like mailing list ignore mails with encoded 'from' field: "=?UTF-8?B?0JDQu9C10LrRgdC10LkgJ1hlcmt1cycg0KXRg9C00Y/QutC+0LI=?= <[hidden email]>" -- Aleksey (aka ~Xerkus) PGP key | http://xerkus.ru/xerkus.asc -- List: [hidden email] Info: http://framework.zend.com/archives Unsubscribe: [hidden email] |
|
Administrator
|
-- Aleksey 'Xerkus' Khudyakov <[hidden email]> wrote
(on Saturday, 30 July 2011, 08:03 AM +1100): > Zf1 translated files use <!-- EN-Revision: xxx --> pseudotag at the > start of the file to keep track of relevant english versions and to > easily find outdated translations. > > But as git haven't revision number (not as in svn at least) we need > another way to do this. > > While googling for revnum equivalent I found this command: > > git ls-files --stage documentation/manual/en/module_specs > It lists files and hashes. As i understand those hashes used to track > changes in git and they can be used to retrieve specific version of file. > > It looks like valid replacement for revision number as it can be easily > scripted to detect outdated translations and we can easily get changes > between that hash and head. > > So should we use something like <!-- EN-Githash: > 978374a3dc50d782586f0884201d1db9b4484d7d --> or there is better way? You can actually use just the first 6-8 characters of the hash, typically, as there are rarely collisions with even that few characters. (You'll actually often see me reference commits using short hashes.) So, yes, this would work fine -- and I'd recommend using the has for the _commit_ of a given file in the English manual, and not the object hash itself. That makes it easier to find the commit and the differences. -- Matthew Weier O'Phinney Project Lead | [hidden email] Zend Framework | http://framework.zend.com/ PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc -- List: [hidden email] Info: http://framework.zend.com/archives Unsubscribe: [hidden email] |
|
On 02.08.2011 0:19, Matthew Weier O'Phinney wrote:
> So, yes, this would work fine -- and I'd recommend using the has for the > _commit_ of a given file in the English manual, and not the object hash > itself. That makes it easier to find the commit and the differences. I spend 3 hours searching for built in functionality to list files with last commit info. And find nothing. So here is simple bash script i used: from withing documentation/manual/en/ directory > git ls-files --exclude-standard -- *.xml | while read file; do git log > -n 1 --date="short" --format="%Cgreen%h %Cred%cd %Creset$file > %Cblue%cn %Cgreen%s" -- $file; done; May be it will be useful for someone. -- Aleksey (aka ~Xerkus) PGP key | http://xerkus.ru/xerkus.asc -- List: [hidden email] Info: http://framework.zend.com/archives Unsubscribe: [hidden email] |
| Powered by Nabble | Edit this page |
