Gregory Szorc
bdc9fb8c76
clonebundles: improve BUNDLESPEC documentation
...
Before the existence of `hg debugbundle --spec`, the process for
defining the BUNDLESPEC value in manifests was not very clear and not
trivial to automate, especially in the case of stream clone bundles.
This patch adds documentation to note the existence of
`hg debugbundle --spec`. We drop the reference to stream clone
requirements handling because it is now redundant with
`hg debugbundle --spec`. While we are here, we further reinforce the
importance of defining BUNDLESPEC.
2016-01-14 22:50:55 -08:00
Gregory Szorc
3a890f3e32
commands: teach debugbundle to print bundle specification
...
This seems like the most logical place to put this functionality.
Test coverage over existing known bundle specs has been added.
2016-01-14 22:57:55 -08:00
Gregory Szorc
274b1c944c
commands: use context manager for opened bundle file
2016-01-14 21:27:53 -08:00
Gregory Szorc
6a6f7ee7dc
exchange: implement function for inferring bundle specification
...
We don't currently have a mechanism for inferring bundle spec strings
from bundle files. This patch adds one.
This will eventually be used to make the producing of clone bundles
manifests easier.
2016-01-14 22:49:03 -08:00
Gregory Szorc
9128d3d945
streamclone: extract code for reading header fields
...
So it can be called from another consumer in a future patch.
2016-01-14 22:48:54 -08:00
Yuya Nishihara
6727c29486
encoding: escape U+007F (DEL) character in JSON
...
RFC 7159 does not state that U+007F must be escaped, but it is widely
considered a control character. As '\x7f' is invisible on a terminal, and
Python's json.dumps() escapes '\x7f', let's do the same.
2016-01-16 18:30:01 +09:00
timeless
fafbbff385
run-tests: skip threading for a single test (issue5040)
...
This version backs out 69d5cadd84a0 and implements it in
a more consistent manner.
2016-01-14 04:14:50 +00:00
Augie Fackler
54446bb7e0
cleanup: use modern @property/@foo.setter property specification
...
We can use this now that we're 2.6+, and this is more idiomatic modern
Python.
2016-01-16 10:50:28 -05:00
Mathias De Maré
53015f77fd
buildrpm: use bash shebang, since we use bash features in the script
...
As suggested by Bryan O'Sullivan.
2016-01-15 16:16:25 +01:00
Matt Mackall
4343a7194d
mac: ignore resource fork when checking file sizes
...
Some evil evil awful tool adds resource forks to files it's comparing.
Our Mac-specific code to do bulk stats was accidentally using "total
size" which includes those forks in the file size, causing them to be
reported as modified. This changes it to only care about the normal
data size and thus agree with what Mercurial's expecting.
2016-01-14 12:37:15 -06:00
Matt Mackall
a8fcfbf03d
copies: fix detection of divergent directory renames
...
If we move all the files out of one directory, but into two different
directories, we should not consider it a directory rename. The
detection of this case was broken.
2016-01-13 10:10:05 -06:00
Bryan O'Sullivan
541db2c882
with: use context manager for transaction in strip
2016-01-15 13:14:49 -08:00
Bryan O'Sullivan
fd04392cbc
with: use context manager for transaction in pushphase
2016-01-15 13:14:49 -08:00
Bryan O'Sullivan
8bfeb98530
with: use context manager for transaction in strip
2016-01-15 13:14:49 -08:00
Bryan O'Sullivan
49db6467b8
with: use a context manager for transaction in strip
2016-01-15 13:14:50 -08:00
Bryan O'Sullivan
da377129a6
with: use context manager in rebuildfncache
2016-01-15 13:14:49 -08:00
Bryan O'Sullivan
13360de2f3
with: use context manager for transaction in consumev1
2016-01-15 13:14:49 -08:00
Bryan O'Sullivan
8c6b71c1ce
with: use context manager in _histedit
2016-01-15 13:14:49 -08:00
Bryan O'Sullivan
c72a4fb771
with: use context manager in amend
2016-01-15 13:14:50 -08:00
Bryan O'Sullivan
337c3199e2
with: use context manager for transaction in changegroup apply
...
(This needs some line wrapping due to the additional indent level. -mpm)
2016-01-15 13:14:50 -08:00
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
31c9d97ad8
transaction: turn a transaction into a Python context manager
...
This lets us greatly simply acquire/release cycles.
If the block completes without raising an exception, the transaction
is closed.
Code pattern before:
try:
tr = repo.transaction('x')
# zillions of lines of code
tr.close()
finally:
tr.release()
And after:
with tr.transaction('x'):
# ...
2016-01-15 13:14:47 -08:00
Bryan O'Sullivan
2c9c32a10b
with: use context manager for lock in pushphase
2016-01-15 13:14:49 -08:00
Bryan O'Sullivan
155e1de602
with: use context manager in rebuildfncache again
2016-01-15 13:14:49 -08:00
Bryan O'Sullivan
cde011507a
with: use context manager in streamclone consumev1
2016-01-15 13:14:49 -08:00
Bryan O'Sullivan
f646cafad4
with: use context manager in manifest
2016-01-15 13:14:49 -08:00
Bryan O'Sullivan
2caa7d79a8
with: use context manager in rename
2016-01-15 13:14:49 -08:00
Bryan O'Sullivan
f32abc8e35
with: use context manager in resolve
2016-01-15 13:14:49 -08:00
Bryan O'Sullivan
fa514efcb7
with: use context manager in unbundle
2016-01-15 13:14:49 -08:00
Bryan O'Sullivan
44384e880c
with: use context manager in update
2016-01-15 13:14:49 -08:00
Bryan O'Sullivan
9e950df349
with: use context manager in bisect save_state
2016-01-15 13:14:49 -08:00
Bryan O'Sullivan
ff05835c28
with: use context manager in merge update
2016-01-15 13:14:49 -08:00
Bryan O'Sullivan
51b6f1d59f
with: use context manager in _markchanges
2016-01-15 13:14:49 -08:00
Bryan O'Sullivan
9b486e52cc
with: use context manager in maybeperformlegacystreamclone
2016-01-15 13:14:49 -08:00
Bryan O'Sullivan
1d0c7077f2
with: use context manager in verify
2016-01-15 13:14:49 -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
b5f5cce8ca
with: use context manager in localrepo recover
2016-01-15 13:14:50 -08:00
Bryan O'Sullivan
721f51151e
with: use context manager in streamclone generatev1
2016-01-15 13:14:50 -08:00
Bryan O'Sullivan
d5d9f6c78a
with: use context manager in subrepo storeclean
2016-01-15 13:14:50 -08:00
Bryan O'Sullivan
65a1bc16a6
with: use context manager in subrepo _cachestorehash
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