Commit Graph

1611 Commits

Author SHA1 Message Date
Saurabh Singh
5106edcb35 gitgetmeta: enable serving only missing hg-git map data
Summary:
The gitlookup extension allows for only requesting the complete file
from the server. This leads to download of large files (hg-git map file
specifically in this case) when only the missing chucks of the file would have
sufficed.

This commit makes changes to allow for downloading only the missing parts of
the map file. A config option 'onlymapdelta' has also been added to allow for
switching between the two different modes of operation: serving complete file
and serving only the missing chunks. The tests were subsequently updated to
cater to the new scenario and also, checking for interoperability of the two
modes.

Test Plan: Ran all the tests.

Reviewers: #fbhgext, durham

Reviewed By: #fbhgext, durham

Subscribers: durham

Differential Revision: https://phab.mercurial-scm.org/D695
2017-09-13 17:17:55 -07:00
Saurabh Singh
285ded5861 gitmeta: refactor and add more test cases to test-git-getmeta.t
Summary:
test-git-getmeta.t has some basic tests to check that the git metadata
syncing  works as expected. I have added some tests for more complicated
scenarios for robust testing. Also, I did some refactoring of the test for
readability.

Test Plan: Ran all the tests.

Reviewers: #fbhgext, durham

Reviewed By: #fbhgext, durham

Differential Revision: https://phab.mercurial-scm.org/D685
2017-09-13 17:17:55 -07:00
Durham Goode
26e92d8ffe tests: update tests for upstream changes
5d45a997d11 in upstream changed rebase to use unfiltered repositories, which
changes the definition of tip in these two tests. Let's update the test output.
2017-09-12 10:10:06 -07:00
Ryan McElroy
ca9289cb2a fbconduit: properly pass through params on local hit
Summary:
Previously, we didn't pass through additional parameters, which resulted in
errors complaining about insufficient arguments.

Test Plan: Added a new test that previously crashed

Reviewers: #fbhgext, simonfar

Reviewed By: #fbhgext, simonfar

Differential Revision: https://phab.mercurial-scm.org/D689
2017-09-12 08:04:17 -07:00
Mihails Smolins
bbbb8e96dd cstore: uniondatapackstore support for python stores
Summary:
Now uniondatapackstore can also hold python data stores. PythonDataStore
wrapper simply passes function calls to underlying python objects and marshals
the output.

Test Plan:
* Added test case
* Tested on fbsource with treemanifest.usecunionstore=True

Reviewers: durham, simonfar, ryanmce, #fbhgext

Reviewed By: durham, simonfar, #fbhgext

Differential Revision: https://phab.mercurial-scm.org/D631
2017-09-11 09:23:10 -07:00
Saurabh Singh
a55e107c0e copytrace: handle modification of config from disablecopytrace to copytrace
Summary: In mercurial core, the config for disabling copytrace was changed from
disablecopytrace (boolean) to copytrace which can be on or off. As a result of
this change, there were some breaks which need to be modified to work with the
new config. This commit acheives the same.

Test Plan: Ran all the tests.

Reviewers: #fbhgext, quark

Reviewed By: #fbhgext, quark

Subscribers: quark

Differential Revision: https://phab.mercurial-scm.org/D662
2017-09-08 18:46:24 -07:00
Saurabh Singh
cd4903b1fb amend: fix test-treemanifest-treeonly.t after amend's redundant commit removal
Summary: cmdutil.amend was changed recently to get rid of the redundant commit
during the amend operation. As a result, we need to update this test as it was
aware of the redundant commit. This commit achieves the same.

Test Plan: Executed the test after the changes.

Reviewers: #fbhgext, durham, quark

Reviewed By: #fbhgext, quark

Differential Revision: https://phab.mercurial-scm.org/D661

message empty to abort commit. HG: -- HG: user: Saurabh Singh <singhsrb@fb.com>
2017-09-08 11:24:24 -07:00
Saurabh Singh
a6ec1d2188 dirsync: fixing mirroring following removal of redundant commit in amend
Summary: The dirsync extension was relying on the redundant commit in amend to
achieve the mirroring. Now with that commit removed, I decided to wrap the
cmdutil.amend itself so that we can still do the mirroring correctly during the
amend.

I added a new test file test-dirsync-amend.t to test the wrapper over amend.
The test-dirsync.t was an existing test that was broken after the amend
behavior change and has been added again with some changes. It would be best to
review it against its old version.

Test Plan: Ran the test suite.
2017-09-08 10:01:05 -07:00
Saurabh Singh
7daa1a0dda copytrace: fixing amend wrapper following removal of redundant commit in amend
Summary: I just had to ensure that the we were storing the amend information by
checking against the working copy instead of the intermediate commit.

The test-copytrace-amend.t wasn't added in this revision. It is actually an
existing test which was broken after the change in amend behavior. I have added
the test again with minor changes. I think it would be best to diff the test
against its old version for the review.

Test Plan: Ran the test suite.
2017-09-08 10:00:09 -07:00
Saurabh Singh
7f3e8286a8 amend: fixing tests following the removal of redundant commit in amend
Summary:
cmdutil.amend was changed recently to get rid of the redundant commit during
the amend operation. As a result, we need to update the tests which were aware
of the redundant commit. This commit achieves the same.

Note that as a result of the amend behavior change, the dirsync and copytrace
extensions were broken. They will be be fixed in subsequent commits on top of
this commit. For now, the broken tests for these extensions were removed from
the commit. Eventually, I will fold all the fixes together so that revision
history of the tests is not messed up. This is primarily done only to aid the
review.

Test Plan: Ran the test suite after updating the tests.
2017-09-08 09:58:14 -07:00
David Soria Parra
9787efd179 p4fastimport: add --base option to define branchpoint
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
2017-09-07 19:44:16 -07:00
Mihails Smolins
38c4cde5a3 cstore: extend and refactor deltachain class
Summary:
Extended DeltaChain with CDeltaChain and PyDeltaChain which are wrappers around
c and python delta chains respectively. The declaration and implementation
of c and python delta chains as well as DeltaChainLink were put in a different
file.

Test Plan: * Ensure that unit tests pass

Reviewers: ryanmce, durham, simonfar, #fbhgext

Reviewed By: ryanmce, durham, #fbhgext

Differential Revision: https://phab.mercurial-scm.org/D630
2017-09-07 08:07:30 -07:00
Durham Goode
0f55351745 tests: update test-infinitepush-pullbackups.t due to upstream
These lines were added in D485 but the diff indicates they weren't sure why
these lines were needed. D608 fixes the upstream bug that caused this, so now
the lines aren't necessary.
2017-09-06 21:57:19 -07:00
Durham Goode
69c8748ee2 test: fix pushvars check code failures 2017-09-06 21:46:16 -07:00
Mihails Smolins
d65b5a13b9 cstore: pythonkeyiterator refactor
Summary:
PythonKeyIterator has been moved to a separate file, because we will need to
include it in several places in future commits.

Test Plan: * Ensure unit tests pass

Reviewers: ryanmce, durham, simonfar, #fbhgext

Reviewed By: ryanmce, #fbhgext

Differential Revision: https://phab.mercurial-scm.org/D629
2017-09-05 08:04:55 -07:00
Andres Suarez
6a6c71a9f2 tweakdefaults: support -I and -X in grep
Summary:
Pass-through the common `-I`/`--include` and `-X`/`--exclude` flags to
`scmutil.match`. This gives `hg grep` similar semantics to other commands that
support filtering by pattern.

Test Plan:
```
$ hg grep backgroundprefetch
remotefilelog/__init__.py:    ``remotefilelog.backgroundprefetch`` runs prefetch in background when True
remotefilelog/__init__.py:            repo.backgroundprefetch(bgprefetchrevs, repack=bgrepack)
remotefilelog/__init__.py:                                        'backgroundprefetch', False)
remotefilelog/__init__.py:                repo.backgroundprefetch(prefetchrevset, repack=bgrepack)
remotefilelog/shallowrepo.py:        def backgroundprefetch(self, revs, base=None, repack=False, pats=None,
tests/test-remotefilelog-bgprefetch.t:  > backgroundprefetch=True

$ hg grep -X '**/*.py' backgroundprefetch
tests/test-remotefilelog-bgprefetch.t:  > backgroundprefetch=True
```

Reviewers: #mercurial, simonfar

Reviewed By: simonfar

Subscribers: medson, mjpieters

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

Signature: 5764306:1504535581:ebc8d9f76bbd243d49b1b3306620b88a4f16e818
2017-09-04 15:45:37 +01:00
Simon Farnsworth
9e23886f80 tests: use python instead of echo -e
Summary:
BSD echo doesn't support -e. The lint rule says to use Python instead,
so follow its advice

Test Plan: Ran tests locally on Mac and Linux.

Reviewers: #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Differential Revision: https://phab.mercurial-scm.org/D619
2017-09-04 05:26:23 -07:00
Durham Goode
a2cd5ebd96 tests: update test with upstream change 2017-08-31 13:08:41 -07:00
Durham Goode
364ef7af41 tree: don't download flat manifests when cloning in tree only mode
Summary: Prevents downloading any manifest revlogs when the client is in treeonly mode.

Reviewers: #fbhgext, simonfar

Reviewed By: #fbhgext, simonfar

Differential Revision: https://phab.mercurial-scm.org/D575
2017-08-31 11:14:39 -07:00
Durham Goode
0faa105a6d tree: adds test for pushing a treeonly manifest to a hybrid server
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
2017-08-31 11:14:39 -07:00
Durham Goode
fba182aeee tests: remove orig file from a commit
Summary:
An orig file was getting added to a commit in a test accidentally, which makes
it harder to test the contents of that commit in a future diff. Let's purge that
file before we make the commit. This affects some of the later output because
the hash changes.

Reviewers: #fbhgext, simonfar

Reviewed By: #fbhgext, simonfar

Differential Revision: https://phab.mercurial-scm.org/D570
2017-08-31 11:14:39 -07:00
Durham Goode
57571a68f0 treemanifest: fix non-tree repos when treemanifest is loaded
Summary:
If the treemanifest is loaded, but not enabled for a repo, it was still
executing tree code for that repo, which would break. This adds checks to
prevent tree code from running in non-tree repositories.

Reviewers: #fbhgext, simonfar

Reviewed By: #fbhgext, simonfar

Subscribers: simonfar

Differential Revision: https://phab.mercurial-scm.org/D568
2017-08-31 11:14:39 -07:00
Wez Furlong
9bfe39b9c7 scm-prompt: fixup extraction of the commit when in eden
Summary:
We changed the format a little while back, but neglected to
adjust this script.

Test Plan: run it locally and saw the correct hash.  Revised test case.

Reviewers: simpkins, akushner, mbolin

Reviewed By: mbolin

Subscribers: medson, mjpieters, net-systems-diffs@fb.com, #sourcecontrol

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

Tasks: T21489553

Signature: 5738750:1504122070:43595555652c35e721ff4248a83d615fdc330e6e
2017-08-30 14:25:18 -07:00
Mihails Smolins
4cadb2504b cstore: generic uniondatapackstore
Summary:
Implementation of uniondatapackstore that can hold generic stores.
This diff doesn't support python data stores yet, but provides an abstraction
to the stores that can be used by uniondatapackstore.
DeltaChain and DeltaChainLink wrappers will allow to use C and python chains
and chain links.

Test Plan:
* Ensure that unit tests pass
* Test on fbsource to ensure new code is executed by printfing to stdout
* Ensure the code is built successfully on macOS

Reviewers: durham, ryanmce, simonfar, #fbhgext

Reviewed By: durham, #fbhgext

Differential Revision: https://phab.mercurial-scm.org/D560
2017-08-30 11:37:25 -07:00
Durham Goode
e187dcbbd6 treemanifest: add test for hg bundle support
A simple test for hg bundle/unbundle
2017-08-29 13:02:22 -07:00
Durham Goode
1ad5d48f77 treemanifest: add test for peer-to-peer push/pull 2017-08-29 13:02:22 -07:00
Durham Goode
bb3289435b treemanifest: add test for histedit in treeonly mode
Test covering a simple histedit in treeonly mode.
2017-08-29 13:02:22 -07:00
Durham Goode
c16a1ef8df treemanifest: fix rebasing in treeonly mode
Adds a test for rebasing in tree only mode and fixes a bug in readdelta where it
was returning the parent's file nodes instead of the current file nodes. The
test covers this case.
2017-08-29 13:02:22 -07:00
Durham Goode
be98ac261a treemanifest: support pull in a treeonly repository
In order to support pulling from the main server, we need to:

- ignore the flat manifest part of the changegroup
- change our treeonlymanifestlog to do store.get() instead of
  store.getmissing(), since only get() fetches from the remote server.
2017-08-29 13:02:22 -07:00
Durham Goode
75e615d919 tests: add a test for client side treeonly support 2017-08-29 13:02:22 -07:00
Dylan Richardson
5b84495e9e copytrace: use full version of copytrace for draft branch rebases
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
2017-08-29 08:57:54 -07:00
Adam Simpkins
ecb0fd2dd7 clib: update C/C++ copyright statements to pass lint checks
Summary:
Update the copyright headers in most of the C/C++ code consistently use the
GPLv2 copyright message.  This allows these files to pass Facebook's internal
C/C++ linters.

Some of the files in fbcode/scm/hgext/cstore/ appear to have actually been
copied from the hg-crew repository, and were not originally authored by
Facebook.  I have not modified the copyright statements in these files:

- cstore/bitmanipulation.h
- cstore/compat.h
- cstore/mpatch.h
- cstore/mpatch.c

I also have not modified any of the cfastmanifest code.

This corresponds to Facebook diff D5588677.

Test Plan:
Confirmed that Facebook's C++ linters no longer complain about the copyright
messages.

Reviewers: #fbhgext, quark

Reviewed By: #fbhgext, quark

Differential Revision: https://phab.mercurial-scm.org/D507
2017-08-25 16:46:07 -07:00
Adam Simpkins
702f276ede ctreemanifest: move ManifestPtr to its own header file
Summary:
Define the ManifestPtr class in its own header file, to eliminate some of the
nasty circular dependencies between manifest.h, manifest_entry.h, and
manifest_fetcher.h

This makes the include process for these files much simpler, and prevents
manifest.h and manifest_entry.h from both trying to include each other at
different locations in their files.

This corresponds to Facebook diff D5588672.

Test Plan: Confirmed "make local" succeeds and the unit tests pass.

Reviewers: #fbhgext, quark

Reviewed By: #fbhgext, quark

Differential Revision: https://phab.mercurial-scm.org/D506
2017-08-25 16:46:07 -07:00
Mihails Smolins
de2fbf4ada remotefilelog: keepset tuple bug fix
Summary:
Keepset computation algorithm added tuples to the keepset that are the results
of diffs between two manifests. Now it has been fixed and only new node from
the tuple is added to the keepset.

Test Plan:
* Run hg gc on www, fbsource
* Ensure the unit tests pass

Reviewers: simonfar, durham, #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Subscribers: ryanmce

Differential Revision: https://phab.mercurial-scm.org/D519
2017-08-25 10:06:43 -07:00
Durham Goode
8c688d88da tests: actually fix flakey test
Which packs get cleaned up is non-deterministic in some cases, so grepping for
the 'x' in this test did not catch when a non-x pack was left behind, which
caused flakey output. Let's instead check that 3 packs were left behind and one
of them was from the small generation.
2017-08-25 09:23:34 -07:00
Mark Thomas
6455de7566 tweakdefaults: make pull --rebase ffwd if nothing to rebase
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
2017-08-25 09:01:41 -07:00
Durham Goode
e5dd4fdd58 tests: fix flakey repack test
If a bunch of packs are the same size, the ones repack chooses to pack is
non-deterministic. This was causing flakiness in the test as different packs
were being left behind. Let's remove that dependency.
2017-08-24 16:31:05 -07:00
Michael Bolin
9578f20605 spelling: change commited -> committed
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
2017-08-24 14:13:58 -07:00
Felix Merk
48ec146530 undo: better error messaging and hiding hg serve commands
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
2017-08-24 12:29:40 -07:00
Durham Goode
7d2bdf6f8e repack: fix incremental repack for large quantities of packs
Summary:
Previously incremental repack would only take the top 3 packs in a generation of
packs. For instance, if there were 100 packs between 1KB and 1MB, it would only
repack the first 3, instead of repacking a whole bunch because it's cheap. This
patch fixes it to grab as many packs in a generation as it can fit under the
limit (default of 100MB of pack data).

This will fix an issue where we're seeing users with 100's of tiny pack files
that aren't getting repacked fast enough.

Test Plan: Added a test

Reviewers: #fbhgext, quark

Reviewed By: #fbhgext, quark

Subscribers: quark

Differential Revision: https://phab.mercurial-scm.org/D500
2017-08-24 09:31:10 -07:00
Mark Thomas
986a478c59 tweakdefaults: make histedit update dates of commits it edits
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
2017-08-24 07:45:02 -07:00
Durham Goode
3f740e778f undo: fix test broken by previous commit 2017-08-23 23:59:34 -07:00
Jun Wu
05c526a68e infinitepush: update test to reflect upstream change
It seems `debugcheckbackup` could get a new kind of error with the latest
upstream code:

  Traceback (most recent call last):
    File "hg/mercurial/scmutil.py", line 150, in callcatch
      return func()
    File "hg/mercurial/dispatch.py", line 292, in _runcatchfunc
      return _dispatch(req)
    File "hg/mercurial/dispatch.py", line 896, in _dispatch
      cmdpats, cmdoptions)
    File "hg/mercurial/dispatch.py", line 658, in runcommand
      ret = _runcommand(ui, options, cmd, d)
    File "hg/mercurial/dispatch.py", line 904, in _runcommand
      return cmdfunc()
    File "hg/mercurial/dispatch.py", line 893, in <lambda>
      d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
    File "hg/mercurial/util.py", line 1118, in check
      return func(*args, **kwargs)
    File "hg/mercurial/extensions.py", line 322, in closure
      return func(*(args + a), **kw)
    File "hg/mercurial/util.py", line 1118, in check
      return func(*args, **kwargs)
    File "hg/hgext/mq.py", line 3542, in mqcommand
      return orig(ui, repo, *args, **kwargs)
    File "hg/mercurial/util.py", line 1118, in check
      return func(*args, **kwargs)
    File "fb-hgext/infinitepush/backupcommands.py", line 272, in checkbackup
      if not _dobackupcheck(bkpstate, ui, repo, dest, **opts):
    File "fb-hgext/infinitepush/backupcommands.py", line 469, in _dobackupcheck
      for r in lookupresults:
    File "hg/mercurial/wireproto.py", line 137, in results
      next(batchable)
    File "hg/mercurial/wireproto.py", line 238, in lookup
      self._abort(error.RepoError(data))
    File "hg/mercurial/sshpeer.py", line 235, in _abort
      raise exception
  RepoError: 0e1a088ff2825213eaa838a82a842bc186f10dd5
  abort: 0e1a088ff2825213eaa838a82a842bc186f10dd5!

The error message only contains a commit hash, which is not friendly to be
printed out. Therefore make sure we have control about the error message and
update the test accordingly.

Differential Revision: https://phab.mercurial-scm.org/D485
2017-08-22 21:58:37 -07:00
Pulkit Goyal
9c86deebae pushvars: cleanup the extension to just set the server config option
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
2017-08-23 09:28:07 +05:30
Pulkit Goyal
c288e6c436 bundle2hooks: remove the extension from hgext3rd as it is moved to core
The ability to add hookargs to a bundleoperation object has been added to the
core from this extension.

Related commits are:
https://www.mercurial-scm.org/repo/hg-committed/rev/bf6a06e6310e
https://www.mercurial-scm.org/repo/hg-committed/rev/aa97e972460f

Differential Revision: https://phab.mercurial-scm.org/D364
2017-08-23 09:28:07 +05:30
Pulkit Goyal
2930e709e9 commitextras: remove the extension from hgext3rd as it is moved to core
This extension is moved to core as an extension in
https://www.mercurial-scm.org/repo/hg/rev/bb5f26e8d735.

This patch also removes the test of the extension.

Differential Revision: https://phab.mercurial-scm.org/D363
2017-08-23 09:28:07 +05:30
Adam Simpkins
5977867b68 sha1: provide wrapper functions around the SHA-1 implementation
Summary:
Add a clib/sha1.h file with SHA-1 utility functions that hide the details of
the underlying SHA-1 implementation being used.  This will make it easier in
the future if we want to use the faster SHA-1 implementation from OpenSSL if it
is available, but fall back to the sha1collisiondetection library if it is not
available.

Test Plan: Confirmed the code builds and passes unit tests.

Reviewers: #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Differential Revision: https://phab.mercurial-scm.org/D282
2017-08-22 19:09:07 -07:00
Adam Simpkins
d5440b15c4 sha1: move the sha1collisiondetection code to third-party
Summary:
Move the third-party sha1collisiondetection code from clib/sha1 to
third-party/sha1dc.  This helps isolate third-party code from our own
internally developed code.

This also updates the code to use the same include paths and library names as
used by the sha1collisiondetection's upstream Makefile, which would be needed
to link against a version of sha1collisiondetection installed locally.

Test Plan:
Confirmed "make local" succeeds.

All of the tests pass, except for test-check-commit-hg, which complains about
the fact that some of this third-party code contains multiple empty lines in a
row.  It doesn't seem straightforward to update test-check-commit to ignore
this third-party code, but these test failures shouldn't affect any future
commits.

Reviewers: #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Differential Revision: https://phab.mercurial-scm.org/D281
2017-08-22 19:09:07 -07:00
Sonia Kim
7ef1e18d89 lfs: include filename in object lookup fail message
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
2017-08-22 10:54:41 -07:00
Felix Merk
9df57fe0d2 undo: preview change - just show delta
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
2017-08-22 10:18:03 -07:00
Stanislau Hlebik
d90c0a301d infinitepush: always require a pattern for --list-remote
Summary:
--list-remote can return too many nodes if used without a pattern.
Let's require a pattern.

Test Plan: Run unittests

Reviewers: #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Subscribers: ryanmce

Differential Revision: https://phab.mercurial-scm.org/D221
2017-08-22 01:24:23 -07:00
Jun Wu
805ddc8422 codemod: be compatible with upstream change
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
2017-08-21 15:10:41 -07:00
Felix Merk
e45f912211 undo: preview shows command and time output
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
2017-08-21 11:25:36 -07:00
Felix Merk
721459469f undo: draft obsolete handling
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
2017-08-18 11:40:18 -07:00
Felix Merk
2d555e35dd undo: informative output
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
2017-08-18 11:37:45 -07:00
Felix Merk
aa2547d949 undo: unfinished command handling
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
2017-08-18 11:37:45 -07:00
Ryan McElroy
efdd3372ea dirsync: update tests for upstream behavior change
Summary:
Since f33f2b5b487453a0387c80a2d736ec450696cefe, a failed `hg commit -A` will no
longer update the dirstate.

Reviewers: #fbhgext, simonfar

Reviewed By: #fbhgext, simonfar

Differential Revision: https://phab.mercurial-scm.org/D433
2017-08-18 03:11:29 -07:00
Mateusz Kwapich
432714c0bf perftweaks: don't crash if the rebase dest is None
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
2017-08-17 12:15:02 -07:00
Jun Wu
6e9f7aeb68 absorb: preserve phase
When rewriting changesets, preserve their phases.

Fixes https://bitbucket.org/facebook/hg-experimental/issues/10/hg-absorb-doesnt-preserve-commits-phase

Differential Revision: https://phab.mercurial-scm.org/D418
2017-08-16 13:40:00 -07:00
Mihails Smolins
a2bdf68679 remotefilelog: limit number of changesets to be prefetched
Summary:
Added config option 'prefetchdays' which indicates that commits older than
'prefetchdays' days should not be prefetched. This option is necessary to avoid
prefetch of huge amount of data. The default value is set to 14 days.

Test Plan: Ensure that unit tests pass

Reviewers: ryanmce, simonfar, durham, #fbhgext, simpkins

Reviewed By: #fbhgext, simpkins

Subscribers: simpkins

Differential Revision: https://phab.mercurial-scm.org/D420
2017-08-16 13:21:31 -07:00
Mihails Smolins
a46c678ab9 remotefilelog: flaky bgprefetch test fix
Summary:
The test fails due to a race condition. Now the failing part of the test
output is optional.

Test Plan: Ensure that unit tests do not fail

Reviewers: ryanmce, simonfar, #fbhgext

Reviewed By: ryanmce, #fbhgext

Differential Revision: https://phab.mercurial-scm.org/D417
2017-08-16 09:16:07 -07:00
Ryan McElroy
73ea227f7d treemanifest: make tests more lenient and fail more descriptively
Summary:
The test-treemanifest-pushrebase test was failing in our continuous integration
environment with a perplexing error:

```
$ pushclients
+ abort: exporting bookmark master failed!
```

(plus some additional failures later)

I thought this should not be possible because of the redirect, but it turns out
that the order of the redirects matters:

`>/dev/null 2>&1` redirects both stderr and stdout to `/dev/null`, but
`2>&1 >/dev/null` redirects stdout to /dev/null and stderr to stdout

(TIL)

However, this was the only clue to the issue that was going on, and so it's
better to actually keep the error around, if one occurs, so I removed the 2>&1
redirect altogether.

Furthermore, the test was failing with various clients failing to push.
To increase the chance of this succeeding, I'm bumping the sleep time. Ideally,
we should wait for the server to be "ready", but I'm not certain what that means
or how to test and would like to discuss to figure it out. This hopefully will
unblock the continuous integration for now.

Test Plan: Test still passes locally; wait to see if it passes in automation.

Reviewers: #fbhgext, mitrandir

Reviewed By: #fbhgext, mitrandir

Differential Revision: https://phab.mercurial-scm.org/D415
2017-08-16 16:12:04 +01:00
Jun Wu
50e07b913e test: do not ignore test-check sanity check
Previously, if the system hg does not work, `helper-testrepo.sh` will skip
the test (usually `test-check-*.t`). This patch makes it stricter so a
non-functional system hg will be an error so it's less likely to be ignored.

Differential Revision: https://phab.mercurial-scm.org/D387
2017-08-15 16:56:54 -07:00
Felix Merk
00870d6060 undo: don't break when undo isn't first argument
Undo commands where undo wasn't first, for example `hg --pager=off undo` break
multiple things, including hg redo.  This change fixes this.

Differential Revision: https://phab.mercurial-scm.org/D396
2017-08-15 16:56:25 -07:00
Felix Merk
8a98220afc undo: invalidate false cache
Mercurial sometimes leaves bad caches.  Easiest example is when updating to a
hidden commit, where hg undo will fail, but can be reproduced with many commands
(such as fold which is used for testing here).

Test Plan:
unit tests

Differential Revision: https://phab.mercurial-scm.org/D395
2017-08-15 16:56:25 -07:00
Simon Farnsworth
0d8b65f603 tweakdefaults: do not change the date when using amend --to
Summary:
amend --to is a thin wrapper around histedit, and fails if you ask it
to update the date. tweakdefaults can be configured to ask amend to change the
date. When this is the case, don't change the date when using --to, so that it
can work.

Test Plan:
Test case added here fails before the change complaining about other
flags with --to, and fails in the histedit afterwards (I'm not clear on why - I
suspect phases are significant here).

Reviewers: #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Differential Revision: https://phab.mercurial-scm.org/D349
2017-08-15 07:21:37 -07:00
Mihails Smolins
7cd5d8e5d5 remotefilelog: fix flaky bgprefetch test
Summary: The test failed due to a race condition. Now the failing part of the test output is optional.

Test Plan: Ensure that unit tests do not fail

Reviewers: #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Differential Revision: https://phab.mercurial-scm.org/D407
2017-08-15 03:53:34 -07:00
Felix Merk
db3ca9f593 undo: improved --branch handling
Adds --branch handling to the no argument redo.  Also adds better branch testing
and takes a more sensible approach to an undo after an undo --branch.

Redo now restores undoredo.i's --branch field.  Undo after a undo --branch is
now an absolute undo.  See test cases.

Test Plan:
unit

Differential Revision: https://phab.mercurial-scm.org/D324
2017-08-11 18:05:03 -07:00
Felix Merk
5cd0a8ae43 undo: better docs
Strips docs of unnescerary info and sticks complex things behind --verbose flag.
In most cases hg undo and redo or hg undo --preview should be enough for the
user.  Also changes --index to --step, which seems clearer.

Differential Revision: https://phab.mercurial-scm.org/D287
2017-08-11 18:05:03 -07:00
Felix Merk
1041cbca21 undo: no argument redo
Changes redo to straight up undo the previous undo.  This is a bit trickier than
it may seem.  The previous redo capabilities are still covered in hg undo as
--index accepts negative numbers allowing you to step both forward and
backwards one step at a time.  The new redo reads the linear undo log to find
out where to undo to while updating the undo/redo index allowing you to continue
from where you left off.

Differential Revision: https://phab.mercurial-scm.org/D286
2017-08-11 18:05:03 -07:00
Felix Merk
223355effd undo: add --index and redo support to preview
Adds --index handling for --preview.  With the added handling, preview also
works for redo.  In order to bypass template logic, we simply change the
"undoredo.i" file and reset it afterwards.

Differential Revision: https://phab.mercurial-scm.org/D207
2017-08-11 18:05:03 -07:00
Felix Merk
070ee13318 undo: basic --preview
Allows for hg undo --preview to see smartlog like preview of what undo will do.
This will be neccesery before a general roll-out so users can see what undo will
do.  This first iteration only shows what "hg undo" will do, not redo and not
--index.

Differential Revision: https://phab.mercurial-scm.org/D206
2017-08-11 18:05:03 -07:00
Zhihui Huang
587971de01 p4fastimporter: handle blob commits
Summary: Since a blob commit does not associate with a p4 changelist, while a regular commit mirrored a p4 change has a p4 changelist number, p4fastimporter needs to know how to handle a blob commit. The solution here is to get p4basecl number (which tells it which changelist number it's based on when creating this blob commit) from the blob commit node, and import from there.

Test Plan:
$ cd ~/facebook-hg-rpms/fb-hgext/test
$ python ../../hg-crew/tests/run-tests.py test-p4fastimport-blobcommit.t
$ python ../../hg-crew/tests/run-tests.py test-p4*

All tests should pass

Reviewers: #idi, davidsp

Reviewed By: davidsp

Subscribers: medson, mjpieters

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

Tasks: 20141624

Signature: t1:5544046:1502405269:9f449550d60b9d29d8be464ab1cc98500bc60cad
2017-08-10 17:54:18 -07:00
Zhihui Huang
bf31927f4c p4fastimporter: blob commits - support lfs
Differential Revision: https://phabricator.intern.facebook.com/D5560829
2017-08-10 17:54:18 -07:00
Zhihui Huang
06ebaed0bb p4fastimporter: blob commits - support bookmark
Differential Revision: https://phabricator.intern.facebook.com/D5550722
2017-08-10 17:54:18 -07:00
Zhihui Huang
49930828ea p4fastimporter: blob commits
Differential Revision: https://phabricator.intern.facebook.com/D5542123
2017-08-10 17:54:18 -07:00
David Soria Parra
dde1b0d2d2 p4fastimport: decode special perforce characters in filenames
Summary:
Perforce encodes certain characters in filenames (see
https://www.perforce.com/perforce/doc.current/manuals/cmdref/filespecs.html)
We must decode this before we add it to Mercurial.

Test Plan:
  python ../../hg-crew/test/run-tests.py test-check* test-p4fastimport*

Reviewers: #idi, #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, steaphan, medson, mjpieters

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

Tasks: 20133877

Signature: t1:5570533:1502010300:0ef3ce0c228c61e23396b5a8ac887ac8c65812ff
2017-08-10 15:49:15 -07:00
Mihails Smolins
4bbe319f4c remotefilelog: add repack to hg gc
Summary: Now on hg gc incremental repack is run if configured

Test Plan: Added a test case

Reviewers: simonfar, durham

Reviewed By: durham

Subscribers: medson, mjpieters, #mercurial

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

Tasks: 19727557

Signature: t1:5583902:1502221690:dce09112207e9e4595458d61a7b73f1210d3b012
2017-08-09 11:04:46 -07:00
Mihails Smolins
9922a9fdde remotefilelog: date command on mac bug fix
Summary: Linux command for the date 100 seconds from now didn't work on mac.

Test Plan: Tested that new expression works on both mac and linux

Reviewers: rmcelroy

Reviewed By: rmcelroy

Subscribers: medson, mjpieters, #mercurial

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

Signature: t1:5592832:1502295105:eb281ee3948f29fcadbe4389d90be434751d37bf
2017-08-09 09:13:31 -07:00
Jun Wu
2e023a378c test-pushrebase: do not match detailed output of "running ..."
The debug output of "running ..." has been changed. Update our test
accordingly.
2017-08-08 15:12:11 -07:00
Mihails Smolins
227be4a118 remotefilelog: fixed failing test
Summary: After fixing prefetch after prefetch and repack bug, test output changed.

Test Plan: Not required

Reviewers: simonfar, durham, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, medson, mjpieters, #mercurial

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

Signature: t1:5583622:1502215262:22b51ea4da10de3996460161f910a4fec65afd9b
2017-08-08 11:04:48 -07:00
Mihails Smolins
2f4474e9ab remotefilelog: update hg gc keepset
Summary:
Now hg gc keepset includes pullprefetch and bgprefetchrevs revsets to avoid
garbage collection of prefetched in background data.

Test Plan: Added test case, also tested in *-gcrepack.t

Reviewers: durham, simonfar

Reviewed By: simonfar

Subscribers: medson, mjpieters, #mercurial

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

Tasks: 19727557

Signature: t1:5583184:1502208410:c247d802cf27c0143b6d7e2d95029bad5f344499
2017-08-08 09:11:39 -07:00
Durham Goode
cedafbb53b fastmanifest: migrate to use new manifestlog.datastore
Summary:
The tree datastores have moved from the svfs to the manifestlog. Let's update
fastmanifest to use them from there.

Test Plan: Ran the tests

Reviewers: #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Differential Revision: https://phab.mercurial-scm.org/D235
2017-08-07 19:27:18 -07:00
Jun Wu
ba4766820a configwarn: new extension to warn about unsupported configs
We have seen issues caused by user config file (`~/.hgrc`) having
unsupported extensions enabled. This new extension would allow us to warn
users about those problematic configs.

Differential Revision: https://phab.mercurial-scm.org/D154
2017-08-07 13:16:09 -07:00
Mihails Smolins
760abb3739 remotefilelog: fixed repeated prefetch after prefetch and repack bug
Summary:
The bug was the following:
If you run hg prefetch, then hg repack, then hg prefetch, the second prefetch
downloads the same things as the first prefetch, even though the items are
already in the pack file.
That happened because Mercurial only checked if loose files exist before
prefetching(it didnt consider pack files). Now it also checks pack files.

Test Plan: Added test case, tested manually on www

Reviewers: simonfar, durham

Reviewed By: durham

Subscribers: medson, mjpieters, #mercurial

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

Tasks: 20797710

Signature: t1:5574070:1502124107:34cfabcfdcb81da79aff565641c9002bfe548def
2017-08-07 12:33:30 -07:00
Mihails Smolins
bbd44be472 remotefilelog: garbage collection on repack
Summary:
Implemented initial version of a garbage collector for repack. Garbage
collection is only performed if gcrepack flag is set in config. Currently
data that is old and not in keepset is garabage collected. The age of data at
which point it will be garbage collected can be specified in config as well.

Test Plan: Added a test case

Reviewers: durham

Reviewed By: durham

Subscribers: rmcelroy, medson, mjpieters, #mercurial

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

Tasks: 19727521

Signature: t1:5548194:1501882489:cc775ec95aa6fafc462a46f99d790f231139ce27
2017-08-07 11:30:53 -07:00
Zhihui Huang
84229312d5 p4fastimport: handle race condition with config users and time delta
Summary: This is a followup diff of this diff: [[ https://phabricator.intern.facebook.com/D5509536 | D5509536 ]]. It makes the ignored user and the constraint on time difference between a user commit and a p4fastimporter import configurable.

Test Plan:
$ cd ~/facebook-hg-rpms/fb-hgext/tests/
$ python ../../hg-crew/tests/run-tests.py test-p4fastimport-gitfusion-race-condition.t
$ python ../../hg-crew/tests/run-tests.py test-p4*

All tests should pass

Reviewers: #idi, davidsp

Reviewed By: davidsp

Subscribers: wlis, medson, mjpieters

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

Tasks: 20141882

Signature: t1:5531404:1501866435:25686443d99a2b96f8e8a7fa9e3f660ba8c8393e
2017-08-04 10:58:07 -07:00
Kostia Balytskyi
099d4692bb sparse: use correct cwd-prepending with patterns
Summary:
Change fb-hgext's sparse to treat patterns correctly (this was brought to
my attention by @martinvonz on the mailing list).

This patch makes sure that:

```
  reporoot/subdir$ hg --include **/file
```

results in `subdir/**/file` being included rather than `subdir/`.

Test Plan: rt

Reviewers: mjpieters, durham, #fbhgext

Subscribers: martinvonz

Differential Revision: https://phab.mercurial-scm.org/D225
2017-08-04 06:16:45 -07:00
Kostia Balytskyi
c979f86f0a lint: fix undo-related warnings
Summary: Before this `test-check-code-hg.t` failed on `undo`-related things.

Test Plan: - rt

Reviewers: felixmerk, #fbhgext

Differential Revision: https://phab.mercurial-scm.org/D226
2017-08-04 06:08:23 -07:00
Felix Merk
2e993a8456 undo: localbrach fancy indexes
Adds smart indexing to localbranch undoes. This eliminates the mental burden of
the user of keeping track in what order and when changes where made.  Drawback
is that it raises the computational complexity from the number of draft
commits to draft commits times how many repo states you are undoing.  Common use
case should be to undo a small number of changes, so this is acceptable.

hg undo -b changectx finds the closest pertinent change and undoes that.  -b
with -n is not supported.  The reason it is not supported is that local branch
level undoes are delta specific and not state specific, which in essence means
that running hg undo -b # twice is not guaranteed to give you the same resault
as running hg undo -b # -n 2.  We could run -b multiple times for a -n, but the
cost of a -b increases with a larger -n (which isn't the case for a standard
undo), and abort handling would be more complicated (I'm not sure how well we
can roll back a tree of obs markers?).  In essence -n with -b is not that
usefull a feature (bc perf limits) and would potentially require a decently large
amount of time to implement correctly.

Also adds redo -b since this command now makes a lot more sense when we use the
smarter indexing.  Adds logic to seperate undoes and redoes in different
branches.  You can perform relative undoes and redoes within the latest scope,
while undoes and redoes within a new scope will start at the present (absolute)
state.

Differential Revision: https://phab.mercurial-scm.org/D186
2017-08-03 15:17:21 -07:00
Felix Merk
c280eb12b5 undo: basic single repo undo
Add the ability to undo changes within one 'localbranch'.  In the future, this
will probably become default behavior.  Undo -b changecontext will undo changes
belonging to the local branch identified by the changecontext (see revset
localbranch).  Based on obs markers we can identify connected commits that we
in turn reveal or hide outside of this localbranch.  This undo allows users to
work on multiple branches independantly.

Currently, indexing for undoes is still on the repo level.  This isn't good
from a ux experience.  Next up would be localbranch level indexing logic and
redo logic.

Differential Revision: https://phab.mercurial-scm.org/D160
2017-08-03 15:17:21 -07:00
Felix Merk
a10bb81e36 undo: localbranch revset
Adds localbranch revset to be used for localbranch undos.  A localbranch is a
set of draft commits that are connected via draft commits.  Any draft commit
within a branch, or a public commit at the base of the branch, can be passed as
an argument to localbranch().  This will be necessary for selecting the scope
for a localbranch undo.  Also fixes oldraft() output when used with other
revsets.  Previously olddraft() would ignore operators such as and because of a
missing the necessary handling.

Differential Revision: https://phab.mercurial-scm.org/D159
2017-08-03 15:17:21 -07:00
Mateusz Kwapich
e570184225 crdump: fix tests on OSX
Summary: We need a check-code for that.

Test Plan: tested on my laptop

Reviewers: #fbhgext, ryanmce, ikostia

Reviewed By: #fbhgext, ryanmce, ikostia

Subscribers: ikostia

Differential Revision: https://phab.mercurial-scm.org/D222
2017-08-03 08:50:12 -07:00
Mateusz Kwapich
86cc4e67ff crdump: introduce extension to dump data for code review tools
Summary:
We've spent a lot of time hacking around the outputs of hg in jf (a new
tool we use at FB to interact with our code-review system). We've figured out that it
could be all avoided and made cleaner with simple hg extension that dumps all
the data we need in a format that we can easily consume.

Test Plan: see attached test

Reviewers: #fbhgext, ryanmce

Reviewed By: #fbhgext, ryanmce

Subscribers: quark

Differential Revision: https://phab.mercurial-scm.org/D205
2017-08-03 04:50:46 -07:00
Jun Wu
054d4b010d Backed out changeset 95334859434c
It's breaking Linux tests. I spent some time reading the shell script but
cannot figure out what's wrong quickly, so backing it out to unblock
contbuild now.
2017-08-02 11:44:18 -07:00
Jun Wu
6a528bce1e test-infinitepush-backup: do not test ls output 2017-08-02 11:29:03 -07:00
Luke Petre
cc24d00df6 infinitepush: display backup state in scm-prompt
Summary: - update the scm-prompt.sh script to display when there have been local changes that haven't backed up in four hours

Test Plan: arc unit tests/test-scm-prompt-hg.t

Reviewers: rmcelroy, stash

Reviewed By: rmcelroy

Subscribers: medson, mjpieters

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

Tasks: 18349390

Signature: t1:5498437:1501083894:8a8872df2c6492006c8a76c365d53a3b9a41933a
2017-08-02 16:42:08 +01:00
Luke Petre
0b56f3786a infinitepush: write infinitepush backup status
Summary:
  - change the infinitepush extension to record additional state when the a backup occurs.
  - useful for other tools (scm-prompt, nuclide) to indicate when a backup hasn't occurred recently

Test Plan:
  - cd facebook-hg-rpms/
  - source hg-dev
  - cd fb-hgext
  - arc unit

Reviewers: rmcelroy, stash

Reviewed By: stash

Subscribers: rmcelroy, medson, mjpieters

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

Tasks: 18349390

Signature: t1:5321221:1501271966:6698785e0714e3ecf7e1e2684d1e62e52ac0f1a0
2017-08-02 16:42:08 +01:00
Luke Petre
b4d16230a3 infinitepush: relax hostname regex in tests
Summary: My hostname contains an underscore and that causes these tests to fail.

Test Plan: arc unit tests/test-infinitepush-logging.t

Reviewers: stash

Reviewed By: stash

Subscribers: medson, mjpieters

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

Signature: t1:5498213:1501229709:6cd63cd0e7e644388d21f516893dcd8fb48e75de
2017-08-02 16:42:08 +01:00
Jeroen Vaelen
f0ed4c94e4 tweakdefaults: add ellipsis to trimmed showupdated commit messages
Summary:
Keep `showupdated` commit messages limited to a 50 character width,
with a "..." ellipsis to signify that the message was trimmed.

Test Plan: Added a test.

Reviewers: #fbhgext, durham

Reviewed By: #fbhgext, durham

Differential Revision: https://phab.mercurial-scm.org/D217
2017-08-02 07:56:58 -07:00