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

FR: Add support of syncing just a single file #1116

Open
Drugoy opened this issue Feb 1, 2025 · 10 comments · Fixed by #1117
Open

FR: Add support of syncing just a single file #1116

Drugoy opened this issue Feb 1, 2025 · 10 comments · Fixed by #1117

Comments

@Drugoy
Copy link

Drugoy commented Feb 1, 2025

I'd like to keep some config files synced between the machines.
I don't want to bother with creating an extra dir for those files and symlink them for the actual paths of those configs.
I want to be able to do a file-to-file sync.

@celane
Copy link

celane commented Feb 1, 2025 via email

@Drugoy
Copy link
Author

Drugoy commented Feb 1, 2025

@celane thanks for suggesting another tool, but I honestly would prefer much such functionality added to Unison.
I'd rather bother with the symlinks approach with Unison (or write a simple, stupid [with next to none interaction], shell script myself) than to adopt another tool (especially, given that it is a python program with basically no binary distribution).

@gdt
Copy link
Collaborator

gdt commented Feb 1, 2025

Please bring this up on the users list. It's not clear to me that it's impossible to configure what you want. (Help is inappropriate in issues, which is why I am pointing you to the users list.)

@Drugoy
Copy link
Author

Drugoy commented Feb 1, 2025

@gdt I believe it's fine to discuss the issue here, because there seems to be one and it needs some changes made in different places.
For example, if I want to sync 2 files sitting in the same directory - the Unison's GUI won't let me do it: notice how 'Next' button is grayed out and isn't clickable.
Image

If we simplify the task a little bit to make it sync file x/x with file y/y - that's something Unison will also fail to do, since the filenames differ.

And ONLY if you simplify the task even more to make it sync file x/x with file y/x is what Unison currently is capable of doing if the user tinkers enough with ignore and notignore rules to make it ignore everything except specific file.

That's like not the same task, I believe the current functionality is not enough to solve a more general task of being able to use Unison to sync one file with another, regardless of their location (which may or may not be two different locations) and names (which may or may not match).

@gdt
Copy link
Collaborator

gdt commented Feb 1, 2025

The point of directing you to the lists is that there are very few that follow the repository, and many on the lists. The project does not accept the dictates of github culture.

I've add this feature request to the list of things that are unlikely to be implemented: https://github.com/bcpierce00/unison/wiki/Feature-Requests and therefore closed it.

if you intend to implement this (code, doc changes, tests), please feel free to bring it up on unison-hackers@. I have a strong bias that unison is already too complicated, so it will need either an elegant approach or a good argument that the additional complexity is a good tradeoff relative to the overall benefit to the user-using community.

@gdt gdt closed this as completed Feb 1, 2025
@tleedjarv
Copy link
Contributor

I think this is worth reopening. If not completely fix it, there is at least a low-effort option to improve the situation.

This is a GUI issue (seems to be a limitation in the GTK file chooser). Syncing single files (with differing names) is well supported on the command line or when you craft the profile manually. It would be no problem adding a clarifying message in the affected GUI dialogs.

@gdt
Copy link
Collaborator

gdt commented Feb 2, 2025

My issue here is that the 'using the tracker' document defines that the tracker, for feature requests is only for fully baked requests. This was not one, and I asked the reporter to engage on the list, which has a broader audience, vs the issue tracker, which comes down to being responded to by a very small number of people,, and they declined to do so. I did suspect this could be handled in the TUI (but the issue tracker is not a help forum and i decilne to go there on principle).

With the message added, this seems adequately addressed. Followup from @Drugoy or anyone else welcome on the lists.

@Drugoy
Copy link
Author

Drugoy commented Feb 2, 2025

What does engaging with broader audience have to do with your claim of this feature request not being a 'fully baked' one?
If you think this issue requires some refining - why not tell what you'd want me to add/change to it to make it a fully baked request?

p.s.: I am not entirely sure (as I don't speak OCaml), but it looks like your pull request #1117 is incorrect.
As I understand, you've added a text note Note: To synchronize a single file with another file, you currently have to create the profile manually or specify the files on the command line..
The thing is - I was already using manual profile creation (in the GUI) and GUI simply doesn't let one not only pick the same dir for both 'First directory' and 'Second directory', but it also makes the file manager picker interface filter out all the files: they are grayed out, they can't be selected.

Image

@tleedjarv
Copy link
Contributor

I was already using manual profile creation (in the GUI)

That's the assistant, the opposite of manual :)
Either way, I've proposed an actual fix for this situation in #1119. Again, this issue is affecting only the GUI assistant (wizard) for creating a new profile.

@gdt
Copy link
Collaborator

gdt commented Feb 5, 2025

@Drugoy Please test the CI builds from the PR and comment (in the PR is probably best).

@gdt gdt reopened this Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants