Eric Sumner <ericsumner@fb.com> [Wed, 21 Jan 2015 15:54:52 -0800] rev 23939
repair._bundle: fix traceback for bad config value
On IRC, rom1dep reported a traceback[1] from setting
experimental.strip-bundle2-version to True. This diff catches
unexpected values and falls back to the non-experimental bundle1
implementation after issuing a warning.
[1] http://gist.tamytro.org/_admin/gists/qXcdQLwtApgy6e3NwWgl
Mathias De Maré <mathias.demare@gmail.com> [Wed, 21 Jan 2015 21:47:27 +0100] rev 23938
subrepo: correctly add newline for git subrepo diffs
Previously, git subrepo diffs did not have a newline at the end.
This caused multiple subrepo diffs to be joined on the same line.
Additionally, the command prompt after the diff still contained
a part of the diff.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 22 Jan 2015 00:10:26 +0900] rev 23937
tests: discard useless "(glob)" in "reverting subrepo" lines
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 22 Jan 2015 00:10:26 +0900] rev 23936
check-code.py: avoid warning against "reverting subrepo ..." lines
Before this patch, "reverting subrepo subrepo/path" lines in *.t test
files require "(glob)", because such lines are recognized as
"reverting path/to/managed/file" by "check-code.py".
On the other hand, "(glob)" for such "reverting ..." line is
recognized as useless by "runt-tests.py", because subrepo paths shown
in such lines are always normalized by "util.pconvert". And this
causes "no result code from test" warning.
As a preparation for discarding "(glob)" from such lines in subsequent
patch, this patch avoids warning against them, by adding negative
lookahead assertion "(?!subrepo )" to the regexp.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 22 Jan 2015 00:07:06 +0900] rev 23935
run-tests.py: inherit --pure option from outer run-tests.py execution
Before this patch, "test-run-tests.t" doesn't test "run-tests.py" with
"--pure", even if outer "run-tests.py" is executed with it.
This patch uses not "HG_RUN_TESTS_PURE" but "HGTEST_RUN_TESTS_PURE",
because "HG_" prefixed environments are forcibly dropped in "_getenv()".
This is also useful to run "run-tests.py" successfully by
"run-tests.py --pure" on Windows without any compilation tools (like
VisualStudio).
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 22 Jan 2015 00:07:06 +0900] rev 23934
hg.bat: return exit code explicitly for indirect invocation
When "hg.bat" is invoked via interactive shell "cmd.exe" on Windows,
it can store own exit code into ERRORLEVEL correctly, regardless of
explicit "exit" statement in it: "cmd.exe" seems to hold ERRORLEVEL
updated by the last command in the batch file (= "python hg", in
"hg.bat" case).
On the other hand, "hg.bat" is invoked indirectly via
"subprocess.Popen" (e.g. shell alias, hooks, hgclient and so on), the
parent process always receives exit code 0 from spawned "hg.bat":
batch files on Windows seem not to be really spawned like as shell
scripts on UNIX, but to be executed in the "cmd.exe" process.
This patch returns exit code explicitly for indirect invocation.
"/b" should be specified for "exit" to prevent "cmd.exe" from being
terminated when "hg.bat" is invoked interactively from it.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 22 Jan 2015 00:03:58 +0900] rev 23933
run-tests.py: execute hghave with same env vars as ones for actual tests
Before this patch, "run-tests.py" executes "hghave" process without
any modifications for environment variables, even though actual tests
are executed with LC_ALL, LANG and LANGUAGE explicitly assigned "C".
When "run-tests.py" is executed:
- with non-"C" locale environment variables on any platforms, or
- without any explicit locale environment setting on Windows
(only for "outer-repo" feature using "hg root")
external commands indirectly executed by "hghave" may show translated
messages.
This causes incorrect "hghave" result and skipping tests, because some
regexp matching of "hghave" expect external commands to show
un-translated messages.
To prevent external commands from showing translated messages, this
patch makes "run-tests.py" execute "hghave" with same environment
variables as ones for actual tests.
This patch doesn't make "hghave" execute external commands forcibly
with LC_ALL, LANG and LANGUAGE explicitly assigned "C", because
changing "run-tests.py" is cheaper than changing "hghave":
- "os.popen" should be replaced by "subprocess.Popen" or so, and
- setting up environment variables should be newly added
Mads Kiilerich <madski@unity3d.com> [Wed, 21 Jan 2015 05:04:48 +0100] rev 23932
osx: use bdist_mpkg.script_bdist_mpkg module instead of bdist_mpkg command
It seems like a default installation of bdist_mpkg makes it available as
Python module, but the corresponding executable is placed in a location like
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/bin which is
not in $PATH and thus not directly available. 'make osx' would thus fail.
Instead, skip the bdist_mpkg executable and invoke it as a Python module. That
works out of the box here.
Mads Kiilerich <madski@unity3d.com> [Wed, 21 Jan 2015 05:04:46 +0100] rev 23931
osx: don't launch installer after building it with bdist_mpkg
bdist_mpkg do for some reason default to use the parameter --show ("Open with
Installer.app after building") if no parameters are specified. We do not like
that.
All the important parameters to bdist_mpkg are already specified in setup.py
and we don't have any to specify in the Makefile.
Instead, specify the parameter '--' which do no harm but will disable the
default opening of the installer. This makes it possible to build packages
"silently".
Mads Kiilerich <madski@unity3d.com> [Wed, 21 Jan 2015 05:01:01 +0100] rev 23930
osx: update "Read Me" "Important Information" text in the package installer
Nothing fancy here, just making the text less specific and less wrong by not
mentioning OS X version and Python versions and wrong URLs.
Ryan McElroy <rmcelroy@fb.com> [Tue, 20 Jan 2015 15:05:44 -0800] rev 23929
commit: remove reverse search for copy source when not in parent (
issue4476)
Previously, we had weird, nonsensical behavior when committing a file move
with a missing source. This removes that weird logic and tests that the bug
this strange behavior caused is fixed. Also adds a longish comment to prevent
some poor soul from accidentally re-implementing the bug in the future.
Matt Mackall <mpm@selenic.com> [Tue, 20 Jan 2015 14:51:11 -0800] rev 23928
merge with i18n
Wagner Bruna <wbruna@yahoo.com> [Sun, 18 Jan 2015 11:16:45 -0200] rev 23927
i18n-pt_BR: synchronized with
db8e3f7948b1
Matt Harbison <matt_harbison@yahoo.com> [Sun, 18 Jan 2015 22:21:53 -0500] rev 23926
convert: handle LookupError in mercurial_source.lookuprev()
This is in line with the documentation on the base class method, and is related
to
issue4496 (but doesn't fix the reporter's problem of not mangling other data
that matches a revision pattern). Now instead of aborting when there is an
ambiguous source rev, it simply won't update the commit comment. A warning
message might be nice, but a None return masks whether the problem was no
matching revision, or more than one.
The only other caller of this is the logic that converts tags, but those are
never ambiguous since they are always 40 characters.
A test isn't feasible because there simply aren't enough commits in the test
suite repos to have an ambiguous identifier that is at least 6 characters long,
and it would be too easy for the ambiguity to disappear when unrelated changes
are made. Instead, I simply ran 'hg --traceback log -r c' on the hg repo, and
handled the error it threw.
Sean Farley <sean.michael.farley@gmail.com> [Sun, 18 Jan 2015 22:24:14 -0800] rev 23925
color: add missing 'dim' in _effects
It seems that this has been missing for people running in 'ansi' mode.
Martin von Zweigbergk <martinvonz@google.com> [Sat, 17 Jan 2015 15:03:41 -0800] rev 23924
diff: use binary diff when copy source is binary
When a binary source has been copied or renamed into a non-binary
file, we don't check whether the copy source was binary. There is a
code comment explaining that a git mode will be forced anyway in order
to capture the copy record (i.e. losedatafn() will be called). This is
true, but forcing git mode is not the only effect binary files have:
when git mode was already requested, we use the binary-ness to tell us
whether to use a regular unified diff or a git binary diff. The user
sees this as a "Binary file $file has changed" instead of the binary
Matt Harbison <matt_harbison@yahoo.com> [Sun, 18 Jan 2015 15:15:40 -0500] rev 23923
largefiles: fix commit of a directory with no largefile changes (
issue4330)
When a directory is named in the commit file list, the previous behavior was to
walk the list, and if no normal files in the directory were also named, add the
corresponding standin for each largefile in that directory. The directory is
then dropped from the list, so that committing a directory with no normal file
changes works. It then added the corresponding standin directory for the first
largefile seen, by prefixing it with '.hglf/'.
The latter is unnecessary since each affected largefile is explicitly referenced
by its standin in the list. It also caused an abort if there were no changed
largefiles in the directory, because none of its standins changed:
abort: .hglf/foo/bar: no match under directory!
This list of files is used to tweak a matcher in lfutil.updatestandinsbymatch(),
which is what is passed to commit().
The status() call that is ultimately done in the commit code with this matcher
seems to have some OS specific differences. It is not necessary to append '.'
for Windows to run the largefiles tests cleanly. But if '.' is not added to the
list, the match function isn't called on Linux, so status() would miss any
normal files that were also in a named directory. The commit then proceeds
without those normal files, or says "nothing changed" if there were no changed
largefiles in the directory. This is not filesystem specific, as VFAT on Linux
had the same behavior as when run on ext4. It is also not an issue with
lfilesrepo.status(), since that only calls the overridden implementation when
paths are passed to commit. I dont have access to an OS X machine ATM to test
there.
Maybe there's a better way to do this. But since the standin directory for the
first largefile was previously being added, and that caused the same walk in
status(), there's no preformance change to this. There is no danger of
erroneously committing files in '.', because the original match function is
called, and if it fails, the lfutil.updatestandinsbymatch() tweaked matcher only
indicates a match if the file is in the list of standins- and '.' never is. The
added tests confirm this.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 18 Jan 2015 16:38:56 -0500] rev 23922
test-tools: update for platforms without symlink support after
5b20e4c32117
The change was triggered by removing the 'baz' hardlink.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 18 Jan 2015 16:33:41 -0500] rev 23921
tests: add "(glob)" to output in test-histedit-commute.t for Windows
This goes with the changes in
3831e9b3750a.
Matt Mackall <mpm@selenic.com> [Sat, 17 Jan 2015 18:29:30 -0800] rev 23920
Added signature for changeset
db8e3f7948b1
Matt Mackall <mpm@selenic.com> [Sat, 17 Jan 2015 18:29:05 -0800] rev 23919
Added tag 3.3-rc for changeset
db8e3f7948b1
Matt Mackall <mpm@selenic.com> [Sat, 17 Jan 2015 18:28:30 -0800] rev 23918
merge default into stable for 3.3 feature freeze
Wagner Bruna <wbruna@yahoo.com> [Sat, 17 Jan 2015 22:01:14 -0200] rev 23917
messages: quote "hg help" hints consistently
Matt Mackall <mpm@selenic.com> [Sat, 17 Jan 2015 18:08:47 -0800] rev 23916
bundle2: fix parttype enforcement
As spotted by Malte Helmert.
Matt Mackall <mpm@selenic.com> [Sat, 17 Jan 2015 17:59:30 -0800] rev 23915
test-tools: another vfat fix
Matt Mackall <mpm@selenic.com> [Sat, 17 Jan 2015 15:54:03 -0800] rev 23914
test-tools: check for unix permissions for hardlinking
Matt Mackall <mpm@selenic.com> [Sat, 17 Jan 2015 15:28:56 -0800] rev 23913
tests: more fixes for f
Matt Mackall <mpm@selenic.com> [Sat, 17 Jan 2015 13:53:56 -0800] rev 23912
tests: teach f not to report symlink mode bits
They're not meaningful or portable
Matt Mackall <mpm@selenic.com> [Sat, 17 Jan 2015 13:53:16 -0800] rev 23911
tests: teach f not to report directory size
It's not meaningful or portable
Matt Mackall <mpm@selenic.com> [Sat, 17 Jan 2015 13:44:43 -0800] rev 23910
test-histedit-commute: call helper script with sh
Buildbot pointed out that this test wasn't passing on Linux+vfat
because there's no chmod for shell scripts.
Matt Mackall <mpm@selenic.com> [Sat, 17 Jan 2015 13:38:17 -0800] rev 23909
test-tools: fix portability issues
Solomon Matthews <smat@fb.com> [Sat, 17 Jan 2015 13:13:16 -0800] rev 23908
progress: add a lock to prepare for introducing a thread
Solomon Matthews <smat@fb.com> [Sat, 17 Jan 2015 13:10:37 -0800] rev 23907
progress: move update check into helper method
Solomon Matthews <smat@fb.com> [Sat, 17 Jan 2015 13:09:33 -0800] rev 23906
progress: move current topic to member variable
Solomon Matthews <smat@fb.com> [Thu, 15 Jan 2015 20:03:28 -0800] rev 23905
progress: add try/finally to make the diffs for the next commit more readable
No change in behavior.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 16 Jan 2015 18:34:14 -0800] rev 23904
transaction: include backup file in the "undo" transaction
Once the transaction is closed, we now write transaction related data for
possible future undo. For now, we only do it for full file "backup" because
their were not handle at all in that case. In the future, we could move all the
current logic to set undo up (that currently exists in localrepository) inside
transaction itself, but it is not strictly requires to solve the current
situation.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 16 Jan 2015 19:35:04 -0800] rev 23903
transaction: pass the name of the "undo" journal to the transaction
It is time for the transaction to be responsible for setting up the
undo data. It is necessary to move this logic into the transaction
because many more files are handled now, and the transaction is the
object tracking them all.
The value can be set to None if no undo should be set.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 16 Jan 2015 19:29:16 -0800] rev 23902
rollback: have an empty entry for the vfsmap in rollback
This empty string key is used for the store. This will be needed to properly
rollback backup in a future changesets.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 16 Jan 2015 14:54:24 -0800] rev 23901
transaction: clarify the name of 'journal' argument for transaction
The argument is a string containing the journal name (used as prefix for all
other transaction file). This is not the transaction file itself. So we clarify
this.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 05 Jan 2015 12:44:15 -0800] rev 23900
transaction: use 'util.copyfile' for creating backup
Using 'copyfile' (single file) instead of 'copyfiles' (tree) will ensures
destination file will be overwritten. This will prevent some abort if backup
file are left in place for random reason.
It also seems more correct.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 05 Jan 2015 12:39:09 -0800] rev 23899
copyfile: allow optional hardlinking
Some code paths use 'copyfiles' (full tree) for a single file to take advantage
of the best-effort-hard-linking parameter. We add similar parameter and logic
to 'copyfile' (single file) for this purpose.
The single file version have the advantage to overwrite the destination file if
it exists.
Eric Sumner <ericsumner@fb.com> [Thu, 15 Jan 2015 16:51:13 -0800] rev 23898
repair: add experimental option to write bundle2 files
This adds an experimental option 'strip-bundle2-version' which causes backup
bundles to use bundle2 formatting. Especially for generaldelta repositories,
this should provide significant performance gains for any operation that needs
to write a backup.
Eric Sumner <ericsumner@fb.com> [Thu, 15 Jan 2015 15:55:13 -0800] rev 23897
changegroup.getsubset: support multiple versions
Allow a version parameter to specify which version of the packer should be
used
Eric Sumner <ericsumner@fb.com> [Thu, 15 Jan 2015 15:39:16 -0800] rev 23896
changegroup.writebundle: HG2Y support
This diff adds support to writebundle to generate a bundle2 wrapper; upcoming
diffs will add an option to write a v2 changegroup part instead of v1 in these
bundles.
Eric Sumner <ericsumner@fb.com> [Thu, 15 Jan 2015 14:39:41 -0800] rev 23895
changegroup.writebundle: provide ui
The next diff will add support for writing bundle2 files to writebundle, but
the bundle2 generator wants access to a ui object. This changes the signature
and callsites to pass one in.
Matt Mackall <mpm@selenic.com> [Fri, 16 Jan 2015 16:25:30 -0800] rev 23894
test-module-imports: use test-repo requirement
Mads Kiilerich <madski@unity3d.com> [Fri, 09 Jan 2015 19:10:09 +0100] rev 23893
largefiles: don't rehash largefiles in updatelfiles if standin hash changed
Standins are read before and after an update/merge, and all the standins that
changes are handed to updatelfiles for getting their corresponding largefiles
updated. updatelfiles would then hash the largefile and see if it already
matched the new expected hash. If so, it would skip the update. If different,
the largefile would be updated.
It would happen very rarely that the largefile happened to match the new hash
(and thus not the old one) and the hashing would thus be pointless ... and
hashing is not cheap.
Instead, when it is known that the standin hash changed (from an update), just
update the standin unconditionally. If the largefile was "unsure" before the
update, it was hashed at that point, so we know there is nothing to preserve.
(Also, the hashing in updatelfiles was not used to preserve changes, but only
to be lazy about updating the largefile, so nothing is lost by not doing this
extra hashing.)
There might be rare situations where we now will update largefiles that didn't
have to be updated, but in all relevant cases (?) this will improve
performance.
Updates on a repo with some big largefiles has been seen to go from 9.19 s to
6.8 s - that is 26% less painful.
Mads Kiilerich <madski@unity3d.com> [Fri, 16 Jan 2015 19:51:25 +0100] rev 23892
largefiles: show progress when checking standin hashes in outgoing changesets
This checking can take a huge amount of time and we should give user a hint
that something is going on.
Eric Sumner <ericsumner@fb.com> [Wed, 14 Jan 2015 17:09:55 -0800] rev 23891
unbundle: support bundle2 files
This adds support for bundle2 files to the unbundle command.
Eric Sumner <ericsumner@fb.com> [Fri, 16 Jan 2015 12:53:45 -0800] rev 23890
pullbundle2: extract addchangegroup result combining into its own function
This will also be used for 'hg unbundle'
Augie Fackler <raf@durin42.com> [Fri, 16 Jan 2015 15:31:45 -0500] rev 23889
histedit: add a test to show that
issue4251 is fixed (
issue4251)
This will help us not regress this case in the future.
Eric Sumner <ericsumner@fb.com> [Thu, 15 Jan 2015 15:35:26 -0800] rev 23888
commands.debugbundle: bundle2 support
This enables debugbundle to print supporting info for bundle2 files.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 12 Jan 2015 22:30:12 -0500] rev 23887
largefiles: cleanup overrideadd()
This was a remnant of the code prior to overridding cmdutil.add().
Matt Harbison <matt_harbison@yahoo.com> [Mon, 12 Jan 2015 21:44:43 -0500] rev 23886
largefiles: enable subrepo support for add
The --large, --normal and --lfsize args couldn't be passed to a subrepo before,
and files in the subrepos would be added silently (if -v wasn't specified) as
normal files. As an added bonus, 'hg add --dry-run' no longer prints that
largefiles would also be added as normal files as well.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 12 Jan 2015 20:59:17 -0500] rev 23885
add: pass options via keyword args
The largefiles extensions needs to be able to pass --large, --normal and
--lfsize to subrepos via cmdutil.add() and hgsubrepo.add(). Rather than add
additional special purpose arguments, stop extracting the existing args from the
**opts passed to commands.add() and just pass them along.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 31 Dec 2014 18:24:32 -0500] rev 23884
largefiles: don't pop largefile-specific arguments to the add command
The arguments will need to stay present when making add work with subrepos.
Angel Ezquerra <angel.ezquerra@gmail.com> [Sun, 11 Jan 2015 16:20:15 +0100] rev 23883
share: replace the bookmarks.shared file with an entry on a new "shared" file
cd79fb4d75fd introduced a way to share bookmarks. When a repository share that
shares bookmarks was created, a .hg/bookmarks.shared file was created to mark
the repository share as one that shares its bookmarks.
We have plans to introduce other levels of sharing, including a "full share"
mode. Rather than creating a new ".shared" file for each new thing that we may
want to share It seems better to create a single "shared" file that will list
what is shared for a given shared repository. This should make it much easier
to get a list of everything that is shared by a given shared repository.
The shared file contains a list of shared "items" (such as bookmarks). Each
shared "item" is added as a new line in the file. For now the only possible
entry in the file is "bookmarks".
Mads Kiilerich <madski@unity3d.com> [Sun, 02 Nov 2014 02:36:47 +0100] rev 23882
docker: support Fedora 21
Mads Kiilerich <madski@unity3d.com> [Fri, 16 Jan 2015 04:26:40 +0100] rev 23881
rpm: make Python 2.7.9 the default Python to include in rpms for EL 5
Use the new and more TLS support in Python 2.7.9.
Mads Kiilerich <madski@unity3d.com> [Fri, 16 Jan 2015 04:26:25 +0100] rev 23880
contrib: make Python 2.7.9 the default in Makefile.python
We should utilize (and test) the big API changes and new TLS functionality in
Python 2.7.9 whenever possible.
Angel Ezquerra <angel.ezquerra@gmail.com> [Sun, 11 Jan 2015 01:51:52 +0100] rev 23879
localrepo: remove all external users of localrepo.wopener
This change touches every module in which repository.wopener was being used, and
changes it for the equivalent repository.wvfs.
It should now be possible to remove localrepo.wopener.
Angel Ezquerra <angel.ezquerra@gmail.com> [Sun, 11 Jan 2015 00:25:54 +0100] rev 23878
localrepo: remove all external users of localrepo.sopener
This change touches every module in which repository.sopener was being used, and
changes it for the equivalent repository.svfs.
It should now be possible to remove localrepo.sopener.
Angel Ezquerra <angel.ezquerra@gmail.com> [Thu, 15 Jan 2015 23:17:12 +0100] rev 23877
localrepo: remove all external users of localrepo.opener
This change touches every module in which repository.opener was being used, and
changes it for the equivalent repository.vfs. This is meant to make it easier
to split the repository.vfs into several separate vfs.
It should now be possible to remove localrepo.opener.
Sean Farley <sean.michael.farley@gmail.com> [Wed, 14 Jan 2015 20:29:47 -0800] rev 23876
log: use namespace logname and colorname
Now that we have the machinary to change the log name and the color label used,
let's use that. Tests have been updated accordingly.