To install the unreleased libvcs version, see developmental releases.
pip:
$ pip install --user --upgrade --pre libvcs
-
{class}
libvcs.git.GitRepo
now accepts remotes in__init__
repo = GitRepo( url="https://github.com/vcs-python/libvcs", repo_dir=checkout, remotes={ 'gitlab': 'https://gitlab.com/vcs-python/libvcs', } )
repo = GitRepo( url="https://github.com/vcs-python/libvcs", repo_dir=checkout, remotes={ 'gitlab': { 'fetch': 'https://gitlab.com/vcs-python/libvcs', 'push': 'https://gitlab.com/vcs-python/libvcs', }, } )
-
{meth}
libvcs.git.GitRepo.update_repo
now acceptsset_remotes=True
-
Python 3.7 and 3.8 dropped (#308)
Maintenance and bug support exists in
v0.11.x
-
Add codeql analysis (:issue:
303
) -
git test suite: Lots of parametrization (:issue:
309
) -
CI: Use poetry caching from @actions/setup v3.1, (:issue:
316
) -
New constants for
str
-> class mappings- {data}
libvcs.shortcuts.DEFAULT_VCS_CLASS_MAP
- {data}
libvcs.shortcuts.DEFAULT_VCS_CLASS_UNION
- {data}
libvcs.shortcuts.DEFAULT_VCS_LITERAL
- {data}
-
Add your latest changes from PRs here
-
By setting a mercurial URL with an alias it is possible to execute arbitrary shell commands via
.obtain()
or in the case of uncloned destinations,.update_repo()
. (#306, credit: Alessio Della Libera)See also: cve.mitre.org, nvd.nist.gov, snyk.
- Run pyupgrade formatting (#305)
- Tests:
- Move from pytest
tmp_dir
(py.path.local
) totmp_path
(pathlib.Path
) - Text fixture updates: Use home directory via
tmp_path_factory
, generate config for git and hg.
- Move from pytest
- Move to furo theme
- Root:
make start_docs
,make design_docs
- docs/:
make start
,make design
- Add python 3.10 (#300)
- Drop python 3.6 (#300)
- Poetry: 1.1.7 -> 1.1.12 (#300)
- Add
.pre-commit-config.yaml
- #295: Checkout remote branch before git rebase. Thank you @jensens!
- #293: Fix revision handling with pip-urls. Thank you @jensens!
- #279: Update poetry to 1.1
- CI: Use poetry 1.1.7 and
install-poetry.py
installer - Relock poetry.lock at 1.1 (w/ 1.1.7's fix)
- CI: Use poetry 1.1.7 and
- #311: Convert to markdown
Generally speaking, refactor / magic is in the process of being stripped out in the next few releases. The API is subject to change significantly in pre-1.0 builds.
#271:
- Big version bump (0.5 -> 0.9)
- Remove Python 2.7 support
- Add annotations
- Change
libvcs.git.GitRepo.status()
to returnGitStatus
named tuple - Breaking change: Repo objects now require
repo_dir
to be passed - Update black to 21.6b0
-
[refactor] #267 overhaul docs
-
Move sphinx api format to Numpy-style
-
Move from reStructuredText to Markdown (via recommonmark). The master plan is to eliminate docutils and sphinx as a bottleneck completely in favor of something else (e.g. gatsby with a source that inspects our modules and can source intersphinx)
-
Move from RTD to GitHub Action, full support of poetry extras packages, deploys straight to S3 and CloudFront
-
-
#270 Build and publish packages via poetry
-
#270 Overhaul development docs
- #268
libvcs.base.BaseRepo
:- no longer sets
**kwargs
to dictionary on the object - remove
__slot__
and renamename
attribute torepo_name
- no longer sets
- [bug]
libvcs.git.extract_status()
Fix issue capturing branch names with special characters
- [bug]
libvcs.git.GitRepo.get_current_remote_name()
Handle case where upstream is unpushed - [feature]
libvcs.git.GitRepo.status()
- Retrieve status of repo - [feature]
libvcs.git.extract_status()
- Return structured info fromgit status
- Remove log statement
Breaking changes
Internal functionality relating to remotes have been reorganized to avoid implicit behavior.
-
~libvcs.git.GitRepo
methods have been renamed, they will be deprecated in 0.5:GitRepo.remotes_get
renamed tolibvcs.git.GitRepo.remotes()
GitRepo.remote_get
renamed tolibvcs.git.GitRepo.remote()
GitRepo.remote_set
renamed tolibvcs.git.GitRepo.set_remote()
-
~libvcs.git.GitRepo
theremotes
argument is deprecated and no longer used. Uselibvcs.git.GitRepo.set_remote
after repo is instantiated. -
libvcs.git.GitRepo.obtain
no longer set remotes based on adict
passed to~libvcs.git.GitRepo
. This was deemed to specialized / implicit. -
libvcs.git.GitRepo.set_remote()
(formerlyremote_set
)The new method accepts
name
andurl
(in that order).name
no longer has a default value (wasorigin
). -
libvcs.git.GitRepo.remote()
(formerlyremote_get
):-
remote
argument renamed toname
. It will be removed in 0.5.0The default value of
'origin'
has been removed -
Now returns
~libvcs.git.GitRemote
(a :pycollections.namedtuple
object)The tuple is similar to the old output, except there is an additional value at the beginning, the name of the remote, e.g.
('origin', '<fetch_url>', '<push_url>')
-
-
libvcs.git.GitRepo.remotes()
(formerlyremotes_get
) are now methods instead of properties.Passing
flat=True
to return adict
oftuple
instead ofdict
-
New method:
libvcs.git.GitRepo.get_git_version()
-
New method:
libvcs.git.GitRepo.get_current_remote_name()
- Remove f-string from test
libvcs.git.GitRepo.obtain
Overwrite remote if exists
258
libvcs.git.GitRepo.remote_set
- Fix updating of remote URLs
- Add new param:
overwrite
, usage:repo.remote_set(url, 'origin', overwrite=True)
- Fix version in pyroject.toml
- Update developer docs
- Fix issue with subprocess.Popen loud warning on Python 3.8
- [#296] - Move from Pipfile to poetry
- Sort imports
- Add isort package, isort configuration in setup.cfg, and
make isort
task to Makefile. - Add
project_urls
to setup.py
[#296] #296
- Move vcspull to the vcs-python organization
- Fix issue where VCS objects failed to set attribute in Ubuntu 18.04.
- Update documentation to point to libvcs.git-pull.com
- Switch doc theme to alabaster
- Pin and update libraries via pyup
- update vulture 0.8.1 to 0.11
- update flake8 from 2.5.4 to 3.2.1
- update pytest-mock from 1.4.0 to 1.5.0
- update pytest from 3.0.4 to 3.0.5
- pin alabaster to 0.7.9
- pin sphinx to 1.5.1
- Fix bug with unused
support
module in vcspull. See vcspull#43
- Update pytest to 3.0.2, remove unused pytest-raisesregexp dependency.
- Fix bug in
which
when executable is not found. Allow specifying search paths manually. - Better support for missing VCS when testing on git and subversion.
- #9 Support for
progress_callback
to use realtime output from commands in progress (such asgit fetch
). - #9 More tests, internal factoring and documentation, thanks @jcfr
- #9 Official support for pypy, pypy3
- #11 : Fix unbound local when updating git repos
7
Addcheck_returncode
property to run, thanks @jcfr8
Remove all cases ofrun_buffered
/ buffering from the library.
-
5
Remove colorama dependency -
6
Remove log module. Logging defaults.The library user can still use formatters and set log levels, for an example, see the vcspull logging setup.
An example:
import logging # your app log.setLevel(level) log.addHandler(logging.StreamHandler()) # vcslib logging options vcslogger = logging.getLogger('libvcs') vcslogger.propagate = False # don't pass libvcs settings up scope vcslogger.addHandler(logging.StreamHandler()) vcslogger.setLevel(level)
You can also use
logging.Formatter
variablesrepo_name
andrepo_vcs
with repos:repo_channel = logging.StreamHandler() repo_formatter = logging.Formatter( '[%(repo_name)s] (%(repo_vcs)s) %(levelname)1.1s: %(message)s' ) repo_channel.setFormatter(repo_formatter) vcslogger = logging.getLogger('libvcs') vcslogger.propagate = False # don't pass libvcs settings up scope vcslogger.addHandler(repo_channel) vcslogger.setLevel(level)
- Fix issue where repo context wouldn't pass to repo logging adapter
- Fix print_stdout_on_progress_end signature in git update
create_repo
function for regular vcs urls- API docs updated
- change signature on
create_repo_from_pip_url
to acceptpip_url
insetad ofurl
. Base
to acceptrepo_dir
instead ofname
andparent_dir
.
- remove unneeded pyyaml, kaptan and click dependencies
- libvcs split from vcspull