Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 19 Aug 2014 10:01:06 -0700] rev 22222
obsmarker: add `date` as an explicit field
The markers are now 5-item tuples (concluded by the date). The obsstore.fields
contents have been updated accordingly.
There is no change to the on-disk format yet, so the date has to be extracted
every time we read binary markers and re-injected each team we write them. This
introduces a slowdown that will be solved when a new version of the format is
added. Such a slowdown was already introduced by the evolve extension anyway.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 12 Aug 2014 01:49:38 -0700] rev 22221
obsstore: add fields attribute to track each field in a marker
We are going to increase the amount of data explicitly stored in obsolescence
markers. This mean we are going to have a longer tuple and some values will be
shuffled around. So we add a ``fields`` attribute to the obsstore class to
keep track of what entry is what. This will be useful for extensions and for
documentation purpose.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 13 Aug 2014 23:42:36 -0700] rev 22220
debugobsolete: explicitly display date in the output
As the date is becoming a first-class citizen, we are displaying it in an
explicit field. As a bonus it is now readable by humans.
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 14 Aug 2014 12:59:48 -0700] rev 22219
obsolete: add a date argument to the `createmarkers` function
The function is now just passing the value to create markers.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 13 Aug 2014 23:25:07 -0700] rev 22218
debugobsolete: use the new date argument on obsstore.create
Now that we have this new argument, we can just use it.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 13 Aug 2014 22:44:47 -0700] rev 22217
obsstore: add an explicit `date` argument to obsstore.create
The date will become an official field in the markers (and ultimately
in the on-disk format). We start by making it an official argument for
the function.
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 14 Aug 2014 01:53:07 -0700] rev 22216
obsolete: explicitly pass metadata argument using keyword argument
We are about to add more arguments to this function (date, parents, etc).
Passing metadata as a keyword argument gives us more flexibility when adding
them.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 15 Aug 2014 09:41:30 -0700] rev 22215
obsmarker: add a `flags` method
We introduce a proper method to access the flag information.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 15 Aug 2014 14:19:15 -0700] rev 22214
test-treediscovery: update output after merge
Recent change in the push process introduced an extra listing of the phase
name space before the push (on default). Meanwhile on default, a fix introduced
a new test with debug output.
We update the test output to be correct.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 24 Jun 2014 16:59:40 +0100] rev 22213
revert: add an XXX about rename tracking
We check for rename information in the dirstate. This is probably not enough to
preserve this behavior when using an explicit target rev.
I just spotted this while working on this code, but this is outside the scope
of my series so I'm just adding a comment to highlight this suspicious
situation.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 24 Jun 2014 17:39:43 +0100] rev 22212
revert: inline a now useless closure
Now that a single call site remains, we can just inline its content.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 24 Jun 2014 17:37:24 +0100] rev 22211
revert: remove code killed by the double status
All those checks were here to catch cases where files were not modified in
dirstate but were different in the target revision. This is now properly handled
by calling status on the target node too.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 24 Jun 2014 17:36:49 +0100] rev 22210
revert: drop `missingmodified` set
There cannot be any elements in this set since:
dsmodified &= modified
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 24 Jun 2014 17:28:20 +0100] rev 22209
revert: detect files added during a merge
In case of merge, file that are actually added can be reported as modified. This
is currently handled by special-case code. We detect it beforehand instead. This
will lets use remove the special-case code at some point in the future.
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 02 Aug 2014 11:32:24 -0700] rev 22208
revert: simplify handling of `added` files
There are multiple possible cases for added files. But it's all handled by magic
much lower in the stack. We document them, simplify the codes and move on.
Matt Mackall <mpm@selenic.com> [Fri, 15 Aug 2014 11:48:05 -0500] rev 22207
merge with stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 15 Aug 2014 23:05:53 +0900] rev 22206
rebase: use "rebase.collapse" as "editform" for "--collapse" always
Before this patch, if both "--message" and "--collapse" are specified
for "hg rebase", "rebaes.normal" is used as "editform" unexpectedly.
Unlike patches before and after in this series for improvement, this
is bug fix patch.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 15 Aug 2014 23:05:53 +0900] rev 22205
ui: invoke editor for committing with HGEDITFORM environment variable
At the external editor invocation for committing, the value specified
as "editform" for "cmdutil.getcommiteditor" is in "HGEDITFORM".
This enables external editor to do own customization according to
commit types.
Mads Kiilerich <madski@unity3d.com> [Fri, 15 Aug 2014 04:37:46 +0200] rev 22204
cleanup: name unused variables using convention of leading _
This helps checker tools ... and readability for those who knows and follows
the convention.
Mads Kiilerich <madski@unity3d.com> [Fri, 15 Aug 2014 16:20:47 +0200] rev 22203
cleanup: rename check-translation.py checker function - don't hide global var
Mads Kiilerich <madski@unity3d.com> [Fri, 15 Aug 2014 04:37:45 +0200] rev 22202
cleanup: remove some unused / duplicate imports
Mads Kiilerich <madski@unity3d.com> [Fri, 15 Aug 2014 04:37:46 +0200] rev 22201
cleanup: fix some list comprehension redefinitions of existing vars
In all the remaining cases the comprehension variable is used for the same
thing as a previous loop variable.
This will mute some pyflakes "list comprehension redefines" warnings.
Mads Kiilerich <madski@unity3d.com> [Fri, 15 Aug 2014 16:20:47 +0200] rev 22200
cleanup: avoid local vars shadowing imports
This will mute some pyflakes "import ... shadowed by loop variable" warnings.
Mads Kiilerich <madski@unity3d.com> [Fri, 15 Aug 2014 16:20:47 +0200] rev 22199
cleanup: avoid _ for local unused tmp variables - that is reserved for i18n
_ is usually used for i18n markup but we also used it for I-don't-care
variables.
Instead, name don't-care variables in a slightly descriptive way but use the _
prefix to designate unused variable.
This will mute some pyflakes "import '_' ... shadowed by loop variable"
warnings.
Mads Kiilerich <madski@unity3d.com> [Fri, 15 Aug 2014 04:37:45 +0200] rev 22198
cleanup: make sure we always access members of imported modules
This will make sure we get import errors, even if demandimport is enabled.
This will also mute some pyflakes 'imported but unused' warnings.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 15 Aug 2014 20:28:51 +0900] rev 22197
largefiles: update lfdirstate for unchanged largefiles during linear merging
Before this patch, linear merging of modified largefiles causes
an unexpected result, if (1) largefile collides with same-name normal one
in the target revision and (2) "local" largefile is chosen, even
though branch merging between such revisions works correctly.
Expected result of such linear merging is marking the largefile as
(re-)"added", but the actual result is marking it as "modified".
The standin of modified "local largefile" is not changed by linear
merging, and updating/merging update lfdirstate entries only for
largefiles of which standins are changed.
This patch adds the code path to update lfdirstate only for largefiles
of which standins are not changed.
In this case, "synclfdirstate" should be invoked with True as
"normallookup" argument always to force using "normallookup" on
dirstate for "n" files, because "normal" may mark target files as
"clean" unexpectedly.
To reduce cost of "lfile not in filelist", this patch converts
"filelist" to a "set" object: "filelist" is used only in (1) the newly
added code path and (2) the next line of "filelist = set(filelist)".
This is a temporary way to fix with less changes. For fundamental
resolution of this kind of problems in the future, "lfdirstate" should
be updated with "dirstate" simultaneously during "merge.update"
execution: maybe by hooking "recordupdates" (+ total refactoring
around lfdirstate handling)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 15 Aug 2014 20:28:51 +0900] rev 22196
largefiles: keep largefiles from colliding with normal one during linear merge
Before this patch, linear merging of modified or newly added largefile
causes unexpected result, if (1) largefile collides with same name
normal one in the target revision and (2) "local" largefile is chosen,
even though branch merging between such revisions doesn't.
Expected result of such linear merging is:
(1) (not yet recorded) largefile is kept in the working directory
(2) largefile is marked as (re-)"added"
(3) colliding normal file is marked as "removed"
But actual result is:
(1) largefile in the working directory is unlinked
(2) largefile is marked as "normal" (so treated as "missing")
(3) the dirstate entry for colliding normal file is just dropped
(1) is very serious, because there is no way to restore temporarily
modified largefiles.
(3) prevents the next commit from adding the manifest with correct
"removal of (normal) file" information for newly created changeset.
The root cause of this problem is putting "lfile" into "actions['r']"
in linear-merging case. At liner merging, "actions['r']" causes:
- unlinking "target file" in the working directory, but "lfile" as
"target file" is also largefile itself in this case
- dropping the dirstate entry for target file
"actions['f']" (= "forget") does only the latter, and this is reason
why this patch doesn't choose putting "lfile" into it instead of
"actions['r']".
This patch newly introduces action "lfmr" (LargeFiles: Mark as
Removed) to mark colliding normal file as "removed" without unlinking
it.
This patch uses "hg debugdirstate" instead of "hg status" in test,
because:
- choosing "local largefile" hides "removed" status of "remote
normal file" in "hg status" output, and
- "hg status" for "large2" in this case has another problem fixed in
the subsequent patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 15 Aug 2014 20:28:51 +0900] rev 22195
largefiles: add test for large/normal conflict at linear merging
Before this patch, there is no explicit test for it: test-
issue3084.t
seems to test such conflict only at branch merging.
This patch uses "[debug] dirstate.delaywrite" feature for the tests
expecting "M" status of largefiles, to confirm certainly whether files
are marked unexpectedly as "clean".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 15 Aug 2014 20:28:51 +0900] rev 22194
largefiles: put whole "hgmerge" process into the same "wlock" scope
Before this patch, there are two distinct "wlock" scopes below in
"hgmerge":
1. "merge.update" via original "hg.merge" function
2. "updatelfiles" specific "wlock" scope (to synchronize largefile
dirstate)
But these should be executed in the same "wlock" scope for
consistency, because users of "hg.merge" don't get "wlock" explicitly
before invocation of it.
- merge in commands
This patch puts almost all of the original "hgmerge" implementation into
"_hgmerge" to reduce changes.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 15 Aug 2014 20:28:51 +0900] rev 22193
largefiles: put whole "hgupdaterepo" process into the same "wlock" scope
Before this patch, there are two distinct "wlock" scopes below in
"hgupdaterepo":
1. "merge.update" via original "hg.updaterepo" function
2. "updatelfiles" specific "wlock" scope (to synchronize largefile
dirstate)
In addition to them, "dirstate.walk" is executed between these "wlock"
scopes.
But these should be executed in the same "wlock" scope for
consistency, because many (indirect) users of "hg.updaterepo" don't
get "wlock" explicitly before invocation of it.
"hg.clean" is invoked without "wlock" from:
- mqrepo.restore in mq
- bisect in commands
- update in commands
"hg.update" is invoked without "wlock" from:
- clone in mq
- pullrebase in rebase
- postincoming in commands (used in "hg pull -u", "hg unbundle")
- update in commands
This patch puts almost all original "hgupdaterepo" implementation into
"_hgupdaterepo" to reduce changes.
Yuya Nishihara <yuya@tcha.org> [Fri, 15 Aug 2014 14:33:19 +0900] rev 22192
annotate: inline definition of decorate() functions
Yuya Nishihara <yuya@tcha.org> [Fri, 15 Aug 2014 14:29:30 +0900] rev 22191
annotate: rewrite long short-circuit statement by if-elif-else
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 24 Jun 2014 17:27:18 +0100] rev 22190
revert: use modified information from both statuses
Using status information against the target ensures we are catching all
files with modifications that need reverting.
We still need to distinguish fresh modifications for backup purpose.
test-largefile is affected because it reverted a file that needs no content
change.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 24 Jun 2014 16:57:16 +0100] rev 22189
revert: drop special case handling for file unknown in parent
We had a special case for file not caught by any categories. It was
aimed at files missing in wc and wc's parent but existing in the target
revision. This is now properly handled using status information.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 24 Jun 2014 16:53:22 +0100] rev 22188
revert: use "remove" information from both statuses
Using status information against the target to make sure we are catching all
files that need to be re-added.
We still need to distinguish fresh removal because they use a different
message.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 01 Aug 2014 18:27:47 -0700] rev 22187
revert: process removed files missing in target as clean
If a file does not exist in target and is marked as removed in the dirstate, we
can mark it as clean. There are no changes needed to revert it.
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 31 Jul 2014 15:52:56 -0700] rev 22186
revert: also track clean files
Tracking clean files is the simplest way to be able to reports files that need
no changes. So we explicitly retrieve them.
This fixes a couple of test outputs where the lack of changes was not reported.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 01 Aug 2014 18:57:53 -0700] rev 22185
revert: triage "deleted" files into more appropriate categories
Status can return file as "deleted". This is only a special case
related to working directory state: file is recorded as tracked but no
file exists on disk. This will never be a state obtainable from
manifest comparisons.
"Deleted" files have another working directory status shadowed by the lack of
file. They will -alway- be touched by revert. The "lack of file" can be seen as
a modification. The file will never match the same "content" as in the revert
target. From there we have two options:
1. The file exists in the target and can be seen as "modified".
2. The file does not exist in the target and can be seen as "added".
So now we just dispatch elements from delete into appropriate categories.
Matt Mackall <mpm@selenic.com> [Fri, 15 Aug 2014 10:54:15 -0500] rev 22184
unshelve: silence internal revert
This prepares for upcoming revert changes.
Matt Mackall <mpm@selenic.com> [Fri, 15 Aug 2014 10:47:03 -0500] rev 22183
tests: fixup issue markers to make check-commit happy
Mads Kiilerich <madski@unity3d.com> [Fri, 15 Aug 2014 03:24:40 +0200] rev 22182
incoming: don't request heads that already are common
Pull would send a getbundle command where common heads were sent both as common
and head, even though there is no reason to request a common head.
The request was thus twice as big as necessary and more likely to hit HTTP
header size limits.
Instead, don't request heads that already are common.
This is fixed in bundlerepo.getremotechanges . It could perhaps also have been
fixed in discovery.findcommonincoming but that would have a bigger impact.
Mads Kiilerich <madski@unity3d.com> [Fri, 15 Aug 2014 03:24:40 +0200] rev 22181
tests: improve test coverage for discovery and actual parameters for pulling
Mads Kiilerich <madski@unity3d.com> [Fri, 15 Aug 2014 02:46:44 +0200] rev 22180
changectx: ancestor should only prefer merge.preferancestor if it is a revision
The value '*' currently designates that bid merge should be used. The best
way to test bid merge is to set preferancestor=* in the configuration file ...
but then it would abort with unknown revision '*' when other code paths ended
up in changectx.ancestor .
Instead, just skip and ignore the value '*' when looking for a preferred
ancestor.
Mads Kiilerich <madski@unity3d.com> [Fri, 15 Aug 2014 02:39:01 +0200] rev 22179
merge: show the scary multiple ancestor hint for merges only, not for updates
Updates with uncommited changes will always only have one ancestor - the parent
revision. Updates between existing revision should (and will) always give the
same result no matter which ancestor is used. The warning is thus only relevant
when doing a "real" merge.
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 14 Aug 2014 16:26:41 -0700] rev 22178
discovery: prevent crash on unknown remote heads with old repo (
issue4337)
When a remote is not capable of the `branchmap` wireproto command, we denote
incoming heads with None. This leads to a crash in the code in charge of
displaying the list of unknown remote heads.
We now properly detect this case and display a shorter message in this case.
The reason for this `set([None])` value is now documented.
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 14 Aug 2014 14:59:42 -0700] rev 22177
obsstore.create: add a simple safeguard against cyclic markers
We detect when there is a cycle in the marker itself (precursors being listed
as successors).
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 14 Aug 2014 14:57:03 -0700] rev 22176
debugobsolete: catch ValueError that may be raised by obsstore.create
There are already a couple of errors that obsstore.create can raise and we are
going to introduce a cycle check too.
Matt Mackall <mpm@selenic.com> [Thu, 14 Aug 2014 16:39:27 -0500] rev 22175
check-code: extend try/except/finally check for multiple except clauses
Matt Mackall <mpm@selenic.com> [Thu, 14 Aug 2014 16:39:02 -0500] rev 22174
repoview: fix try/except/finally for py2.4
Matt Mackall <mpm@selenic.com> [Thu, 14 Aug 2014 16:25:47 -0500] rev 22173
merge with stable
Matt Mackall <mpm@selenic.com> [Thu, 14 Aug 2014 16:18:45 -0500] rev 22172
test-run-tests: fix up slash/backslash on diff chunks for Windows
Siddharth Agarwal <sid0@fb.com> [Wed, 13 Aug 2014 15:55:45 -0700] rev 22171
test-largefiles: add test for hg log --follow --patch with path
This was the one case for test-largefiles that was not broken.
Siddharth Agarwal <sid0@fb.com> [Wed, 13 Aug 2014 15:51:33 -0700] rev 22170
largefiles: don't override matchandpats for always matchers (
issue4334)
This makes hg log --follow --patch work, since in cmdutil._makelogrevset we
use the non-follow matcher for hg log --follow --patch with no file arguments.
Siddharth Agarwal <sid0@fb.com> [Wed, 13 Aug 2014 15:18:41 -0700] rev 22169
largefiles: in overridelog, use non-lf matcher for patch generation (
issue4334)
This has actually been broken since at least Mercurial 2.8 -- hg log --patch
with largefiles only used to work when no largefiles existed. Rev
5809d62e7106
exposed this bug for all cases.
Siddharth Agarwal <sid0@fb.com> [Wed, 13 Aug 2014 15:13:50 -0700] rev 22168
largefiles: drop setting lfstatus in overridelog (
issue4334)
lfstatus should only be True for operations where we want standins to be
printed out. We explicitly do not want that for historical operations like log.
Other historical operations like hg diff -r A -r B don't print out standins
either.
This is required to fix
issue4334, but doesn't fix anything by itself. That's
why there aren't any tests accompanying this patch.
Siddharth Agarwal <sid0@fb.com> [Wed, 13 Aug 2014 15:17:03 -0700] rev 22167
cmdutil: add a hook for making custom non-follow log file matchers
This will be used by largefiles (and basically only by largefiles) in an
upcoming patch.
Siddharth Agarwal <sid0@fb.com> [Wed, 13 Aug 2014 15:15:13 -0700] rev 22166
cmdutil: rename _makelogfilematcher to _makefollowlogfilematcher
We're going to add a _makenofollowlogfilematcher in an upcoming patch.
Matt Mackall <mpm@selenic.com> [Thu, 14 Aug 2014 15:21:48 -0500] rev 22165
merge with stable
Yuya Nishihara <yuya@tcha.org> [Wed, 13 Aug 2014 22:22:24 +0900] rev 22164
alias: exit from bad definition by Abort
Yuya Nishihara <yuya@tcha.org> [Wed, 13 Aug 2014 22:18:28 +0900] rev 22163
alias: show one-line hint for command provided by disabled extension
It will be a hint of Abort exception. "hg help <alias>" provides the detailed
version as before.