Commit Graph

14 Commits

Author SHA1 Message Date
Jun Wu
1e30f781e0 dirsync: rename in-repo config file to .hgdirsync
Summary:
It will allow sparse to not ignore the file, and is more consistent with
other special files.

Test Plan: Updated existing tests

Reviewers: rmcelroy, #sourcecontrol, durham

Reviewed By: durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4738766

Signature: t1:4738766:1490032493:199f3fef9c74a137b16ae7637b87de625ca5115d
2017-03-20 10:55:43 -07:00
Jun Wu
c133169b8b dirsync: read ".dirsync" in the working copy as part of its config
Summary:
It'd be nice to have dirsync config in the repo, since it's better synced, and
easier to be modified.

Test Plan: Added a test case

Reviewers: #sourcecontrol, simonfar

Reviewed By: simonfar

Subscribers: simonfar, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4732054

Signature: t1:4732054:1489793650:ca6c63ef47a1d9ebd181fbaee5554975801324eb
2017-03-17 16:35:08 -07:00
Simon Farnsworth
be87628803 Catch up with upstream changes so that our tests pass
Summary: Upstream's done a few changes that we need to catch up with.

Test Plan: Run tests locally on my devserver

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: quark, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4058640

Signature: t1:4058640:1477065516:e2ab2483d054e47b4fe75c6eba185dfd5179f57a
2016-10-21 08:58:52 -07:00
Jun Wu
8a3a99ba21 hgext: move single file extensions to hgext3rd
Summary:
Be a better citizen under system python path.

Fix all tests issues and change setup.py to use glob pattern to include
all extensions.

Test Plan:
Run tests and `make local`.
Also build and install the package and run `hg sl` in major repos.

Reviewers: #mercurial, ttung, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, durham, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3534311

Signature: t1:3534311:1468275426:fe122646c8bd6c541e1889e73e9df28f86747ff2
2016-07-08 13:15:42 +01:00
Durham Goode
8282d2384c dirsync: disable dirsync during shelve/unshelve
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
2016-05-05 14:51:59 -07:00
Adam Simpkins
84b5cc23ce cleanup: make test-dirsync.t pass check code
Summary: Quote ".^" arguments that check-code.py complains about.

Test Plan: Ran the tests, confirmed the check-code test no longer fails.

Reviewers: lcharignon, durham, balpert

Reviewed By: balpert

Subscribers: net-systems-diffs@, yogeshwer, mjpieters

Differential Revision: https://phabricator.fb.com/D3012566

Signature: t1:3012566:1457117778:fe0bdc37c02f1aa2f2a9d97f7cdf2910794c4966
2016-03-04 13:52:11 -08:00
Ben Alpert
56e0b352ae dirsync: Behave better with already-inconsistent mirror
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
2016-02-25 16:50:43 -08:00
Laurent Charignon
95f1498273 cleanup: make test-dirsync.t pass check code
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
2016-01-11 10:19:22 -08:00
Laurent Charignon
0ca941a08a cleanup: use backtick instead of parent to capture output of shell cmd
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
2016-01-07 18:30:24 -08:00
Laurent Charignon
5ebc03718c cleanup: fix quoting patterns in tests
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
2016-01-07 18:30:24 -08:00
Michael Lee
5ed662ae76 [dirsync] Remove dirsync mirroring message
Summary:
^^^

https://fb.facebook.com/groups/sourcecontrol/permalink/932848996764721/

Test Plan:
    ../../hg-crew/tests/run-tests.py test-dirsync.t

Reviewers: lcharignon, durham

Reviewed By: durham

Subscribers: seanc, knekritz

Differential Revision: https://phabricator.fb.com/D2802500

Tasks: 9584342

Signature: t1:2802500:1452026176:4813992ae1f42836d30921a4a1e79e86a01ce52b
2016-01-05 16:52:13 -05:00
Durham Goode
9b444e63df dirsync: fix extramatches function
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
2015-12-11 14:46:29 -08:00
Durham Goode
14f794444a dirsync: fix 'hg commit file.txt'
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
2015-11-25 11:21:47 -08:00
Durham Goode
175f3b3410 dirsync: add extension for keeping directories synchronized
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
2015-10-30 15:37:17 -07:00