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

Add git-to-freshports script #1

Merged
merged 1 commit into from Sep 20, 2019

Conversation

@skozlov404
Copy link
Contributor

commented Sep 20, 2019

Event: EuroBSDCon 2019 Hackathon
Sponsored by: Intel Corporation

Event:		EuroBSDCon 2019 Hackathon
Sponsored by:	Intel Corporation
@dlangille dlangille merged commit 10f2b17 into FreshPorts:master Sep 20, 2019
@dlangille

This comment has been minimized.

Copy link
Collaborator

commented Sep 20, 2019

Thank you for your work on this. I hope to test it soon.

@dlangille

This comment has been minimized.

Copy link
Collaborator

commented Sep 20, 2019

This worked on my laptop. Thank you.

@skozlov404

This comment has been minimized.

Copy link
Contributor Author

commented Sep 20, 2019

@dlangille

This comment has been minimized.

Copy link
Collaborator

commented Sep 22, 2019

I started working on processing the XML.

Please include the hash into the XML. I know it is in the filename, but we should also put it into the XML.

I would also like repo name in there. Just hardcode it to ports for now please.

EDIT: after working on the code more: It looks like we should add a COMMIT clause, where we once had MESSAGE:

        <COMMIT Hash="f2bfe60090b840b6d99a3288c0b745843cefcfe1" EncodingLosses="false" Repository="ports"/>

Let's put it between PEOPLE and FILES.

@dlangille

This comment has been minimized.

Copy link
Collaborator

commented Sep 22, 2019

We have the first commit loaded into the database. Further processing is required, but I managed to get this hacking done on the train from Lillehammer to Oslo airport.

freshports=# select id, message_id, committer, description  from commit_log order by id desc limit 2;
   id   |                  message_id                  | committer |                                 description                                  
--------+----------------------------------------------+-----------+------------------------------------------------------------------------------
 766918 | f2bfe60090b840b6d99a3288c0b745843cefcfe1     | feld      | net-mgmt/unifi5: Update to 5.11.46                                          +
        |                                              |           |                                                                             +
        |                                              |           | Also pull in port improvements from glewis@ to enable customizing which Java+
        |                                              |           | that Unifi runs with                                                        +
        |                                              |           |                                                                             +
        |                                              |           | PR:             240016
 766908 | 201909201136.x8KBaUna058053@repo.freebsd.org | jhale     | Update security/*gpgme* to 1.13.1
(2 rows)

freshports=# 

@jpmens

This comment has been minimized.

Copy link

commented Sep 22, 2019

@dlangille you shouldn't have to say put "this element" between "that and that"; XML is agnostic to that as the proper parsers won't care. On the contrary: it typically isn't possible to define how the elements/tags are output. :-)

@dlangille

This comment has been minimized.

Copy link
Collaborator

commented Sep 23, 2019

Agreed.

The placement is for humans reading it when debugging. We are writing a file. We can control the placement.

@skozlov404

This comment has been minimized.

Copy link
Contributor Author

commented Sep 23, 2019

I would also like repo name in there. Just hardcode it to ports for now please.

It's already there, in the OS section. It defaults to 'ports', but you can change is by using cmdline flags to the script. In the next pull request it's also used in the COMMIT tag #2

EDIT: after working on the code more: It looks like we should add a COMMIT clause, where we once had MESSAGE:

        <COMMIT Hash="f2bfe60090b840b6d99a3288c0b745843cefcfe1" EncodingLosses="false" Repository="ports"/>

Let's put it between PEOPLE and FILES.

Done in the next pull request #2 I wasn't sure what EncodingLosses have to be, so just hard-coded it for now.

@skozlov404

This comment has been minimized.

Copy link
Contributor Author

commented Sep 23, 2019

@dlangille you shouldn't have to say put "this element" between "that and that"; XML is agnostic to that as the proper parsers won't care. On the contrary: it typically isn't possible to define how the elements/tags are output. :-)

The parser I'm using preserves order, although it's not strictly enforced by the XML standard. I believe most of parsers/emitters preserve order because it's important in HTML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.