Summary:
Shelve and unshelve use commits under the hood to bundle up data. dirsync sees
these commits happening and performs mirrors, which then shows up at unbundle
time, making it impossible to mirror the change again. Example: if I change X,
and it gets mirrored to Y, if I go back and change X later after a unshelve, hg
commit now fails because Y has pending changes and differs from X.
Test Plan: Added a test
Reviewers: #mercurial, ttung, quark
Reviewed By: quark
Subscribers: quark, wez, mjpieters, frantic, wluh
Differential Revision: https://phabricator.intern.facebook.com/D3266602
Signature: t1:3266602:1462484017:738f67c0ab4b5af999819d3855c1f4ba6b2ea338
Summary:
If a mirror of a file is missing, dirsync now behaves better:
- When deleting the source, it allows the commit and does no mirroring since the two paths are already in sync (previously, it raised an exception when trying to delete the mirror)
- When updating the source, it creates a file in the mirrored location to match
- When updating (creating) the mirrored file, the source (which already exists) is updated too
Fixes https://www.facebook.com/groups/sourcecontrol/permalink/929877003728587/.
Test Plan: `../../hg/tests/run-tests.py test-dirsync.t`
Reviewers: #sourcecontrol, durham, lcharignon, ttung
Reviewed By: durham
Subscribers: poshannessy, mjpieters, durham
Differential Revision: https://phabricator.fb.com/D2794928
Signature: t1:2794928:1456446576:c18d06a42eb89b5168c25d048ba4fa1fa3f0c6d3
Summary:
I missed this one as I was working on top of the release branch and it
changed under @
Test Plan: all tests that were passing before pass and check code passes
Reviewers: #sourcecontrol, ttung
Differential Revision: https://phabricator.fb.com/D2814605
Summary: This diff is part of a series to cleanup fb-hgext and make it pass check-code.
Test Plan: all tests pass
Reviewers: #sourcecontrol, ttung, mitrandir, akushner
Reviewed By: akushner
Subscribers: mpm, akushner, mitrandir
Differential Revision: https://phabricator.fb.com/D2811997
Signature: t1:2811997:1452200059:9e4fca501a22f95d2d9a22d234758f55e292ea9a
Summary: This diff is part of a series to cleanup fb-hgext and make it pass check-code.
Test Plan: All tests pass
Reviewers: #sourcecontrol, ttung
Differential Revision: https://phabricator.fb.com/D2811856
Summary:
matchfn actually accepts just a single argument (the file name), so our
extramatches function was incorrect. The test didn't hit it because the matcher
had no patterns (it only had explicit files), so it never executed the matchfn.
Test Plan: I updated the tests with a pattern to force this code path to be hit.
Reviewers: #sourcecontrol, ttung
Differential Revision: https://phabricator.fb.com/D2750982
Summary:
Previously, only commiting/amending a certain file would break the dirsync,
since it would apply the mirror to the working copy but it would not perform the
amend.
The fix is to extend the commit's matcher to include the files that are mirrors
of what is already being included in the commit.
Test Plan: Added tests
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2696486
Summary:
This adds an extension that allows configuring the repository such that any
commit that touches a file in directory foo/ will also have the change applied
to directory bar/. It will also block commits if they try to make divergent
changes to mirrored directories.
Test Plan: Added a test suite
Reviewers: #sourcecontrol
Subscribers: chip, aponomarenko
Differential Revision: https://phabricator.fb.com/D2602592