Commit Graph

4 Commits

Author SHA1 Message Date
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
Stanislau Hlebik
8adfcdd88c hgsql: use fetchall method in committodb
Summary:
It makes this method 25-30% faster (shaves off 250-300 ms).

Also it counts number of fetched rows correctly - fetchall method was
overriden, but looks like __iter__ method wasn't

Reviewed By: ikostia

Differential Revision: D14915472

fbshipit-source-id: 313695c1a83d05dac2fc801792226b6b64539cb5
2019-04-13 03:20:27 -07:00
Jun Wu
02e2830919 treemanifest: fix filecache for manifestlog
Summary:
Manifestlog needs to use `00manifesttree.i` for filecache if treeonly is turned
on.

Teach `filecache` to also cache non-existed files and add `00manifesttree.i`
to `repo.manifestlog` check list.

Assuming inode cannot be 0, `cacheable` is a constant `True`. Drop code
dealing with `cacheable = False` accordingly.

Reviewed By: DurhamG

Differential Revision: D10417795

fbshipit-source-id: c8aedd36dc39592c86847bf4327ed9c46736bab0
2018-10-17 20:07:47 -07:00
Jun Wu
5a3842e136 hgsql: add a test demonstrating issues we saw with treeonly pushrebases
Summary:
This happens if during prepushrebase hook, a hgsql repo sync (db -> local)
is completed by another process. `repo.manifestlog` does not get invalidated
correctly if it's treeonly.

The issue was partially detected by a C program modified from fanotify (2)
manpage example monitoring `00manifesttree.i` changes:

  [00:32:35.780] pid 7734 opens 00manifesttree.i (size 1000264)                       # First open.
  [00:32:35.930] pid 7734 reads closes (no write) 00manifesttree.i (size 1000264)
  [00:32:38.685] pid 9175 opens 00manifesttree.i (size 1000264)
  [00:32:38.885] pid 9175 reads 00manifesttree.i (size 1000264)
  [00:32:38.886] pid 9175 closes (no write) 00manifesttree.i (size 1000264)
  [00:32:39.235] pid 9175 opens 00manifesttree.i (size 1000264)
  [00:32:39.235] pid 9175 closes (no write) 00manifesttree.i (size 1000264)
  [00:32:39.236] pid 9175 opens 00manifesttree.i (size 1000264)
  [00:32:39.236] pid 9175 modifies closes 00manifesttree.i (size 1000328)             # Appended by another process.
  [00:32:41.169] pid 10759 opens 00manifesttree.i (size 1000328)
  [00:32:41.355] pid 10759 reads 00manifesttree.i (size 1000328)
  [00:32:41.355] pid 10759 closes (no write) 00manifesttree.i (size 1000328)
  [00:32:41.537] pid 10759 opens closes (no write) 00manifesttree.i (size 1000328)
  [00:32:41.537] pid 10759 opens 00manifesttree.i (size 1000392)
  [00:32:41.537] pid 10759 modifies closes 00manifesttree.i (size 1000392)            # Appended by another process.
  [00:32:44.930] pid 7734 opens closes (no write) 00manifesttree.i (size 1000392)     # Main process picked up changes.
  [00:32:44.930] pid 7734 opens 00manifesttree.i (size 1000392)
  [00:32:44.930] pid 7734 reads 00manifesttree.i (size 1000392)
  [00:32:44.930] pid 7734 modifies closes 00manifesttree.i (size 1000456)             # Main process wrote data.
  [00:32:45.275] pid 7734 opens 00manifesttree.i (size 1000456)
  [00:32:45.459] pid 7734 reads 00manifesttree.i (size 1000456)
  [00:32:45.459] pid 7734 closes (no write) 00manifesttree.i (size 1000456)
  [00:32:45.550] pid 7734 opens closes (no write) 00manifesttree.i (size 1000456)
  [00:32:45.550] pid 7734 opens 00manifesttree.i (size 1000264)
  [00:32:45.550] pid 7734 closes 00manifesttree.i (size 1000264)                      # Main process truncated to the wrong position.

Pid 7734 had "IntegrityError: 1062 (23000): Duplicate entry" error. The
fanotify log showed it truncated the revlog to a wrong location, indicating
an outdated revlog was kept in memory.

The C program was sent as D10418991.

Reviewed By: DurhamG

Differential Revision: D10417797

fbshipit-source-id: 7ccc0a976d05efbca5b3ed6fb5ff7886766d06d2
2018-10-17 20:07:47 -07:00