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

ENH: specify push --data modes; keep --force to only force git push and checkdatapresent #4620

Merged
merged 12 commits into from
Jun 23, 2020

Commits on Jun 9, 2020

  1. RF: push - introduce --transfer-data=(anything|nothing|auto)

    Changes are intensionally minimal.  Subsequent commits might refine further
    yarikoptic committed Jun 9, 2020
    Configuration menu
    Copy the full SHA
    c6d032c View commit details
    Browse the repository at this point in the history
  2. RF: define force_git_push helper var at _push level

    I am luke warm about this change -- just wanted to compartmentalize
    "forces" to _push instead of spreading logic around all helper functions
    yarikoptic committed Jun 9, 2020
    Configuration menu
    Copy the full SHA
    a0a8cd1 View commit details
    Browse the repository at this point in the history
  3. [DATALAD RUNCMD] RF: --force=datatransfer -> --force=checkdatapresent…

    … (to be more to the point of the effect)
    
    Closes datalad#4603
    
    === Do not change lines below ===
    {
     "chain": [],
     "cmd": "git-sedi datatransfer checkdatapresent",
     "exit": 0,
     "extra_inputs": [],
     "inputs": [],
     "outputs": [
      "datalad/core/distributed/push.py",
      "datalad/core/distributed/tests/test_push.py"
     ],
     "pwd": "."
    }
    ^^^ Do not change lines above ^^^
    yarikoptic committed Jun 9, 2020
    Configuration menu
    Copy the full SHA
    b20ed13 View commit details
    Browse the repository at this point in the history
  4. [DATALAD RUNCMD] RF: --force=pushall -> --force=all (since now could …

    …just enable all forces - orthogonal)
    
    === Do not change lines below ===
    {
     "chain": [],
     "cmd": "git-sedi pushall all",
     "exit": 0,
     "extra_inputs": [],
     "inputs": [],
     "outputs": [
      "datalad/core/distributed/push.py",
      "datalad/core/distributed/tests/test_push.py"
     ],
     "pwd": "."
    }
    ^^^ Do not change lines above ^^^
    yarikoptic committed Jun 9, 2020
    Configuration menu
    Copy the full SHA
    65aae48 View commit details
    Browse the repository at this point in the history
  5. DOC: adjust --force docstring to be more to the point of the effects

    Any option is about changing "automatic decision making" IMHO. I think it is
    important to mention possible effects such as absence of --force for push is
    a safety measure. Default --fast  is optimization and name "checkdatapresent" is
    self descriptive on the effect
    yarikoptic committed Jun 9, 2020
    Configuration menu
    Copy the full SHA
    3492d60 View commit details
    Browse the repository at this point in the history
  6. RF: --transfer-data=auto-if-wanted which dissolves datalad.push.copy-…

    …auto-if-wanted config
    
    I was going back and forth either we need some additional "datalad.push.transfer-data"
    config setting which could be set per repository to indicate what "datalad push"
    should do with data.  But I remain of an idea that it would be counter-productive
    to establish yet another level of data transfer behavior instead of using what is
    already there provided by git-annex itself.
    
    To maintain "do the right thing" behavior by default I had decided also to make
    auto-if-wanted to be the default mode of operation -- it will transfer data if there
    is no explicit "wanted" setting for the remote.
    yarikoptic committed Jun 9, 2020
    Configuration menu
    Copy the full SHA
    1be419f View commit details
    Browse the repository at this point in the history
  7. ENH: log at debug that we do not even attempt data transfer is not gi…

    …t-annex
    
    To ease possible troubleshooting later on whenever some expected data transfer
    does not happen.  Also tuned up a comment to say "copy" not "move", which is a
    valid (but not supported ATM) operation.
    yarikoptic committed Jun 9, 2020
    Configuration menu
    Copy the full SHA
    8031fbb View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2020

  1. [DATALAD RUNCMD] RF: push - --transfer-data -> --data

    === Do not change lines below ===
    {
     "chain": [],
     "cmd": "sed -i -e 's,transfer_data,data,g' -e 's,--transfer-data,--data,g' {outputs}",
     "exit": 0,
     "extra_inputs": [],
     "inputs": [],
     "outputs": [
      "datalad/core/distributed/push.py",
      "datalad/core/distributed/tests/test_push.py"
     ],
     "pwd": "."
    }
    ^^^ Do not change lines above ^^^
    yarikoptic committed Jun 12, 2020
    Configuration menu
    Copy the full SHA
    7dd99fd View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2020

  1. ENH: RM note about anything/nothing, duplicate "data"

    Also placed list of constraints to a new line to make it fit 80 chars
    yarikoptic committed Jun 15, 2020
    Configuration menu
    Copy the full SHA
    56fd2e8 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2020

  1. TST: push: Add test for data="auto"

    Adapt the test posted at dataladgh-4541.  Aside from tweaking the way to
    specify "use --auto", add a block that tests that the following two
    behave the same when a file does not match a remote's preferred
    content:
    
      datalad push --to=r --data=auto FILE
      git annex copy --to=r --auto FILE
    kyleam committed Jun 18, 2020
    Configuration menu
    Copy the full SHA
    38ba64b View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2020

  1. Configuration menu
    Copy the full SHA
    20d80cf View commit details
    Browse the repository at this point in the history
  2. TST: push: Skip create-sibling-dependent tests on crippled FS

    We already do this elsewhere in test_push.py, because running the
    post-update hooks fails.  Example:
    https://ci.appveyor.com/project/mih/datalad/builds/33609947/job/8ylv5wpq7l2fn93p#L1061
    kyleam committed Jun 19, 2020
    Configuration menu
    Copy the full SHA
    0646464 View commit details
    Browse the repository at this point in the history