git - Phabricator Arcanist arc land vs arc amend -


i using phabricator , arcanist code reviews in team. 'arc land' command awesome, there 1 scenario doesn't work us.

we have single xml file, contains linked list (each element refers previous element). don't make changes file often, once in while do. if 2 people make changes @ same time "silent conflict" occurs, meaning linked list broken because both new elements link same previous element. not difficult resolve. no merge conflict raised git.

so when run arc land, incorrect xml file automatically pushed. don't want that.

would correct action use arc amend, , resolve conflict manually followed git push (like today without hassle), or how suggest moving forward this?

some possible ideas:

  • you can arc land --hold stop before git push run , inspect changes, run git push manually.
  • you can add local git pre-commit hook validate xml file before git allows commit.
  • you can add pre-receive hook on server validate xml file before pushed remote.
  • you can override git's merge behavior using merge directive in gitattributes, , replace default merge 1 gets right (or fails merge).
  • you try replace xml file data in format doesn't have these undesirable merge properties, since problem general one.
  • you force merge fail including string in file conflict. example, add attribute lastnode="whatever" container element (i.e., on line 1 or whatever), 2 edits conflict on line naming different last nodes (to make sure edited, check lastnode correct @ runtime). if file automatically generated, put random number in comment on well-known line.

Comments