Commit Graph

13975 Commits

Author SHA1 Message Date
Marla Azriel
774d69dbaf commands: help text for uncommit, unamend
Summary: Updated help text for hg uncommit, hg unamend

Reviewed By: mitrandir77

Differential Revision: D15424275

fbshipit-source-id: 39091707195c2478b17ec0c1a8c5062304cb8709
2019-05-23 21:39:22 -07:00
Durham Goode
7e146b80f1 phases: remove O(changelog) loop
Summary:
The phases command had some naive code that looped over every revision
in the repository. Twice. This was really slow on huge repos, so let's get rid
of the need for it.

I originally attempted to optimize it by only looking at commits greater than
the ones being passed in, but this is incorrect since changing a commit to
public may affect it's ancestors. Instead of trying to optimize it further,
let's just drop the output text entirely.

Reviewed By: quark-zju

Differential Revision: D15465942

fbshipit-source-id: ba63a1096a515032fe13a8699807fe69c73c80ed
2019-05-23 15:10:46 -07:00
Durham Goode
148e70118a treemanifest: sort trees by linkrev before inserting
Summary:
Previously we sorted the trees topologically before inserting them. On
a revlog-backed server, this may mean that trees are written in a different
order from the actual commits. hgsql-backed servers rely on the data being
written in linkrev order so they can be replayed in linkrev order on other
machines, so this broke hgsql replication.

Let's instead sort by linkrev, which will be both topological and satisfy
hgsql's requirements.

Reviewed By: quark-zju

Differential Revision: D15437953

fbshipit-source-id: d4aaaa03b392a6cb6cf1be478aed2583ecb757c5
2019-05-22 09:09:03 -07:00
Durham Goode
9d35dc6f3d treemanifest: add test demonstrating bug in tree+hgsql
Summary:
hgsql relies on all revisions being inserted in linkrev order.
Treemanifest was sorting topologically instead of by linkrev, which resulted in
possible corruption in hgsql backed servers. Let's add a test showing this.

Reviewed By: quark-zju

Differential Revision: D15437952

fbshipit-source-id: 642708d7bf76a0d0843a13f8c23b99108f05444a
2019-05-22 09:09:03 -07:00
Durham Goode
1bf9700af1 treemanifest: disable manifest verify when treemanifest is on
Summary:
We had this disabled in a config we ship in rpms, but if we want the
tests to work in treeonly mode we want this disabled in all tree cases.

Reviewed By: xavierd

Differential Revision: D15296199

fbshipit-source-id: 0f9751583eefa10c275bd499bb5998adfbe644a4
2019-05-22 08:37:11 -07:00
Durham Goode
69ebfd6bf7 template: remove manifest rev number from templates
Summary:
With treemanifest we no longer have manifest rev numbers, so let's drop
them from the templates. This let's us convert a few more tests to treeonly.

In theory automation may parse this, but I kinda doubt anyone parses the
manifest node from this.

Reviewed By: xavierd

Differential Revision: D15296141

fbshipit-source-id: a4d2194bd9604867cd9958509bcd2e6513a72494
2019-05-22 08:37:10 -07:00
Mark Thomas
95afd0a5cd hgsubversion: use better string literals for significant whitespace
Summary:
The test-hgsubversion-externals.py test contained string literals with significant trailing whitespace that was stripped by an editor in D15392154.

Restore the significant whitespace, and switch from multi-line string literals to a single string literal per line, to make the newlines and whitespace more obvious.

Reviewed By: krallin

Differential Revision: D15448869

fbshipit-source-id: 68444d2a31b71ab9f99927c95174a0d49e26bb06
2019-05-22 02:34:58 -07:00
Mark Thomas
30e5b3eb26 commitcloud: remove omitted bookmarks that are available locally
Summary:
When syncing, if a locally-available bookmark is synced to a new commit that
has been omitted, remove the local bookmark to ensure that the next cloud sync
doesn't move the bookmark back to where it used to be.

Reviewed By: mitrandir77

Differential Revision: D15414172

fbshipit-source-id: 71aaa2d89f734e4c575c24da2c0ef6b59ca4deaa
2019-05-21 15:32:09 -07:00
Mark Thomas
93b9b82be1 commitcloud: add test demonstrating bad behaviour for moved omitted bookmarks
Summary:
Add a test that shows moving a synced bookmark onto a commit which will be
omitted elsewhere causes the bookmark to be moved back.

Reviewed By: mitrandir77

Differential Revision: D15414173

fbshipit-source-id: 92dc42d1c5560fa2f5bc618d5335e21ac14d9e7d
2019-05-21 15:32:09 -07:00
Durham Goode
3403a1dc36 hooks: remove "incoming" hook
Summary:
This hook fires for every commit that is introduced in a pull. When
doing pulls with hundreds of thousands of commits, this introduces a noticable
delay. We don't use this hook anywhere, and it's not particularly scalable, so
let's delete it.

Reviewed By: singhsrb

Differential Revision: D15424697

fbshipit-source-id: 98d76bca703e625adf5be8f6234436befd260fc4
2019-05-21 15:01:16 -07:00
Kostia Balytskyi
fb54cc5694 hgsubversion: move to absolute import
Summary:
Let's move hgsubversion to absolute_import, just to be consistent with the rest
of Mercurial codebase.

Reviewed By: markbt

Differential Revision: D15392154

fbshipit-source-id: e4c32939aff0616790828da508f3feea158669e1
2019-05-21 09:15:21 -07:00
Mark Thomas
157325e38d commitcloud: limit the number of backup bookmarks the client sends
Reviewed By: mitrandir77

Differential Revision: D15373957

fbshipit-source-id: a197a39fc5b423f57e07ab92aa6544f62439d9d3
2019-05-20 06:19:49 -07:00
Mark Thomas
66d79c86c8 pull: remove postincoming advice
Summary:
The postincoming checks prints out advice of the following forms:

* `(run 'hg heads' to see heads)`
* `(run 'hg heads' to see heads, 'hg merge' to merge)`
* `(run 'hg heads .' to see heads, 'hg merge' to merge)`
* `(run 'hg update' to get a working copy)`

This advice is no longer useful, so remove it.

Reviewed By: DurhamG, farnz

Differential Revision: D15317185

fbshipit-source-id: 50ba576406c96715fa058399da53462be9b7a3bf
2019-05-20 06:19:49 -07:00
Mark Thomas
a2db36c434 commitcloud: log background backup command and start time
Summary:
Improve logging of background backup commands by including the command that was
run and the time it was started in the background backup logs.

Reviewed By: mitrandir77

Differential Revision: D15334879

fbshipit-source-id: 932e91a43033c5cb06c79ede7b5224da2e34eb7d
2019-05-20 06:19:49 -07:00
Mark Thomas
7f08a38705 commitcloud: pull heads in small groups
Summary:
When pulling heads from commit cloud during sync, pull them in small groups
of heads from around the same time, to prevent overloading the server when
pulling a large number of heads.

Reviewed By: mitrandir77

Differential Revision: D15317184

fbshipit-source-id: 5e69eb970b18292a4f5d643b25fac80c90c5d537
2019-05-20 06:19:49 -07:00
Mark Thomas
7359c3df5d commitcloud: refactor sync processing
Summary:
Refactor how commit cloud sync works.

Sync is simplified by delegating backup processing to the existing backup code.
This happens first, which means the user's work is backed up earlier, and the
sync processing can assume that all backed up commits are available in the
cloud storage.

Sync no longer attempts to handle the case where cloud storage has changed.
Instead, backup processing should ensure that all local commits are backed up
to the current cloud storage.

If a commit can't be backed up, then treat this as a normal failure to
sync and ignore that commit for this sync attempt.  If a commit can't be
downloaded from the server then the sync fails.

Reviewed By: mitrandir77

Differential Revision: D15295499

fbshipit-source-id: d371c5bf0daedbbe42e8c7d4a0c3d1a40c21a36f
2019-05-20 06:19:48 -07:00
Mark Thomas
7f84c86805 commitcloud: add test demonstrating bad sync behaviour when removing obsolete bookmark
Summary:
If the user has a bookmark pointing at an obsolete commit, and then moves that
bookmark away from that commit, commit cloud can't tell whether the commit
should really be obsolete or not.  Previously the bookmark was the only thing
keeping the commit visible, but commit cloud doesn't know that.

I can't think of a way to fix this with obsmarkers.  It works with separate
mutation and visibility (T34204947).

Reviewed By: quark-zju

Differential Revision: D15097845

fbshipit-source-id: 5926553b4878b28823a6ce47d29c0346cba04e5e
2019-05-20 06:19:48 -07:00
Mark Thomas
81d738646f commitcloud: incorporate infinitepush backups into commitcloud
Summary:
Merge the functionality of the infinitepushbackup extension (backing up commits
to commit cloud) into the commitcloud extension.

These two extensions are highly coupled, and the commitcloud extension
monkey-patches the infinitepushbackup extension for a lot of its functionality.
There is also a lot of code duplication between the two extensions which we can
remove if they are part of the same extension.

The infinitepushbackup commands (`hg pushbackup`, ...) are moved to subcommands
of the `hg cloud` command, e.g. `hg cloud backup`.

Each feature of the infinitepushbackup extension is moved to a new module
in the commit cloud extension:

The `background` module controls background execution of `hg cloud backup` and
`hg cloud sync`.

The `backupbookmarks` module tracks and updates scratch bookmarks for backups.
This will be deprecated in the future.

The `backupstate` module tracks whether or not a commit has been backed up.
This is now tracked separately from backup bookmarks in a new file:
`.hg/commitcloud/backedupheads.<remote-identifier>`.  This also covers hidden
commits, preventing a re-backup of previously backed up commits when they are
unhidden.

Previously the commitcloud extension customized the smartlog annotations: `Backing up`
became `Syncing`, etc.  This is now removed for consistency.

Previously the infinitepushbackup extension disabled background backup by
injecting an `infinitepushbackup.disableduntil` config entry into the user's
config.  This is now replaced with a state file at `.hg/commitcloud/autobackup`.
Either option can be set to disable auto backup.  Commit cloud will wait until
both have expired before starting to run background backups again.

Reviewed By: DurhamG

Differential Revision: D15276939

fbshipit-source-id: 1d28989a157286e47d3dd97ca9c70b27f692dda1
2019-05-20 06:19:47 -07:00
Mark Thomas
abb390625f bindings: merge pyrevisionstore code into bindings
Summary:
D15381038 made the `pyrevisionstore` crate a strongly-coupled dependency of the
`bindings` crate.  For simplicity, just move the code into the bindings crate.

Reviewed By: xavierd

Differential Revision: D15392547

fbshipit-source-id: 3dfa924b33722760ef7829fbb8659ce0262e6671
2019-05-20 04:08:03 -07:00
Jun Wu
12747763a5 pathmatcher: make gitignore "explain" low cost and more verbose
Summary:
This is a nice-to-have feature requested by nikz. He made an initial version
at D15029612, which changes `MatchResult` to include enough infomation to
explain a rule.

The diff reworked the feature so the runtime CPU and memory overhead stay
minimal if nothing needs to be explained.  The change also makes it easier
to display more information - all rules matching a path, to make it easier
to detect and remove duplicated or conflicting rules.

Reviewed By: DurhamG

Differential Revision: D15095576

fbshipit-source-id: 5784aabd50d9b716dceead10bc593f9155228046
2019-05-17 14:25:26 -07:00
Xavier Deguillard
90e4ab0d4e bindings: fold pyrevisionstore lib into the bindings lib
Summary:
After D15266191, the bindings crate directly depends on pyrevisionstore, and
since then we have seen really weird compilation errors that magically go away
when some files are touched.

From my observations, here is what I came up with. The pyrevisionstore crate is
both compiled as a dependency of the bindings crate, and as a library to be
used in python. Therefore, its Cargo.toml contains a '[lib]' section, the
presence of this section forces the crate to be compiled into a
"libpyrevisionstore.{rlib,so}", while all the regular crates have a hashed
suffix like "libedenapi-2b9975ec9b865e87.rlib".

None of this would usually matter, but our build system re-uses the build
directory to then compile the pyrevisionstore library. While doing so, it will
re-create the "libpyrevisionstore.{rlib,so}", but not in an identical fashion.
After this, the rest of the build succeeds.

Once a file in the bindings crate is touched, recompiling will only recompile
its file, and not the pyrevisionstore crate, but since
"libpyrevisionstore.{rlib,so}" is different, it now fails to compile...

A previous effort tried to compile each top level target into a separate
directory, but that directly affected some of our tests. Since the underlying
issue is that pyrevisionstore is compiled twice, let's simply not compile it as
a top-level target and simply fold it into the bindings lib. Ideally, we would
want to do the opposite, but let's do that at a later time.

Reviewed By: DurhamG

Differential Revision: D15381038

fbshipit-source-id: 047cfab794371464942f19084ffb9240e836cb40
2019-05-17 08:20:53 -07:00
Jared Bosco
476e71b1cc commands: add root --shared to print the shared root of the current directory.
Summary: When the `--shared` flag is passed to `hg root` i.e. `hg root --shared` - display the shared root of the current directory.

Reviewed By: quark-zju

Differential Revision: D15363157

fbshipit-source-id: 6e6c13f27c624502a83edc1046ae3d4de227b6b8
2019-05-16 11:10:29 -07:00
Jun Wu
348e0831e2 templates: move builtin styles to code
Summary:
See the previous diff (D15291676) for motivation. Basically, it's hard to keep
static resources work well with 3 different kinds of deployments (buck xar,
Windows zip, and python side-packages).

This diff just precomputes common styles and hardcoded them in Python code.

This should address a user complaint that `-T xml` does not work.

Reviewed By: markbt

Differential Revision: D15307457

fbshipit-source-id: de4edb0b6896b731301715abe612a31b1512b00a
2019-05-16 09:49:02 -07:00
Mark Thomas
3584341a18 visibility: use x graphnode for invisible commits
Summary:
The `-` graphnode can be confusing as `-` is also used for horizontal graph lines.

There are no good ASCII characters to use for invisible commits, so revert to
just using `x` so that they match obsolete commits.

Reviewed By: quark-zju

Differential Revision: D15293717

fbshipit-source-id: 5d1f327ddd8c3f104a99f494309a79b10ad71401
2019-05-16 02:35:48 -07:00
Jun Wu
16c156f11f edit: save editor text for 2 weeks
Summary:
There are multiple reports that the work in the commit message editor gets lost
for various reasons. We have `.hg/last-message.txt` for commit hook failure,
but that one does not take care of all code paths (ex. metaedit).

This diff changes `ui.edit` directly to try to save messages in `.hg/edit-tmp`
for 2 weeks.

Reviewed By: kulshrax

Differential Revision: D15347831

fbshipit-source-id: 9207adf4315d94a4892685a03f323e89d9c4a7f1
2019-05-15 17:20:13 -07:00
Jun Wu
ed026e04d8 contrib: remove some unused files
Summary:
Clean up things:
- Build scripts. They are probably broke. We have different build scripts.
- hgk. Probably broken.
- docker. We won't maintain hgweb as-is.
- Utilities from fb-hgext. They are no longer used.

Reviewed By: kulshrax

Differential Revision: D15327228

fbshipit-source-id: 3568f20ddce6b364a46d306d95279b7faaef9f82
2019-05-15 17:10:07 -07:00
Nitzan Raz
7e4907ef7c ignore: make debugignore support gitignore
Summary: Make `hg debugignore` show what gitignore rules match the files.

Reviewed By: quark-zju

Differential Revision: D15029612

fbshipit-source-id: e3621c198b9d6e3823de5587b0b859d2d0e36888
2019-05-15 02:05:27 -07:00
Jun Wu
cbc28a6600 doc: remove unused doc build step
Summary: As a follow-up of D15338757, remove the scripts around building doc/.

Reviewed By: singhsrb

Differential Revision: D15340829

fbshipit-source-id: bc121947696aaecd574edf3d9b9b3e874037bcda
2019-05-14 15:09:42 -07:00
Jun Wu
4d6591aee7 help: move help docs to Python code
Summary:
It's a headache about how to deal with static files (help/, template/, default
config), since we have 3 different ways of packing the Python code: normal
(linux), embedded (Windows), and fbcode xar (linux). The latter two need
workarounds to make `help/` work, and for the "embedded" case, It is currently
broken.

This diff moves user-facing `help/` files to a Python module to remove the need
of special casing it in different ways.

`helptext.py` was created via:

  import glob, os
  for path in glob.glob('help/*.txt'):
      if path.count('.') == 1:
          name = path.split('.')[0]
          name = os.path.basename(name)
          if '-' in name:
              name = 'globals()[%r]' % name
          print("%s = r'''%s'''\n\n" % (name, open(path, "rb").read()))
          os.unlink(path)

The help text about named branches are removed to make `test-check-help.t`
happy.

Reviewed By: mitrandir77

Differential Revision: D15291676

fbshipit-source-id: 2320bd59369ef092d8c06b8539e401799a0467ef
2019-05-13 16:23:40 -07:00
Jun Wu
fe6e63becd help: drop internal help from UI
Summary:
Drop the "internals" help text from the UI. This is because the internal docs
are mostly outdated (ex. we're moving to new HTTP protocols and slowly removing
bundle2 formats, we're moving away from revlogs).

This diff just disabled access to them via the `hg help` command, the files are
still accessible in the repo.

Reviewed By: kulshrax

Differential Revision: D15291675

fbshipit-source-id: a6e55e0ed085bb54def3790aaaf1a92a4bfa787f
2019-05-13 16:23:40 -07:00
Saurabh Singh
29e1278187 hgsubversion: allow inferring the svn layout from the commit
Reviewed By: mitrandir77

Differential Revision: D15206676

fbshipit-source-id: fc7604bfa2df9cd1d47e4a5d582f0efe80339531
2019-05-13 11:57:37 -07:00
Aida Getoeva
3f3e91d339 remotenames: do not update accessed bookmarks if there is not new accessed
Summary: Do not try to update accessed bookmarks file if there wasn't pulled bookmarks. Currently it rewrites the file even with an empty list of bookmarks.

Reviewed By: quark-zju

Differential Revision: D15165791

fbshipit-source-id: 8eb3b137332c741324b9da9455e3d0dba31bbeda
2019-05-13 08:13:24 -07:00
Saurabh Singh
4de29d283f tests: remove the i18n related tests
Summary:
I guess this was missed as part of D15291618 which intended to remove
the i18n related tests.

Differential Revision: D15301699

fbshipit-source-id: e0364e37695c60ec05f2d533903f136706661a1f
2019-05-10 14:15:24 -07:00
Alexandre Marin
10b2f48ed6 Make importer respect commits not done by itself
Summary: TSIA

Reviewed By: jpratlifffb

Differential Revision: D15228205

fbshipit-source-id: 56bf76d48e5c5e4fcb48645d49b94d9c580e6376
2019-05-10 10:10:57 -07:00
Durham Goode
65a9f2ac94 treemanifest: set reponame and cachepath by default
Summary:
We want to migrate the tests to run using treemanifest. As part of
that, we need remotefilelog reponame and cachepath to always be set. So let's
set that for all tests now.

Differential Revision: D15030250

fbshipit-source-id: 4147997ceebb1294deb322bdbef77b6caab18c44
2019-05-10 09:59:54 -07:00
Durham Goode
9e90a464ee treemanifest: add flatcompat mode for test migration
Summary:
We want to migrate the tests to run using treemanifest. As part of
that, we want to first transition to using treemanifest without actually
changing the hash, so we can check that the tests still work first, then update
the hashes second.

This diff adds the flatcompat mode and enables it by default. A future diff will
start enabling treemanifest for existing tests.

Reviewed By: quark-zju

Differential Revision: D15030252

fbshipit-source-id: 06c82be749282d62f1d9cfb43246695c427f8165
2019-05-10 09:59:53 -07:00
Jun Wu
2cd81d66ce tests: remove i18n related tests
Summary:
The direct motivation is the recent `ui` prefix change made `abort:`
untranslated.

The i18n translations are unmaintained. As we move more logic to Rust, things
would be worse.

I18n tests does not seem to provide much value. Therefore just remove them.

Reviewed By: kulshrax

Differential Revision: D15291618

fbshipit-source-id: 1a244ae32dc8e2f099aba46cbd45553bbb477b2c
2019-05-09 21:24:07 -07:00
Mark Thomas
a86ed27aff commitcloud: use component for status and exceptions
Summary:
Set the `component` to `"commitcloud"` for commit cloud statuses and
messages, rather than using custom highlight functions.

Reviewed By: quark-zju

Differential Revision: D15201944

fbshipit-source-id: 7635942a5ca029209711a2b89c32cc5fd677d22f
2019-05-09 06:55:11 -07:00
Mark Thomas
60e99a245c ui: add labelled prefixes to ui.write
Summary:
Add optional prefix keyword arguments to `ui.write` (and thus `ui.status`,
`ui.warn`, etc.).  These prefixes can be used to indicate an error condition,
some notice to the user, or to mark a message as coming from a particular
component.  The prefixes are labelled so that they can be colored to stand
out from the surrounding text.  The default colors are red for errors, yellow
for notices, and cyan for components.

Add a component parameter to `error.Abort` (and thus any exception that
inherits from it) that can be used by callers to mark which component is
responsible for the exception.   When the error is printed, the component is
passed as the component prefix of the error message.

Reviewed By: mitrandir77

Differential Revision: D15201946

fbshipit-source-id: 02e3da40e9563704fa1d7ce81366e6e7f66c7f34
2019-05-09 06:55:11 -07:00
Saurabh Singh
145ef2b991 metaedit: fix the tests for the --batch option on OSX
Summary:
D15188668 added the `--batch` option to the `metaedit` command along
with updating the tests. Unfortunately, the test is broken on OSX. This commit
fixes the test to be compatible with OSX.

Differential Revision: D15273960

fbshipit-source-id: 57a67b9d7ab2b471ee205db4fdfc7f3e6e2e553b
2019-05-08 20:49:45 -07:00
Adam Simpkins
9b6992506a tracing: fix the perftrace tests
Summary: Update the tests to expect the new output added by D15173846.

Reviewed By: quark-zju

Differential Revision: D15212315

fbshipit-source-id: 82bb3b4e67a28eb8905d35fcaa8251947163f521
2019-05-06 12:17:40 -07:00
Adam Simpkins
6c30a172a9 fix the test-worker.t test
Summary: Update the test code to return a 3-tuple as required after D15173846.

Reviewed By: singhsrb

Differential Revision: D15212317

fbshipit-source-id: 5c5ecaae858a3eaab23f624c11f0dda3ac74a870
2019-05-06 11:50:11 -07:00
Jun Wu
a0bccf8b7b metaedit: allow editing commit messages in batch
Summary:
I wanted this feature in multiple cases. For example, I have renamed
`segdag::SegDag` to `segment::Dag`, and want to edit commit message for
`D15055347::D15055347`, a 9-diff stack. Editing them one by one is
painful.

Reviewed By: singhsrb

Differential Revision: D15188668

fbshipit-source-id: c7cc11aca0a5e16992b5246a74346a35bec00770
2019-05-03 15:55:20 -07:00
Thomas Orozco
398d8bcc1f hgsql: expose reason on top of sqlisreporeadonly
Summary:
This introduces `repo.sqlreporeadonlystate()`, which works similarly to `repo.sqlisreporeadonly()`, but also gets the reason why the read only state is the way it is.

The underlying goal is to use this in a repo hook to report the lock state.

I retained the `sqlisreporeadonly` function so that we don't need to synchronize deployment of this code and the underlying hook.

Reviewed By: quark-zju

Differential Revision: D15165946

fbshipit-source-id: 0a62147167fa826b575178dd261990a956b5f317
2019-05-02 09:08:51 -07:00
Mark Thomas
23f7bbf387 infinitepush: refactor client-specific functions into client module
Reviewed By: DurhamG

Differential Revision: D15170163

fbshipit-source-id: 21ae784c5867bcf198aaa8c079c21b00ae5334fb
2019-05-02 07:06:45 -07:00
Mark Thomas
104261775b visibility: add unamend support
Summary:
Add support for the `unamend` command.  It should use the mutation predecessors
if mutation is enabled, and update the visibility of the commits.

Reviewed By: quark-zju

Differential Revision: D15146976

fbshipit-source-id: e9ee4d26f45ba9e5c3c05a7bca80c8ac326adb9c
2019-05-02 04:06:26 -07:00
Saurabh Singh
640c1b7d87 hgsql: refactor to use existing method during sqlstrip
Summary:
We have an existing method which can capture the desired functionality
without dropping all the data in the `revision_references` table. This
primarily solves these problems:

 - Reuse of code.

Reviewed By: farnz

Differential Revision: D15107057

fbshipit-source-id: 5f9970ffd13536808c1b201481b6d2015fbe8295
2019-05-01 10:46:30 -07:00
Aida Getoeva
13b68c9983 remotenames: log number of accessed remote names
Summary: Added logging of a number of the currently tracked accessed remote bookmarks.

Reviewed By: mitrandir77

Differential Revision: D15080683

fbshipit-source-id: c03c417afcd24683998689365c893d9e16f265f8
2019-04-30 09:26:11 -07:00
Aida Getoeva
e24c3dc2d6 remotenames: track remote names to update to
Summary:
Track remote names that are used as destination for hg update.

Resolving name in the repo happens actually twice: as validation during parsing and tokenization of the given specs and actual resolving. This is still fine to update file with used bookmarks twice, because the update/pull operations are much heavy, and updating the file won't make things much slower. Implementing kind-of-cache for used remote names so we could update the file once, isn't worth it, as the feature will be temporarily enabled and won't be needed after the selective pull rollout.

Reviewed By: markbt

Differential Revision: D15048105

fbshipit-source-id: 5b03443a6ab349e3bd88613d21e7b1efdc1ff6cf
2019-04-30 09:26:11 -07:00
Aida Getoeva
331b10b445 remotenames: track pulled bookmarks
Summary:
Tracking remote bookmarks that was pulled with
```
hg pull -B <remote name>
```
All these remotenames, if they exist, will be stored in `.hg/selectivepullusedbookmarks` file.

It will allow us to estimate how much memory do we need to keep remote names in sync state in Commit Cloud and automatically mark collected remote bookmarks as "interesting" when the selective pull will be enabled.

Reviewed By: markbt

Differential Revision: D14912903

fbshipit-source-id: 3001869175553327c0840e2cfb829724dfd82893
2019-04-30 09:26:11 -07:00