Auto saving/synchronizing Bitbucket repositories locally

Jan Vrany jan.vrany at fit.cvut.cz
Thu Jan 30 09:56:06 UTC 2020


Hi Pierre,


> Anyway, I also need to save many other repositories locally. I didn't find anything convenient already developed, so I guess I'll have to code a bit. But maybe someone already did something similar?
> 

Your usecase sounds familiar :-) I hacked up something very crude indeed.
Maybe it will meet your needs too: 

https://bitbucket.org/janvrany/jv-scripts/src/default/bitbucket-sync.rb

Sorry, no Python, Ruby instead. If Ruby is not a show-stopper for you, 
feel free to use it! If there are any missing features, I'd be happy to 
help. 

> I don't know yet how I'm going to do that. Any ideas ?

Well, getting list of repos owned by particular user is easy, just use
JSON API as I did. For all repos a user has (write) access to, I'm not sure,
but your best bet is to search API documentation on how to do that. 
If you find a way, I'd be happy to add this feature to the script. 

HTH

Jan




More information about the Mercurial mailing list