Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Mercurial Support #53

Closed
1 of 3 tasks
rm-code opened this issue Dec 15, 2015 · 1 comment
Closed
1 of 3 tasks

Mercurial Support #53

rm-code opened this issue Dec 15, 2015 · 1 comment

Comments

@rm-code
Copy link
Owner

rm-code commented Dec 15, 2015

Would be nice to have Mercurial support (after all LÖVE uses mercurial).

I started playing around with hg log --template "info: {author}|{author}|{date}\n{file_adds}\n" but that doesn't seem to be flexible enough. Apparently Mercurial allows us to load a custom style file (see here "From templates to styles").

Should be possible to produce a format which LoGiVi can understand.

The current log files look like this:

info: Example Name|example.mail@foo.bar|1412164839
A File
D Other file
M Another file

info: Example Name|example.mail@foo.bar|1412164839
A File
D Other file
M Another file

TODO

  • Write template to generate correct log format
  • LoGiVi needs to determine the type of a repository
  • Run the correct command to generate a log

Update:

Managed to get the header to work although the unix timestamp seems to use an offset:
changeset = "info: {author|person}|{author|email}|{date}\n"

Update2:

This one looks like it works (will have to test the timestamps though):

# Each commit should be styled like this:
# info: Forename Surname|forename.surname@somemail.com|10010210103
# A    foo/bar/File.txt
# A    foo/bar/README.md
# D    foo/README.md
# M    foo/LICENSE.md

# Creates the header for each commit:
# info: Forename Surname|forename.surname@somemail.com|10010210103.07000
# TODO Check if the unix timestamp works with our logreader (it includes the timezone of the commiter)
changeset = "info: {author|person}|{author|email}|{date}\n{file_adds}{file_dels}{file_mods}\n"

# Shows the files which have been added, deleted and modified in the commit.
file_add = "A    {file_add}\n"
file_del = "D    {file_del}\n"
file_mod = "M    {file_mod}\n"
@rm-code rm-code self-assigned this Dec 15, 2015
@rm-code
Copy link
Owner Author

rm-code commented Dec 15, 2015

Might need to change the way I check for git ... If git isn't available, it is still possible that Mercurial is installed (and the other way round). So instead of aborting it probably makes sense to check if the folder contains a .git or .hg folder and THEN check if the necessary VCS is installed.

@rm-code rm-code closed this as not planned Won't fix, can't repro, duplicate, stale Feb 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant