Commit Graph

26229 Commits

Author SHA1 Message Date
Yuya Nishihara
c09856f19f changeset_printer: move _meaningful_parentrevs() to scmutil
It will be used by templatekw.
2015-09-26 12:29:09 +09:00
Matt Harbison
31dd910b50 test-run-tests: add globs for Windows
There are two other unrelated failures in this test.  For some reason child1 has
a space after it, thus 2 spaces before the glob, otherwise the glob is ignored
and removed.
2015-10-01 22:14:11 -04:00
Matt Harbison
0ad55d4a9e test-commandserver: generate files with a fixed EOL for test stability
The hashes were different on Windows.
2015-10-01 21:49:50 -04:00
Matt Harbison
6ea942a477 test-debugextensions: sanitize JSON output for Windows
Windows is printing a double backslash, which isn't handled by (glob):

  --- c:/Users/Matt/Projects/hg/tests/test-debugextensions.t
  +++ c:/Users/Matt/Projects/hg/tests/test-debugextensions.t.err
  @@ -47,7 +47,7 @@
      {
       "buglink": "",
       "name": "color",
  -    "source": "*/hgext/color.pyc", (glob)
  +    "source": "c:\\Users\\Matt\\Projects\\hg\\hgext\\color.pyc",
       "testedwith": "internal"
      },
      {
2015-10-01 21:24:10 -04:00
Matt Harbison
82e37c870f test-strip: add glob for Windows 2015-10-01 21:10:38 -04:00
Ryan McElroy
83dd86ff3e bundle2: generate check:heads in a independent function 2015-10-01 10:48:14 -07:00
Matt Mackall
eb810eca5f merge with stable 2015-10-01 12:17:46 -05:00
Matt Mackall
e190fd19b1 Added signature for changeset f41404cf41e2 2015-10-01 12:07:20 -05:00
timeless@mozdev.org
51da91c959 cmdutil: handle multiline translations of HG: messages safely
Before this, if a localizer/localization included a multiline
message, and didn't prefix the intermediate lines with 'HG: ',
then the line would be a candidate for inclusion in the commit
message -- which isn't ideal.
2015-09-30 12:36:30 -04:00
Matt Harbison
f5215c2c04 largefiles: restore archiving largefiles with hgweb (issue4859)
This regressed in f07f4c45a8f2, when trying to conditionally disable archiving
of largefiles.

I'm not sure if wrapfunction() is the right way to do this, but it seems to
work.  The mysterious issue with lfstatus getting out of sync in the proxy and
the unfiltered view crops up again here.  See the referenced cset for more info.
2015-09-29 23:29:44 -04:00
Wagner Bruna
9560b312bd i18n-pt_BR: synchronized with e1c84c9ac25a 2015-10-01 11:09:36 -03:00
Pierre-Yves David
316994e165 strip: compress bundle2 backup using BZ
Storing uncompressed bundle on disk would be a regression. Strip backup using
bundle2 are now compressed when requested.
2015-09-29 14:42:03 -07:00
Pierre-Yves David
28ea49b6c2 writebundle: add a compression argument for the bundle2 case
Bundle2 compression is more complex than the bundle1 one. Therefore it
is handled by the bundler itself. Moreover, on-disk bundle2 will
probably have a large number of flavors so simply adding a new "format"
for it does not seems the way to go.

This will be used in the next changeset to compress bundle2 strip backup.
2015-09-29 14:41:40 -07:00
Pierre-Yves David
124ee320a0 strip: use bundle2 + cg2 by default when repository use general delta
The bundle10 format (plain changegroup-01) does not support general delta and
result into expensive delta re-computation when stripping. If the repository is
general delta, we store backups as bundle20 containing a changegroup-02 payload.

We remove the experimental feature related to strip backup bundle format because
this achieve the same goal in a leaner way. Removing the experimental option is
fine, that is why it experimental in the first place.

Compression of these bundles are coming in later changesets.
2015-09-29 13:16:51 -07:00
timeless@mozdev.org
dba46baf88 run-tests: report paths saved by --keep-tmpdir 2015-09-30 16:01:19 -04:00
Matt Mackall
5e1b4ad958 urls: bulk-change primary website URLs 2015-09-30 15:43:49 -05:00
Matt Mackall
7543320395 urls: bulk-change BTS urls to new location 2015-09-30 15:31:07 -05:00
Yuya Nishihara
4ffbdfca20 localrepo: recreate phasecache if changelog was modified (issue4855)
Because _phaserevs and _phasesets cache revision numbers, they must be
invalidated if there are new commits or stripped revisions. We could do
that by calling _phasecache.invalidate(), but it wasn't simple to be
integrated with the filecache mechanism.

So for now, phasecache will be recreated after repo.invalidate() if
00changelog.i was modified before.
2015-09-29 21:57:08 +09:00
Yuya Nishihara
727976289b help: hide deprecated filesets, revsets and template items if not verbose
This allows us to hide {branches} template keyword in a better way. Currently
it is achieved by copying keywords table and deleting 'branches' from it.
2015-09-26 12:17:44 +09:00
Yuya Nishihara
46fcad08f6 help: pass around ui to rewriter hooks (API)
makeitemsdoc() will hide DEPRECATED items conditionally.
2015-09-26 12:11:46 +09:00
Yuya Nishihara
2f746aa9d3 help: pass around ui to doc loader (API)
This is necessary to hide DEPRECATED items conditionally.

Flagged as API change because it will break "hg help git|subversion".
2015-09-26 12:06:30 +09:00
Yuya Nishihara
958a6389af gendoc: use real ui in place of stdout
ui attributes will be required by a help function, so a file object can't be
used as a fake ui.
2015-09-27 23:34:37 +09:00
Yuya Nishihara
f3df68f405 check-seclevel: use ui to show status and error messages
Future patches will require ui module to be passed to a help function, so
let's use it where appropriate.

Additional parens are necessary to silence a check-code warning.
2015-09-27 22:29:07 +09:00
Pierre-Yves David
9df64adaed unbundle: cleanly abort on unknown bundle2 feature
The exception wasn't caught and resulted in a traceback.
2015-09-25 13:30:49 -07:00
Pierre-Yves David
508568fbbd unbundle: test and fix for clean abort on unknown bundle2 feature
This introduce a test for the feature and fix the exception name that is
different on default.
2015-09-24 17:52:21 -07:00
Matt Mackall
011d3e76a5 merge with stable 2015-09-29 14:33:31 -05:00
Yuya Nishihara
902720a104 localrepo: recreate phasecache if changelog was modified (issue4855)
Because _phaserevs and _phasesets cache revision numbers, they must be
invalidated if there are new commits or stripped revisions. We could do
that by calling _phasecache.invalidate(), but it wasn't simple to be
integrated with the filecache mechanism.

So for now, phasecache will be recreated after repo.invalidate() if
00changelog.i was modified before.
2015-09-29 21:57:08 +09:00
Augie Fackler
b156fbc3ed progress: force a repaint of a printed progress bar after a clear()
This avoids some visual flickering of the progress bar in convert and
probably some other operations. Previously, a line of output would
erase the progress bar, and then it would wait `progress.refresh`
seconds (default of 0.1) before redrawing the progress bar. Now if
we've ever painted a progress bar, we schedule the progress bar for
immediate repainting on the next progress call, which helps lend the
illusion that the progress bar is "always" there. In practice, it's
merely there more of the time, but it ends up being a lot easier to
read during convert.
2015-09-26 00:10:48 -04:00
Matt Mackall
aa8bafdf33 tests: fix test-bundle2-format output
Forgot to amend.
2015-09-29 14:08:37 -05:00
Pierre-Yves David
c4198a6645 bundle2: allow compressed bundle
This changeset adds support for a 'compression' parameter in bundle2 streams.
When set, it controls the compression algorithm used for the payload part of the
bundle2.

There is currently no usage of this except in tests.
2015-09-23 12:56:12 -07:00
Pierre-Yves David
7b56b0a80e test-bundle2: dump bundle content using f --hexdump
Thanks to Greg Szorc for pointing this out.
2015-09-28 15:01:20 -07:00
Augie Fackler
4f77804eb0 treemanifest: rework lazy-copying code (issue4840)
The old lazy-copy code formed a chain of copied manifests with each
copy. Under typical operation, the stack never got more than a couple
of manifests deep and was fine. Under conditions like hgsubversion or
convert, the stack could get hundreds of manifests deep, and
eventually overflow the recursion limit for Python. I was able to
consistently reproduce this by converting an hgsubversion clone of
svn's history to treemanifests.

This may result in fewer manifests staying in memory during operations
like convert when treemanifests are in use, and should make those
operations faster since there will be significantly fewer noop
function calls going on.

A previous attempt (never mailed) of mine to fix this problem tried to
simply have all treemanifests only have a loadfunc - that caused
somewhat weird problems because the gettext() callable passed into
read() wasn't idempotent, so the easy solution is to have a loadfunc
and a copyfunc.
2015-09-25 22:54:46 -04:00
Augie Fackler
70820b78e7 manifest: rename treemanifest load functions to ease debugging
I'm hunting an infinite recursion bug at the moment, and having both
of these methods named just _load is muddying the waters slightly.
2015-09-25 17:18:28 -04:00
Augie Fackler
83cf95501a manifest: add id(self) to treemanifest __repr__
Also rename __str__ to __repr__ since that's what we really want for
pdb.
2015-09-25 17:17:36 -04:00
Durham Goode
291911d02c bundlerepo: let bundle repo look in the _mancache
When looking up a base revision, we were ignoring the contents that were already
available in the manifest's _mancache. This patch allows us to use that data
instead of reading from the revlog.

This is useful in our pushrebase extension (which allows rebasing on the server
side during a push) because it allows us to prefetch the bundle base manifest
before aquiring the repo lock (1 second saving), which means doing less work inside the lock,
which means a 20% higher commit rate.
2015-09-28 10:27:36 -07:00
Yuya Nishihara
4b52e9276e check-seclevel: wrap entry point by function
This is intended to narrow scope of local variables. The global _verbose
flag will be replaced later by ui.verbose.
2015-09-27 22:19:54 +09:00
Yuya Nishihara
a63986f458 check-seclevel: set executable bit as it has shebang 2015-09-27 22:16:24 +09:00
Pierre-Yves David
c6b4571453 bundle20: extract core payload generation in its own function
We are about to allow compressing the core of the bundle2. So we extract the
generation of this bits in its own parts to make this compression phases easier
in a later changesets.
2015-09-23 12:56:05 -07:00
Pierre-Yves David
18caca2d9c unbundle20: allow registering handlers for stream level parameters
As a comment in the code have been asking for, it is now possible to register
piece of code that handle parameters for the stream. I've been wondering is such
function should be class methods or not. I eventually went for externally
decorated methods to stick with the culture of extensibility from an extensions
that apply to bundle2.
2015-09-23 14:00:16 -07:00
Pierre-Yves David
485efcee1f bundle2: allow to specify unsupported value on error
A client may support an argument but not some of its values (eg: coming
"compression" parameters). We allow this case to be carried in the
exception.
2015-09-23 11:55:27 -07:00
Pierre-Yves David
2aa8064fde bundle2: rename error exception class for unsupported feature
The original name explicitly mention "Part", however it is also used outside of
parts related feature. We rename from 'UnsupportedPartError' to
'BundleUnknownFeatureError' to fix this.
2015-09-23 11:44:52 -07:00
Pierre-Yves David
496ebe3ecb changegroup: use a different compression key for BZ in HG10
For "space saving", bundle1 "strip" the first two bytes of the BZ stream since
they always are 'BZ'. So the current code boostrap the uncompressor with 'BZ'.
This hack is impractical in more generic case so we move it in a dedicated
"decompression".
2015-09-23 11:33:30 -07:00
Anton Shestakov
22d1cd552d monoblue: provide links to branches, tags and bookmarks by name
This is adapted from 635285e0a942, that was added to paper for 3.5 release.

It adds another way to refer to branches, tags and bookmarks in urls: by name.
It's still possible to navigate to a specific changeset hash, but now you can
get more descriptive urls straight from /summary page, for example.

branchentry template (and so the whole branches table on /summary and
/branches) lost the column that had a plain changeset hash, because tags and
bookmarks don't have this column and also because there is already a way to
address branch by its changeset hash (changeset link just next to it). Maybe we
can instead bring this column with a plain changeset hash to tags and
bookmarks, but this, more terse, new look feels fine.
2015-09-26 17:24:12 +08:00
Anton Shestakov
c3abc3de29 gitweb: provide links to branches, tags and bookmarks by name
This is adapted from 635285e0a942, that was added to paper for 3.5 release.

It adds another way to refer to branches, tags and bookmarks in urls: by name.
It's still possible to navigate to a specific changeset hash, but now you can
get more descriptive urls straight from /summary page, for example.

branchentry template (and so the whole branches table on /summary and
/branches) lost the column that had a plain changeset hash, because tags and
bookmarks don't have this column and also because there is already a way to
address branch by its changeset hash (changeset link just next to it). Maybe we
can instead bring this column with a plain changeset hash to tags and
bookmarks, but this, more terse, new look feels fine.
2015-09-26 17:15:58 +08:00
timeless@mozdev.org
2993615080 cmdutil: remove HG: prefix from translation strings 2015-09-25 03:44:15 -04:00
timeless@mozdev.org
1e8c71dffb i18n-zh_CN: annotate broken HG: translations 2015-09-25 03:47:48 -04:00
Siddharth Agarwal
4a04cef0a1 lock: recognize parent locks while acquiring
This is part of a series that will allow locks to be inherited by subprocesses
in limited circumstances. This patch enables the logic introduced in previous
patches.
2015-09-24 22:07:55 -07:00
Siddharth Agarwal
e60aaeccf1 test-lock.py: fix testing for forks
The earlier test worked only because the held count went up to 2, so the first
release brought it down to 1. Making a copy of the lock fixes that issue.
2015-09-24 22:00:51 -07:00
Siddharth Agarwal
1d157c4b16 test-lock.py: allow PID to be changed in test state
This will be used in upcoming patches to create locks that appear as if they're
being created by child processes.
2015-09-24 20:40:00 -07:00
Siddharth Agarwal
e006a50c9b test-lock.py: add a lock wrapper that allows faking the PID
This will be used in upcoming patches to create locks that appear as if they're
being created by child processes.
2015-09-24 20:22:59 -07:00