manifest: rename ambiguously-named set to setflag

Just makes it a little clearer what this method does.

--HG--
extra : rebase_source : ee79d05c3bc82b83f4e9291399398493868a08be
manifest: add docstring to text() method

--HG--
extra : rebase_source : 3a7903c8b81c7bbfae17dab61ec017da6fc2034e
revset: better naming of variables containing the value of a single argument

Calling them args is not helpful.

--HG--
extra : rebase_source : 43d8ef1ac6329666c43554a17c41a71dbbeedb19
hgignore: ignore the PyCharm workspace folder

--HG--
extra : rebase_source : 53c37b8e193ea01e355db56f40b35ea33294b186
checklink: always close the NamedTemporaryFile

This fixes test-patchbomb.t when using pypy with --pure.

--HG--
extra : rebase_source : 47e1b4a9f5123a91ea8e17acbef67da451443c3f
tests: use $PYTHON instead of hardcoding python

This makes running the testsuite with pypy possible.

--HG--
extra : rebase_source : 9c4ce2cbbdc13f3c60f49bc0db4d9d5bb90e661d
obsstore: fix defaultformat option passing

The obsstore format passing was not actually being passed to the obsstore. This
fixes it.

--HG--
extra : rebase_source : ad8e6d9c296548ce723f4ce8e37ff2f294566627
obsolete: add isenabled function for option checking

Previously, obsolete used the module level _enabled flag to determine whether it
was on or off. We need a bit more granular control, so we'll be introducing
toggle options. The isenabled() function is how you check if a particular option
is enabled for the given repository.

Future patches will add options such as 'createmarkers', 'allowunstable', and
'exchange' to enable various features of obsolete markers.

--HG--
extra : rebase_source : 8d7139988a8e242f2da8c6fa625166d9022933d5
obsolete: add readonly flag to obstore constructor

Previously, obstore read the obsolete._enabled flag to determine whether to
allow writes to the obstore. Since obsolete._enabled will be moving into a repo
specific config, we can't read it globally, and therefore must pass the
information into the constructor.

--HG--
extra : rebase_source : 1889094a6f70ab7ae42c773fbbea823638e3cbfd
obsolete: add createmarkers option

The basic obsolete option is allowing the creation of obsolete markers. This
does not enable other features, such as allowing unstable commits or exchanging
obsolete markers.

--HG--
extra : rebase_source : 81f2b707cb53d45f554e605628b59441731bdfd5
obsolete: add allowunstable option

This option allows the creation of unstable commits. This allows things like
amending in the middle of a stack of commits, etc.

--HG--
extra : rebase_source : cf566ba970bfe87eaeeea5245c4e54d7aa05538d
obsolete: add exchange option

This adds an option that enables obsolete marker exchange.

--HG--
extra : rebase_source : 83acb585d7b7d32ec43ce35285323e6af9ee6f9e
obsolete: prevent options from being used without createmarkers

exchange and allowunstable should only be enabled if createmarkers is enabled,
so check for that and raise an exception if that's not the case.

--HG--
extra : rebase_source : dd2a55ac2cf3e17f792dc1700c6a0ee30681ff4a
obsolete: update tests to use obsolete options

The obsolete._enabled flag has become a config option. This updates all but one
of the tests to use the minimal number of flags necessary for them to pass.  For
most tests this is just 'createmarkers', for a couple tests it's
'allowunstable', and for even fewer it's 'exchange'.

--HG--
extra : rebase_source : 3b19afd8bbd62fbbc397b99e791fcda9d6ba9bcd
obsolete: update test-commit-amend to use obsolete option

This test actually used the obs.py file as part of the test, so we need to fix
up the test a little more than usual to work with the new obsolete option flags.

--HG--
extra : rebase_source : 4746143efea7e612ef16976b63bf9b4d2527f76d
test-bundle2-exchange: do not drop HG_NODE from the hook output

HG_NODE is precisely something we would like to test.
util: move md5 back next to sha1 and allow to call it without an argument

This effectively backs out changeset 908c5906091b.

The API change is done so that both util.sha1 and util.md5 can be called the
same way. The function is moved in order to use it for md5 checksumming for
an upcoming bundle2 feature.

--HG--
extra : rebase_source : 5bbc846fe56b585a8f143fd5e981aa295272b3f8
tests: pull common http server setup out of individual tests

There are currently two different tests using roughly the same code to
create temporary scripts acting as HTTP servers. As there is going to
be at least one more in an upcoming change, factor those out in a
standalone dumbhttp.py script.

--HG--
extra : rebase_source : 3ac7f76fd7d1e9c87e2878d70a612255965ccf4b
changegroup: use a copy of hookargs when invoking the changegroup hook

addchangegroup creates a runhook function that is used to invoke the
changegroup and incoming hooks, but at the time the function is called,
the contents of hookargs associated with the transaction may have been
modified externally. For instance, bundle2 code affects it with
obsolescence markers and bookmarks info.

It also creates problems when a single transaction is used with multiple
changegroups added (as per an upcoming change), whereby the contents
of hookargs are that of after adding a latter changegroup when invoking
the hook for the first changegroup.

--HG--
extra : rebase_source : 39e3ffc34e2fe1cda96858220ef159edfbfe8166
extra : amend_source : 9acdce3cfbe17f4ab9a62013b3d8a9a5607483d2
bundle2: merge return values when bundle contains multiple changegroups

A bundle2 may contain multiple parts adding changegroups, in which case there
are multiple operation records for changegroups, each with its own return
value. Those multiple return values are aggregated in a single cgresult value
for the whole operation.

As can be seen in the associated test case, the situation with hooks is not
really the best, but without deeper thoughts and changes, we can't do much
better. Hopefully, things will be improved before bundle2 is enabled by default.
In the meanwhile, multiple changegroups is not expected to be in widespread
use, and even less expected to be used for pushes. Also, not many clients
cloning or pulling bundle2 with multiple changesets are not expected to have
changegroup hooks anyways.

--HG--
extra : rebase_source : 42dcd1bba8ecbc05bd879e9afbe45d527b1d2f2a
extra : amend_source : c864e7eeba274ea3cc1ecaabe2fe46fa0f3c474a