przemoc / metastore

Store and restore metadata from a filesystem.
http://software.przemoc.net/#metastore
GNU General Public License v2.0
169 stars 31 forks source link

Managing Git workflows in large repos #47

Closed maizo9 closed 3 years ago

maizo9 commented 6 years ago

I have been looking at your tool and several others and they all seem to not be able to handle the following scenario. Suppose you have a large repo with lots of developers working on some of the same files. The file metadata is used to control the build process, which is lengthy due to the size of the project; the metadata is limited to file access and modification times. How do you handle the file metadata when a developer decides to pull the official repo or merges his/her code with the official repo, and the official repo contains changes to the same files that he/she is working on? Obviously, you want to preserve the file changes so a file contents merge will need to occur but what to do with the metadata? What if the metadata in the official repo points to a time earlier than the metadata for such file in the developers node? What if the opposite is true. There are several scenarios at play in here but I think the 2 described above are the main ones.

Can megastore handle such scenarios?

przemoc commented 3 years ago

metastore is only a tool for storing or applying metadata. In examples/ directory you can find some scripts helping to some extent using it in scenarios you describe. Check their descriptions:

There is no metastore documentation regarding this topic beside above mentioned comments in scripts and one paragraph in README file: https://github.com/przemoc/metastore/blob/d2a15300caffe3970c4434c611964b2a5d1081e7/README#L34-L41

There is issue #33 for tracking that. Patches are welcomed.

But, I wrote "to some extent", because collisions are effectively merge conflicts (or local forms of them, i.e. how users should integrate their changes with regards to metadata), which need manual intervention/decision, especially if you want some particular behavior. How to handle merge conflicts is up to the user. Dump action has been introduced in metastore to help investigate stuff (you can dump state stored in .metadata or in file system for given path).

What we also lack is proper textual format (#6) that would help in such cases, because then you could resolve conflicts using your favorite tools (meld, kdiff3, you name it). Binary formats are not really handy for that.