mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-21 03:08:40 +01:00
No description
Summary: This provides a `phragment.getstate` and a `phragment.getpatch` Conduit method. `phragment.getstate` - This returns the current state of the fragment and all of it's children. `phragment.getpatch` - This accepts a base path and a mapping of paths to hashes. The mapping is for the caller to specify the current state of the files it has. This returns a list of patches that the caller needs to apply to it's files to get to the latest version. Test Plan: Ran the following script in a folder which had content matching a fragment and it's children: ``` #!/bin/bash STATE="" for i in $(find ./ -type f); do HASH=$(cat $i | sha1sum | awk '{ print $1 }') BASE=${i:2} STATE="$STATE,\"$BASE\":\"$HASH\"" done STATE=${STATE:1} STATE="{$STATE}" echo '{"path":"tychaia3.zip","state":'$STATE'}' | arc --conduit-uri=http://phabricator.local/ call-conduit phragment.getpatch ``` and I got: ``` {"error":null,"errorMessage":null,"response":[]} ``` I updated one of the child fragments with a new file and ran the script again (patch has been omitted due to it's size): ``` {"error":null,"errorMessage":null,"response":[{"path":"Content\/TitleFont.xnb","hash_old":"4a927d7b90582e50cdd330de9f4b59b0cc5eb5c7","hash_new":"25867504642a3a403102274c68fbb9b430c1980f","patch":"..."}]} ``` Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley CC: Korvin, epriestley, aran, staticshock Maniphest Tasks: T4205 Differential Revision: https://secure.phabricator.com/D7739 |
||
---|---|---|
bin | ||
conf | ||
externals | ||
resources | ||
scripts | ||
src | ||
support | ||
webroot | ||
.arcconfig | ||
.divinerconfig | ||
.editorconfig | ||
.gitignore | ||
LICENSE | ||
NOTICE | ||
README |
Phabricator is an open source collection of web applications which make it easier to write, review, and share source code. Phabricator was developed at Facebook. It's pretty high-quality and usable, but under active development so things may change quickly. You can learn more about the project and find links to documentation and resources at: http://phabricator.org/ LICENSE Phabricator is released under the Apache 2.0 license except as otherwise noted.