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

Set commit time from command line (using -t) #349

Merged
merged 1 commit into from Aug 12, 2013

Conversation

Projects
None yet
4 participants
@mapmeld
Contributor

mapmeld commented Jul 16, 2013

Uses existing CommitOp.setCommitterTimestamp method to set commit time to a Unix timestamp from the command line, adding a -t option.

For example, creating an historic commit on October 26, 1985.

geogit commit -m "first time-traveling commit" -t 499152060000

The web API returned this response in commit history:

screen shot 2013-07-16 at 2 22 34 pm

@mapmeld

This comment has been minimized.

Show comment
Hide comment
@mapmeld

mapmeld Jul 16, 2013

Contributor

Commits with negative times seem to be impossible or broken... I'm seeing whether it'd be better to parse a timestamp from a string argument

Contributor

mapmeld commented Jul 16, 2013

Commits with negative times seem to be impossible or broken... I'm seeing whether it'd be better to parse a timestamp from a string argument

@dwins

This comment has been minimized.

Show comment
Hide comment
@dwins

dwins Jul 16, 2013

Contributor

I think users will certainly appreciate the ability to specify times with separate year month day hour and minute fields. Git itself has some pretty flexible date parsing (http://alexpeattie.com/blog/working-with-dates-in-git/) but I don't know if we need to go too far. I think just handling RFC3339 timestamps would be plenty.

Contributor

dwins commented Jul 16, 2013

I think users will certainly appreciate the ability to specify times with separate year month day hour and minute fields. Git itself has some pretty flexible date parsing (http://alexpeattie.com/blog/working-with-dates-in-git/) but I don't know if we need to go too far. I think just handling RFC3339 timestamps would be plenty.

@dwins

This comment has been minimized.

Show comment
Hide comment
@dwins

dwins Jul 22, 2013

Contributor

@mapmeld any progress on the date parsing?

Contributor

dwins commented Jul 22, 2013

@mapmeld any progress on the date parsing?

@mapmeld

This comment has been minimized.

Show comment
Hide comment
@mapmeld

mapmeld Jul 25, 2013

Contributor

@dwins I added support to accept a String as a datetime. I tested it locally and it works.

Not sure whether there is a more efficient way to do this.

Contributor

mapmeld commented Jul 25, 2013

@dwins I added support to accept a String as a datetime. I tested it locally and it works.

Not sure whether there is a more efficient way to do this.

@volaya

This comment has been minimized.

Show comment
Hide comment
@volaya

volaya Jul 25, 2013

Member

I implemented support for git-like dates, but I am not sure if it's merged (it was sometime ago, I guess that for the reflog, but I remember we have used it at someother point). I will check it and, if so, I can work on extending this PR with that. Is that OK with you?

Member

volaya commented Jul 25, 2013

I implemented support for git-like dates, but I am not sure if it's merged (it was sometime ago, I guess that for the reflog, but I remember we have used it at someother point). I will check it and, if so, I can work on extending this PR with that. Is that OK with you?

@mapmeld

This comment has been minimized.

Show comment
Hide comment
@mapmeld

mapmeld Jul 25, 2013

Contributor

Sure @volaya that would be great. I wasn't sure how to implement this.

Contributor

mapmeld commented Jul 25, 2013

Sure @volaya that would be great. I wasn't sure how to implement this.

@volaya

This comment has been minimized.

Show comment
Hide comment
@volaya

volaya Jul 26, 2013

Member

I just made a Pull Request to your repo with a few changes and a couple of functional tests. Have a look at it, and if it's ok and that's the functionality you needed, maybe you can merge all commits in a single one and we can merge that into master. Sounds ok to you?

Member

volaya commented Jul 26, 2013

I just made a Pull Request to your repo with a few changes and a couple of functional tests. Have a look at it, and if it's ok and that's the functionality you needed, maybe you can merge all commits in a single one and we can merge that into master. Sounds ok to you?

@volaya

This comment has been minimized.

Show comment
Hide comment
@volaya

volaya Jul 30, 2013

Member

@mapmeld did you have time to have a look at the code I added?

Member

volaya commented Jul 30, 2013

@mapmeld did you have time to have a look at the code I added?

Merge pull request #2 from volaya/time
Added support commits with timestamps in git-like formats
@mapmeld

This comment has been minimized.

Show comment
Hide comment
@mapmeld

mapmeld Jul 30, 2013

Contributor

@volaya just merged your /time branch into my /time branch (and this pull request). Looks good to me

Contributor

mapmeld commented Jul 30, 2013

@volaya just merged your /time branch into my /time branch (and this pull request). Looks good to me

@ghost ghost assigned groldan Aug 12, 2013

@groldan groldan merged commit 008c183 into boundlessgeo:master Aug 12, 2013

@groldan

This comment has been minimized.

Show comment
Hide comment
@groldan

groldan Aug 12, 2013

Member

merged and added a fix to the functional test, check the comment at 596ed5c

Member

groldan commented Aug 12, 2013

merged and added a fix to the functional test, check the comment at 596ed5c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment