Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exclude and include options do not propagate to sub-externals #145

Open
gold2718 opened this issue Jul 11, 2020 · 2 comments
Open

exclude and include options do not propagate to sub-externals #145

gold2718 opened this issue Jul 11, 2020 · 2 comments
Labels

Comments

@gold2718
Copy link
Collaborator

Summary of Issue:

Cannot exclude a sub-external repository with --exclude option.

Expected behavior and actual behavior:

Expected to be able run checkout_externals with a modified sub-external by excluding it. In screen capture below, the clubb repository should not be listed.
Actual behavior is that the sub-external is not excluded and the command fails.

Steps to reproduce the problem (should include model description file(s) or link to public repository):

  1. Run checkout_externals on a repository with a sub-external
  2. Modify a file in a sub-external
  3. Try to run checkout_externals by using the --exclude option listing the modified sub-external

What is the changeset ID of the code, and the machine you are using:

be5a1a4

have you modified the code? If so, it must be committed and available for testing: No

Screen output or log file showing the error message and context:

$ ../../manage_externals/checkout_externals --exclude clubb
Processing externals description file : Externals.cfg
Processing externals description file : Externals_CISM.cfg
Processing externals description file : Externals_CLM.cfg
Processing externals description file : Externals_CAM.cfg
Checking status of externals: cice, cime, cism, source_cism, clm, fates, ptclm, mosart, rtm, cam, chem_proc, carma, cosp2, clubb, silhs, pumas, atmos_phys, 
    ./chem_proc
    ./cime
    ./components/cice
    ./components/cism
    ./components/cism/source_cism
    ./components/clm
    ./components/clm/src/fates
    ./components/clm/tools/PTCLM
    ./components/mosart
    ./components/rtm
    ./src/atmos_phys
    ./src/physics/carma/base
 M  ./src/physics/clubb
    ./src/physics/cosp2/src
    ./src/physics/pumas
    ./src/physics/silhs
----------------------------------------------------------------------
The external repositories labeled with 'M' above are not in a clean state.

The following are two options for how to proceed:

(1) Go into each external that is not in a clean state and issue either
    an 'svn status' or a 'git status' command. Either revert or commit
    your changes so that all externals are in a clean state. (Note,
    though, that it is okay to have untracked files in your working
    directory.) Then rerun checkout_externals.

(2) Alternatively, you do not have to rely on checkout_externals. Instead, you
    can manually update out-of-sync externals (labeled with 's' above)
    as described in the configuration file Externals.cfg.


The external repositories labeled with '?' above are not under version
control using the expected protocol. If you are sure you want to switch
protocols, and you don't have any work you need to save from this
directory, then run "rm -rf [directory]" before re-running the
checkout_externals tool.

----------------------------------------------------------------------
@gold2718 gold2718 added the bug label Jul 11, 2020
@billsacks
Copy link
Member

Does the same issue apply to the "include" list that you can give on the command line? i.e., does it work to only update a particular sub-external?

I'm thinking we'd need to introduce some syntax for both cases, maybe using / as a separator: what if externals foo and bar both have a sub-external named baz?: how would you specify that you just want to update (or exclude) foo's baz, not bar's baz?

@gold2718 gold2718 changed the title exclude option does not propagate to sub-externals exclude and include options do not propagate to sub-externals Jul 14, 2020
@gold2718
Copy link
Collaborator Author

Does the same issue apply to the "include" list that you can give on the command line?

Almost certainly as neither argument is passed to the recursive checkout code (going from memory here but I'm pretty sure).
As for the potential for a collision, don't do that :)
Seriously, I suggest allowing --include or --exclude to include the path. So for your example, baz would load the baz external in both foo and bar. However, src/foo/baz or ./src/foo/baz would be restricted to operating on foo's copy of baz.
I like the path because you can just cut and paste it from the --status output and would be easy to process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants