Commit Graph

4983 Commits

Author SHA1 Message Date
Kevin Bullock
d1f8c5d7da update: note updated bookmark
This brings update in line with pull: we notify the user when an action
indirectly updates a bookmark.
2012-01-27 13:12:56 -06:00
FUJIWARA Katsunori
96875b39e1 revset: add tests for 'remote()' predicate 2012-01-27 22:29:58 +09:00
Matt Mackall
5a379a202e sslutil: more helpful fingerprint mismatch message
This will aid debugging for users of sites that renew certs.
2012-01-26 11:23:15 -06:00
Matt Mackall
578253989c help: add phases topic 2012-01-26 11:23:14 -06:00
Matt Mackall
e4d11ad28c scmutil: unify some 'no changes found' messages
This keeps the wording more consistent for secret csets
2012-01-25 17:14:08 -06:00
Alain Leufroy
9a455ccd0e outgoing: display info about secret changets while no sharable changeset found 2012-01-25 19:41:34 +01:00
Alain Leufroy
b62e38b78d bundle: display info about secret changets while no sharable changeset found 2012-01-25 19:05:16 +01:00
Augie Fackler
68e234d364 test-rebase-collapse: Add test for rebase regression introduced in 5f0e8de75b35 2012-01-23 12:26:01 -06:00
Idan Kamara
3e9227d2bd test-commandserver: test that phase data is being refreshed 2012-01-26 00:21:55 +02:00
Na'Tosha Bard
979dbb4473 largefiles: fix revert on missing largefile (issue3217) 2012-01-25 16:52:16 +01:00
Na'Tosha Bard
e63a87cfd7 largefiles: fix transplant for all cases (issue3192) 2012-01-25 14:10:01 +01:00
Pierre-Yves David
7b8b0389cd push: prevent moving phases outside of the pushed subset 2012-01-20 21:21:13 +01:00
Pierre-Yves David
f813e53446 mq-safety: don't apply safety on non-outgoing changeset
When mq changeset are secret, they don't appear in outgoing and won't be
pushed. So it's not necessary to abort the push.

The checkpush call is protected by lock to prevent race on phase.
2012-01-20 18:45:29 +01:00
Pierre-Yves David
fa04c4b2de phases: properly register excluded changeset when revision are specified
There was no other drawback than a bad UI message for now.
2012-01-20 00:27:11 +01:00
Wagner Bruna
32e015e05a rebase: drop uppercase in abort message 2012-01-20 12:04:45 -02:00
Na'Tosha Bard
ccfa519703 largefiles: add --normal option to hg add (issue3061) 2011-12-02 18:20:32 +01:00
Mads Kiilerich
9bb6f6608a run-tests: expand user in --with-hg
This makes it possible to run:
  $ ./run-tests.py --with-hg=~/hg-bin/hg
2012-01-14 01:56:27 +01:00
Mads Kiilerich
41bb79518b tests: let run-tests.py default to use 'sh' in $PATH instead of '/bin/sh'
This makes it easier to run tests on systems that have a usable sh in the
search path but not in the standard location.
2012-01-20 01:24:16 +01:00
Mads Kiilerich
efadf4b249 tests: add 'set -x' to the .t sh scripts in run-tests.py debug mode
This makes -d output much more readable when debugging the test framework or
very strange test failures.
2012-01-14 01:55:50 +01:00
Matt Mackall
0e96c1d311 bookmarks: automatically advance bookmark on naked update (BC) (issue2894) 2012-01-19 14:07:48 -06:00
Matt Mackall
dbc9adfaa2 qimport: back out 1b64707da148
This patch presumed mq csets must always be secret, which isn't yet
established.
2012-01-19 11:35:06 -06:00
Pierre-Yves David
78c5d64e2e phases: only synchronize on common changeset when push fails
If push failed we should not expect the pushed changeset to exist on remote.
The common set before the push is used for phase related operation instead of
common + missing.

Note:
  * We still pull phase data even if push fails
  * We still try to push data even if push fails (same than bookmark)
2012-01-19 16:09:43 +01:00
Pierre-Yves David
a445988112 discovery: diet discovery.prepush from non-discovery code
The ``discovery.prepush`` function was doing multiple things not related to
discovery. This changeset move some code into the ``localrepo.push`` method. The
old ``discovery.prepush`` function jobs is now restricted to checking for
multple head creation. It was then renamed ``discovery.checkheads``.

This new ``discovery.checkheads`` function may receive several other changes in
the future but we are a bit too much near the freeze for a wider refactoring.
2012-01-19 15:50:55 +01:00
Patrick Mezard
7768e63bf5 largefiles: test and simplify empty directory removal in remove 2012-01-19 10:07:13 +01:00
Mads Kiilerich
dbffdfd960 tag: invalidate tag cache immediately after adding new tag (issue3210)
New tags were written to .hgtags / .hglocaltags without updating or
invalidating the localrepo cache.

Before 462e6cfb1bac a lock was acquired soon after the new tags had been
written, and that invalidated the cache so the new tags for example could be
seen in pretxncommit hooks. With 462e6cfb1bac the lock had already been
acquired at this point and the missing cache invalidation was exposed.

The tag caches will now explicitly and immediately be invalidated when new tags
are added.
2012-01-19 02:14:06 +01:00
Pierre-Yves David
c4a53864db mq: qimporting revision set them to secret 2012-01-17 02:26:00 +01:00
Pierre-Yves David
3025e16875 mq: have mq create secret changeset only 2012-01-18 16:53:49 +01:00
Alain Leufroy
eddef4ddbd graft: add test to check the phase of new changesets
Graft actually do not keep the phase of the source
changesets: no need to change the graft code and add
test to check this behaviour.
2012-01-17 11:08:23 +01:00
Alain Leufroy
fd923bd6e3 rebase: fix phases movement
Rebase now try to keep the phases of source changesets.
2012-01-17 09:12:14 +01:00
Na'Tosha Bard
1e5b58f8a8 largefiles: cache new largefiles for new heads when pulling
When the user pulls from a remote repository that is not his default repo, it
is quite likely that he will pull a new head.  This means that if he tries to
merge or rebase with the other head, he will run into a problem becuase
largefiles has no way of tracking where the remote repository for this other
head is, so it cannot download the largefiles from this other remote repository.
It will attempt to download them from its default remote repository, which will
not yet contain the largefiles.

This patch solves this problem by caching any new largefiles for all heads
directly into the system cache at the time of the pull, so they are available
later.

This behavior is actually more in line with Mercurial's distributed nature,
because pulling already implies we have a connection to the remote server, but
merging or rebasing does not.
2012-01-18 11:33:14 +01:00
David M. Carr
560a2fff89 forget: fix subrepo recursion for explicit path handling
When support for handling explicit paths in subrepos was added to the forget
command (155b89136ae7), subrepo recursion wasn't taken into account.  This
change fixes that by pulling the majority of the logic of commands.forget into
cmdutil.forget, which can then be called from both there and subrepo.forget.
2012-01-17 19:10:59 -05:00
David M. Carr
375e0ca3cf add: fix subrepo recursion for explicit path handling
When support for handling explicit paths in subrepos was added to the add
command (825c4cefde4b), subrepo recursion wasn't taken into account.  This
change adds an explicitonly argument to cmdutil.add to allow controlling which
levels of recursion should include only explicit paths versus all matched
paths.
2012-01-17 19:10:58 -05:00
David M. Carr
d83135c3ee tests: add subrepo recursion tests for add/forget with explicit paths
When support for handling add/forget of explicit paths within subrepos was
added (825c4cefde4b/155b89136ae7), nested subrepos weren't handled properly.
This change adds test coverage to expose the broken behavior, which will be
fixed in later patches.
2012-01-17 19:10:54 -05:00
Matt Mackall
35e56c3616 merge with stable 2012-01-18 15:07:15 -06:00
Pierre-Yves David
1b001a85f3 changeset_printer: display changeset phase on debug level
Backward compatibility make it hard to display it on higher level
2012-01-17 20:23:23 +01:00
Patrick Mezard
2c7c26d633 largefiles: remove empty directories upon update (issue3202) 2012-01-17 11:29:32 +01:00
Mads Kiilerich
5c283321a0 rebase: write series file without removed mq patches
Rebase will remove empty changesets and will also completely remove the mq
patch file for rebased empty patches.

Starting with f64ab644b39f (1.9) it would preserve guards by writing the old
series file back. That would however also reintroduce removed patch files in
the series file and the inconsistency would make qpop + qpush fail.

This patch backs out most of f64ab644b39f and makes sure guards are preserved
without reintroducing removed patches.
2012-01-17 02:55:55 +01:00
Sune Foldager
e577300102 phases: use nodemap to check for missing nodes 2012-01-18 16:46:15 +01:00
Christian Ebert
12742c63ce keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file
Analogous to fe250fe8487d.
2012-01-15 13:37:33 +01:00
Yuya Nishihara
0bf3f9f6fd filectx: fix cmp() of file starting with '\1\n'
If file data starts with '\1\n', it will be escaped in the revlog to
create an empty metadata block, thus adding four bytes to the size in
the revlog size index. There's no way to detect that this has happened
in filelog.size() faster than decompressing each revision [1].

For filectx.cmp(), we have the size of the file in the working directory
available. If it differs by exactly four bytes, it may be this case, so
do a full comparison.

 [1]: http://markmail.org/message/5akdbmmqx7vq2fsg
2012-01-12 00:49:45 +09:00
Steven Brown
51a1bd2f20 rebase: reinstate old-style rev spec support for the source and base (issue3181)
As of 1ffaca626da1 (first released as part of Mercurial 2.0), the rebase command
accepted ONLY revsets for the source and base arguments and no longer accepted
old-style revision specifications. As a result, some revision names were no
longer recognised, e.g.

hg rebase --base br-anch
abort: unknown revision 'br'!

These arguments are now interpreted first as old-style revision specifications,
then as revsets when no matching revision is found. This restores backwards
compatibility with releases prior to 2.0.
2012-01-08 23:09:35 +08:00
Na'Tosha Bard
d2bd6a2acb largefiles: fix output of hg summary (issue3060) 2012-01-08 12:35:47 +01:00
Na'Tosha Bard
0bd0abc6e9 largefiles: fix confusion upon removal of added largefile (issue3176)
This patch makes "hg remove" work the same way on largefiles as it does on
regular Mercurial files.  If you try to remove an added largefile, the removal
fails and you are instead prompted to use "hg forget" to undo the add.
2012-01-08 11:19:51 +01:00
Matt Mackall
a5d2446886 tests: patch up silly new year's bug 2012-01-03 17:09:26 -06:00
Matt Mackall
8ba239a418 grep: make multiline mode the default (BC)
This is a much more logical way to deal with ^ and $.
Old ^ and $ behavior are available with \A and \Z.
2012-01-03 15:48:58 -06:00
FUJIWARA Katsunori
1a00d3603f merge: check filename case collision between changesets for branch merging
this patch makes branch merging abort when merged changesets have same
file in different case on case insensitive filesystem.

this patch does not prevent linear update which merges between target
and working contexts, because 'branchmerge' is False in such case.
2011-12-16 21:21:27 +09:00
Martin Geisler
19be7012dc largefiles: handle merges between normal files and largefiles (issue3084)
The largefiles extension prevents users from adding a normal file
named 'foo' if there is already a largefile with the same name.
However, there was a loop-hole: when merging, it was possible to bring
in a normal file named 'foo' while also having a '.hglf/foo' file.

This patch fixes this by extending the manifest merge to deal with
these kinds of conflicts. If there is a normal file 'foo' in the
working copy, and the other parent brings in a '.hglf/foo' file, then
the user will be prompted to keep the normal file or the largefile.
Likewise for the symmetric case where a normal file is brought in via
the second parent. The prompt looks like this:

  $ hg merge
  foo has been turned into a largefile
  use (l)argefile or keep as (n)ormal file?

After the merge, either the '.hglf/foo' file or the 'foo' file will
have been deleted. This would cause status to return output like:

  $ hg status
  M foo
  R foo

To fix this, the lfiles_repo.status method is changed so that a
removed normal file isn't shown if there is largefile with the same
name, and vice versa for largefiles.
2011-12-09 17:35:00 +01:00
Martin Geisler
54d4706f56 test-subrepo: test for Issue3153 2011-12-15 16:18:10 +01:00
Martin Geisler
3a9a310829 largefiles: fix 'hg status' abort after merge
If a largefile is introduced on the branch that is merged into the
working copy, then 'hg status' would abort with an error like:

   $ hg status
   abort: .hglf/foo@33fdd332ec: not found in manifest!

The problem was that the largefiles status code only looked in the
first parent for the largefile. Largefiles are now always reported as
modified if they don't exist in the first parent -- this matches the
behavior of localrepo.status for normal files.
2011-12-09 17:34:58 +01:00
Mads Kiilerich
80b4f15548 hg-ssh: use shlex for shell-like parsing of SSH_ORIGINAL_COMMAND
The Mercurial ssh protocol is defined as if it was ssh-ing to a shell account on
an ordinary ssh server, and where hg was available in $PATH and it executed
the command "hg -R REPOPATH serve --stdio".

The Mercurial ssh client can in most cases just pass REPOPATH to the shell, but
if it contains unsafe characters the client will have to quote it so the shell
will pass the right -R value to hg. Correct quoting of repopaths was introduced
in 7bec00a7d7a6 and tweaked in c3194121de6c.

hg-ssh doesn't create the command via a shell and used a simple parser instead.
It worked fine for simple paths without any quoting, but if any kind of quoting
was used it failed to parse the command like the shell would do it.

This makes hg-ssh behave more like a normal shell with hg in the path would do.
2011-12-08 16:28:18 +01:00