Make sure that infinitepush work fine with lfs. To achieve it we try to use
changegroup3 if it's available and also run prepush hook before infinitepush.
Details
- Reviewers
quark dsp - Group Reviewers
Restricted Project - Commits
- rFBHGX557b7fa4bea5: infinitepush: handle lfs correctly
Run arc unit
Diff Detail
- Repository
- rFBHGX Facebook Mercurial Extensions
- Branch
- default
- Lint
Lint OK - Unit
Unit Tests OK
Event Timeline
infinitepush/bundleparts.py | ||
---|---|---|
33–37 | I feel this code is pretty specific and not forward compatible if there is ever a cgversion = '04'. I would recommend using cgversion = changegroup.safeversion(repo) and overwrite changegroup.supportedoutgoingversions(repo) and discarding '01' in there. That way we can ensure we don't do 01, but everything later. We should also always try to handle lfs and leave it to the LFS extension to correctly set the supported version, e.g.: def extsetup(...): ... def infinitepushsupported(orig, repo): versions = orig(repo) versions.discard('01') return versions extensions.wrapfunction(changegroup, 'supportedoutgoingversions', infinitepushsupported) def getscratchbranchpart(...): ... cgversion = changegroup.safeversion(repo) _handlelfs(repo, outgoing.missing) @quark what do you think? |
Back to your queue for addressing dsop's comment. Glad to see #testcases being used again!
hgext3rd/lfs/wrapper.py | ||
---|---|---|
182–192 | Maybe make it a public API like uploadblobsfromrevs(repo, revs)? It's a bit strange to keep "Move implementation to a separate function" in docstring, maybe just say: """upload lfs blobs introduced by revs Note: also used by other extensions. avoid renaming. """ | |
205–208 | This could use the new uploadblobsfromrevs API. | |
infinitepush/bundleparts.py | ||
33–37 | I agree. Infinitepush only needs to remove cg01 support (better to check if 01 exists before dropping it). LFS drops cg02 support independently. And uploading LFS blobs does not depend on changegroup. So calling existing API to get the cg version is better. |
I've already landed this revision. How can I close it? Should I just abandon the revision
I just pushed the latest commits to bitbucket. I think we have to do that to get this phabricator to pick them up and close revisions.
Maybe make it a public API like uploadblobsfromrevs(repo, revs)? It's a bit strange to keep "Move implementation to a separate function" in docstring, maybe just say: