Ticket #1988 (assigned defect)

Opened 15 years ago

Last modified 5 years ago

Working in diff filesystem doesn't allow copy operation

Reported by: volo78 Owned by:
Priority: major Milestone: Future Releases
Component: mc-vfs Version: 4.7.0.1
Keywords: patchfs Cc: kdave, info@…
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

I can remove/copy patches from diff filesystem but I cannot copy to it and I cannot save changes to patches in diff filesystem. It was possible in older versions of mc. I searched for a corresponding ticket but it seems no one reported it before.

Change History

comment:1 Changed 15 years ago by andrew_b

  • Component changed from mc-core to mc-vfs
  • Milestone changed from 4.7.1 to 4.7

comment:2 follow-up: ↓ 5 Changed 15 years ago by volo78

Additional note. When I remove a patch from diff filesystem there still remains an artifact like this.

Index: ChangeLog?
===================================================================

I doesn't hurt too much but clutters the whole patch.

comment:3 follow-up: ↓ 6 Changed 14 years ago by andrew_b

  • Cc kdave added

These regressions were introduced in #90 (changeset:b29e81556f67087955a9eceec45347d002c781f1).

comment:4 Changed 14 years ago by andrew_b

  • Keywords patchfs added

comment:5 in reply to: ↑ 2 Changed 14 years ago by kdave

  • Status changed from new to accepted
  • Owner set to kdave

Replying to volo78:

Additional note. When I remove a patch from diff filesystem there still remains an artifact like this.

Index: ChangeLog?
===================================================================

I doesn't hurt too much but clutters the whole patch.

This is in the 'comment' part of a patch and may be useful in some cases. Use the 'filterdiff' utility to remove all artifacts.

comment:6 in reply to: ↑ 3 ; follow-up: ↓ 7 Changed 14 years ago by kdave

Replying to andrew_b:

These regressions were introduced in #90 (changeset:b29e81556f67087955a9eceec45347d002c781f1).

'copyin' operation is not supported and was broken in previous version. See my comment/todo:

sub copyin($$$) {
    # TODO: seems to be tricky. what to do?
    # copyin of file which is already there may:
    #  * delete the original and copy only the new
    #  * just append the new hunks to the same file
    #    problems: may not be a valid diff, unmerged hunks
    #  * try to merge the two together
    #    ... but we do not want write patchutils again, right?
    error "Copying files into diff not supported";
    return;

The only safe case is if any of the files the diff changes does not exist in the original diff. Any other case must be verified to produce a valid diff.

comment:7 in reply to: ↑ 6 Changed 14 years ago by volo78

Replying to kdave:

Replying to andrew_b:

These regressions were introduced in #90 (changeset:b29e81556f67087955a9eceec45347d002c781f1).

'copyin' operation is not supported and was broken in previous version. See my comment/todo:

sub copyin($$$) {
    # TODO: seems to be tricky. what to do?
    # copyin of file which is already there may:
    #  * delete the original and copy only the new
    #  * just append the new hunks to the same file
    #    problems: may not be a valid diff, unmerged hunks
    #  * try to merge the two together
    #    ... but we do not want write patchutils again, right?
    error "Copying files into diff not supported";
    return;

The only safe case is if any of the files the diff changes does not exist in the original diff. Any other case must be verified to produce a valid diff.

Does this mean that this bug will not be fixed? I understand the difficulty but there is one important part (at least for me) that you didn't address in your reply. If I change a patch in patchfs I cannot save the change. Strictly speaking saving a patch doesn't differ too much from copying into patch but that's the functionality that I miss.

Another note. Why mc should be smart? Let's allow a user to be smart. Even if the previous functionality was broken (I mean the functionality of 4.6) no one complained as far as can see. It used to be as in your comment "* delete the original and copy only the new" and even if sometimes it could produce invalid diff then only user was responsible for this.

comment:8 Changed 13 years ago by andrew_b

  • Branch state set to no branch
  • Milestone changed from 4.7 to Future Releases

comment:9 Changed 13 years ago by andrew_b

  • Owner kdave deleted
  • Status changed from accepted to assigned

comment:10 Changed 5 years ago by metux

  • Cc info@… added
Note: See TracTickets for help on using tickets.