Commit Graph

5311 Commits

Author SHA1 Message Date
Bryan O'Sullivan
cc14be3d13 with: use context manager for transaction in rebase 2016-01-15 13:14:48 -08:00
Bryan O'Sullivan
1ac3200b15 with: use context manager for transaction in qimport 2016-01-15 13:14:47 -08:00
Bryan O'Sullivan
a9ed8a0db6 with: use context manager for transaction in qfinish 2016-01-15 13:14:47 -08:00
Bryan O'Sullivan
4a70f875ef with: use context manager for transaction in mercurial_sink 2016-01-15 13:14:47 -08:00
Bryan O'Sullivan
d7d3b75b31 with: use context manager in qrename 2016-01-15 13:14:50 -08:00
Bryan O'Sullivan
2231de2286 with: use context manager in qfinish 2016-01-15 13:14:50 -08:00
Bryan O'Sullivan
496b2e9b09 with: use context manager in largefiles commit 2016-01-15 13:14:50 -08:00
Bryan O'Sullivan
9c8b627124 with: use context manager in unshelveabort 2016-01-15 13:14:50 -08:00
Bryan O'Sullivan
64b55549f8 with: use context manager for wlock in transplant 2016-01-15 13:14:47 -08:00
Bryan O'Sullivan
933b3aaee3 with: use context manager for wlock in shelve stripcmd 2016-01-15 13:14:47 -08:00
Bryan O'Sullivan
9ab24eb658 with: use context manager for lock in continue 2016-01-15 13:14:47 -08:00
Bryan O'Sullivan
f176ae0f45 with: use context manager for wlock in unshelve 2016-01-15 13:14:47 -08:00
Bryan O'Sullivan
7d902f7f8f with: use context manager for wlock in shelve deletecmd 2016-01-15 13:14:47 -08:00
Bryan O'Sullivan
274fcb4437 with: use context manager for wlock in shelve cleanupcmd 2016-01-15 13:14:47 -08:00
Bryan O'Sullivan
74eae160f6 with: use context manager for wlock in shelve createcmd 2016-01-15 13:14:47 -08:00
Bryan O'Sullivan
2ced15165a with: use context manager for lock in histedit cleanupnode 2016-01-15 13:14:47 -08:00
Bryan O'Sullivan
ed2500cd97 with: use context manager for lock in qimport 2016-01-15 13:14:47 -08:00
Bryan O'Sullivan
3feacd382c with: use context manager for wlock in qfold 2016-01-15 13:14:47 -08:00
Bryan O'Sullivan
4b7071051f with: use context manager for wlock in qrefresh 2016-01-15 13:14:47 -08:00
Bryan O'Sullivan
e826ea566e with: use context manager for wlock in qpop 2016-01-15 13:14:47 -08:00
Bryan O'Sullivan
4003062696 with: use context manager for wlock in qpush 2016-01-15 13:14:47 -08:00
Bryan O'Sullivan
68786b4a3e with: use context manager for wlock in qnew 2016-01-15 13:14:47 -08:00
Bryan O'Sullivan
e41ff99cd6 with: use context manager for wlock in mergeupdate 2016-01-15 13:14:47 -08:00
Bryan O'Sullivan
ab04c813f9 with: use context manager for wlock in overridepurge 2016-01-15 13:14:46 -08:00
Bryan O'Sullivan
070b1b5491 with: use context manager for wlock in cmdutilforget 2016-01-15 13:14:46 -08:00
Bryan O'Sullivan
b83485ed82 with: use context manager for wlock in overriderevert 2016-01-15 13:14:46 -08:00
Bryan O'Sullivan
3538da229b with: use context manager for wlock in removelargefiles 2016-01-15 13:14:46 -08:00
Bryan O'Sullivan
ccc94927e6 with: use context manager for wlock in addlargefiles 2016-01-15 13:14:46 -08:00
Bryan O'Sullivan
c7a59c74b6 with: use context manager for wlock in updatelfiles 2016-01-15 13:14:46 -08:00
Bryan O'Sullivan
65ee17ba0b with: use context manager for wlock in kw_dorecord 2016-01-15 13:14:46 -08:00
Bryan O'Sullivan
a9fe3cefa5 with: use context manager for wlock in kw_copy 2016-01-15 13:14:46 -08:00
Bryan O'Sullivan
85a3bcab4f with: use context manager for wlock in kw_amend 2016-01-15 13:14:46 -08:00
Bryan O'Sullivan
6b60d65449 with: use context manager for wlock in keyword demo 2016-01-15 13:14:46 -08:00
Bryan O'Sullivan
82870250ec with: use context manager for wlock in _kwfwrite 2016-01-15 13:14:46 -08:00
Bryan O'Sullivan
a2f04de9b6 with: use context manager for wlock in sign 2016-01-15 13:14:46 -08:00
Yuya Nishihara
1eaa3db7b3 chgserver: mark as a built-in extension 2015-12-23 22:37:24 +09:00
Yuya Nishihara
c4a6a3f863 chgserver: import background server extension from cHg
This extension is copied from
https://bitbucket.org/yuja/chg/ -r 86feb5f2e971

