Open yannsartori opened 4 days ago
I forgot to indicate the main motivation, but if I have two different projects in one git repository, both of which use independent versioning, then you cannot use bumpver
for them (since specifying the paths in the root would sync up both versions)
I guess you could remove the check and see if the test suite passes (YOLO). Also, I think this request is similar to #220.
More fundamentally, the question to answer for this issue is how to deal with git tags. Since you are handling multiple projects in the same repo, how can bumpver
determine which version tags belong to which project?
Hello,
I noticed that
bumpver update --commit
cannot be invoked unless in the root of the project (at least for git).Minimal reproduction:
mkdir project
cd project
git init
mkdir a
Create
a/pyproject.toml
with the following contents:pip install -e .
git add pyproject.toml
git commit -m "commit"
Run
bumpver update --patch --commit
, observe outputPotential Fix
In
vcs.py
,VCSAPI::is_usable
, there is a checkwhich will obviously fail if not in the root. I don't think this check is necessary (at least for
git
), because you then invokeself.subcommands['is_usable']
, which forgit
isgit rev-parse --git-dir
and works anywhere in thegit
project. I'm not sure if this is true for mercurial though.I can open a PR to remove that check, but I just wanted to verify that it is indeed unnecessary before removing.