Commit Graph

27273 Commits

Author SHA1 Message Date
Augie Fackler
e4e988fdf5 changegroups: add documentation for cg3 2015-12-18 09:57:35 -05:00
Mike Edgar
44af48ee4a changegroup: add flags field to cg3 delta header
This lets revlog flags be transmitted over the wire. Right now this is
useful for censored nodes and for narrowhg's ellipsis nodes.
2015-12-14 15:55:12 -05:00
Augie Fackler
d33d6a0cb5 changegroup: introduce cg3, which has support for exchanging treemanifests
I'm not entirely happy with using a trailing / on a "file" entry for
transferring a treemanifest. We've discussed putting some flags on
each file header[0], but I'm unconvinced that's actually any better:
if we were going to add another feature to the cg format we'd still be
doing a version bump anyway to cg4, so I'm inclined to not spend time
coming up with a more sophisticated format until we actually know what
the next feature we want to stuff in a changegroup will be.

Test changes outside test-treemanifest.t are only due to the new CG3
bundlecap showing up in the wire protocol.

Many thanks to adgar@google.com and martinvonz@google.com for helping
me with various odd corners of the changegroup and treemanifest API.

0: It's not hard refactoring, nor is it a lot of work. I'm just
disinclined to do speculative work when it's not clear what the
customer would actually be.
2015-12-11 11:23:49 -05:00
Matt Mackall
e061768384 merge with stable 2015-12-18 14:40:11 -06:00
Augie Fackler
1b827711c9 manifestmerge: have manifest do matching before diffing
This means that the diff code does less work, potentially
significantly less in the case of treemanifests. It also should ease
implementation with narrowed clone cases (such as narrowhg) when we
don't always have the entire set of treemanifest revlogs locally.

As far as I can tell, this codepath is currently only used by record,
so it'll probably die in the near future, and then narrowhg won't have
to worry about composing with some unknown matching system.
2015-12-14 20:57:21 -05:00
timeless
8634803214 branch: reword help text
We're not necessarily talking about *the* active branch,
just any old branch.
2015-12-17 14:57:20 +00:00
timeless
c8d8d5d5ad archive: adjust help text 2015-12-17 14:56:32 +00:00
timeless
b6b262b427 annotate: add missing period to help 2015-12-17 14:54:47 +00:00
timeless
81c1e01972 addremove: make help match add 2015-12-17 14:54:20 +00:00
timeless
86a42ddbf7 add: mention .hgignore in help 2015-12-17 14:53:40 +00:00
timeless
ef7cfdfced bundle: warn for --base with --all 2015-12-17 15:05:25 +00:00
timeless
3db2ef2e04 bundle: fix error for --all with destination
Before it complained about --base
2015-12-17 15:03:45 +00:00
timeless
82d910c7aa bundle: fix grammar in help text 2015-12-17 14:59:11 +00:00
timeless
9c4b396c3c bundle: clarify help text
The file might not be compressed; the interactions between
-a, --base, and a named or default repository weren't clear.
2015-12-17 14:58:52 +00:00
Yuya Nishihara
664cff6605 cmdutil: do not duplicate stdout by makefileobj()
It made output order unpredictable because two separate buffers are flushed
individually. Let's use a thin wrapper that just sends close() to black hole.
2015-12-13 20:07:19 +09:00
Yuya Nishihara
db7707d747 cmdutil: reimplement file wrapper that disables close()
There's no need to dynamically create wrappedfileobj class and define
close() as lambda. Also, __iter__() was missing.
2015-12-13 20:01:11 +09:00
Yuya Nishihara
3a0b98410a export: remove useless comparison between file object and string
It was introduced at fa80944106df, where "template" argument could be a file
object. After that, 426525670e45 added "len(template)", so "template" must be
a string now. Therefore, "fp != template" should always be True.

It seems fa80944106df was intended to work around a bug in TortoiseHg, and
I'm sure I've fixed it completely in TortoiseHg source.

https://selenic.com/pipermail/mercurial-devel/2011-February/028467.html
2015-12-13 19:57:54 +09:00
Yuya Nishihara
00a04ad77b export: do not print '<fdopen>' as an output filename
Because makefileobj() duplicates or wraps stdout, "fp != sys.stdout" didn't
work correctly. Python doc states that special file objects are named in the
form '<...>', and absolute filenames should never start with '<', we can
ignore names start with '<'. We can't test fp.fileno() because fp may be a
command-server channel.

https://docs.python.org/2.7/library/stdtypes.html#file.name

In the test output, "exporting patch:" line is printed after patch content.
This is caused by fdopen() and will be fixed by the subsequent patch.
2015-12-13 19:47:46 +09:00
Yuya Nishihara
f7f67c678f commandserver: implement name() to clarify channel is not a plain file
Because unknown attributes are delegated to the underlying file object,
commandserver channels said they were '<stdout>' or '<stdin>' even though
they weren't. This patch makes them say '<X-channel>'.
2015-12-13 19:32:01 +09:00
Mateusz Kwapich
011f0f625e histedit: delete to drop
The default behaviour to forbid this makes a lot of sense for novice users
because it's safeguarding them from dangerous behavior but making it
configurable will be apprieciated by power users in at least one big
organization.

It allows an user to look an histedit rules from declarative perspective and
make the rules reflect the state after histedit.  If we can move lines t move
commits why can't we drop lines to drop commits?

Let's put this behind config knob and inform users about this feature the very
moment they are trying to use it so they can choose desired behaviour.
2015-12-15 13:27:09 -08:00
Mathias De Maré
0e11ed0ee2 clonebundles: fix bundlespec typo 2015-12-16 12:33:54 +01:00
timeless
b7d4dff7f3 record: fix hunk handling to remember the current function 2015-12-17 20:13:29 +00:00
timeless
1054dbcfef record: turn on showfunc
Always try to give diff context when doing an interactive record
2015-12-17 14:38:22 +00:00
Bryan O'Sullivan
509e69c982 parsers: use PyTuple_Pack instead of manual list-filling
Suggested by Yuya.
2015-12-17 13:07:34 -08:00
Thu Trang Pham
3d4e42b9c9 tags: mention --quiet switch in help (issue4920) 2015-12-17 15:23:36 -08:00
Matt Mackall
356bea2fb3 merge with stable 2015-12-17 17:27:32 -06:00
timeless
2abe9172f6 histedit: omit useless message from update (edit)
specifically:
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2015-12-14 23:04:17 +00:00
timeless
26fb25b6cd histedit: omit useless message from update (_histedit)
specifically:
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2015-12-14 22:37:31 +00:00
timeless
5551448efc histedit: omit useless message from update (histeditaction)
specifically:
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2015-12-14 21:43:16 +00:00
timeless
44748f7f11 update: add quietempty flag to _showstats
if called with quietempty=True, suppress:
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2015-12-14 23:14:06 +00:00
timeless
0853af047a histedit: omit useless message from abort
specifically:
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2015-12-14 22:08:14 +00:00
timeless
31ad01fbf1 hg: add quietempty flag to _showstats
if called with quietempty=True, suppress:
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2015-12-14 23:13:25 +00:00
Mateusz Kwapich
dcddc82bed patch: disable nobinary when HGPLAIN=1
The diff output without binaries is definitely great for interactive users - a
binary patch is not meaningful for them. Although setting diff.nobinary flag
can break the automation. Let's force full output for automation.
2015-12-17 11:00:06 -08:00
Yuya Nishihara
c1ebc705e5 help: add missed last new line to "internals" topic
Caught by test-gendoc.t.
2015-12-17 22:29:41 +09:00
Matt Mackall
48434b4246 dirstate: make delaywrite sleep until the next multiple of n seconds
Rather than sleep for 2 seconds, we sleep until the next even-numbered
second, which has the same effect, but makes tests faster. This
removes test-largefiles-update as the long pole of the test suite.
2015-12-16 20:58:26 -06:00
Matt Mackall
476828ae86 dirstate: only invoke delaywrite if relevant
This avoids a significant amount of sleeping in some of our longest
tests.
2015-12-16 20:49:18 -06:00
Matt Mackall
105f68a336 dirstate: move delaywrite logic from write to _write
This will allow us to be smarter in upcoming patches.
2015-12-16 20:46:53 -06:00
Matt Mackall
1a6d366c07 run-tests: show scheduling with --showchannels
This gives one line of output per second with one column per -j level
that allows analyzing test scheduling problems. First 24 seconds of
output at -j 30 looks like this:

  0                                                                .
  1  = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   s.
  2  c c o c r l g r s s = c p = c h c a h c g c h c b c c l l c   ss
  3  h o b o e a e u u u c o a h o e o c g o l h g h u o = a o =   s
  4  e n s n b r n n b b   m t g n l n l w n o e w e n n e r g i   .
  5  c t o = a g d - r r = m c w v p v . e v g c e c d v x g . m
  6  k r l r s e o t e e b a h e e . e . b e . k b k l e t e . p
  7  - i e e e f c e p p u n b b r . r . - r . - - - e r e f . o   .
  8  p b t v - i . s o o n d o d t . t . c t . c s = 2 t n i . r
  9  y - e s c l . t - . d - m i - . - . o - . o y r - - s l . t
 10  3 p - e h e . s s . l t b r s . s . m s . d m e f s i e . .
 11  - e c t e s . . v . e e . . v . v . m v . e r n o v o s . .
 12  c r h . c - . . n . 2 m . . n . n . a n . . e a r n n . . .
 13  o f e . k u . . . . - p . . - . - . n - . . v m m - . . . .
 14  m . c . - p . . . . e l . . s . m . d s . . . e a e . . . .
 15  p . k . r d . . . . x a . . i . o . s o . . . - t n . . . .
 16  a . h . e a . . . . c t . . n . v . . u . . . m . c . . . .
 17  t . e . s t . . . . h e . . k . e . . r . . . e . o . . . .
 18  . . a . t e . . . . a . . . . . . . . c . . . r . d . . . .
 19  . . d . o . . . . . n . . . . . . . . e . . . g . i . . . .
 20  . . s . r . . . . . g . . . . . . . . . . . . e . n . . . .
 21  . . . . e . . . . . e . . . . . . . . . . . . 2 . g . . . .
 22  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
 23  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   .
 24  . . . . . . . . . . . . . . . . . . . . . . . . . = . . . .   ^C