It could be imported as mercurial/chgserver.py, but in that case, we would
have to resolve circular import between chgserver and commandserver. So I
decided to keep it as an extension.

  chgserver.chgcmdserver -> commandserver.server
  commandserver._servicemap -> chgserver.chgunixservice
2015-12-23 22:23:56 +09:00
Laurent Charignon
d72e8db6ef rebase: small refactoring to allow better extensibility from extensions
Inhibit, one of evolve's extension, would like to change the way rebase works
with obsolete changesets. During a rebase with inhibit, the inhibition of the
obsolescence markers should be lifted for the rebase.
With this small refactoring, inhibit and can wrap the _filterobsoleterevs
function to lift inhibition cleanly and at the same time this change makes
rebases' code more legible.
2016-01-14 11:50:28 -08:00
Bryan O'Sullivan
584240dc82 shelve: use a context manager for file I/O in listcmd 2016-01-12 14:47:21 -08:00
Bryan O'Sullivan
4e29b6de19 largefiles: use util.readfile in lfconvert 2016-01-12 14:31:02 -08:00
Bryan O'Sullivan
ebfc6943c7 largefiles: use util.readfile in overrides 2016-01-12 14:29:34 -08:00
Bryan O'Sullivan
f936f9a539 largefiles: use a context manager in _getfile 2016-01-12 14:27:42 -08:00
Bryan O'Sullivan
c490d3c96d patchbomb: replace file I/O with util.readfile 2016-01-12 15:57:18 -08:00
Laurent Charignon
0faf1a71c4 rebase: prevent creating divergence
Before this patch rebase would create divergence when you were rebasing obsolete
changesets on a destination not containing one of its successors.
This patch introduces rebase.allowdivergence to explicitly allow
divergence creation with rebase.
2016-01-12 13:43:41 -08:00
Laurent Charignon
83309d717a rebase: create a new variable to make the next patch more legible 2016-01-06 12:55:56 -08:00
Laurent Charignon
9d840a1d82 rebase: minor refactoring of _computeobsoletenotrebased
This patch is a refactoring of the code skipping obsolete changesets already
present in destination. It makes the following patches more legible.
Instead of passing all the revs to be rebased to _computeobsoletenotrebased,
we only pass the obsolete revisions of the rebaseset.
2016-01-06 12:55:56 -08:00
Gregory Szorc
5732d02b64 exchange: make clone bundles non-experimental and enabled by default
The clone bundles feature was introduced in Mercurial 3.6 behind an
experimental and disabled by default flag. The feature has been enabled
on hg.mozilla.org for a few months and has served many terabytes of
clones. Users have been encouraged to use the feature and reception
has been very positive (mainly due to faster clones as a result of
connecting to a CDN). I have heard no feedback about changing the
feature other than inquiries about when it will be enabled by default.
So, I think the feature is ready to be enabled by default.

This patch renames experimental.clonebundles to ui.clonebundles,
documents the option, and enables it by default. References to the
experimental state of clone bundles have been removed. The remaining
config option docs in clonebundles.py have been removed because they
are redudant with `hg help config`.

There are some oddities with behavior of clone bundles. Because clones
with clone bundles are effectively 2 `hg pull` operations, there may be
2 transactions. This could result in hooks running twice. If the
subsequent pull is aborted, it could result in partial rollback and an
incomplete clone. This behavior is a bit wonky and should probably
be documented. If this patch is accepted, I'll send a follow-up to
document it. I don't think this behavior should prevent the feature
being enabled by default. Reworking the clone mechanism to support
interrupted or multi-part clones feels like a major new feature and
something that when implemented can change the hook and rollback
semantics of clone bundles. Besides, partial clone is better than
full rollback and hooks running on initial clone are likely rare, so I
think the impact is minimal.
2016-01-08 10:58:04 -08:00
Gregory Szorc
0436f8dd18 exchange: make clonebundleprefers non-experimental
In preparation for making the feature enabled by default.
2016-01-08 10:57:01 -08:00
Gregory Szorc
2c9adcd9c5 clonebundles: remove advertisement of feature
I screwed up.

When clone bundles is enabled on the server and a compatible client
without the feature enabled clones, the server sends down an
advertisement saying to enable the feature. The server creates the
message which is printed verbatim on the client as an "output" part.
There are 2 problems:

1) The message doesn't respect the client's localization
2) The message contains a reference to the "experimental.clonebundles"
   option.

Since clone bundles is about to be marked as non-experimental and the
goal of the advertisement was to encourage clients to test the
experimental feature, let's just remove the broken advertisement since
it no longer serves a purpose.
2016-01-08 10:53:07 -08:00
Martin von Zweigbergk
ee22e78a3b convert: use manifest.diff() instead of ctx.status()
mercurial_source.getchanges() seems to care about files whose nodeid
has changed even if their contents has not (i.e. it has been
reverted/backed out). The method uses ctx1.status(ctx2) to find
differencing files. However, that method is currently broken and
reports reverted changes as modified. In order to fix that method, we
first need to rewrite getchanges() using manifest.diff(), which does
report reverted files as modified (because it's about differences in
the manifest, so about nodeids).
2016-01-09 22:58:10 -08:00