Skip to content

Remove surrounding quotes in output filenames even for newer version of annex - #7443

Merged
yarikoptic merged 2 commits into
datalad:maintfrom
yarikoptic:bf-unquote
Jun 29, 2023
Merged

yarikoptic merged 2 commits into
datalad:maintfrom
yarikoptic:bf-unquote

Conversation

@yarikoptic

Copy link
Copy Markdown
Member

Lead to a failure on Windows.
Apparently with core.quotepath=false we would not get simple filenames quoted, so we should decide to remove or not quotes "dynamically" on whether we find them

Closes #7440

Lead to a failure on Windows.
Apparently with core.quotepath=false we would not get simple filenames
quoted, so we should decide to remove or not quotes "dynamically" on whether
we find them

Closes datalad#7440
@yarikoptic yarikoptic added the annex Git-annex related issue label Jun 28, 2023
@codecov

codecov Bot commented Jun 28, 2023 •

Copy link
Copy Markdown

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 🎉

Comparison is base (684c842) 91.51% compared to head (016b7d2) 91.54%.

Additional details and impacted files
@@            Coverage Diff             @@
##            maint    #7443      +/-   ##
==========================================
+ Coverage   91.51%   91.54%   +0.02%     
==========================================
  Files         325      325              
  Lines       43392    43390       -2     
  Branches     5819     5818       -1     
==========================================
+ Hits        39711    39722      +11     
+ Misses       3666     3653      -13     
  Partials       15       15              
Impacted Files Coverage Δ
datalad/support/annexrepo.py 90.64% <100.00%> (+0.61%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yarikoptic yarikoptic changed the title BF: Do remove surrounding quotes even for newer version of annex Remove surrounding quotes in output filenames even for newer version of annex Jun 28, 2023
@yarikoptic

Copy link
Copy Markdown
Member Author
crippled failed with following imho unrelated in test_rerun_fastforwardable_mutator
______________________ test_rerun_fastforwardable_mutator ______________________
5222

5223
path = '/crippledfs/datalad_temp_test_rerun_fastforwardable_mutatorl8mvlh_f'
5224

5225
    @slow
5226
    @with_tempfile(mkdir=True)
5227
    def test_rerun_fastforwardable_mutator(path=None):
5228
        ds = Dataset(path).create()
5229
        # keep direct repo accessor to speed things up
5230
        ds_repo = ds.repo
5231
        ds_repo.checkout(DEFAULT_BRANCH, options=["-b", "side"])
5232
        ds.run("echo foo >>foo")
5233
        ds_repo.checkout(DEFAULT_BRANCH)
5234
        ds_repo.merge("side", options=["-m", "Merge side", "--no-ff"])
5235
        #  o                 c_n
5236
        #  |\
5237
        #  | o               b_r
5238
        #  |/
5239
        #  o                 a_n
5240
    
5241
>       ds.rerun(since="", onto=DEFAULT_BRANCH + "^2")
5242

5243
/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/datalad/local/tests/test_rerun_merges.py:105: 
5244
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
5245
/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/datalad/distribution/dataset.py:507: in apply_func
5246
    return f(*args, **kwargs)
5247
/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/datalad/interface/base.py:773: in eval_func
5248
    return return_func(*args, **kwargs)
5249
/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/datalad/interface/base.py:763: in return_func
5250
    results = list(results)
5251
/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/datalad/interface/base.py:885: in _execute_command_
5252
    allkwargs):
5253
/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/datalad/interface/utils.py:319: in _process_results
5254
    for res in results:
5255
/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/datalad/local/rerun.py:278: in __call__
5256
    for res in handler(ds, results):
5257
/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/datalad/local/rerun.py:453: in _rerun
5258
    new_parents[1:])
5259
/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/datalad/dataset/gitrepo.py:469: in call_git
5260
    keep_ends=True))
5261
/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/datalad/dataset/gitrepo.py:530: in call_git_items_
5262
    sep=sep):
5263
/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/datalad/dataset/gitrepo.py:363: in _generator_call_git
5264
    for file_no, content in generator:
5265
/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/_collections_abc.py:317: in __next__
5266
    return self.send(None)
5267
/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/datalad/runner/nonasyncrunner.py:97: in send
5268
    return self._locked_send(message)
5269
/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/datalad/runner/nonasyncrunner.py:122: in _locked_send
5270
    self._check_result()
5271
/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/datalad/runner/nonasyncrunner.py:93: in _check_result
5272
    self.runner._check_result()
5273
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
5274

5275
self = <datalad.runner.nonasyncrunner.ThreadedRunner object at 0x7f54c24e3e50>
5276

5277
    def _check_result(self):
5278
        if self.exception_on_error is True:
5279
            if self.return_code not in (0, None):
5280
                protocol = self.protocol
5281
                decoded_output = {
5282
                    source: protocol.fd_infos[fileno][1].decode(protocol.encoding)
5283
                    for source, fileno in (
5284
                        ("stdout", protocol.stdout_fileno),
5285
                        ("stderr", protocol.stderr_fileno))
5286
                    if protocol.fd_infos[fileno][1] is not None
5287
                }
5288
                raise CommandError(
5289
                    cmd=self.cmd,
5290
                    code=self.return_code,
5291
                    stdout=decoded_output.get("stdout", None),
5292
>                   stderr=decoded_output.get("stderr", None)
5293
                )
5294
E               datalad.runner.exception.CommandError: CommandError: 'git -c diff.ignoreSubmodules=none -c core.quotepath=false merge -m 'Merge side
5295
E               ' --no-ff --allow-unrelated-histories 7104c22b16f20b7696a9b8ae3c4c068d76efd782' failed with exitcode 128 [err: 'error: Your local changes to the following files would be overwritten by merge:
5296
E               	foo
5297
E               Please commit your changes or stash them before you merge.
5298
E               Aborting']
5299

5300
/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/datalad/runner/nonasyncrunner.py:299: CommandError

I will add changelog entry now so there will be a rerun. I will merge not long after so we could test fresh git-annex with this etc.

@yarikoptic yarikoptic added CHANGELOG-missing When a PR's description does not contain a changelog item, yet. semver-patch Increment the patch version when merged labels Jun 28, 2023
@github-actions github-actions Bot removed the CHANGELOG-missing When a PR's description does not contain a changelog item, yet. label Jun 29, 2023
@yarikoptic

Copy link
Copy Markdown
Member Author

well, brew now failed to install git-annex... I am rerunning that one but meanwhile I will just merge this one since it should address an issue and I hope to see that in the daily tests results. We will release shortly after if it does

@yarikoptic
yarikoptic merged commit 3665940 into datalad:maint Jun 29, 2023
@yarikoptic

Copy link
Copy Markdown
Member Author

seems resolved on "maint" https://github.com/datalad/git-annex/actions/runs/5419023254 and I now progressed "master" to "maint" now.

@yarikoptic-gitmate

Copy link
Copy Markdown
Collaborator

PR released in 0.19.2

@yarikoptic
yarikoptic deleted the bf-unquote branch February 2, 2024 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

annex Git-annex related issue semver-patch Increment the patch version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_unannex_etc fails on windows

2 participants