Martin Geisler <mg@aragost.com> [Mon, 30 Apr 2012 12:45:44 +0200] rev 16549
help/config: expand [subpaths] help
Brifly explain why rewriting subrepository paths can be necessary.
Explain that relative subrepository paths are made absolute before
rewrite rules are applied.
Martin Geisler <mg@aragost.com> [Mon, 30 Apr 2012 12:04:30 +0200] rev 16548
doc: update copyright years to 2012
I sometimes look at a piece of software and if the man page says
"Copyright 2004", then I'm inclined to think that the project is stale
or that the authors are lazy. Neither is good publicity for us :-)
Martin Geisler <mg@aragost.com> [Mon, 30 Apr 2012 11:51:24 +0200] rev 16547
help: consistently use title capitalization for help topics
Matt Mackall <mpm@selenic.com> [Sat, 28 Apr 2012 16:38:07 -0500] rev 16546
merge with i18n
Wagner Bruna <wbruna@yahoo.com> [Sat, 28 Apr 2012 14:15:43 -0300] rev 16545
i18n-pt_BR: synchronized with
e37199a1f9d4
Wagner Bruna <wbruna@yahoo.com> [Sat, 28 Apr 2012 13:22:52 -0300] rev 16544
merge with i18n
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sun, 29 Apr 2012 00:48:22 +0900] rev 16543
i18n-ja: synchronized with
4bce649a2b0f
Patrick Mezard <patrick@mezard.eu> [Sat, 28 Apr 2012 20:29:21 +0200] rev 16542
dirstate: preserve path components case on renames (
issue3402)
The original issue was something like:
$ hg init repo
$ cd repo
$ mkdir D
$ echo a > D/a
$ hg ci -Am adda
adding D/a
$ mv D temp
$ mv temp d
$ echo b > d/b
$ hg add d/b
adding D/b
$ hg ci -m addb
$ hg mv d/b d/c
moving D/b to d/c
$ hg st
A d/c
R D/b
Here we expected:
A D/c
R D/b
the logic being we try to preserve case of path components already known in the
dirstate. This is fixed by the current patch.
Note the following stories are not still not supported:
Changing directory case
$ hg mv D d
moving D/a to D/D/a
moving D/b to D/D/b
$ hg st
A D/D/a
A D/D/b
R D/a
R D/b
or:
$ hg mv D/* d
D/a: not overwriting - file exists
D/b: not overwriting - file exists
And if they were, there are probably similar issues with diffing/patching.
Mads Kiilerich <mads@kiilerich.com> [Sat, 28 Apr 2012 02:00:04 +0200] rev 16541
tests: quote dummyssh in a way that works on windows too
Don't depend on $environmentvariableexpansion and 'quote' handling in system()
Mads Kiilerich <mads@kiilerich.com> [Sat, 28 Apr 2012 01:55:39 +0200] rev 16540
tests: add missing accept of native pathname separator
Mads Kiilerich <mads@kiilerich.com> [Sat, 28 Apr 2012 01:22:56 +0200] rev 16539
tests: skip new tests with requirements not available on windows
Mads Kiilerich <mads@kiilerich.com> [Sat, 28 Apr 2012 01:22:47 +0200] rev 16538
tests: don't require 'hg' without extension on windows
Hackable uses hg.exe instead.
Mads Kiilerich <mads@kiilerich.com> [Sat, 28 Apr 2012 01:22:35 +0200] rev 16537
update .hgignore for hackable with Python 2.7
Patrick Mezard <patrick@mezard.eu> [Sat, 28 Apr 2012 15:01:57 +0200] rev 16536
commit: abort on merge with missing files
Here is a script illustrating the previous behaviour:
The merge brings a new file 'b' from remote
$ hg merge 1 --debug
searching for copies back to rev 1
unmatched files in other:
b
resolving manifests
overwrite: False, partial: False
ancestor:
07f494440405, local:
540395c44225+, remote:
102a90ea7b4a
b: remote created -> g
updating: b 1/1 files (100.00%)
getting b
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
Delete but do not remove b
$ rm b
$ hg st
! b
The commit succeeds
$ hg commit -m merge
$ hg parents --template "{rev} {desc|firstline} files: {files}\n"
3 merge files:
$ hg st
! b
b changes were ignored, but even b existence was ignored
$ hg manifest
a
This happens because localrepo.commitctx() checks the input ctx.files(), which
is empty for workingctx.files() only returns added, modified or removed
entries, and bypass files/manifest updates completely. So the committed
revision manifest is the same as its first parent one, not containing the 'b'
file.
This patch forces the commit to abort in presence of a merge and missing files.
test-merge4.t is modified accordingly as it was introduced to check hg was not
just terminating with a traceback (
5e9e8b8d2629).
Pierre-Yves David <pierre-yves.david@logilab.fr> [Tue, 24 Apr 2012 16:32:44 +0200] rev 16535
branchmap: server should not advertise secret changeset in branchmap (Issue3303)
Discovery now use an overlay above branchmap to prune invisible "secret"
changeset from branchmap.
To minimise impact on the code during the code freeze, this is achieve by
recomputing non-secret heads on the fly when any secret changeset exists. This
is a computation heavy approach similar to the one used for visible heads. But
few sever should contains secret changeset anyway. See comment in code for more
robust approach.
On local repo the wrapper is applied explicitly while the wire-protocol take
care of wrapping branchmap call in a transparent way. This could be unified by
the Peter Arrenbrecht and Sune Foldager proposal of a `peer` object.
An inappropriate `(+i heads)` may still appear when pushing new changes on a
repository with secret changeset. (see Issue3394 for details)
Matt Mackall <mpm@selenic.com> [Fri, 27 Apr 2012 13:18:09 -0500] rev 16534
merge: check for untracked files more precisely (
issue3400)
This fixes the regression, but still leaves the long-standing issue
that merge doesn't cope with trying to merge files and directories.
Matt Mackall <mpm@selenic.com> [Fri, 27 Apr 2012 13:07:29 -0500] rev 16533
revlog: backout
e5750c6716eb
This regresses performance of 'hg branches', presumably because it's
visiting the revlog in the wrong order. This suggests we either need
to fix the branch code or add some read-behind to mitigate the effect.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 26 Apr 2012 03:47:17 +0200] rev 16532
wireprotocol: use visibleheads as reference while unbundling (issue 3303)
The `repo` object here is *always* local. Using `repo.heads()` ensure we will
reject push if any secret changeset exists.
During discovery, `visibleheads` were sent to the peer. So we can only expect it
to send us `visibleheads` back. If any secret changeset exists::
visibleheads != repo.heads()
This fix server side part of issue 3303 when pushing over the wire.
Patrick Mezard <patrick@mezard.eu> [Wed, 25 Apr 2012 17:04:18 +0200] rev 16531
rebase: preserve mq series order, guarded patches (
issue2849)
The previous code was rebasing an applied series like:
patch1 +guarded
patch2
patch3 +guarded
patch4
patch5 +guarded
into:
patch2
patch4
patch1 +guarded
patch3 +guarded
patch5 +guarded
Reported by Lars Westerhoff <lars.westerhoff@newtec.eu>
Also rename mq.series_dirty into mq.seriesdirty, missed by
599a72895c0d, and
without effect since mq.qimport() was setting it already.
Patrick Mezard <patrick@mezard.eu> [Thu, 26 Apr 2012 12:13:20 +0200] rev 16530
subrepo/svn: improve error message on missing files
From:
abort: failed to commit svn changes
to:
abort: cannot commit missing svn entries
Patrick Mezard <patrick@mezard.eu> [Thu, 26 Apr 2012 11:55:07 +0200] rev 16529
subrepo/svn: abort on commit with missing file (
issue3029)
Previous code was printing a traceback because it expected some error output
from svn. But sometimes our definition of "changed" differs with the subversion
one. For instance, subversion ignores missing files when committing. And when
there are only missing files, svn commit will be a successful no-op with no
output. Still, we should stick to our definition including missing files in
changes as doing otherwise could cause surprising behaviour for the user.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 26 Apr 2012 21:32:48 +0900] rev 16528
doc: flatten description of 'matching()' predicate to be formatted well
current description of 'matching()' revset predicate can't be
formatted well on "hg help revset" output.
each descriptions for revset predicates (or something like them) are
split-ed into lines, and spaces on left side of them are stripped
before minirst processing. so, bullet list can't be nested.
this patch just flattens description of 'matching()' predicate to be
formatted well.
Patrick Mezard <patrick@mezard.eu> [Fri, 27 Apr 2012 11:02:16 +0200] rev 16527
subrepo: fix default implementation of forget() (
issue3404)
Patrick Mezard <patrick@mezard.eu> [Fri, 27 Apr 2012 10:17:55 +0200] rev 16526
test-subrepo-svn: fix non-determinism
The test was randomly failing with:
--- /tests/test-subrepo-svn.t
+++ /test-subrepo-svn.t.err
@@ -273,10 +273,10 @@
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd t/s
$ svn status
- ? * a (glob)
- X * externals (glob)
- ? * f1 (glob)
- ? * f2 (glob)
+ ? f1
+ ? f2
+ ? a
+ X externals
Performing status on external item at 'externals'* (glob)
Patrick Mezard <patrick@mezard.eu> [Fri, 27 Apr 2012 10:11:56 +0200] rev 16525
test-convert-svn-source: fix non-determinism
This test was failing randomly with:
--- /tests/test-convert-svn-source.t
+++ /tests/test-convert-svn-source.t.err
@@ -35,8 +35,8 @@
$ svnurl="file://$svnpath/svn-repo/proj%20B"
$ svn import -m "init projB" projB "$svnurl" | fixpath
+ Adding projB/tags
Adding projB/mytrunk
- Adding projB/tags
Committed revision 1.
Patrick Mezard <patrick@mezard.eu> [Thu, 26 Apr 2012 21:44:02 +0200] rev 16524
patch: be more tolerant with EOLs in binary diffs (
issue2870)
The only place where an trailing CR could be meaningful is in the "diff --git"
line as part of a filename, and existing code already rule out this
possibility. Extend the CR/LF filtering to the whole binary hunk.
Patrick Mezard <patrick@mezard.eu> [Thu, 26 Apr 2012 21:44:00 +0200] rev 16523
patch: include file name in binary patch error messages
$ hg import --no-commit ../mercurial_
1915035238540490516.patch
applying ../mercurial_
1915035238540490516.patch
abort: could not extract binary data
Becomes:
abort: could not extract "binary2" binary data
Patrick Mezard <patrick@mezard.eu> [Sat, 21 Apr 2012 19:58:18 +0200] rev 16522
patch: display a nice error for invalid base85 data
Before, import was terminating with a traceback. Now it says:
$ hg import --no-commit ../bad.patch
applying ../bad.patch
abort: could not decode binary patch: bad base85 character at position 66
Patrick Mezard <patrick@mezard.eu> [Thu, 26 Apr 2012 14:24:46 +0200] rev 16521
revset: fix adds/modifies/removes and patterns (
issue3403)
The fast path was triggered if the argument was not like "type:value", with
type a known pattern type. This is wrong for several reasons:
- path:value is valid for the fast path
- '*' is interpreted as a glob by default and is not valid for fast path
Fast path detection is now done after the pattern is parsed, and the normalized
path is extracted for direct comparison. All this seems a bit complicated, it
is tempting to drop the fast path completely. Also, the hasfile() revset does
something similar (only check .files()), without a fast path. If the fast path
is really that efficient maybe it should be used there too.
Note that:
$ log 'modifies("set:modified()")'
is different from:
$ log 'modifies("*")'
because of the usual merge ctx.files()/status(ctx.p1(), ctx) differences.
Reported by Steffen Eichenberg <steffen.eichenberg@msg-gillardon.de>
Matt Mackall <mpm@selenic.com> [Thu, 26 Apr 2012 13:18:47 -0500] rev 16520
merge with i18n
Wagner Bruna <wbruna@yahoo.com> [Tue, 24 Apr 2012 21:09:27 -0300] rev 16519
i18n-pt_BR: synchronized with
e3c7ca15cde2
Wagner Bruna <wbruna@yahoo.com> [Tue, 24 Apr 2012 20:54:56 -0300] rev 16518
merge with i18n
Wagner Bruna <wbruna@yahoo.com> [Tue, 24 Apr 2012 10:06:17 -0300] rev 16517
i18n-pt_BR: synchronized with
83622954b64d
Matt Harbison <matt_harbison@yahoo.com> [Sun, 22 Apr 2012 13:19:22 -0400] rev 16516
largefiles: notice dirty large files in a subrepo
Summary and commit use dirty() to check the status of a subrepository,
so this overrides dirty() in the subrepo in the same manner as
status() to check the large files instead of their standins.
Previously, if only a large file was changed in a subrepo, summary in
the top level repo would not report the subrepo was dirty and commit
-S would report nothing changed. If any type of file was changed in
the top repo and only a large file in the subrepo, commit -S would not
commit the changes to the subrepo.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 22 Apr 2012 03:47:34 -0400] rev 16515
largefiles: fix status -S reporting of subrepos (
issue3231)
Wrapping the status command will only invoke overridestatus() and set
the lfstatus field for the top level repository. Wrapping the status
function is required to set the field on child repositories.
Previously, status -S would report large files in a subrepo as '?'
regardless of their actual states, and was inconsistent with what
status would report from within that subrepo.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 26 Apr 2012 02:41:20 +0900] rev 16514
i18n: use locale insensitive format for datetimes as intermediate representation (
issue3398)
on some non "en" locale environments, "hg convert" is aborted, because
"util.parsedate()" fails.
it fails in "memctx.__init__()" called by "putcommit()" of "convert".
in "hg convert", datetimes gotten from source repository
are usually formatted by "util.datestr()" with default format "%a %b
%d %H:%M:%S %Y %1%2".
but on some environments, "%a" and "%b" may cause locale sensitive
string, and such string may cause parse error in "util.parsedate()".
this path uses "%Y-%m-%d %H:%M:%S %1%2" as intermediate representation
format for datetimes, because it consists only of locale insensitive
elements.
datetimes in above format are only used for passing them from
conversion logic to memctx object, so it doesn't have to be formatted
by locale sensitive one.
this patch just avoids locale sensitivity problem of "datestr()" and
"parsedate()" combintion.
Patrick Mezard <patrick@mezard.eu> [Tue, 24 Apr 2012 14:34:54 +0200] rev 16513
alias: fix shell alias documentation (
issue3374)
Described behaviour was the one before shell alias argument handling was
reworked by
f853873fc66d mid-2010.
Patrick Mezard <patrick@mezard.eu> [Tue, 24 Apr 2012 13:05:38 +0200] rev 16512
test-convert-svn-sink: add helper to smooth svn xml output
svnxml.py parses "svn log --xml" output and prints the attributes shared among
all tested svn versions. This fixes the test with svn 1.7.
Tested with svn 1.6.12 and 1.7.4.
Patrick Mezard <patrick@mezard.eu> [Tue, 24 Apr 2012 12:50:41 +0200] rev 16511
convert/svn: make svn sink work with svn 1.7
"svn add file" now fails if "file" is already tracked. To filter them we have
to mirror the svn manifest in the sink.
Tested with svn 1.6.12 and 1.7.4.
Mads Kiilerich <mads@kiilerich.com> [Wed, 25 Apr 2012 23:28:54 +0200] rev 16510
docs: don't use :hg: at the beginning of lines in notes (
issue3397)
It seem like docutils 0.8 interpret ':hg:`command`' roles at the beginning of
indented lines in '.. note::' directives as a field that is an invalid argument
to the directive. It fails with 'Error in "note" directive: invalid option
block.' Docutils 0.7 accepted this arguably incorrect markup.
Reflowing the text makes the problem go away. A leading '\ ' could perhaps also
be used to mask the problem.
Patrick Mezard <patrick@mezard.eu> [Sun, 22 Apr 2012 20:06:36 +0200] rev 16509
rebase: skip resolved but emptied revisions
When rebasing, if a conflict occurs and is resolved in a way the rebased
revision becomes empty, it is not skipped, unlike revisions being emptied
without conflicts.
The reason is:
- File 'x' is merged and resolved, merge.update() marks it as 'm' in the
dirstate.
- rebase.concludenode() calls localrepo.commit(), which calls
localrepo.status() which calls dirstate.status(). 'x' shows up as 'm' and is
unconditionnally added to the modified files list, instead of being checked
again.
- localrepo.commit() detects 'x' as changed an create a new revision where only
the manifest parents and linkrev differ.
Marking 'x' as modified without checking it makes sense for regular merges. But
in rebase case, the merge looks normal but the second parent is usually
discarded. When this happens, 'm' files in dirstate are a bit irrelevant and
should be considered 'n' possibly dirty instead. That is what the current patch
does.
Another approach, maybe more efficient, would be to pass another flag to
merge.update() saying the 'branchmerge' is a bit of a lie and recordupdate()
should call dirstate.normallookup() instead of merge().
It is also tempting to add this logic to dirstate.setparents(), moving from two
to one parent is what invalidates the 'm' markers. But this is a far bigger
change to make.
v2: succumb to the temptation and move the logic in dirstate.setparents(). mpm
suggested trying _filecommit() first but it is called by commitctx() which
knows nothing about the dirstate and comes too late into the game. A second
approach was to rewrite the 'm' state into 'n' on the fly in dirstate.status()
which failed for graft in the following case:
$ hg init repo
$ cd repo
$ echo a > a
$ hg ci -qAm0
$ echo a >> a
$ hg ci -m1
$ hg up 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg mv a b
$ echo c > b
$ hg ci -m2
created new head
$ hg graft 1 --tool internal:local
grafting revision 1
$ hg --config extensions.graphlog= glog --template '{rev} {desc|firstline}\n'
@ 3 1
|
o 2 2
|
| o 1 1
|/
o 0 0
$ hg log -r 3 --debug --patch --git --copies
changeset: 3:
19cd7d1417952af13161b94c32e901769104560c
tag: tip
phase: draft
parent: 2:
b5c505595c9e9a12d5dd457919c143e05fc16fb8
parent: -1:
0000000000000000000000000000000000000000
manifest: 3:
3d27ce8d02241aa59b60804805edf103c5c0cda4
user: test
date: Thu Jan 01 00:00:00 1970 +0000
extra: branch=default
extra: source=
a03df74c41413a75c0a42997fc36c2de97b26658
description:
1
Here, revision 3 is created because there is a copy record for 'b' in the
dirstate and thus 'b' is considered modified. But this information is discarded
at commit time since 'b' content is unchanged. I do not know if discarding this
information is correct or not, but at this time we cannot represent it anyway.
This patch therefore implements the last solution of moving the logic into
dirstate.setparents(). It does not sound crazy as 'm' files makes no sense with
only one parent. It also makes dirstate.merge() calls .lookupnormal() if there
is one parent, to preserve the invariant.
I am a bit concerned about introducing this kind of stateful behaviour to
existing code which historically treated setparents() as a basic setter without
side-effects. And doing that during the code freeze.
Patrick Mezard <patrick@mezard.eu> [Sun, 22 Apr 2012 18:27:50 +0200] rev 16508
test-rebase: exhibit revisions which should have been skipped
This will be fixed in the next commit.
v2:
- Display emptied grafted revisions
- Use --git flag
Patrick Mezard <patrick@mezard.eu> [Sun, 22 Apr 2012 16:40:38 +0200] rev 16507
transplant: do not rollback on patching error (
issue3379)
Otherwise, all transplanted revisions are gone and the failing one cannot be
fixed (unless it is the first one).
I do not know what is the expected behaviour with rollback, probably something
pull-like. Non-conflicting cases should work as previously. But something like:
$ hg transplant r1 r2
commiting r1 as c1
failing r2
$ hg transplant --continue
committing r2 as c2
$ hg rollback
would reset the repository to its state before the "transplant --continue"
instead of the whole transplant session. To fix this we might need a way to
open an existing journal file, not sure this is worth the pain.
Patrick Mezard <patrick@mezard.eu> [Sat, 21 Apr 2012 21:40:25 +0200] rev 16506
patch: fix patch hunk/metdata synchronization (
issue3384)
Git patches are parsed in two phases: 1) extract metadata, 2) parse actual
deltas and merge them with the previous metadata. We do this to avoid
dependency issues like "modify a; copy a to b", where "b" must be copied from
the unmodified "a".
Issue3384 is caused by flaky code I wrote to synchronize the patch metadata
with the emitted hunk:
if (gitpatches and
(gitpatches[-1][0] == afile or gitpatches[-1][1] == bfile)):
gp = gitpatches.pop()[2]
With a patch like:
diff --git a/a b/c
copy from a
copy to c
--- a/a
+++ b/c
@@ -1,1 +1,2 @@
a
+a
@@ -2,1 +2,2 @@
a
+a
diff --git a/a b/a
--- a/a
+++ b/a
@@ -1,1 +1,2 @@
a
+b
the first hunk of the first block is matched with the metadata for the block
"diff --git a/a b/c", then the second hunk of the first block is matched with
the metadata of the second block "diff --git a/a b/a", because of the "or" in
the code paste above. Turning the "or" into an "and" is not enough as we have
to deal with /dev/null cases for each file.
We I remove this broken piece of code:
# copy/rename + modify should modify target, not source
if gp.op in ('COPY', 'DELETE', 'RENAME', 'ADD') or gp.mode:
afile = bfile
because "afile = bfile" set "afile" to stuff like "b/file" instead of "a/file",
and because this only happens for git patches, which afile/bfile are ignored
anyway by applydiff().
v2:
- Avoid a traceback on git metadata desynchronization
Adrian Buehlmann <adrian@cadifra.com> [Sat, 21 Apr 2012 10:23:47 +0200] rev 16505
commit: use ui.configbool when checking 'commitsubrepos' setting on --amend
Before this fix, having
[ui]
commitsubrepos = False
in the config file lead to
$ hg ci --amend -mx
abort: cannot amend recursively
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 23 Apr 2012 00:38:22 +0900] rev 16504
doc: add note about pattern rooted/unrooted cases to "hgignore" and "patterns"
each help topics describe that patterns are "not rooted" and "rooted"
in themselves, but not describe about each other.
so, this may causes misunderstanding about "rooted"-ness of patterns.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 23 Apr 2012 00:33:09 +0900] rev 16503
doc: add description about location of management files for subrepo
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 23 Apr 2012 00:33:09 +0900] rev 16502
doc: add description about re-opening closed heads to 'Head, closed branch' in glossary
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 23 Apr 2012 00:33:09 +0900] rev 16501
doc: fix careless document miss for term 'Close changeset' in glossary
there is no term 'Changeset, close' in glossary.
'Close changeset' seems to have to be linked not to 'Branch, closed',
but to 'Head, closed branch', because only the latter explains about
"the changeset that marks a head as no longer interesting".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 23 Apr 2012 00:30:45 +0900] rev 16500
doc: fix careless document miss in help of hgext/notify
according to configuration example below, and direction of changeset
transference, this paragraph should describe about "changegroup" hook.
[hooks]
# one email for each incoming changeset
incoming.notify = python:hgext.notify.hook
# one email for all incoming changesets
changegroup.notify = python:hgext.notify.hook
# one email for all outgoing changesets
outgoing.notify = python:hgext.notify.hook
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 23 Apr 2012 00:29:04 +0900] rev 16499
doc: fix explanation comment in acl extension
according to configuration in "acl.deny" below, group "@hg-denied"
also be denied for all files, so add such description to comment for
configuration.
[acl.deny]
# user6 will not have write access to any file:
** = user6
# Group "hg-denied" will not have write access to any file:
** = @hg-denied
Mads Kiilerich <mads@kiilerich.com> [Mon, 23 Apr 2012 01:57:17 +0200] rev 16498
tests: test test-filelog is python - rename to test-filelog.py
Mads Kiilerich <mads@kiilerich.com> [Mon, 23 Apr 2012 01:56:48 +0200] rev 16497
tests: avoid tab indent on all kinds of lines of sh commands
Mads Kiilerich <mads@kiilerich.com> [Mon, 23 Apr 2012 01:56:48 +0200] rev 16496
tests: use 'do sleep 0' instead of 'do true', also on first line of command
f64b25f147d7 established that '... do true ...' shouldn't be used, but that was
only enforced on continued lines.
Mads Kiilerich <mads@kiilerich.com> [Mon, 23 Apr 2012 01:56:48 +0200] rev 16495
check-code: put grouping around regexps generated from testpats
This removes the pitfall that would make the testpath r'a|b' match 'b' on all
lines in .t tests.
Mads Kiilerich <mads@kiilerich.com> [Mon, 23 Apr 2012 01:56:48 +0200] rev 16494
tests: don't use /dev/urandom for largefiles testing
There is no need to use entropy here just to create some content that only will
be used for hashing and ignored.
This avoids a problem where dd from /dev/urandom on solaris generates too short
output.
Cesar Mena <cesarmena@gmail.com> [Sun, 22 Apr 2012 21:27:52 -0400] rev 16493
encoding: protect against non-ascii default encoding
If the default python encoding was changed from ascii, the attempt to
encode as ascii before lower() could throw a UnicodeEncodeError.
Catch UnicodeError instead to prevent an unhandled exception.
Patrick Mezard <patrick@mezard.eu> [Mon, 23 Apr 2012 14:32:59 +0200] rev 16492
update: fix case-collision with a clean wd and no --clean
cbf2ea2f5ca1 introduced some logic to avoid case-collision detection between
source and destination revisions when it does not make sense: clean or to be
cleaned working directories. Unfortunately, part of it was flawed and the
related test was broken by another bug.
This patch disables cross revision case collision detection for updates without
option or with --check, if the working directory is clean.
Patrick Mezard <patrick@mezard.eu> [Mon, 23 Apr 2012 12:12:04 +0200] rev 16491
update: make --check abort with dirty subrepos
Aka "we could use dirty() but... yeah let's use it"
Patrick Mezard <patrick@mezard.eu> [Mon, 23 Apr 2012 12:09:54 +0200] rev 16490
update: fix "not rev" vs "rev is None"
Steven Stallion <sstallion@gmail.com> [Sat, 21 Apr 2012 08:24:10 -0700] rev 16489
plan9: add missing source entries to proto
Brendan Cully <brendan@kublai.com> [Sun, 22 Apr 2012 20:30:36 -0700] rev 16488
Merge stable
Mads Kiilerich <mads@kiilerich.com> [Mon, 23 Apr 2012 01:39:26 +0200] rev 16487
tests: fix incorrect markup of continued lines of sh commands
Mads Kiilerich <mads@kiilerich.com> [Mon, 23 Apr 2012 01:39:26 +0200] rev 16486
check-code: 'printf \0' is apparently fine - accept it in check-code
Nobody complained over '\0' in test-eol.t.
The too strict check becomes a problem when this check is applied to more
lines.
Mads Kiilerich <mads@kiilerich.com> [Mon, 23 Apr 2012 01:39:26 +0200] rev 16485
tests: solaris sh can not negate exit status with '!'
Mads Kiilerich <mads@kiilerich.com> [Mon, 23 Apr 2012 01:39:26 +0200] rev 16484
tests: hide diff -u saying 'No differences encountered' on solaris
Mads Kiilerich <mads@kiilerich.com> [Mon, 23 Apr 2012 01:39:26 +0200] rev 16483
tests: ^ must be quoted when used on solaris sh
The check was broken when it was introduced in
6e4cf8319f54.
Mads Kiilerich <mads@kiilerich.com> [Mon, 23 Apr 2012 01:39:26 +0200] rev 16482
tests: remove test-pull-pull-corruption2.t
This test gave random failures on slow machines (solaris).
The test was added in
6f6e210b38cf as a test case from
issue148. It did however
require manual setup:
The attached script creates such a corruption (you have to add a "import time;
time.spleep(3)" in localrepo.addchangegroup before the changegroup manifest are
written for example.
The test as it is has thus no value as automatic test case.
The necessary sleep could be added by a hook, but test-pending.t already tests
that.
Mads Kiilerich <mads@kiilerich.com> [Mon, 23 Apr 2012 01:39:26 +0200] rev 16481
tests: remove race in test-pull-pull-corruption.t
The output from the background process was not always interleaved "correctly"
with output from the foreground process.
Mads Kiilerich <mads@kiilerich.com> [Mon, 23 Apr 2012 01:39:26 +0200] rev 16480
tests: fix bashism in test-convert-splicemap.t
This should have been caught by check-code.
Thomas Arendsen Hein <thomas@intevation.de> [Wed, 18 Apr 2012 15:16:15 +0200] rev 16479
opener: coding style, use triple quotes for doc string
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 16 Apr 2012 01:11:29 +0900] rev 16478
icasefs: make case-folding collision detection as rename aware (
issue3370)
if the file in target context causes case-folding collision against
one in working context, current implementation aborts merging with it,
even thouhg collding one (in target) is the file renamed from collided
one (in working).
this patch uses file copy information to know whether colliding file
is renamed from collided one or not: if so, collision between them is
ignored.
this patch also avoids collision detection between current context and
target context, if working context is clean (with --check/-c) or will
be clean (with --clean/-C).
Augie Fackler <raf@durin42.com> [Fri, 20 Apr 2012 11:08:14 -0500] rev 16477
bdiff.bdiff: release the GIL before doing expensive diff operations
This means that threaded webservers will have more of a chance of
doing something useful while the C extension is busy computing a
delta. Not doing this was causing problems for Google Code with a 25
meg text file that takes O(7 minutes) to deltify.
Kevin Bullock <kbullock@ringworld.org> [Fri, 20 Apr 2012 11:57:14 -0500] rev 16476
fetch: remove confusing reference to "authoritative" changes
Patrick Mezard <patrick@mezard.eu> [Fri, 20 Apr 2012 19:11:54 +0200] rev 16475
patch: be more tolerant with "Parent" header (
issue3356)
Here is how export and mq write the "Parent" header:
mq: # Parent XXXXX
export: # Parent XXXXX
then import expects exactly 2 spaces while mq tolerates one or more. So "hg
import --exact" truncates mq generated patches header by one character and
fails. This patch aligns import "Parent" header parsing on mq one. I do not
expect spaces in parent references anytime soon.
Reported by Stefan Ring <stefanrin@gmail.com>
Adrian Buehlmann <adrian@cadifra.com> [Thu, 19 Apr 2012 17:08:12 +0200] rev 16474
pure/osutil: use Python's msvcrt module (
issue3380)
As proposed by Christophe Gouiran <christophe.gouiran@eurocopter.com>
Idan Kamara <idankk86@gmail.com> [Thu, 19 Apr 2012 18:11:48 +0300] rev 16473
commands: add missing wlock to graft
Idan Kamara <idankk86@gmail.com> [Thu, 19 Apr 2012 18:11:42 +0300] rev 16472
dirstate: write branch file atomically
Idan Kamara <idankk86@gmail.com> [Thu, 19 Apr 2012 17:59:23 +0300] rev 16471
commands: add missing wlock to branch
Idan Kamara <idankk86@gmail.com> [Thu, 19 Apr 2012 17:59:23 +0300] rev 16470
commands: add missing wlock to backout
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 19 Apr 2012 20:54:56 +0900] rev 16469
i18n: show localized messages for commands/extensions in hgweb help top (
issue3383)
in hgweb help top page, help topics are localized, but abstracts of
commands and extensions are not, although these are already
translated.
it is because localized messages for them should be explicitly looked
up by original ones.
this patch looks localized messages up for each commands/extensions.
Angel Ezquerra <angel.ezquerra@gmail.com> [Thu, 19 Apr 2012 23:36:42 +0200] rev 16468
revert: show warning when reverting subrepos that do not support revert
The warning is similar to the warning that was shown before hgsubrepo revert
support was added, with the exception that now the subrepo type is shown.
For example, when trying to revert a git subrepo located in "include/mygitsub",
the warning message would be:
include/mygitsub: reverting git subrepos is unsupported
Bryan O'Sullivan <bryano@fb.com> [Wed, 18 Apr 2012 21:27:35 -0700] rev 16467
revset: fix O(n**2) behaviour of bisect() (
issue3381)
Patrick Mezard <patrick@mezard.eu> [Wed, 18 Apr 2012 14:04:58 +0200] rev 16466
convert/svn: do not try converting empty head revisions (
issue3347)
Subversion conversion works by picking trunk and branches heads, computing a
revision graph from them and converting the selected commits. By design we fail
to convert empty revisions so we have to be careful when discovering the
revision graph. In this particular issue, the source svn repository was a
partial mirror made by svnsync. The funny part is svnsync preserves all
revisions including empty ones. Also, we trusted ra.stat(path,
stop).created_rev to give us the latest revision with changes in path history
up to stop. This assumption broke at least when path is '', that is the
repository root, which always returned 'stop' revision despited being empty.
The workaround is to first trust ra.stat() but if the returned revision appear
empty, search the whole path history from stop to r1 until some changes are
found.
Patrick Mezard <patrick@mezard.eu> [Wed, 18 Apr 2012 14:04:58 +0200] rev 16465
convert/svn: refactor svn_source.latest() with a nested function
We will call it more than once for reasons detailed later.
Patrick Mezard <patrick@mezard.eu> [Wed, 18 Apr 2012 14:04:57 +0200] rev 16464
convert/svn: clarify svn_source.latest() stop arg default value
stop=0 could pass for a valid default value at first sight.
Steven Stallion <sstallion@gmail.com> [Tue, 17 Apr 2012 21:12:37 -0700] rev 16463
factotum: rename mount and path configuration entries
The factotum extension used mount and path entries which were too
generic. These have been replaced by mountpoint and executable
(respectively) to match existing conventions.
Matt Mackall <mpm@selenic.com> [Wed, 18 Apr 2012 11:46:23 -0500] rev 16462
Added signature for changeset
d9e2f09d5488
Matt Mackall <mpm@selenic.com> [Wed, 18 Apr 2012 11:46:20 -0500] rev 16461
Added tag 2.2-rc for changeset
d9e2f09d5488
Matt Mackall <mpm@selenic.com> [Wed, 18 Apr 2012 11:45:50 -0500] rev 16460
Makefile: be more careful when cleaning up pure/ components
The recent introduction of pure/__init__.py causes
mercurial/__init__.py to get clobbered by make clean.
Matt Mackall <mpm@selenic.com> [Tue, 17 Apr 2012 17:56:36 -0500] rev 16459
merge default into stable for 2.2 code freeze
Idan Kamara <idankk86@gmail.com> [Wed, 18 Apr 2012 01:20:16 +0300] rev 16458
commit: add option to amend the working dir parent
The --amend flag can be used to amend the parent of the working directory
with a new commit that contains the changes in the parent in addition to
those currently reported by "hg status", if there are any. The old commit
is stored in a backup bundle in ".hg/strip-backup"(see "hg help bundle"
and "hg help unbundle" on how to restore it).
Message, user and date are taken from the amended commit unless specified.
When a message isn't specified on the command line, the editor will open
with the message of the amended commit.
It is not possible to amend public changesets (see "hg help phases") or
changesets that have children.
Behind the scenes, first commit the update (if there is one) as a regular
child of the current parent. Then create a new commit on the parent's
parent with the updated contents. Then change the working copy parent
to this new combined changeset. Finally, strip the amended commit and
update commit created in the beginning.
An alternative (cleaner?) approach of doing this is suggested here:
http://selenic.com/pipermail/mercurial-devel/2012-March/038540.html
It is currently not possible to amend merge commits or recursively,
this can be added at a later time.
Steven Stallion <sstallion@gmail.com> [Mon, 16 Apr 2012 22:41:03 -0700] rev 16457
transplant: remove extraneous whitespace
Matt Mackall <mpm@selenic.com> [Tue, 17 Apr 2012 11:13:38 -0500] rev 16456
journal: use tryread helper to backup files (
issue3375)
Matt Mackall <mpm@selenic.com> [Tue, 17 Apr 2012 11:11:59 -0500] rev 16455
opener: introduce tryread helper
This makes it easier to follow the common pattern "read a file or give
an empty string if it's missing".
Angel Ezquerra <angel.ezquerra@gmail.com> [Tue, 17 Apr 2012 07:22:44 +0200] rev 16454
tests: add test for fileset 'subrepo' keyword
Patrick Mezard <patrick@mezard.eu> [Tue, 17 Apr 2012 10:33:47 +0200] rev 16453
revset: make matching() work on python 2.4
tuple.index() was apparently added to python 2.6:
http://bugs.python.org/
issue1696444
Also remove a trailing comma to make check-code.py happy.
Thomas Arendsen Hein <thomas@intevation.de> [Tue, 17 Apr 2012 15:10:33 +0200] rev 16452
revset: use list instead of tuple for compatibility with python before 2.6
'string elements'.split() instead of explicitly typing a list of strings is
used. This is done in other parts of Mercurial code, too.
Matt Mackall <mpm@selenic.com> [Mon, 16 Apr 2012 16:50:25 -0500] rev 16451
merge with stable
Patrick Mezard <patrick@mezard.eu> [Mon, 16 Apr 2012 11:48:15 +0200] rev 16450
archive: make it work with svn subrepos (
issue3308)
- _svncommand() in files() returns a tuple since
0ae98cd2a83f not a string.
- _svncommand() in filedata() returns a tuple not a string.
- "svn list" returns files but also directories.
- "svn list" is not recursive by default.
I have no idea what happens to svn:externals possibly embedded in the svn
subrepository.
Martin Geisler <mg@lazybytes.net> [Sun, 15 Apr 2012 16:05:57 +0200] rev 16449
largefiles: hide .hglf/ prefix for largefiles in hgweb
This makes the manifest view in hgweb match what you see in the
working copy and what you get when you download an archive in hgweb.
Martin Geisler <mg@lazybytes.net> [Sun, 15 Apr 2012 16:05:53 +0200] rev 16448
hgweb: add hook for remapping repository path into virtual paths
Extensions such as largefiles can use this to remap files so they
appear in the same location as they do in the user's working copy.
Angel Ezquerra <angel.ezquerra@gmail.com> [Sun, 15 Apr 2012 00:27:31 +0200] rev 16447
tests: add tests for matching keyword
This adds a couple of tests for the revset "matching" keyword:
1. Test that the 2nd parameter is optional
2. Test that all the 1st argument can be a revset and that all the supported
fields of the 2nd argument work.
Angel Ezquerra <angel.ezquerra@gmail.com> [Sat, 14 Apr 2012 01:41:03 +0200] rev 16446
revset: speedup matching() by first matching fields that take less time to
match
This patch sorts the fields that are passed to the matching function so that it
always starts by matching those fields that take less time to match.
Not all fields take the same amount of time to match. I've done several
measurements running the following command:
hg --time log -r "matching(1, field)"
on the mercurial repository, and where 'field' was each one of the fields
accepted by match. In order to avoid the print overhead (which could be
different for different fields, given the different number of matches) I used a
modified version of the matching() function which always returns no matches.
These tests showed that different fields take wildly different amounts of time
to match. Particulary the substate field takes up to 25 seconds to match on my
machine, compared to the 0.3 seconds that takes to match the phase field or the
2 seconds (approx) that takes to match most fields. With this patch, matching
both the phase and the substate of a revision takes the same amount of time as
matching the phase.
The field match order introduced by this patch is as follows:
phase, parents, user, date, branch, summary, files, description, substate
An extra nice thing about this patch is that it makes the match time stable.
Angel Ezquerra <angel.ezquerra@gmail.com> [Fri, 13 Apr 2012 13:46:49 +0200] rev 16445
revset: speedup matching() by stopping the match early if a field does not match
Rather than getting all the fields that are being matches from every revision
and then comparing them to those of the target revision, compare each field one
by one and stop the match as soon as there is a match failure.
This can greatly reduce the match time when matching multiple fields.
The impact on match time when matching a single field seems negligible
(according to my measurements).
Angel Ezquerra <angel.ezquerra@gmail.com> [Fri, 13 Apr 2012 13:35:45 +0200] rev 16444
revset: make matching keyword not match summary when matching for description
Angel Ezquerra <angel.ezquerra@gmail.com> [Thu, 22 Mar 2012 21:12:15 +0100] rev 16443
fileset: add "subrepo" fileset symbol
This new fileset symbol returns a list of subrepos whose paths match a given
pattern. If the argument has no pattern type set, an exact
match is performed.
If no argument is passed, return a list of all subrepos.
Steven Stallion <sstallion@gmail.com> [Sun, 15 Apr 2012 23:47:46 -0700] rev 16442
plan9: finalize documentation for next release
Alain Leufroy <alain.leufroy@logilab.fr> [Mon, 16 Apr 2012 10:56:37 +0200] rev 16441
localrepo: do not complain about missing journal files
Alain Leufroy <alain.leufroy@logilab.fr> [Mon, 16 Apr 2012 10:33:18 +0200] rev 16440
repair: fix missing import
introduced by:
b5c0c7d0f83fe56240ce7a919581f1cbff4f5ee5
Na'Tosha Bard <natosha@unity3d.com> [Mon, 16 Apr 2012 17:03:39 +0200] rev 16439
largefiles: fix cat for largefiles (
issue3352)
This is a fix to largefiles so that 'hg cat' will work correctly when a
largefile is specified.
As per discussion on Issue 3352:
1) The file will be printed regardless if it is binary or large.
2) The file is downloaded if it is not readily available (not found in
the system cache), so that it can be printed. If the download fails,
then we abort.
Steven Stallion <sstallion@gmail.com> [Mon, 16 Apr 2012 08:50:40 -0700] rev 16438
pure: quiesce build warnings
The following patch fixes the following warning when building pure:
package init file 'mercurial/pure/__init__.py' not found (or not a regular file)
Matt Mackall <mpm@selenic.com> [Mon, 16 Apr 2012 11:26:00 -0500] rev 16437
util.h: replace ntohl/htonl with get/putbe32
Wolfgang Treutterer <Wolfgang.Treutterer@ipp.mpg.de> [Fri, 13 Apr 2012 10:08:08 +0200] rev 16436
scmutil: fix systemrcpath regression introduced in
f5dd179bfa4a
Changeset
f5dd179bfa4a introduced a 'root' path component to look for
hgrc files, which is used both as an absolute path and a path relative
to the <install-root>.
The latter one was broken since 'root' was set to an absolute location
and the subsequent os.path.join discarded the <install-root> path prefix.
Patrick Mezard <patrick@mezard.eu> [Fri, 13 Apr 2012 10:14:59 +0200] rev 16435
revlog: fix partial revision() docstring (from
d7d64b89a65c)
Patrick Mezard <patrick@mezard.eu> [Sat, 14 Apr 2012 11:27:11 +0200] rev 16434
graphlog: fix --follow FILE and relative paths
The situation is complicated because filelog() revset uses a match object in
relpath mode while follow() revset interprets the filename as a manifest entry.
Patrick Mezard <patrick@mezard.eu> [Sat, 14 Apr 2012 11:16:57 +0200] rev 16433
graphlog: reduce duplication in --follow code
Patrick Mezard <patrick@mezard.eu> [Sat, 14 Apr 2012 10:44:13 +0200] rev 16432
graphlog: add all log options to glog command
glog and log -G should be equivalent.
Patrick Mezard <patrick@mezard.eu> [Sat, 14 Apr 2012 10:30:38 +0200] rev 16431
graphlog: implement --hidden
Angel Ezquerra <angel.ezquerra@gmail.com> [Wed, 28 Mar 2012 11:42:17 +0200] rev 16430
revert: add support for reverting subrepos without --no-backup and/or --all
When a subrepo is reverted but --no-backup is not set, call revert on the
subrepo that is being reverted prior to updating it to the revision specified
in the parent repo's .hgsubstate file.
The --all flag is passed down to the subrepo when it is being reverted. If the
--all flag is not set, all files that are modified on the subrepo will be
reverted.