Giter Club home page Giter Club logo

bitbucket-sync's People

Contributors

1data0 avatar gautier avatar vlcinsky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bitbucket-sync's Issues

parameter --processes fails on TypeError: unsupported operand type(s)

With bitbucket-sync==0.2.0

$ bitbucket-sync --directory bb-third --key xxxKEYxxx --secret yyyyySECRETyyy --processes=1
Traceback (most recent call last):
  File "/home/javl/Envs/bitbucket-sync/bin/bitbucket-sync", line 9, in <module>
    load_entry_point('bitbucket-sync==0.2.0', 'console_scripts', 'bitbucket-sync')()
  File "/home/javl/Envs/bitbucket-sync/local/lib/python2.7/site-packages/bitbucket_sync/main.py", line 66, in main
    pool = Pool(processes=processes, initializer=init_worker)
  File "/usr/lib/python2.7/multiprocessing/__init__.py", line 232, in Pool
    return Pool(processes, initializer, initargs, maxtasksperchild)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 159, in __init__
    self._repopulate_pool()
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 213, in _repopulate_pool
    for i in range(self._processes - len(self._pool)):
TypeError: unsupported operand type(s) for -: 'str' and 'int'

Clarify syncing of Mercurial repos

Currently, no text indicates, that only git repositories are synced.

Either explicitly say, only git repos are synced (this is currently fine with me), or add ability to sync also Mercurial ones (it seems relatively easy to do and would be nicer).

error: GET/HEAD requests should not include body

Trying to call the command I get an error:

$ bitbucket-sync --account vlcinsky --directory . --key  xxxKEYxx --secret  xxSECRETxx
Traceback (most recent call last):
  File "/home/javl/Envs/bitbucket-sync/bin/bitbucket-sync", line 9, in <module>
    load_entry_point('bitbucket-sync==0.1.1', 'console_scripts', 'bitbucket-sync')()
  File "/home/javl/Envs/bitbucket-sync/local/lib/python2.7/site-packages/bitbucket_sync/main.py", line 55, in main
    response = requests.get(deploy_keys_resource, auth=oauth)
  File "/home/javl/Envs/bitbucket-sync/local/lib/python2.7/site-packages/requests/api.py", line 65, in get
    return request('get', url, **kwargs)
  File "/home/javl/Envs/bitbucket-sync/local/lib/python2.7/site-packages/requests/safe_mode.py", line 39, in wrapped
    return function(method, url, **kwargs)
  File "/home/javl/Envs/bitbucket-sync/local/lib/python2.7/site-packages/requests/api.py", line 51, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/javl/Envs/bitbucket-sync/local/lib/python2.7/site-packages/requests/sessions.py", line 241, in request
    r.send(prefetch=prefetch)
  File "/home/javl/Envs/bitbucket-sync/local/lib/python2.7/site-packages/requests/models.py", line 521, in send
    r = self.auth(self)
  File "/home/javl/Envs/bitbucket-sync/local/lib/python2.7/site-packages/requests_oauthlib/core.py", line 61, in __call__
    unicode(r.full_url), unicode(r.method), r.data, r.headers)
  File "/home/javl/Envs/bitbucket-sync/local/lib/python2.7/site-packages/oauthlib/oauth1/rfc5849/__init__.py", line 274, in sign
    raise ValueError('GET/HEAD requests should not include body.')
ValueError: GET/HEAD requests should not include body.

Installed packages (using virtualenv):

$ pip freeze
-f /home/javl/.pip/packages
argparse==1.2.1
bitbucket-sync==0.1.1
docopt==0.5.0
oauthlib==0.6.0
requests==0.14.2
requests-oauthlib==0.2.0
wsgiref==0.1.2

Using Ubuntu 13.04

$ python
Python 2.7.4 (default, Sep 26 2013, 03:20:26) 
[GCC 4.7.3] on linux2

repo dir shall include owner name, not only slug

One may have access to repositories from multiple accounts: it's own, team ones, and those who are shared with him.

When using workflow "form my repo and then issue pull request" one gets often repositories with the same name living under different owners.

Currently, repositories are stored locally in directory, which is derived only from slug. This may result in conflicts, as multiple repositories may attempt to sync into the same local directory.

Proposal 1: repo directories as subdirs of owner directory

so for repo named "repo" existing in different versions at account "vlcinsky" and "myteam", sync would result in "vlcinsky/repo.git" and "myteam/repo.git".

This is safe method, but sometime it may archive repos from other owners, what is not always needed.

Proposal 2: require --owner to specify, which account to sync

Note, that one account may provide repos from multiple owners so do not confuse owner with account.

The value of --owner would define filter, selecting only repos, which are owned by given owner.

In this case the owner parameter is required.

Proposal 3: combine 1 and 2

So always store under directory of an owner.

And allow filtering by one owner name (this time this does not have to be required parameter).

AttributeError: 'module' object has no attribute 'check_output'

I'm trying to backup all the repositories of my organization, so I've created and OAuth key with that account. Now when I try to run the backup I get the following error.

Any clues on how to fix this?

bitbucket-sync --key MyOrgranizationKey --secret MyOrganizationSecret --directory .
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib64/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.6/site-packages/bitbucket_sync/main.py", line 109, in worker
    if sync_repo(directory, repo, lock):
  File "/usr/lib/python2.6/site-packages/bitbucket_sync/main.py", line 83, in sync_repo
    scm.validate_local_repository()
  File "/usr/lib/python2.6/site-packages/bitbucket_sync/main.py", line 40, in validate_local_repository
    subprocess.check_output(
AttributeError: 'module' object has no attribute 'check_output'

Add NEWS.rst to the project root

NEWS.rst shall be present in project root and list chronologically changes in functionality.

Feel free to leave it to me - I would do that within a week.

There would come NEWS.rst and also slightly modified setup.py to merge it for pypi page (so pypi page would show on the bottom changes in the project).

Repeated messages "X11 forwarding request failed" on output (problem of ssh config)

When using the command, I got many lines on output stating:

X11 forwarding request failed
X11 forwarding request failed
X11 forwarding request failed
X11 forwarding request failed

Initially they were in groups of 4, later on they got scattered in smaller groups.

This was spoiling output of the command and made more difficult to estimate, if all syncing went correctly or there was a problem.

Happened on Ubuntu 13.10 64 bits, python 2.7

File "/usr/local/bin/bitbucket-sync", line 5, in <module> from pkg_resources import load_entry_point

hi out there
we're using lots of bitbucket repos in my company so was really happy when i found your script. I've no clue what's the problem. When i execute your script i get the following error:

bitbucket-sync
Traceback (most recent call last):
File "/usr/local/bin/bitbucket-sync", line 5, in
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in
working_set.require(requires)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: requests>=2.0.0

am i using wrong python version or smth. sm? i've never been in touch with python - can you please give me an advice?

maybe it's important: i'm using osx 10.9.5 with python 2.7.5 installed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.