Commit Graph

11245 Commits

Author SHA1 Message Date
Sune Foldager
a81e6a76a5 prepush: rewrite most of the code from scratch
For servers with branchmap support, the algorithm now works as follows:

1. A list of branches in outgoing changesets is created.
2. Using the remote branchmap, a check for new branches is performed.
3. A map (from branch to head list) of locally known remote heads before
   the push is created, and one which, after step 4, will contain the locally
   known remote heads after the push.
4. The post-push head map is updated with the outgoing changesets, using the
   branch cache update mechanism.
5. A check for new heads is performed, by comparing the length of the head list
   before and after push, for each branch. If there are new heads, an error
   depending on whether or not there are incoming changes on the branch,
   is returned.
6. If the push is allowed, a warning is written if there are incoming changes
   on any branches involved in the push.

For old servers, an algorithm similar to step 4-6 above is used to check for
new topological heads only.

Two bugs are also fixed:
1. Sometimes you would be allowed to push new branch heads without --force.
   A test for this case was added.
2. You would get the "note: unsynced remote changes!" warning if there were any
   incoming changesets, even if they were on unrelated branches.
2010-04-15 21:59:21 +02:00
Benoit Boissinot
d2fd3d1bf8 run-tests.py: can't remove from os.environ on solaris 2010-04-15 20:25:07 +02:00
Benoit Boissinot
73bdc48646 workingctx: correctly compute the flag for noexec filesystems+merge
This bug happens if the filesystem doesn't support exec-bit, during merges,
for example in 0b01431fee25 on the hg repo.
If f is not in p1, but is in p2 and has the x-bit in p2, since the dirstate is
based on p1, and the FS doesn't support the exec-bit, the dirstate can't
"guess" the right bit.
We instead fix it in workingcontext.flags()/manifest.
2010-04-15 18:08:48 +02:00
Benoit Boissinot
36f866b9f2 simplify test-issue2137, make it more portable 2010-04-15 15:21:41 +02:00
Benoit Boissinot
042c3ae681 add documentation for revlog._prereadsize 2010-04-15 15:21:21 +02:00
Greg Ward
81511c58c5 revlog: fix lazyparser.__iter__() to return all revisions (issue2137)
Previously, it only returned revisions that were in the revlog when it
was originally opened; revisions added since then were invisible.
This broke revlog._partialmatch() and therefore repo.lookup().

(Credit to Benoit Boissinot for simplifying my original test script
and for the actual fix.)
2010-04-14 15:06:40 -04:00
Greg Ward
fac8084184 revlog: factor out _maxinline global.
This lets us change the threshold at which a *.d file will be split
out, which should make it much easier to construct test cases that
probe revlogs with a separate data file.
(issue2137)
2010-04-13 17:58:38 -04:00
Peter Arrenbrecht
da567ef452 prepush: add more test cases 2010-04-14 19:35:54 +02:00
Sune Foldager
62eb1177d6 prepush: fix bug in warning message selection
In certain situations you would be told "you should pull and merge" even when
there is nothing to pull.
2010-04-14 19:11:35 +02:00
Ry4an Brase
24ead01860 Fix --blacklist when --jobs > 1 in run_tests.py.
The options parsing logic replaces the options.blacklist initial value,
a list of filenames, with a dict of test names to filenames.  When
runchildren rebuilds the command line to launch child processes the dict
is flattened and provided as a malformed argument when a filename is
expected.

Fix is to remove the blacklist option from child invocations since the
filtering is handled in the parent anyway.
2010-04-14 00:24:47 -05:00
Benoit Boissinot
4ae674da0c run-tests.py: reset env variables set by hooks 2010-04-14 09:08:47 +02:00
Benoit Boissinot
1bad57968f checklink: use an explicit prefix for the temporary file 2010-04-14 08:48:26 +02:00
Benoit Boissinot
293ba231eb checkexec: use an explicit prefix for the temporary file 2010-04-13 21:54:59 +02:00
Patrick Mezard
4070a4e9d2 convert/subversion: fix default URL checker prototype 2010-04-12 21:19:53 +02:00
Peter Arrenbrecht
7abe6f6609 patch: don't look for headers in diff lines
If you have a diff line that matches a header line, the patch splitter
currently breaks your patch at this line. For example a line like:

  +key: value

