- Nov 15, 2014
-
-
Siddharth Agarwal authored
We're going to make changes to the missing ancestor algorithm, and random testing will give us much more confidence than a fixed set of tests.
-
- Nov 16, 2014
-
-
Siddharth Agarwal authored
We're going to add to it in upcoming patches.
-
- Nov 14, 2014
-
-
Siddharth Agarwal authored
This has some test coverage in test-revlog-ancestry.py, but not very much.
-
Siddharth Agarwal authored
Principle of least privilege, and it also brings this in line with missingancestors.
-
- Nov 16, 2014
-
-
Matt Harbison authored
Previously, any files relative to the root of the repo that match the -I patterns would be deleted, but the command exited with 1 after printing a warning: $ hg remove -S -I 're:.*.txt' . removing sub1/sub2/folder/test.txt removing sub1/sub2/test.txt not removing .: no tracked files
-
- Nov 13, 2014
-
-
Matt Harbison authored
-
- Nov 16, 2014
-
-
Matt Harbison authored
Like 'forget', git and svn subrepos are currently not supported. Unfortunately the name 'remove' is already used in the subrepo classes, so we break the convention of naming the subrepo function after the command.
-
- Nov 15, 2014
-
-
Yuya Nishihara authored
Because pipe-mode server uses stdio as IPC channel, other modules should not touch stdio directly and use ui instead. However, this strategy is brittle because several Python functions read and write stdio implicitly. print 'hello' # should use ui.write() # => ch = 'h', size = 1701604463 'ello', data = '\n' This patch adds protection for such mistakes. Both stdio files and low-level file descriptors are redirected to /dev/null while command server uses them.
-
Yuya Nishihara authored
This makes it easy to swap file descriptors while running command server.
-
Yuya Nishihara authored
Because commandserver itself is an hg subcommand, it shouldn't use stdio directly in principle.
-
Siddharth Agarwal authored
ancestor.missingancestors is really an implementation detail.
-
- Nov 14, 2014
-
-
Martin von Zweigbergk authored
Probably not a noticeable performance gain, but shortens the code slightly.
-
Martin von Zweigbergk authored
The method has been called from commands.py since 3eab42088be4 (update: just merge unknown file collisions, 2012-02-09), so drop the underscore prefix that suggests that it's private.
-
- Nov 12, 2014
-
-
Pierre-Yves David authored
We are still doing double backups, but now that we have proper location handling this is less of an issue. Dropping this simplifies the code before we add some pending-related logic. This also ensures we actually test the new 'location' mechanism.
-
- Oct 18, 2014
-
-
Pierre-Yves David authored
The argument is now a location name. The location must be present in the 'vfsmap' provided to the transaction at creation time.
-
- Nov 05, 2014
-
-
Pierre-Yves David authored
This unlock the backup of file outside of store (eg: bookmarks).
-
- Nov 14, 2014
-
-
Pierre-Yves David authored
The current naming scheme ('journal.backups.<file>') resulted is bad directory name when 'file' was in a subdirectory. We now extract the directory name and create the backupfile within it. We plan to use file in a subdirectory for cachefile.
-
Pierre-Yves David authored
The backup file location was always computed using the opener, bypassing the 'location' setting. (And making the feature broken.)
-
- Nov 13, 2014
-
-
Pierre-Yves David authored
Now that all mechanisms are in place, we can advertise it with a proper new version.
-
Pierre-Yves David authored
We do not want to abort if anything wrong happen while handling a cache file. Cache file have way to be invalidated and if old/bad version stay no misbehavior will happen. Proper value will eventually be computed and the wrong will be righten. This changeset use the transaction reporter (usually writing on stderr) to write details about failed cache handling. This will only apply to write operation using a transaction. The usual update during read only operation will stay a debug message. I was on the way to bring these message back to debug level when I realised it could be a feature. People with write access to the repository are likely to have the power to fix error related to cache (and it is valuable to fix them). So let the things as is for now.
-
- Oct 18, 2014
-
-
Pierre-Yves David authored
We finally use the 'location' value coupled with the 'vfsmap' to restore backup for the right file.
-
Pierre-Yves David authored
The goal is to allow access to file outside ofthe store directory from the transaction. The obvious target are the `bookmarks` file. But we can envision usage for cache too. We keep passing a main opener explicitly because a lot of code rely on this default opener. The main opener (operating on store) is using an empty key ''.
-
- Nov 05, 2014
-
-
Pierre-Yves David authored
We need to store new data to improve the current transaction logic: - location: We want to generate and backup file outside of the 'store' (eg: bookmarks, or various cache files). This requires knowing and preserving where each file is located. The value of this new field is a string. It will be used as a key for a vfs mapping. - cache: We would like to handle cache file in the transaction code. This Will help to have cache consistent with the repository state and avoid performance issue on big repository like Mozilla. However, failure to handle cache file should not result in a transaction failure. We add a new field that carry this information. The value is boolean, A True value mean any error while handling this file can be ignored. Those two mechanisms are not implemented yet, but they are now persisted in the on disk file. Support for new mechanisms is coming in later changeset. We update the file format now and will introduce the new features in later changeset. The format version is set to 0 until we actually support the new feature. This will prevent misunderstanding between incomplete and final client. Support for reading both version 1 and (future) version 2 could be achieved (using default value when reading version 1) but has not been seen as necessary for now.
-
- Nov 13, 2014
-
-
Augie Fackler authored
As I've been working on complicated extension code it's been handy to be able to get standard unittest verbose output so I can find crashers more efficiently.
-
- Nov 14, 2014
-
-
Martin von Zweigbergk authored
This cleans up leftovers from b228ad1f79d7 (largefiles: override calculateupdates instead of manifestmerge, 2014-03-02).
-
Siddharth Agarwal authored
This dumb cache works surprisingly well: on a repository with typical delta chains ~50k in length, unbundling a linear series of 5000 revisions (changelogs and manifests only) went from 60 seconds to 3.
-
- Oct 23, 2014
-
-
Martin von Zweigbergk authored
Move the code in context._manifestmatches() into a new manifest.matches(). It's a natural place for the code to live and it allows other callers to easily use it. It should also make it easier to optimize the new method in alternative implementations of the manifest (same reasoning as with manifest.diff()).
-
- Nov 13, 2014
-
-
Martin von Zweigbergk authored
By passing a status tuple (instead of the current list), we can access the status fields by name and make it a little more readable.
-
Martin von Zweigbergk authored
We can just modify the status tuple we got from dirstate.status() instead of deconstructing it and constructing a new instance, thereby simplifying the code a little.
-
Martin von Zweigbergk authored
Letting _dirstatestatus() return an scmutil.status instance also means that _buildstatus() will always return such an instance, so we can remove the conversion from the call sites.
-
Martin von Zweigbergk authored
It makes no sense to request reverse status (i.e. changes from the working copy to its parent) and then look at the deleted, unknown or ignored fields. If you do, you would get the result from the forward status (changes from parent to the working copy). Instead of giving a nonsensical answer to a nonsensical question, it seems a little saner to return empty lists. It might be best if we could prevent the caller accessing these lists, but it's doubtful it's worth the trouble.
-
Siddharth Agarwal authored
-
Siddharth Agarwal authored
-
Siddharth Agarwal authored
See previous patch descriptions for the motivation. The tests reflect the current state of the world -- as we add support we'll see changes in the test output.
-
Siddharth Agarwal authored
In an upcoming patch we'll enable support as an option to 'hg diff' as well. The tests reflect the current state of the world -- as we add support we'll see changes in the test output.
-
Siddharth Agarwal authored
Upcoming patches will add an option that will almost certainly break diff output parsers when enabled. Add support for forcing an option to something in plain mode, as a fallback. Options passed in via the CLI are not affected, though -- it is assumed that any script passing the option in explicitly knows what it is doing.
-
Siddharth Agarwal authored
We're going to add another condition here, and with the current structure that becomes just too confusing.
-
Siddharth Agarwal authored
By popular demand, we introduce an option to disable the 'a/' and 'b/' prefixes in diff output. This makes copying and pasting filenames from diff output easier. This option will be implemented and documented in upcoming patches. To ensure that existing scripts that parse output don't break, we will ensure that this prefix is disabled in plain mode. A straight 'hg export | hg import' without HGPLAIN=1 will still be broken though, but there's little that can be done about that.
-
Siddharth Agarwal authored
-
- Nov 08, 2014
-
-
Pierre-Yves David authored
The file is registered to make sure the transaction is cleaned up in all cases.
-