Added timing methods #157

Closed
wants to merge 8 commits into
from

Conversation

Projects
None yet
4 participants
@johncongdon

Hi,

This is my first pull request, so I hope I am doing it correctly. I am hoping you can take my core idea to the next level. As I am not much of a shell scripter, I did my best.

Just wanted to get your thoughts on my direction and see if you had any ideas to improve upon my implementation.

My thought was to add timing so that gitflow will track how much time is spent on each feature/hotfix/release/etc....

All records are stored in .gitflowTiming
TIMESTAMP ACTION TYPE READABLEDATE BRANCH

ACTION would be START, PAUSE(When switching branches), FINISH
TYPE would be FEATURE, HOTFIX ETC <---probably not needed

Also added (git flow develop), which switches you back to the develop branch while pausing the branch you are on.

To Be Done: Automatically calculate time spent and put into the comment. Started down the AWK trail, but haven't gotten back to it.

awk 'BEGIN{total=0;}/feature/test/ { if ($2=="START") start=$1; if ($2=="UNPAUSE") start=$1; if
($2=="PAUSE") total+=$1-start; if ($2=="FINISH") total+=$1-start;} END{print "total"; print total;}' .gitflowTiming

Seems to work correctly.

@Zaxuhe

This comment has been minimized.

Show comment Hide comment
@Zaxuhe

Zaxuhe Sep 23, 2011

I like the idea (didn't check the code) but the ideas are quite nice, thanks!

Zaxuhe commented Sep 23, 2011

I like the idea (didn't check the code) but the ideas are quite nice, thanks!

@nvie

This comment has been minimized.

Show comment Hide comment
@nvie

nvie Nov 23, 2011

Owner

I don't really see this as something that should be in gitflow. Its use is too specific. If you want this, you should use your own scripts and wrap gitflow inside them, I think.

Owner

nvie commented Nov 23, 2011

I don't really see this as something that should be in gitflow. Its use is too specific. If you want this, you should use your own scripts and wrap gitflow inside them, I think.

@nvie nvie closed this Nov 23, 2011

@johncongdon

This comment has been minimized.

Show comment Hide comment
@johncongdon

johncongdon Nov 28, 2011

ok, I didn't see them as specific. I think most developers would like to know that they spent X hours on a feature.

But I definitely respect your opinion. My scripts are still not 100% anyway. I was putting some code out there in hopes that others could improve upon it.

ok, I didn't see them as specific. I think most developers would like to know that they spent X hours on a feature.

But I definitely respect your opinion. My scripts are still not 100% anyway. I was putting some code out there in hopes that others could improve upon it.

@rwilcox

This comment has been minimized.

Show comment Hide comment
@rwilcox

rwilcox Nov 28, 2011

I +1 the idea of spawning these scripts off.

Perhaps git flow could have a hooks/callback mechanism - when you git flow feature start it calls .git/feature_start_callback.sh, which could call your scripts.

rwilcox commented Nov 28, 2011

I +1 the idea of spawning these scripts off.

Perhaps git flow could have a hooks/callback mechanism - when you git flow feature start it calls .git/feature_start_callback.sh, which could call your scripts.

@nvie

This comment has been minimized.

Show comment Hide comment
@nvie

nvie Nov 28, 2011

Owner

@rwilcox: I like the idea of callbacks. This has been playing around in my head for a long time, since it would be ideal to auto-bump version numbers upon starting release branches, for example. But there are many more hooks you could think of, and I think @johncongdon's is one of them.

If you have a suggestion or an implementation idea, please make sure to start the discussion (for example, in a separate issue). We could see how that takes us further.

Owner

nvie commented Nov 28, 2011

@rwilcox: I like the idea of callbacks. This has been playing around in my head for a long time, since it would be ideal to auto-bump version numbers upon starting release branches, for example. But there are many more hooks you could think of, and I think @johncongdon's is one of them.

If you have a suggestion or an implementation idea, please make sure to start the discussion (for example, in a separate issue). We could see how that takes us further.

@rwilcox

This comment has been minimized.

Show comment Hide comment
@rwilcox

rwilcox Dec 3, 2011

Moved callback discussion to #171

rwilcox commented Dec 3, 2011

Moved callback discussion to #171

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