Created
July 25, 2016 04:39
-
-
Save silicontrip/f2bb2fbe82b537f9fc19e5c4b9ee6627 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| task 1 remove duplicates; | |
| make list of duplicates | |
| duplicate_list[] = file[2] | |
| for duplicate_list: | |
| # get both parents of each file. | |
| path1 = file[0].parent | |
| path2 = file[1].parent | |
| # perform path ordering so same 2 paths make the same key | |
| parents[path1;path2] ++ | |
| sort_highest_first(parents) | |
| for sort parents[]: | |
| res = path_diff (path1,path2) | |
| if res == identical { prompt for path to delete; } | |
| if res != identical { prompt for direction to sync; delete source; } | |
| task 2 merge repository source -> destination; | |
| make list of duplicates | |
| for sort parents[]: | |
| if res != identical { copy from source to destination; delete source; } | |
| sync remaining files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment