xolox / python-vcs-repo-mgr Goto Github PK
View Code? Open in Web Editor NEWVersion control repository manager
Home Page: http://vcs-repo-mgr.readthedocs.org/
License: MIT License
Version control repository manager
Home Page: http://vcs-repo-mgr.readthedocs.org/
License: MIT License
For a config file:
[repo]
local = ~/workspace/project
It would be better to expand the user home path in the local
option.
It provides portability between different usernames.
This could be done by wrapping the local
variable using os.path.expanduser()
.
It might be either
vcs_repo_mgr/init.py#L175
or
vcs_repo_mgr/init.py#L321,
but I'm not sure.
Hi, I'm getting an error trying to install this package. I'm using Python 3.5.2. The error message is the following:
Collecting vcs-repo-mgr
Using cached vcs-repo-mgr-0.32.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-h_jil8df/vcs-repo-mgr/setup.py", line 31, in <module>
readme_text = open(readme_file, 'r').read()
File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 13626: ordinal not in range(128)
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-h_jil8df/vcs-repo-mgr/
Can you assist?
Thanks in advance!
In the aftermath of #4 it has become apparent that my initial fixes to support remote named branches in non-bare git repositories weren't enough to abstract away the significant differences between git and mercurial.
The problem is that the git commands used by the find_revision_id()
and find_revision_number()
methods don't support being given the name of a remote branch (without a local equivalent) unless the branch name is expanded to refs/remotes/$ORIGIN/$BRANCH
.
The code to do so has already been written but first I wanted a place to document the underlying issue and an audit trail of commits that first reproduce the issue in the test suite and then fix it. Here it is ๐.
Given
import os
import random
import string
from vcs_repo_mgr.backends.git import GitRepo
repository = GitRepo(
local=os.path.dirname(os.path.realpath(__file__)) + '/local',
remote='[email protected]/my-remote-repo.git',
release_scheme='branches',
release_filter=r'^r.*',
bare=False,
)
approved_revision = repository.merge_up(
target_branch='r1810',
feature_branch='my-awesome-feature',
delete=False,
)
When I call this script, I get the following output:
Cloning into '/path/to/local'...
remote: Counting objects: 15, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 15 (delta 2), reused 0 (delta 0)
Receiving objects: 100% (15/15), done.
Resolving deltas: 100% (2/2), done.
Traceback (most recent call last):
File "script.py", line 18, in <module>
delete=False,
File "/path/to/local/.env/lib/python2.7/site-packages/vcs_repo_mgr/__init__.py", line 1704, in merge_up
self.create_release_branch(target_branch)
File "/path/to/local/.env/lib/python2.7/site-packages/vcs_repo_mgr/__init__.py", line 1160, in create_release_branch
raise ValueError(msg % branch_name)
ValueError: Failed to determine suitable parent branch for release branch 'r1810'!
It does work when I checkout the branches that are involved before the merge_up
call:
# ...
repository.checkout('r1810')
repository.checkout('r1812')
repository.checkout('my-awesome-feature')
approved_revision = repository.merge_up(
target_branch='r1810',
feature_branch='my-awesome-feature',
delete=False,
)
I'd expect those branches to be checked out automatically.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.