Follow symlinks when finding unmanaged repos#106
Follow symlinks when finding unmanaged repos#106jacobperron wants to merge 1 commit intovcstools:masterfrom
Conversation
|
Are you checking to make sure the symlink doesnt appear inside another repo? The way gitshelf handles symlinks inside another repo is nice. |
|
Is the following directory structure an example of the case you are describing? I'm not sure if there are any explicit checks for symlinks appearing inside another repo, but I did a quick test with the above directory structure replacing Running the following commands (with and without a symlink) produces the same result: Results in the following yaml file: So it appears repos within repos are ignored. Only the top level repo is considered. |
|
The case where the symlink points to a repo inside another repo appears to work as expected as well: The symlinked repo is managed, not the top level repo. |
|
I just noticed that this solution does not work with if the link is pointing to a directory that is not the root of the repo (e.g. a package contained inside a metapackage). |
c3419b1 to
3d3609b
Compare
3d3609b to
14cffcc
Compare
|
Is there a particular reason that this is not yet merged? |
| unmanaged_paths = [] | ||
| scm_clients = {SvnClient: 'svn', GitClient: 'git', BzrClient:'bzr', HgClient:'hg'} | ||
| for root, dirs, files in os.walk(path): | ||
| for root, dirs, files in os.walk(path, followlinks=True): |
There was a problem hiding this comment.
I wonder if it would be possible to add a test to show this new feature. There are already some good tests in this repo.
There was a problem hiding this comment.
I don't have resources to add a test.
By the way, what would you like to test here? os.walk is a system function, that should be tested upstream.
|
Closing since the repository is about to be archived: see #154. |
I found this helpful for one of my use cases that involves a workspace containing symlinks to repos.
The resultant yaml file contains paths from the symlinks as local names, for example:
wstool updateworks as expected.