Siddharth Agarwal <sid0@fb.com> [Thu, 21 Aug 2014 15:58:32 -0700] rev 22263
clone: for local clones, copy branchcache from the right location (
issue4286)
The unfiltered branchcache is in .hg/cache/branch2, not
.hg/store/cache/branch2.
Augie Fackler <raf@durin42.com> [Wed, 20 Aug 2014 14:33:59 -0400] rev 22262
obsolete: avoid 2-argument form of enumerate, which was new in Python 2.6
Augie Fackler <raf@durin42.com> [Wed, 20 Aug 2014 13:21:41 -0400] rev 22261
repoview: use util.sha1() instead of hashlib.sha1()
45b5cd948a4d accidentally broke Python 2.4 compatibility, this fixes it.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 Aug 2014 17:17:23 -0700] rev 22260
debugobsolete: display parents information from markers
Now that we have a new field, we need a way to visualize it.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 Aug 2014 17:14:27 -0700] rev 22259
obsmarkers: add a `parentnodes` method to retrieve parent information
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 Aug 2014 16:28:44 -0700] rev 22258
obsstore: also store the 'parents' field on disk
We now store the `parents` field on disk. We use the same strategy as for
`date`: We stick it into the metadata. This is slow and dirty, but this is also
the only way we currently have.
At some point we'll have a new obsstore format to store this properly.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 Aug 2014 17:06:08 -0700] rev 22257
obsstore: drop 'date' from the metadata dictionary
We are extracting the `date` information from the metadata at read time.
However, we failed to remove it from the metadata returned in the markers. This
is now fixed.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 Aug 2014 16:17:16 -0700] rev 22256
createmarkers: automatically record the parent of pruned changesets
We need this information to build the set of relevant markers during
exchanges. This can only be done at the `createmarkers` level since
the `obsstore.create` function does not have a repo and therefore has
no access to the parent information.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 Aug 2014 16:12:29 -0700] rev 22255
obsstore: add a `parents` argument to obsstore.create
We need a way to pass the information to the function. Some guru told me that
what's arguments are made for.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 Aug 2014 16:08:44 -0700] rev 22254
obsstore: add a `parents` field
This field is intended to store the parent of the precursor. This is useful to
attach pruned changesets to a set of exchanged changesets. We currently just
add the fields with a None value. None stands for "no data recorded".
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 19 Aug 2014 14:42:08 -0700] rev 22253
obsstore: add some documentation about the marker fields
As the number of fields grow, it makes sense to start documenting their contents.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 16 Aug 2014 10:43:59 +0900] rev 22252
transplant: change "editform" to distinguish merge commits from others
"editform" argument for "getcommiteditor" is decided according to the
format below:
EXTENSION[.COMMAND][.ROUTE]
- EXTENSION: name of extension
- COMMAND: name of command, if there are two or more commands in EXTENSION
- ROUTE: name of route, if there are two or more routes in COMMAND
This patch newly adds "normal" and "merge" as ROUTE, to distinguish
merge commits from other.
This patch adds 4 test patterns to test combination of "merge"(x2) and
"--continue"(x2).
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 16 Aug 2014 10:43:59 +0900] rev 22251
rebase: change "editform" to distinguish merge commits from others
"editform" argument for "getcommiteditor" is decided according to the
format below:
EXTENSION[.COMMAND][.ROUTE]
- EXTENSION: name of extension
- COMMAND: name of command, if there are two or more commands in EXTENSION
- ROUTE: name of route, if there are two or more routes in COMMAND
This patch newly adds "merge" as ROUTE, to distinguish merge commits
from other.
This patch passes bool as "ctxorbool" to "mergeeditform", because
working context has always 2 parents at this point. Dropping the
second parent of non-merging commits is executed in "concludenode".
Unlike other patches in this series (e.g. for "hg commit"), this patch
doesn't add "normal.normal"/"normal.merge" style ROUTEs, because there
is no "merge" case in "collapse" ROUTE.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 16 Aug 2014 10:43:59 +0900] rev 22250
import: change "editform" to distinguish merge commits from others
"editform" argument for "getcommiteditor" is decided according to the
format below:
COMMAND[.ROUTE]
- COMMAND: name of command
- ROUTE: name of route, if there are two or more routes in COMMAND
This patch uses "normal.normal" and "normal.merge" as ROUTE of
"editform" instead of "normal", to distinguish merge commits from
other in "hg import" without "--bypass" case.
This patch assumes "editform" variations for "hg import" below:
import.normal.normal
import.normal.merge
import.bypass.normal
import.bypass.merge
Unlike other patches in this series, this patch uses "editor.sh"
instead of "checkeditform.sh" for the name of the script to check
"HGEDITFORM", because it has to do more than checking "HGEDITFORM".
To invoke editor forcibly in "test-import-merge.t", this patch creates
the patch not having patch description as "merge.nomsg.diff".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 16 Aug 2014 10:43:59 +0900] rev 22249
commit: change "editform" to distinguish merge commits from other (--amend)
"editform" argument for "getcommiteditor" is decided according to the
format below:
COMMAND[.ROUTE]
- COMMAND: name of command
- ROUTE: name of route, if there are two or more routes in COMMAND
This patch uses "amend.normal" and "amend.merge" as ROUTE of
"editform" instead of "amend", to distinguish merge commits from other
in "hg commit --amend" case.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 16 Aug 2014 10:43:59 +0900] rev 22248
commit: change "editform" to distinguish merge commits from others
"editform" argument for "getcommiteditor" is decided according to the
format below:
COMMAND[.ROUTE]
- COMMAND: name of command
- ROUTE: name of route, if there are two or more routes in COMMAND
This patch uses "normal.normal" and "normal.merge" as ROUTE of
"editform" instead of "normal", to distinguish merge commits from
others in "hg commit" without "--amend" case.
This patch assumes "editform" variations for "hg commit" below:
commit.normal.normal
commit.normal.merge
commit.amend.normal
commit.amend.merge
"mergeeditform" is factored out for subsequent patches. It takes
"ctxorbool" argument, because context object can't be passed in some
cases.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 16 Aug 2014 10:19:26 -0700] rev 22247
test-ssh: verify that stderr from remote is printed (
issue4336)
The issue fixed in the previous patch was uncovered by implementing an
extension that printed additional output locally before the push command
completed. This test emulates that.
If this change is applied before the previous patch, the test will fail
on Linux, with the local output being printed before the "remote: "
lines.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 16 Aug 2014 10:28:59 -0700] rev 22246
posix: implement readpipe using non-blocking I/O (
issue4336)
On Linux, fstat().st_size of a pipe always returns 0, even if the
pipe has data available for reading. This meant that reading from
and subsequently printing the stderr pipe content after wireproto
commands over SSH meant that available data wasn't being printed.
We now implement pipe reading on POSIX by doing a non-blocking
read for all available data.
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 15 Aug 2014 20:02:18 -0700] rev 22245
platform: implement readpipe()
Reading all available data from a pipe has a platform-dependent
implementation.
This patch establishes platform.readpipe() by copying the
inline implementation in sshpeer.readerr(). The implementations
for POSIX and Windows are currently identical. The POSIX
implementation will be changed in a subsequent patch.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 15 Aug 2014 19:18:21 -0700] rev 22244
exchange: remove duplicated addition to pushop.stepdone
Not sure how it got there but it is useless.
Augie Fackler <raf@durin42.com> [Mon, 18 Aug 2014 20:23:37 -0400] rev 22243
exchange: drop superfluous parens
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 15 Aug 2014 19:03:42 -0700] rev 22242
push: add bookmarks to the unified bundle2 push
We use the `pushkey` part to exchange bookmark updates within the unified
bundle2 push. Note that this only applies on update (moving a bookmark known on both
sides) since bookmark export (creation of a new bookmark on remote) is apparently
done outside of the _push function.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 15 Aug 2014 19:03:33 -0700] rev 22241
test-bundle2: add bookmark movement to the push test
If we add bookmarks to bundle2, we need a way to test the new code.
Tests are changed beforehand to highlight that inclusion of bookmarks in bundle
does not introduce any behavior changes.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 15 Aug 2014 18:40:57 -0700] rev 22240
push: use stepsdone to control bookmark push
If bookmark are to be integrated in the unified bundle2, we need a way to disable
the old-style push.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 15 Aug 2014 18:39:39 -0700] rev 22239
push: move bookmark discovery with other discovery steps
The discovery of necessary bookmark updates is now done within the "discovery
phase". This opens the door to the inclusion of bookmarks in a unified bundle2
push.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 15 Aug 2014 18:02:54 -0700] rev 22238
pushbookmark: split an ultra-long line into a saner version
We make a temporary variable for the remote bookmark data and we do not expand
all elements from `bookmark.compare` since we are going to use only one.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 25 Jun 2014 00:02:17 +0100] rev 22237
revert: drop dead code for untracked files
Untracked files are handled through status now.
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 25 Jun 2014 00:01:30 +0100] rev 22236
revert: handle unknown files through status
This will allow us to drop the code dedicated to this special case.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 24 Jun 2014 23:55:43 +0100] rev 22235
revert: drop more dead code
Now that we detect all clean files, we do not need this clause anymore.
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 02 Aug 2014 13:07:01 -0700] rev 22234
revert: add a message to noop action
This prepares for the arrival of a second "not touching file" action:
revert of an untracked file.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 01 Aug 2014 11:41:56 -0700] rev 22233
revert: simplify loop conditional
The two breaks can be joined into one. The code gains one level of indent.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 24 Jun 2014 18:04:13 +0100] rev 22232
revert: explode the action tuple in the for loop
noop is about to gain a message.
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 02 Aug 2014 12:45:34 -0700] rev 22231
revert: use actions[...] in all disptable cases
1. Special cases are not special enough
2. There are two cases where nothing is done and a message is displayed. This
prepares it.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 24 Jun 2014 17:54:33 +0100] rev 22230
revset: factorize backup decision
The conditional controlling the creation of backup is fairly big. We move config
related decisions outside of the loop.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 24 Jun 2014 17:44:31 +0100] rev 22229
revert: use a flat dispatch table
Now that the table is simpler, remove one level of depth from it. This
simplifies its usage in the for loop.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 15 Aug 2014 18:26:21 -0700] rev 22228
pushbookmark: do not attempt to update bookmarks if the push failed (BC)
Before this patch, there was always an attempt to update bookmark even if prior
steps of the push failed. I cannot see a good semantic reason to do so. We
disable this possibility to simplify the push flow with bundle2. Bookmarks will
be included in the bundle and fail with other steps.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 15 Aug 2014 17:58:15 -0700] rev 22227
pushbookmark: remove a <cond> and <val> or <other> construct
We make the conditional explicit for the sake of readability.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 15 Aug 2014 16:31:06 -0700] rev 22226
pushbookmark: stop unrolling ancestors
Now that ancestors has the same boolean property as a list, we can stop unrolling
the set of ancestors. This should provide a significant speedup to this step as
ancestor objects are smart and lazy.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 15 Aug 2014 15:57:50 -0700] rev 22225
ancestors: add a __nonzero__ method
This allows using the object in a conditional the same way we can use list.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 15 Aug 2014 15:25:12 -0700] rev 22224
push: update bookmarks within the remote lock
Updating bookmarks is part of the push. It should be done within the same lock
as the other steps of the push.
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 18 Aug 2014 12:12:57 -0700] rev 22223
hgweb: refresh repository using URL not path (
issue4323)
hgweb detects out-of-date repository instances (using a highly
suspect mechanism that should probably be fixed) and obtains a new
repository object if needed.
This patch changes the repository object copy to use the repo URL
(instead of path). This preserves more information about the source
repository and allows bundles to be served through hgweb.
A test verifying that bundles can now be served properly via
`hg serve` has been added.
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.