Closed pritzvac closed 1 year ago
I'm not aware of a change that would cause that. What version are you using? Can you pinpoint which version introduced the new behavior?
I'm using version 3.3.2, which seems to be the version that introduced it. When I downgrade to 3.3.1, it doesn't happen. I guess it probably changed with pull request #295
@DavidWatkins do you think your PR could have unintentionally changed this behavior?
My changes caused this change, but this is because of how find_nested_configs
works. To fix this we'd have to change the way find_nested_configs
works to instead install nested configs in isolation rather than building up a global config for the top level repository. To get the old functionality you could use --depth 2
when installing in the meantime.
@pritzvac Do you have an example config I can look at? I am trying to see where it would incorrectly symlink but L400 of gitman/models/config.py
uses the current subdirectory as the root and shouldn't be symlinking from the parent directory.
Sure, thanks for looking into it. Here's a quick example config I made, linking to subrepository with this config: https://github.com/ctu-mrs/octomap_mapping_planning/blob/master/.gitman.yml
location: .gitman
sources:
- repo: https://github.com/ctu-mrs/octomap_mapping_planning.git
name: octomap_mapping_planning
rev: master
type: git
params:
sparse_paths:
-
links:
- source: ''
target: ros_packages/octomap_mapping_planning
groups:
-
default_group: ''
It actually works fine when I call gitman install
for the first time, but then it changes the symlinks in the subrepository, when I call it for a second time.
@pritzvac Can you try my fix in PR #300 and see if it resolves your issue?
Yes, the PR fixed my issue, thanks.
Here's the updated release: https://pypi.org/project/gitman/3.3.3/
Hi, I'm running into an issue when using gitman with nested repositories that appeared in some recent version.
I have a main repository
main_repo
, where .gitman.yml contains a nested repositorynested_repo1
with its own .gitman.yml, linking e.g. tonested_repo2
. In both .gitman.yml files, I'm using thelinks
syntax for creating symlinks to the repositories.When I run
gitman install
in themain_repo
, the symlinks in the nested repositorynested_repo1
are changed to incorporate the parent folders, i.e., they change from../.gitman/nested_repo2/.
to../../../.gitman/nested_repo1/.gitman/nested_repo2/.
After this change, I need to either reset the changes to the links in
nested_repo1
or I'd need to commit the changes, which could cause problems when usingnested_repo1
on its own.This started happening after some recent update of gitman. Is this the expected behavior? Can something be modified to make gitman not change the symlinks in nested repositories?