Summary:
We are adding an option --base to define a starting point for a
new branch. We define --bookmark as the head of the branch (we
might introduce a --dest option in addition). This allows us to create
new branches for release branches and others.
Note that for some reason, `arc unit` is generating different test
results than running the run-test.py manually, causing branch updates in
different situations. Therefore we have to glob a bunch of tests.
Test Plan:
python ../../hg-crew/tests/run-tests.py test-p4fastimport-* test-check*
Reviewers: #mercurial, quark
Reviewed By: quark
Subscribers: quark, medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5769328
Signature: 5769328:1504763221:78eb81f32ec46fc56619d77537c2b1944e938466
Upstream has added devel warnings around edit, so we need to update our usage.
In particular, the action parameter is now required, and the suffix extra will
soon be ignored.
Summary: Upstream change the rebase signature, so let's change our wrapper.
Test Plan: Ran the tests
Reviewers: #fbhgext, quark
Reviewed By: #fbhgext, quark
Differential Revision: https://phab.mercurial-scm.org/D585
Summary: This broke working with upstream hg.
Test Plan: Ran the tests
Reviewers: #fbhgext, quark
Differential Revision: https://phab.mercurial-scm.org/D584
Summary:
This adds a test that pushes a treeonly commit from a treeonly client to a
hybrid server, and verifies the result is written to the server flat and tree
manifests. Also tests that hooks can access the tree data.
This also changes the server to read the treemanifest if a tree was provided in
the bundle. Previously the server would only read trees if the forcereceivetrees
flag was on, which meant we couldn't accept flat and trees at the same time,
which made migrating harder.
Reviewers: #fbhgext, simonfar
Reviewed By: #fbhgext, simonfar
Differential Revision: https://phab.mercurial-scm.org/D571
Content written by `print` may not get flushed (especially in chg's case).
Use `ui.write` so Mercurial is responsible for flushing `ui.fout`.
Differential Revision: https://phab.mercurial-scm.org/D572
D451 is going to add an `order` parameter so let's update our code.
Also remove the wrapping of `revset.symbols['stringset']`, which is no
longer needed by the current Mercurial.
Differential Revision: https://phab.mercurial-scm.org/D543
Summary: on merge during rebase, check to see if source and destination are both draft commits. If so, use full copytrace to support more functionality.
Test Plan:
In tests/test-copytrace.t, added two tests:
- Change a file name and move containing directory in one branch. Modify contents of original file name in other branch. Rebase modded file into new file name in new directory.
- Move directory in one merge parent. Add new file to original directory in other merge parent. File moved to new directory on rebase.
Reviewers: stash, #fbhgext
Reviewed By: stash, #fbhgext
Subscribers: pulkit, ryanmce
Differential Revision: https://phab.mercurial-scm.org/D481
Summary:
Pull --rebase when you have local draft commits moves your commits,
your working copy, and your active bookmark to the new branch head
(or whatever destination you specify with -d). If you don't have
any local draft commits, it doesn't do any of that.
This change makes it so that it does everything except moving the
commits.
Test Plan: Added new unit tests. Re-ran existing ones.
Reviewers: #fbhgext, ryanmce
Differential Revision: https://phab.mercurial-scm.org/D518
Summary:
We have an internal linter that keeps yelling at me about this spelling error.
I created this by running:
```
hg grep -l 'commited' | xargs sed -i -e 's#Changes commited as#Changes committed as#g'
```
Test Plan: CI
Reviewers: durham, quark
Reviewed By: quark
Subscribers: medson, mjpieters, stash, jeroenv
Differential Revision: https://phabricator.intern.facebook.com/D5699238
Signature: t1:5699238:1503596778:de5e4f26daeaf3649c6c09ded6bd2b459b0e5f97
chg runs a mercurial command, we want to see which actual commands are run and
don't want to wrap at the chg level.
Differential Revision: https://phab.mercurial-scm.org/D504
Disables line wrapping for interactive ui. This makes sure the line count is
correct and the output is clear.
Differential Revision: https://phab.mercurial-scm.org/D503
In interactive mode, disables out of bounds <-,-> notifying the user with text
and a '\a' sound. Friendlier ui messages for when the user selects the current
state with the arrow keys or when trying to undo to a state before we recorded
anything. Hg serve commands generally aren't user executed and simply should be
skipped across when undoing (like unfinished states). The user can always use
--absolute to see them in preview and to undo to them.
Differential Revision: https://phab.mercurial-scm.org/D502
It was kept there to allow us to fallback to it in emergency cases. But the
new hiddenoverride code seems to work well. Therefore remove the old inhibit
extension.
Differential Revision: https://phab.mercurial-scm.org/D501
Summary:
tweakdefaults already overrides amend, rebase and graft to update the commit date
to the current time when it creates new commits.
This extends this to also give the same behavior to histedit.
Test Plan: New unit test added.
Reviewers: #fbhgext, stash
Differential Revision: https://phab.mercurial-scm.org/D490
It's a valid use-case to run split inside a histedit plan. The
checkunfinished was added by D161, which was caused by a user report that
the split changes got lost because of rebase failure. If there is no need to
rebase, then checkunfinished is not necessary.
In the future we might want a `splitstate` to make it harder to lose split
commits.
Differential Revision: https://phab.mercurial-scm.org/D488
The --pushvars option to push is moved to core with an extra config named
push.pushvars.server which defualts to False. This config controls whether the
server to unbundle the variables send by pushvars.
To make sure nothing breaks for those with pushvars extension enabled,
this should be added to the configuration file:
[push]
pushvars.server = True
Differential Revision: https://phab.mercurial-scm.org/D365
Summary: Object lookup fails in blobstore provided vague error message when a specific file was not present. Updating error message to reference the filename associated with the blob not found.
Test Plan:
In facebook-hg-rpms/fb-hgext/tests directory: rt test-lfs-test-server.t
Shows no error and validates that correct error message is displayed
Reviewers: quark, rainee, davidsp
Reviewed By: davidsp
Subscribers: medson, mjpieters
Differential Revision: https://phabricator.intern.facebook.com/D5617283
Tasks: T18972111
Signature: t1:5617283:1503070630:56fdcab5295ce7d050a24f1a989806066ef7054f
Change preview to just show the delta and connected commits. This means we need
to calculate oldworkingcopyparent and bookmarks diffs. This output will be
cleaner especially for people with a lot of commits in their repo.
Differential Revision: https://phab.mercurial-scm.org/D467
Summary:
ui.warn() just prints to the stderr. It has two disadvantages:
1) Distracts a user
2) Doesn't notify us about the problem.
Let's use ui.log() that will send result to our logging system
Test Plan: Run unit-tests
Reviewers: #fbhgext, quark
Reviewed By: #fbhgext, quark
Differential Revision: https://phab.mercurial-scm.org/D443
Prevent flashing in 'hg undo -i' for smoother ux. Tested by running hg undo -i
and not seeing flashes when hitting left or right.
Differential Revision: https://phab.mercurial-scm.org/D465
D319 renamed `peer.pipe[ioe]` to `peer._pipe[ioe]`.
D320 removed `peer.batch`.
D331 renamed `subprocess` to `_subprocess`.
D336 renamed `_capabilities` to `capabilities`.
Let's be compatible with those changes.
Differential Revision: https://phab.mercurial-scm.org/D425
Visible obsolete commits are slightly tricky. For example, an amend in the
middle of a stack will leave behind a visible obsoleted commit. This diff
removes visible obsolete commits from 'olddraft()'. This removes the need for
some special casing and allows for a more powerful preview.
Differential Revision: https://phab.mercurial-scm.org/D463
Makes hg undo -i and hg undo -p output show an "undo to time, before command"
message and adds directions (left, right, return, q). Also adds pager check as
pager break interactiveui.
Testing: run hg undo -p and hg undo -i and see output
Differential Revision: https://phab.mercurial-scm.org/D448
Obsoleted commits may be visible. To make sure that they are un-obsoleted after
undo when appropriate, we add "draft() & obsolete()" recording. The most common
case where this matters is undoing a mid stack amend.
Differential Revision: https://phab.mercurial-scm.org/D438
Instead of the _showstats output from hg.py, we now output the args and time of
the mercurial command we are undoing.
Differential Revision: https://phab.mercurial-scm.org/D412
hg rebase, histedit, unshelve and other commands may stop in an unfinished state
because of merge conflicts or other reasons. The user then has the ability to
continue or abort. Undoing in this case is slightly tricky as for example
aborting a rebase will perform real strips and so undo will fail with an error.
This change still records these states, but flags them as unfinished and skips
over them when undoing and redoing. Hg undo --absolute does not ignore these
states in the really unlikely situation you want to go to one of them.
Differential Revision: https://phab.mercurial-scm.org/D410
Summary: Get in line with upstream name change and eliminate develwarns.
Reviewers: #fbhgext, simonfar, simpkins
Reviewed By: #fbhgext, simonfar, simpkins
Subscribers: quark, simpkins, simonfar
Differential Revision: https://phab.mercurial-scm.org/D429
Undo -p is really slow on certain large repos. This caches 'olddraft()' by
using the revlog nodes. Since revlogs are immutable this should be really safe
and could hopefully dramatically improve not only hg undo -p performance, but
performance of all undo commands.
Differential Revision: https://phab.mercurial-scm.org/D439
The modern pager API is to use `ui.pager()` explicitly just before the time
a command needs a pager. It's now hard-coded in individual commands, and
opt-in by default. Users wanting to disable pagers for certain commands need
to disable them explicitly. Ideally we don't need the pager extensions or
the `pager.attend` setting.
This patch migrates `show`, `smartlog`, `fastannotate`, and `grep` to use
the modern API.
Differential Revision: https://phab.mercurial-scm.org/D437
Summary: This happens in case of "pull --rebase" if the source is ancestor of destination
Test Plan: see the new test, it's making hg crash without this change
Reviewers: #fbhgext, ryanmce, simonfar
Reviewed By: #fbhgext, ryanmce, simonfar
Subscribers: ryanmce
Differential Revision: https://phab.mercurial-scm.org/D436