Test names read off vertically, beginning with '='. Idle time (not
shown) appears as blank space.
2015-12-07 16:16:06 -06:00
Matt Mackall
830377c397 tests: avoid duplicate install steps in test-run-tests
At several seconds each, this is significantly slowing down the test.
2015-12-06 15:14:01 -06:00
Matt Mackall
c4ab4cefae run-tests: add more scheduling weight hints
The scheduler would like to order test execution by expected run-time,
but doesn't know much about how long a test will run. It thus uses
test size as a proxy for run-time. By tweaking these weights we can
keep CPUs more evenly busy and thus finish sooner.

In particular, this change pushes the three currently longest-running
tests closer to the beginning:

test-largefiles-update.t
test-run-tests.t
test-gendoc.t

As the largefiles test is currently the long pole of the test suite
with higher -j factors, the sooner it's started, the sooner the tests
can end.

We also up the weight on some shorter but long-running tests that
could have previously delayed completion with low -j factors by
running very close to the end.
2015-12-04 17:05:20 -06:00
Matt Mackall
8d86df8f01 run-tests: report timeouts in a less alarming fashion
Rather than report timed-out tests like this:

 ERROR: test-convert-svn-sink.t output changed
 !

..simply put a 't' rather than a '.' in the stream.
2015-12-04 14:55:10 -06:00
Matt Mackall
e9718e4615 merge with stable 2015-12-16 17:40:01 -06:00
timeless
4eb5187268 import: reorder help text
Try to place key concepts early+together.
2015-12-15 07:57:04 +00:00
timeless
ff823e878b import: add word to help text 2015-12-15 07:56:03 +00:00
timeless
a16cbf7613 import: refactor exact flag 2015-12-15 07:54:01 +00:00
timeless
8e17ef3397 help: filter extension commands 2015-12-14 05:29:55 +00:00
timeless
37c2440209 test-help: tighten grep patterns
Help should output section headings, but no debug commands
2015-12-14 06:00:32 +00:00
Laurent Charignon
4309e7ad61 summary: add troubles list to the output of hg summary
This patch adds troubles information to the output of hg summary.
Example line displayed in hg summary:
unstable: 1 changeset
2015-12-14 11:19:48 -08:00
Matt Mackall
bfb407a6ed wix: add missing template 2015-12-16 17:17:12 -06:00
Siddharth Agarwal
7191433ea2 record: don't dereference symlinks while copying over stat data
Previously, we could be calling os.utime or os.chflags (via shutil.copystat) on
a symlink. These functions dereference symlinks, so this would have caused the
timestamp of the target to be set. On a read-only or similarly weird
filesystem, this might cause an exception to be raised.

This is pretty hard to test because conjuring up a read-only filesystem for
test purposes is non-trivial.
2015-12-12 10:58:05 -08:00