Summary:
Some changes in core made the output for merge conflicts change. I just made
certain tests reflect that.
Test Plan: ran the tests
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy
Differential Revision: https://phabricator.fb.com/D2566237
Tasks: 8797924
Signature: t1:2566237:1445456815:d5a1560bd3421de6b9955e44a8dd2698f0462f51
Summary:
Looks for similar files between the removed/missing and added/unknown
committed files
Test Plan:
Tests are done without 'commit' (testmode option)
mv + add + rm with several thresholds of similarity
changing the threshold of similarity
mv alone
mv + add + rm but not in committed files
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Subscribers: durham, mitrandir, pyd, cdelahousse
Differential Revision: https://phabricator.fb.com/D2492693
Tasks: 8501037
Signature: t1:2492693:1445396857:a40d0aeb3c6592b1c8d2a93d089e4fdc46bde711
Summary: Added the --reuse-message/-M flag to `hg commit` via tweak defaults
Test Plan: See the tests
Reviewers: #sourcecontrol, durham, rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D2559541
Tasks: 8721257
Signature: t1:2559541:1445364124:db69a1b08defc0a84f314019ce1a01174e7006d3
Summary:
Adds configuration to .hgrc such that setting nooprebase = True
in the tweakdefaults section changes the behaviour of a noop
rebase such that the exit status is 0 (instead of 1).
Test Plan: See: https://phabricator.fb.com/P20083985
Reviewers: rmcelroy
Reviewed By: rmcelroy
Subscribers: dancol
Differential Revision: https://phabricator.fb.com/D2557089
Tasks: 8694501
Signature: t1:2557089:1445447745:fc35600d53f797d7242c2fcff9fac42867d7b651
Summary:
It's a nice property to have commits have increasing timestamps. Since we're
already rewriting commits during pushrebase, we can rewrite the timestamp to the
push time.
Test Plan: Added a test
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2554422
Summary:
Catnotate is a version of hg cat with output annotated with file name and line
number. Such output is very useful when running hg cat on multiple files
(for example in commit hooks).
Test Plan: unit tests
Reviewers: #sourcecontrol, pyd, mpm, durham, rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D2497470
Signature: t1:2497470:1444842798:9192ef3ef1603d068e7f38777def81a43bed0414
Summary:
According to pyd, Mercurial core now writes bundle2 bundles when the repo is
generaldelta, so we don't need this anymore. Plus we're using evolve now so
we're not producing many bundles anyway.
The motivation for disabling this is that the code broke due to changes from
upstream, and I was too lazy to fix it.
Test Plan: nope
Reviewers: pyd, ericsumner, #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2538749
Summary:
This adds a hook before we take the lock that allows us to run some expensive
hooks without blocking the entire repo. This is useful for hooks that check the
contents of the bundle for certain info (like conflict markers), that won't be
affected by rebases.
Test Plan:
Added a test. Verified it passed when hg had lazy locks enabled for
unbundle, and failed with mercurial did not have lazy locks for unbundle.
Reviewers: pyd, #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2511561
changed reseting to resetting in reset.py and test-reset.t
Summary: changed reseting to resetting in reset.py and test-reset.t
Test Plan: checked output and run test to ensure "reseting" is changed to "resetting"
Reviewers: cdelahousse, #sourcecontrol
Subscribers: siqi
Differential Revision: https://phabricator.fb.com/D2535178
Tasks: 8581478
Summary: Moved merge comment to hint in Abort
Test Plan: test output
Reviewers: rmcelroy
Differential Revision: https://phabricator.fb.com/D2522817
Tasks: 8593074
Summary:
A continuation D2502125. Add more helpful output to hg status when the user is
in a bisect state.
Example output
10/07 17:43 cdelahousse@dev4253 ~/local/clearmereg/testrepos/states/bisect
$ hg status
# The repository is in an unfinished *bisect* state.
# To mark the commit good: hg bisect --good
# To mark the commit bad: hg bisect --bad
# To abort: hg bisect --reset
Test Plan: Tests have been updated
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: akushner
Differential Revision: https://phabricator.fb.com/D2520493
Tasks: 8563305
Signature: t1:2520493:1444288081:5da20016aaaaff77db24ecb01c404b0e11aeeb7a
Summary:
Continuation of D2502125. Let's help people when they're in a wierd states by
displaying a helpful message below the output of `hg status`
Example output:
10/07 16:53 cdelahousse@dev4253 ~/local/clearmereg/testrepos/states/merge
$ hg status
M a
# The repository is in an unfinished *merge* state.
# Unresolved merge conflicts:
#
# a
#
# To mark files as resolved: hg resolve --mark FILE
# To continue: hg commit
# To abort: hg update --clean .
For more example output, see the tests
Test Plan: See tests: `tests/test-morestatus.t`
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: akushner
Differential Revision: https://phabricator.fb.com/D2520272
Tasks: 8563305
Signature: t1:2520272:1444287977:b90b747538754ef4f4f0f8fab3e56f3aa288d3e5
Summary: Disabling rollback in tweakdefaults to replace the hook
Test Plan: testing the message
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2515138
Tasks: 8578898
Summary:
If a user gets stuck in a stopped rebase, give some details to the user when
they run `hg status` about how to move forward.
Let's see if we can get some bike shedding done on one command.
Notes on behaviour:
* it there exists any unresolved conflicts, no matter, they'll be shown.
* there is no way to only show what state the user is in (and not the conflicts). You either turn more status on or off.
Example for rebase:
10/05 19:34 cdelahousse@dev4253 ~/local/clearmereg/testrepos/states/rebasestate
$ hg status
M a
# The repository is in an unfinished *rebase* state.
# Unresolved merge conflicts:
#
# a
#
# To mark files as resolved: hg resolve --mark FILE
# To continue: hg rebase --continue
# To abort: hg rebase --abort
Repo in rebase state after the all files have been resolved:
$ hg status
M a
# The repository is in an unfinished *rebase* state.
# No unresolved merge conflicts
# To continue: hg rebase --continue
# To abort: hg rebase --abort
Test Plan: See tests
Reviewers: #sourcecontrol, rmcelroy, durham
Reviewed By: durham
Subscribers: dancol, pyd, akushner
Differential Revision: https://phabricator.fb.com/D2502125
Tasks: 8563305
Signature: t1:2502125:1444189728:d6abf28f09bcc0360628497db8d896025967827f
Summary: Disabling merge in tweakdefaults to replace the hook
Test Plan: enable, disabled, disabled and meaasge modified
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2515407
Tasks: 8593074
Summary:
This is an MVP to give the user more information about the state of the repo. We'll grow the functionality in other diffs.
for example, if the repo is in a state after a stalled graft, then hg status outputs a bit more
$ hg status
M a
? a.orig
# The repository is in an unfinished graft state.
Test Plan: See the tests.
Reviewers: #sourcecontrol, durham, rmcelroy
Subscribers: akushner, rmcelroy
Differential Revision: https://phabricator.fb.com/D2495659
Tasks: 8563305
Summary: Adding config to disable the branch command and still forcing users to pass --new if it's enabled
Test Plan: Testing branch alone, branch when it's disabled and when it's enabled (with the --new options in both cases)
Reviewers: #sourcecontrol, rmcelroy
Differential Revision: https://phabricator.fb.com/D2478915
Tasks: 8500803
Summary:
To do so, we had to change some path variables and change the output of some
tests. Removed a few dependencies that provided by hg.
Test Plan:
Ran the tests. There was some ignorable output changed (about devel-warn) caused by other code not
related to this change.
Reviewers: #sourcecontrol, pyd, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy, durham
Differential Revision: https://phabricator.fb.com/D2499721
Signature: t1:2499721:1443745230:9d4e53e83356807f3343c8343e28d10f1b9dc35f
Summary:
Also added an additional test to show a case that fails now (and should fail),
but would have succeeded with the previous code.
Test Plan: Additional unit test
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Differential Revision: https://phabricator.fb.com/D2502396
Signature: t1:2502396:1443809922:18ec6697b7c135c37c10f7bdd9544901c4a54c99
Summary:
The old check moved the bookmark old node after the prepushkey hooks
had ran, bypassing the non-ff prevention logic. This moves the old node rewrite
to before the prepushkey hook and also checks that old node is moved in a
ff-only way.
Test Plan: updated unit test
Reviewers: #sourcecontrol, mitrandir
Reviewed By: mitrandir
Subscribers: durham
Differential Revision: https://phabricator.fb.com/D2499633
Signature: t1:2499633:1443733890:4c84150bd0f21adb97feb23e54727bb4e8be38cf
Summary:
By removing the part on the pushrebase client instead of ignoring it on the
pushrebase server, the server can still run this check for non-pushrebase
pushes so it will be safer against divergent heads.
Test Plan: Updated unit tests
Reviewers: #sourcecontrol, pyd, durham
Reviewed By: pyd, durham
Differential Revision: https://phabricator.fb.com/D2499115
Signature: t1:2499115:1443736440:001ceb79a4692abbd4c6b208124f6576f10f680c
Summary: Changing tag disabled by default to tag enabled by default
Test Plan: tag default policy, tag when disabled with or without default message
Reviewers: rmcelroy
Differential Revision: https://phabricator.fb.com/D2486970
Tasks: 8500389
Summary:
In pushrebase, we expect bookmarks to be moving after discovery but
before we grab the lock. With this patch, we rewrite the incoming bookmark
changes so that they do not fail if the bookmark moves after discovery.
Test Plan:
Wrote a new test to cover this behavior and verified that the test failed before
this change but works afterwards.
Reviewers: #sourcecontrol, durham
Reviewed By: durham
Subscribers: durham
Differential Revision: https://phabricator.fb.com/D2488675
Signature: t1:2488675:1443503039:660f88da9727a74f7c9a21f0767efb5d7379d16d
Summary:
This check was causing pushes to fail when heads change during a push, but that
is expected in pushrebase pushes.
Test Plan: ran existing tests
Reviewers: ericsumner, #sourcecontrol, durham
Reviewed By: #sourcecontrol, durham
Differential Revision: https://phabricator.fb.com/D2482254
Signature: t1:2482254:1443468591:23dc9ad24e1c7d3b3ec04be678d346dfed6d98a7
Summary:
The tag cache can be pretty expensive to populate, and in many of our repos we
do not even allow tags, so let's allo disable it entirely.
Test Plan: Added a test
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: #sourcecontrol, rmcelroy
Subscribers: rmcelroy
Differential Revision: https://phabricator.fb.com/D2481606
Summary: Adding tag tweak and warning on the tags command
Test Plan:
Testing the tag command if allowed, not allowed with default message and not allowed with custom message
Testing if the default warning message or custom message prints when tags is called
Reviewers: durham, #sourcecontrol, rmcelroy
Reviewed By: #sourcecontrol, rmcelroy
Subscribers: cdelahousse, durham
Differential Revision: https://phabricator.fb.com/D2477368
Tasks: 8500389
Summary:
This tests were A) unreadable, and B) not deterministic. Let's remove all that
text and have a special test just for making sure the hook vars we care about
are present.
Also break the output into multiple lines for easier reading and diffing.
And fix a change in order for the remotenames test.
Test Plan: Ran the tests
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2479274
fbamend was using the python system rebase instead of the one loaded by
Mercurial. This broke the tests when the installed rebase differed from the
version of Mercurial we were running the tests with.
Test Plan:
updated test; made sure to include `HGPLAIN`
ran `arc diff` from repo root and from subdir; both worked
In `fbsource/fbobjc` I ran `arc lint` and there were no warnings but it did fail to find `/usr/bin/xcrun` (which is the same behavior as before).
I repeated this in `fbsource/fbobjc/Configurations` to check for path issues; same result.
In `www` I ran `arc lint` and there were no warnings. I repeated this in `www/flib` and got the same result.
Reviewers: durham, #sourcecontrol
Reviewed By: durham, #sourcecontrol
Subscribers: durham, akushner
Differential Revision: https://phabricator.fb.com/D2457648
Tasks: 8432204
Signature: t1:2457648:1442622676:611ad3072d11b91feb947c0eb7eb25b621c61eb1
Summary: I thought we had already done this
Test Plan: Used new tweakdefaults and the rebase abort issue was fixed!
Reviewers: #sourcecontrol, durham
Reviewed By: #sourcecontrol, durham
Differential Revision: https://phabricator.fb.com/D2457645
Summary: The test-fbamend.t test is failing because of some error codes that no longer happen with an unsuccessful 'hg amend' command. The command prints out 'nothing changed' and no longer throws an error.
Test Plan: After the change, I ran the tests and confirmed the test-fbamend.t test is now passing.
Reviewers: cdelahousse, jetzhao, ttung, romanchadnov, matwood, durham, #sourcecontrol
Reviewed By: durham, #sourcecontrol
Subscribers: rmcelroy, pyd, mitrandir
Differential Revision: https://phabricator.fb.com/D2446352
Signature: t1:2446352:1442536997:e0d7ec996062f8bba5ee125c51091168750f1472
Summary: An empty repo will cause the smartlog extension to have errors. SCM is trying to iterate through an empty dataset. Smartlog needs to catch the exception and abort if the current repo is empty.
Test Plan: Added tests to make sure 'hg smartlog' on a newly created repo doesn't explode. Confirmed that tests failed before the fix, and they pass with the fix in place.
Reviewers: cdelahousse, jetzhao, romanchadnov, ttung, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy, ericsumner
Differential Revision: https://phabricator.fb.com/D2446132
Tasks: 8118567
Signature: t1:2446132:1442512709:6a666351a02639f6e0b15c6c7476a8cdd25370c9
Summary:
`githelp` supported `git checkout -f xyz` but not the same command with out a
path or a rev. Added support for it and wrote a test.
Test Plan:
Added tests and ran them.
Task: #7499727
Reviewers: ericsumner, durham
Reviewed By: durham
Subscribers: joesavona
Differential Revision: https://phabricator.fb.com/D2372309
Signature: t1:2372309:1440530832:cb32553b2ef7f7ff0e09cb80ff6449a8c26c2caf
Summary:
FBConduit used to throw a conduit error when a rev didn't map.
Now, it just returns an empty string for the mapping. This updates the
fbconduit extension so that it matches the server behavior.
Test Plan: passed unit tests.
Reviewers: mitrandir, ericsumner, durham
Reviewed By: ericsumner
Subscribers: mitrandir
Differential Revision: https://phabricator.fb.com/D2331464
Tasks: 7970302
Signature: t1:2331464:1439500203:cbf79e9b9c54aebdf33bbad82c1982b5a69e8bc9
Summary:
Different repos have different notions of important bookmarks. Allow
configuring it.
Test Plan: added a new test
Reviewers: #sourcecontrol, durham
Reviewed By: #sourcecontrol, durham
Subscribers: durham
Differential Revision: https://phabricator.fb.com/D2340061
Tasks: 7955325
Summary:
It turns out commit.files() does not return all the affected files during a
merge commit. It only returns files which differ from both p1 and p2, so in a
merge commit where we accept the changes from p2, the changes were lost during
the rebase.
This fixes it by performing a manifest diff if we're grafting a merge commit.
Test Plan:
Updated the tests to check the file contents (this test would fail
before)
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2331586
Summary: Just in case someone trys to use 'git whatchanged', at least tell them why it's not supported
Test Plan: added a test
Reviewers: rmcelroy
Reviewed By: rmcelroy
Differential Revision: https://phabricator.fb.com/D2329289
Tasks: 7966012
Signature: t1:2329289:1439242809:56fb56704e1110dc95a6366ee9c3eb948e1bf415
Summary:
Adds an xr/execr action that executes the command relative to the
current working directory. This allows our users to run 'arc diff' and pick up
whatever the current arc project is (instead of whatever arc project is at the
root of the repository).
Test Plan: Added a test
Reviewers: davidsp, #sourcecontrol, lcharignon
Reviewed By: #sourcecontrol, lcharignon
Subscribers: rmcelroy, lcharignon
Differential Revision: https://phabricator.fb.com/D2311298
Tasks: 7795286
Summary:
pushrebase doesn't support pushing non-fastward heads when remotenames is on
(since --to implies both remotenames and do a rebase). Long term we want --new
and --replace to indicate bookmark movements, but for now we can use the
existing -f to imply that we don't want a rebase to happen.
Test Plan: Added a test
Reviewers: #sourcecontrol, lcharignon
Reviewed By: #sourcecontrol, lcharignon
Subscribers: lcharignon
Differential Revision: https://phabricator.fb.com/D2307585
Summary:
This is testing more failing case involving command creating obsmarkers during interruption.
More corner case testing could be added, but this is a good start.
Test Plan: test crash before update of core. Properly pass with the series current in review on mercurial-devel
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.fb.com/D2307305