This can lead to "malformed patch" exceptions. Now fixed.
2010-04-09 20:34:05 +02:00
Thomas Arendsen Hein
28d0873b31 test-hgwebdir: correctly include '-' in sed expression.
'\' can't be used to escape '-' from being interpreted as a range,
so put it at the end.
2010-04-09 15:14:43 +02:00
Sune Foldager
b66624019c partial backout of 5a81f112887e and add tests (issue2131)
The tests are due to Peter Arrenbrecht
2010-04-08 19:46:47 +02:00
Henrik Stuart
0efc07dca7 copies: properly visit file context ancestors on working file contexts 2010-04-07 21:31:47 +02:00
Yuya Nishihara
b7e5bbb3f3 remoteui: copy http_proxy settings
http_proxy settings of current repo's .hg/hgrc should be available
on remoteui, so that the httprepo can use them when pulling via http.
2010-04-08 00:13:33 +09:00
Henrik Stuart
c77aceb840 mq: use util.unlink instead of os.unlink and os.removedirs
If, on Windows, your repository and working copy are in a reparse point and you
use os.removedirs, you will remove non-empty reparse points, disabling the
reparse point. See @6b1369445b7b.
2010-04-07 16:55:01 +02:00
Simon Heimberg
4b52c68f90 dispatch: ignore if signals can not be set
This happens if the code is executed in a thread.
This patch allows tortoisehg to start the inotify server again.
2010-04-07 02:41:22 +02:00
Benoit Boissinot
0a44721801 merge stable with stable 2010-04-06 15:39:44 +02:00
Benoit Boissinot
498261f658 dirstate: no need to iterate twice, a dict can be updated in place 2010-04-06 11:49:42 +02:00
Matt Mackall
8516a8fc46 Merge with i18n 2010-04-05 17:48:00 -05:00
Benoit Boissinot
679db973ed clone: no race possible, we can use changegroup() and have smaller urls
Related to issue2126
2010-04-06 00:45:53 +02:00
Ronny Pfannschmidt
b13f9030c7 add a test for the inprocess status dirstate race 2010-04-05 20:10:46 +02:00
Benoit Boissinot
c3e1bfcf81 dirstate: fix in memory dirstate entries for 1-second race
Only the on-disk file was modified, we need to modify the in-memory dirstate
as well.
2010-04-05 18:13:20 +02:00
Martin Geisler
285d3f5d10 i18n-da: small updates 2010-04-05 01:10:09 +02:00
Martin Geisler
b0ebe17f13 i18n-da: synchronized with c1f09a6215ad 2010-04-05 00:14:24 +02:00
Matt Mackall
d01a64cf5b Added signature for changeset 4ac7199cdd90 2010-04-01 17:49:38 -05:00
Wagner Bruna
af918ca65f i18n-pt_BR: update qnew help text 2010-04-01 19:32:36 -03:00
Matt Mackall
d287a71ee7 Merge with i18n 2010-04-01 17:40:47 -05:00
Wagner Bruna
0d7a0676a9 mq: remove reference for deprecated -f option
-f is the default behaviour since a4e731b2164f
2010-04-01 19:32:08 -03:00
Mark Determann
7b2e3d8cf6 hgweb: fix attribute error in error response (issue2060) 2010-04-01 22:04:30 +01:00
Wagner Bruna
6ec12d4fb0 i18n-pt_BR: synchronized with 7e9fc3a0bf4a 2010-04-01 11:33:03 -03:00
Wagner Bruna
3a60c81239 i18n-pt_BR: synchronized with ba36046c1a0e 2010-03-31 12:14:38 -03:00
Mads Kiilerich
6f24bc8f03 check-code.py: Check for bare ^
Solaris sh interprets ^ as some kind of piping symbol.
2010-03-31 11:07:46 +02:00
Elifarley Callado Coelho Cruz
43acaba36c Added support for 'everybody ' (using an asterisk) in user list. 2010-03-29 09:15:08 -03:00
Mads Kiilerich
378848d5c1 convert.cvs: Initialize state variable and abort on cvs error
Fix as proposed by Frank Kingswood.

Avoids
UnboundLocalError: local variable 'mode' referenced before assignment
when cvs fails.

This alsa partially fixes issue1592.
2010-03-30 02:42:21 +02:00
Martin Geisler
3e53380842 share: drop experimental label
As per mail from Matt:

  http://selenic.com/pipermail/mercurial/2010-March/030774.html
2010-04-01 00:02:12 +02:00
Michael Glassford
268693c3a0 Add missing --mq option to hg log.
Since norepo is a string, not a list, the norepo check was matching
command names against any substring in norepo. This fix splits norepo
into a list of commands.
2010-03-31 10:59:00 -04:00
Benoit Allard
5c44ed9439 url: expand path in auth filenames 2010-03-26 21:37:18 +01:00
Alexander Solovyov
3283fbd2f5 expand paths in aliases 2010-03-27 13:39:45 +02:00
Benoit Boissinot
a17cbb3e50 test-subrepo-svn: properly escape the url, make it work for svn 1.5 again 2010-03-31 12:07:13 +02:00
Augie Fackler
9105fced5e util.termwidth: check stderr first as it's least likely to be redirected 2010-03-15 14:53:34 -05:00
Augie Fackler
eeb8822ee1 progress: use stderr instead of stdout; check stderr.isatty()
This means that progress bars will continue to show on the terminal
when both stdin and stdout are redirected.
2010-03-29 16:44:24 -05:00
Matt Mackall
b145c808c3 Merge with i18n 2010-03-29 15:16:05 -05:00
Matt Mackall
7e45d04b9e Merge stable heads 2010-03-29 15:15:44 -05:00
Jens Bäckman
a0e0ebca00 i18n-sv: translated the 'patterns' command 2010-03-28 20:27:09 +02:00
Wagner Bruna
fd1b07dc4d merge with i18n stable 2010-03-26 21:32:49 -03:00