Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

resolving environmental variables in uri #97

@anqixu

Description

@anqixu

Here's an interesting use case for the robot in our research lab: we have multiple developers, each of which has an unique account on an institution-wide NFS. Our robot uses a number of hg repositories, stored at shared paths on the NFS. We have multiple machines that can access the NFS via ssh, but no single one is reliable enough to be used as a single static host.

We would like a standardized way for any individual among us to 'wstool init' and 'wstool update' the packages, in addition to manually execute VCS commands. Due to institution regulations, we cannot use a common shared user, nor can we serve the repositories outside

My current attempt to realize this is to define USERNAME and SERVER environmental variables (in .bashrc). The .rosinstall file contains uri of the form 'ssh://${USERNAME}@${SERVER}//path/to/repo'. This .rosinstall works with wstool init, but it stores the resolved variables in the .hg/hgrc files. I can restore the environmental variable forms using a sed-in-a-find-loop bash script. However, the problem is that 'wstool update' doesn't work, as it detects a mismatch between the .rosinstall and the .hg/hgrc (which is weird since both of them have the unresolved environmental variable strings).

I'm pitching these two competing requests as potential solutions:
A) add an option for 'wstool update' to force-update the hgrc with the one from .rosinstall (presumably with resolved variable strings)
B) add an option, or by default, to have 'wstool update' not resolve environmental variables internally, and let hg (e.g. hg pull) worry about it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions