I am using Phabricator and Arcanist for code reviews in my team. The 'arc land' command is awesome, but there is one scenario where it doesn't work for us.
We have a single xml file, that contains a linked list (each element refers to a previous element). We don't make changes to this file very often, but once in a while we do. If two people make changes at the same time a "silent conflict" occurs, meaning that the linked list is broken because both new elements link to the same previous element. This is not very difficult to resolve. But no merge conflict is raised by git.
So when we run arc land, the incorrect xml file is automatically pushed. We don't want that.
Would the correct action be to use arc amend, and then resolve that conflict manually followed by a git push (like we do today without any hassle), or how would you suggest moving forward with this?
Some possible ideas:
arc land --hold
to stop before the git push
is run and inspect the changes, then run git push
manually.merge
directive in gitattributes
, and replace the default merge with one which gets it right (or fails to merge).lastNode="whatever"
to the container element (i.e., always on line 1 or whatever), so that two edits would always conflict on that line by naming different last nodes (to make sure this was edited, you could check that the lastNode
was correct at runtime). If the file is automatically generated, you could simply put a random number in a comment on a well-known line.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With