Skip to content

Conversation

@lambdalisue
Copy link
Owner

@lambdalisue lambdalisue commented Aug 3, 2020

This PR fix numerous rename issue on rename action of file and dict scheme.

Cases fern support

Simple renames

foo -> a
bar -> b

Nested renames

foo   -> bar
foo/a -> bar/b
foo/c -> bar/c

Cross renames

foo     -> a/foo
foo/a   -> a

Cyclic renames

foo -> bar
bar -> foo

Nested and Cyclic renames

a   -> b
a/b -> b/c
a/c -> b/b

Cases fern warn and avoid

Duplicate destinations

foo   -> bar
foo/a -> bar

Conflicts with exsiting file

foo   -> bar
foo/a -> bar/b

Above renames on the follwoing tree should be avoided before actual renames.

foo
|- a
|- b

Destination under non directory

foo   -> a/foo
foo/a -> a

Above fails if foo/a is file.

Repository owner deleted a comment from github-actions bot Aug 4, 2020
@lambdalisue lambdalisue changed the title WIP Fix nested/cyclic rename issue Aug 4, 2020
@lambdalisue lambdalisue changed the title Fix nested/cyclic rename issue Fix nested/cyclic rename issue WIP Aug 4, 2020
@lambdalisue lambdalisue added the help wanted Extra attention is needed label Aug 4, 2020
@lambdalisue
Copy link
Owner Author

NOTE: I have to check if this PR breaks behavior on Windows or not.

@lambdalisue lambdalisue force-pushed the new-rename branch 3 times, most recently from 2c952e3 to 797379a Compare August 8, 2020 18:19
Repository owner deleted a comment from github-actions bot Aug 8, 2020
@lambdalisue lambdalisue changed the title Fix nested/cyclic rename issue WIP Support complex renaming via 'rename' action of 'file' or 'dict' scheme Aug 8, 2020
@lambdalisue lambdalisue added the enhancement New feature or request label Aug 8, 2020
@lambdalisue lambdalisue merged commit a464d0e into master Aug 8, 2020
@lambdalisue lambdalisue deleted the new-rename branch August 8, 2020 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The "rename" action cannot handle some situations and result is unexpectable

2 participants