The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

automaticly pull from remote repo

marl_scot
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 18, 2013

Hi,

I use one of my Bitbucket repos for a set of PHP librarys.

Once I have tested an addition to the library, i push it to my bitbucket.

Is there a way to check from command line (debian linux) when a repo was last updated?

Curently i just run 'git pull' every so often via cron from each of my machines that use the librarys, but was hoping there may be a better way, that puts less load on the bitbucket servers?

Was looking for something like :

curl https://api.bitbucket.org/1.0/repositories/REPO/last_mod_date

and then if that date has changed, then i would do a full 'git pull'

Or would i be just as well running my current git pull from crontab?

thanks

M

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
m
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
April 18, 2013

Hi Matt,

Repository objects have a last_updated field. See the repository Resource here. Rather than polling each individual repo under your account, you could get your profile and check each repo in the repositories array.

Mary

TAGS
AUG Leaders

Atlassian Community Events