Summary: making the new parts in the bundle non mandatory
Test Plan: the former tests still pass. I pushed to fbjava_test where the part is not handled yet, and the bundle doesn't fail anymore
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2689306
Tasks: 8660367
Summary:
"git branch -m new" renames the *current* branch. Add a shell command to read
the current bookmark when omitted from the git branch -m command line.
Test Plan:
Run tests with:
cd tests && python run-tests.py test-githelp.t
Reviewers: mitrandir, rmcelroy, durham
Reviewed By: rmcelroy, durham
Subscribers: mitrandir
Differential Revision: https://phabricator.fb.com/D2679470
Tasks: 8905356
Signature: t1:2679470:1448062781:d877b60bc2d675efac8d4814f9f89713e1c2630d
Summary: loading copytrace
Test Plan: i built the rpm locally
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2682418
Tasks: 8501037
Summary: returning after exception in bundle2 instead of continuing to run without some args
Test Plan: the former tests still pass. when manually removing getdb.sh, the tests fail gracefully
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2681872
Tasks: 8660367
Summary: When only filldb was enabled, there was an infinite loop, trying to add missing '0' data. so the '0' case was removed and a flag avoiding infinite loop was added
Test Plan: The tests still passes and the loop doesn't appear again during rebases
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2680808
Tasks: 8660367
Summary: Two error modules were imported in bundle2.py and there were some _fail leftovers
Test Plan: the tests still pass
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2680415
Tasks: 8660367
Summary: calculate and add move data when its not in the local or move repo. In theory this should only be called for a few old draft commits, prior to the filldb.py extensions
Test Plan: the old tests still pass and i tested manually a rebase when the local database was erased
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2678603
Tasks: 8659945
Summary: adding the INDEX to the databases. Removed the 'asking server' part of retrieverawdata which is never used since this is to send data to the serve
Test Plan: The former tests still pass
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2678151
Tasks: 8660367
Summary: moved the global remote variable to a repo argument
Test Plan: the former tests still pass
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2677830
Tasks: 8660367
Summary: On exception, pass and print a message asking to report the bug with the metadata.
Test Plan: The former tests still pass and i manually tested the _fail(repo) function
Reviewers: #sourcecontrol, lcharignon, rmcelroy
Subscribers: lcharignon
Differential Revision: https://phabricator.fb.com/D2676065
Tasks: 8659945
Summary: adding ui config to allow deploying first the 'filling the client database' then 'pushing to and pushing from the server database' and finally the 'copytracing' part
Test Plan: adding those ui configs, the former tests still pass
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2672217
Tasks: 8660367
Summary: moving remote to a ui config. servers are True, clients are False.
Test Plan: the former tests still pass
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2671855
Tasks: 8660367
Summary: Added all the sql commands for the MySQL remote database, and gathered all the commands in a single function
Test Plan: Created a serverrepo, two client ones, did push and pulls between them
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D2661606
Tasks: 8660367
Signature: t1:2661606:1447875185:0e9d3876b2f509028585349a9d05b447876b3da0
Summary:
When a sparse profile is not found (perhaps because the user used an incomplete
or misspelled path), warn the user that a profile is not found.
There was already a debug message for this, elevate it to a warning.
Test Plan:
Run the tests:
cd tests
python run-tests.py test-sparse*.t
Manual test:
hg init test
cd test
cat > .hg/hgrc <<EOF
[extensions]
sparse=$(dirname $TESTDIR)/sparse.py
EOF
touch testfile
hg add testfile
hg ci -m 'initial commit'
hg sparse --enable-profile foo/bar
hg sparse --disable-profile foo/bar
and the following warning is printed twice:
warning: sparse profile 'foo/bar' not found in rev <hash> - ignoring it
Disabling the warning with:
cat >> .hg/hgrc <<EOF
[sparse]
missingwarning=false
EOF
hg sparse --enable-profile foo/bar
hg sparse --disable-profile foo/bar
Reviewers: rmcelroy, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D2668406
Tasks: 8994281
Signature: t1:2668406:1447948981:66d16b94ea7ea682b9e0c3faaccc1a364283364d
Summary: centralizing the sqlite commands in a function - adding a 'repo' column to the sqlite database so that it is similar to the future XDB
Test Plan: the former tests still pass
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2665931
Tasks: 8660367
Summary: Part of the delay in the hg ssl call was because phabstatus was actually making the network call for each time it was called in the template condition, and we can cache the results
Test Plan: Ran hg ssl, so much faster
Reviewers: durham, rmcelroy
Differential Revision: https://phabricator.fb.com/D2652050
Summary:
Remove the need to ommit the rREPO prefix when copy pasting from phabricator and
looking up a commit.
Test Plan:
Ran the following in phabricator enabled HG repos
11/13 12:15 cdelahousse@dev4253 ~/fbsource/fbcode
$ hg log -r rFBS27aa00fb74d9a3b82756dad6ff26fe253f1e9a70 --config extensions.fbconduit=~/local/fb-hgext/fbconduit.py
changeset: 992495:27aa00fb74d9
user: Peng Li <pengli@fb.com>
date: Tue Nov 03 10:29:01 2015 -0800
summary: Add a simple root dir arc library
11/13 12:21 cdelahousse@dev4253 ~/fbjava
$ hg log -r rFBA8f1335e6d588 --config extensions.fbconduit=~/local/fb-hgext/fbconduit.py
changeset: 18654:8f1335e6d588
user: Ryan Menezes <ryandm@fb.com>
date: Thu Oct 22 09:59:27 2015 -0700
summary: move jenkins hook into fbjava/arcanist (fbjava changes)
Tried the same on a repo with a git mirror that exists in phabricator:
11/16 11:40 cdelahousse@dev4253 ~/fbsource/fbcode
$ hg log -r rFBCODE8272d25d65869ce059024ff38c7051388ad7b802 --config extensions.fbconduit=~/local/fb-hgext/fbconduit.py
changeset: 1027287:f26a9c32ae08
user: Oleksandr Kuvshynov <oleksandr@fb.com>
date: Sun Nov 15 19:16:39 2015 -0800
summary: [mf] simple cleanup of feed story view
If a git hash is too small, abort:
$ hg log -r rFBCODE8272d25d65869ce059024f --config extensions.fbconduit=~/local/fb-hgext/fbconduit.py
abort: git hash must be 40 characters
The previous commands depends on a list of repos set in my hgrc. See (D2660070)
[fbconduit]
gitcallsigns=LK, CFPUMA, CFSV, CFGK, CFMF, CFGMON, CF, RSIGMA, FA,·
WAWEBCLIENT, SKY, FBCODE, FBOBJC, WAWP, SV, OVRMOBILEMAIN, WAANDROID, IGSRV,
CPE, MSS, ANDROIDSDK, BUCK, IT-CHEF, WABB, ITINFRA, SIGMA, IOSSDK
Reviewers: #sourcecontrol, durham, ericsumner
Reviewed By: durham, ericsumner
Subscribers: rmcelroy, ericsumner
Differential Revision: https://phabricator.fb.com/D2653497
Tasks: 8361368
Signature: t1:2653497:1447480768:295079a7793e182ddea3aeece9cfaead1bfc1a57
Summary:
replacements for the newly-picked node were not present in the
histedit state before successfully continuing which made --abort
unaware of them.
This isn't clean solution. But the stop command (with node) will cease to
exist in near future (it will be replaced by the normal pick and just "stop"
in following line for which we will have better solution). This should suffice
until then.
Test Plan:
test attached
tested manually too
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D2661831
Tasks: 9111207
Signature: t1:2661831:1447790670:a26ee58cacb77e6cf675a1e99d2eadcbffb684d9
Summary: Instead of retrieving moves one by one during copytracing, retrieves all the moves from the ctxstack at a time
Test Plan: The former tests still work
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2661088
Tasks: 8660367
Summary: The regular expression was matching hg hashes that started with a digit.
Test Plan:
Ran it in different repoes:
This should fail (fbcode)
11/13 11:15 cdelahousse@dev4253 ~/fbsource/fbcode
$ hg up rFBCODE8a781801149 --config extensions.fbconduit=~/local/fb-hgext/fbconduit.py
abort: unknown revision 'rFBCODE8a781801149'!
These should succeed (WWW and opsfiles)
11/13 11:16 cdelahousse@dev4253 ~/www
$ hg log -r rE1502460 --config
extensions.fbconduit=~/local/fb-hgext/fbconduit.py
changeset: 808001:34d7f02c58d6
user: cdelahousse@2c7ba8d8-a2f7-0310-a573-de162e16dcc7
date: Thu Nov 20 04:45:21 2014 +0000
summary: CRMEmailHarvester Script runner for raw email processor
11/13 11:29 cdelahousse@dev4253 ~/opsfiles
$ hg log -r rO766855 --config
extensions.fbconduit=~/local/fb-hgext/fbconduit.py
changeset: 758197:db438a952785
user: twsvcscm@914ed892-1039-11dd-9db8-c56a9f3689f4
date: Sat Oct 31 01:13:33 2015 +0000
summary: [Storage] netgroup_gen AUTOCOMMIT
Reviewers: #sourcecontrol, rmcelroy
Subscribers: cdown
Differential Revision: https://phabricator.fb.com/D2653121
Tasks: 9071883
The no-date-rewrite-on-rebase test had output that assumed date rewriting. It
should be outputting the first commit which has a recent date (commit 7) instead
of the current commit (commit 12) which did not have it's date rewritten.
Summary:
There was a bug where if you had a sparse profile and updated across revs that
both A) add file X to the sparse profile, and B) changed the permissions on file
X (ex: to make it executable), the update would fail.
This was caused by the edit permission action being present in the action list
as an 'edit' action, so the profile changing code did not add the 'get' action
that would actually put it on disk.
The fixes is to just add the 'get' action for every file that wasn't previously
in the profile (overwriting any action that had already been computed).
Test Plan: Added a test, and verified it against the reported repro case
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2652793
Summary: the move data concerning the ctx is pushed to the remote sqlite database at the same time as hg push
Test Plan: testing a push between a client and server repo
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2643067
Tasks: 8660367
Summary: If some contexts are not present in the local database during a retrieve, a request is send to the server for those moves one time through a 'pull(revs)' call. When doing a rebase, a check is performed beforehand to see if the local database contains the contexts of the rebased-to branch.
Test Plan: Rebasing in the middle of a branch for which the moves are not known
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2634365
Tasks: 8660367
Summary: Changed the format under which the move dictionaries are sent by bundle2 and sorted the sql test results so that it is constant
Test Plan: The former tests (fill-db.t, copytrace.t and bundle2.t) still pass
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2634262
Tasks: 8660367
Summary:
Previously rebase retained the commit date from the original. Now it uses current time.
Added config option 'tweakdefaults.rebasekeepdate' to save original date in graft.
Test Plan: ./run-tests.py test-tweakdefaults.t
Reviewers: rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D2646736
Tasks: 8770194
Signature: t1:2646736:1447368541:e9735f75b394a25b72d1a5cc4cd26454c2231c91
Summary:
If tracking was set up, 'hg push' was not invoking the pushrebase logic, like it
would if the user ran 'hg push --to master'.
This is required for us to unify all pushes through pushrebase, so we can move
the hooks out of the lock and into prepushrebase.
Test Plan: Added a test
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2635253
Summary:
Removes the need strip the capital letters from an SVN revision when accessing a revision
rE1502460 -> r1502460
Test Plan:
Manually in opsfiles hg and dubdubdub
In opsfiles:
hg show rO766855
In dub dub dub
hg log -r rE1502460
Reviewers: durham, #sourcecontrol, ericsumner, rmcelroy
Subscribers: ericsumner, rmcelroy
Differential Revision: https://phabricator.fb.com/D2603749
Tasks: 8361368
Summary: the _interestingfiles function was blocking the commits
Test Plan: the test still work and commits works in my fbsource repo without unreasonable additional time
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2628371
Tasks: 8501037
Summary:
Requiring that developers use the run-tests from the core hg repo has
some downsides:
1) It forces the tests to run against whatever version of Mercurial I have
checked out right now. I usually want to run tests against my installed
Mercurial (since we're likely to deploy a new fb-hgext without a new hg).
2) It makes it harder for people to contribute. Someone wrote a new extension,
and in order for them to test it, I have to explain how to checkout hg and how
to run tests using the hg run-tests and first they must checkout the rev we
have deployed, not @.
Test Plan: Ran the tests
Reviewers: pyd, cdelahousse, #sourcecontrol
Subscribers: ps
Differential Revision: https://phabricator.fb.com/D2632574
Summary:
The branch cache is used to store a cache of each branches heads. If your
Mercurial repo doesn't have any branches though, this can be slow.
This tweak allows simplifying the branchcache computation to just say every head
in the repo belongs to the 'default' branch. This shaves 600ms off of some
commit commands.
I tested it by running the entire Mercurial test suite with it enabled, and
scanning the failures to make sure they were only related to repos that had
non-default branches.
Test Plan:
$ cd ~/hg/tests
$ ./run-tests.py -S -j 48 --extra-config-opt=perftweaks.disablebranchcache=True --extra-config-opt=extensions.perftweaks=/data/users/durham/fb-hgext/perftweaks.py
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy
Differential Revision: https://phabricator.fb.com/D2630360
Signature: t1:2630360:1447092762:adab0456ff842cf508b7f46e988ef9d865fa3988
Summary: put **kwargs in the arguments to avoid iddues with the 'keepbranches' argument
Test Plan: run the tests again
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2617832
Tasks: 8659945
Summary: Uses the local sqlite database to check for moves during the rebase - Wraps and copies the mergecopies function
Test Plan: Tests the different cases: renamed/renamed renamed/modified renamed/deleted deleted/renamed modified/renamed
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2552629
Tasks: 8659945
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
Summary:
Previously we did force pushes by passing a force argument to the server and
having the server ignore the onto arg. This was annoying because it meant we had
to stage our deploy (server must be able to handle the arg before we could allow
clients to send it).
The new behavior uses the existing onto arg and passes a marker to indicate that
no rebase should happen. Old pushrebase servers will handle this correctly,
since a failure to find a node is already treated as "don't try to rebase".
Test Plan:
Tested force push and non force push between old servers and new
clients, and new servers and old clients, and new servers and new clients.
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2598108