Commit Graph

2413 Commits

Author SHA1 Message Date
Matt Mackall
fcb44e87db commit: move explicit file checking into repo.commit 2009-06-01 21:51:00 -05:00
Matt Mackall
e12da484f7 mq: drop unneeded files args for commit 2009-06-01 13:51:21 -05:00
Dirkjan Ochtman
5912c48b40 tests: delete parallel coverage files after combining 2009-06-03 14:10:36 +02:00
John Mulligan
3f2923090d heads: show closed heads only when --closed is passed
Add a --closed (-c) option to 'hg heads' to show all heads and change the
default behavior to refrain from showing fully closed branches.

Enhance 'hg heads <branch>' so that:

* default: displays normal & inactive heads, not closed heads
* --closed: displays normal, inactive & closed heads
* --active: displays only normal heads
* both --closed and --active: displays normal & closed heads only
2009-06-03 13:59:38 +02:00
John Mulligan
e094244749 localrepo: set heads and branchheads to be closed=False by default
The heads(...) and branchheads(...) functions will now only return closed
heads when explicitly asked for them. This will cause 'hg merge' to have
better behavior in the presence of a branch that has closed heads when no
explicit rev is passed.
2009-06-03 13:42:55 +02:00
Patrick Mezard
a848b6f227 convert: rewrite tags when converting from hg to hg 2009-06-01 17:12:42 +02:00
Patrick Mezard
06e4a5967d convert: default revisions order depends on source
When converting Mercurial repositories you expect the revision numbers to be
preserved, while other sources conversions focus on efficiency.
2009-06-01 17:12:41 +02:00
Patrick Mezard
e8585b2da9 convert: fail fast if source does not support --sourcesort 2009-06-01 17:12:39 +02:00
Patrick Mezard
7c73a84f65 convert: add --sourcesort option for source specific sort
Only supported by Mercurial source for now.
2009-06-01 17:12:39 +02:00
Greg Ward
e8d6180038 run-tests: don't replace PYTHONPATH, just augment it.
(Needed at least for Subversion bindings on OS X, which are in
/opt/subversion.  Useful for other external libraries installed in
non-standard places too.)
2009-06-01 09:18:35 -04:00
Matt Mackall
e81e064b9c add: use match.bad callback more effectively 2009-05-31 17:54:18 -05:00
Greg Ward
3dc47b69c7 run-tests: redefine --with-hg so it takes the 'hg' script to run.
- in parseargs(), check that --with-hg value is valid
- add handy --local option for "--with-hg=../hg"
- ensure that we always set PATH and PYTHONPATH (not just
  when doing a temporary install)
- override any existing PYTHONPATH, so test success does not
  depend on whatever happens to be in the caller's environment
- give tests a little more control by exporting $PYTHON to the
  environment; needed by test-convert and test-mergetool when
  they run hg with a stripped-down $PATH

Also, add a big comment explaining all the corner cases to test for the
next person who tries to modify this script.
2009-05-31 15:20:31 -04:00
Greg Ward
2cb745bb8b run-tests: fix _checkhglib() so it's correct when using --with-hg.
Since this makes the warning less likely, upgrade it to a "real"
warning to stderr.
2009-05-29 22:18:16 -04:00
Greg Ward
47093c6314 run-tests: factor out _checkhglib() to check import path of 'mercurial'.
- rename _hgpath() to _gethgpath() and move it down next to _checkhglib()
- change _gethgpath() so it caches its result: replaces global 'hgpkg'
  that anyone can use with global '_hgpath' that is only for _gethgpath()
- no need to pass 'expecthg' to runchildren() or runtests() anymore

Also: do not change global PYTHON when doing coverage; this seems to
be unnecessary, since we create a dummy 'hg' script that handles
coverage for us, and it made things brittle.  (E.g. the rest of this
patch makes the call to _hgpath() come later, and it was broken by
enabling coverage.)
2009-05-29 22:18:15 -04:00
Greg Ward
3c6e4e3061 run-tests: show PID if running in parallel mode with -v.
(Extremely handy when you break parallel operation and need to figure
out what's going on.  The assumption is that if you run with -v, you
want more details.)
2009-05-29 22:17:53 -04:00
Martin Geisler
5a71040932 commands: typo in bundle abort message
This error trigger if one calls bundle with the wrong parameters and
it is thus not an error scripts will want to look for (they could and
should ensure that they call bundle with the correct parameters).
2009-05-31 18:09:19 +02:00
Martin Geisler
c624e91552 fixed typos found in translatable strings
This is from a spell-check of hg.pot.
2009-05-31 14:55:51 +02:00
Martin Geisler
37b00fb404 test-hybridencode: break long string literals 2009-05-31 01:13:45 +02:00
Martin Geisler
cac71647b1 posix: do not use fstat in isowner
The fstat function was undefined, but never used since a stat object
was always passed in the optional st argument. Passing st is now
mandatory.

This bug crept in when util was split up into posix and windows
modules. The fstat function is still defined in util, but importing it
into posix would create an import cycle which seems unnecessary.
2009-05-30 23:42:35 +02:00
Martin Geisler
58e8fb6277 removed unused imports 2009-05-30 23:20:30 +02:00
Brendan Cully
5189b36798 Move alias into core 2009-05-30 11:32:23 -07:00
Greg Ward
4ad6973308 run-tests: clarify timeout log message. 2009-05-29 10:00:03 -04:00
Cédric Duval
09fe588f0d tests: test for dispatch on [defaults]: more clearly differing output
Using '-r null' instead of '-v' as the overriden command default.
The latter did not have any effect on output, thus not giving much
indication on whether the modified defaults were really in use or not.
2009-05-24 22:15:48 +02:00
Peter Arrenbrecht
38e7748fe0 revlog: add test for 96029cc19930 (issue1678) 2009-05-27 14:11:41 +02:00
Benoit Boissinot
d81f680b31 store encoding: .i/.d encoding for non-store repo (broken by 67e6074ba430) 2009-05-26 23:49:53 +02:00
Dirkjan Ochtman
f9911763f7 tests: make coverage run in parallel mode, clean up coverage code 2009-05-25 18:34:35 +02:00
Patrick Mezard
64fcf86ad8 convert: better feedback when filtering out empty revisions
Original patch by Herbert Griebel <herbertg@gmx.at>
2009-05-24 18:30:59 +02:00
Benoit Boissinot
9ad2c4fd5b merge with crew 2009-05-24 16:33:22 +02:00
Patrick Mezard
82ffe82eb9 convert: deprecate external cvsps, to be removed in 1.4 2009-05-24 16:27:56 +02:00
Simon Heimberg
293c5101a0 runtest: do not start testing when there is no test 2009-05-19 09:36:20 +02:00
Sune Foldager
13556c33e2 tests: add tests for new pre-push logic (issue736)
Co-contributor: Henrik Stuart <henrik.stuart@edlund.dk>
2009-05-23 17:04:41 +02:00
Sune Foldager
2161b139a6 named branches: improve pre-push logic (issue736)
Each named branch is considered separately, and the push is allowed if
no new branch heads are created for any named branch to be pushed.

Due to some tests's use of --debug, their output will change after this
addition. This has been fixed as well.

Co-contributor: Henrik Stuart <henrik.stuart@edlund.dk>
2009-05-23 17:04:31 +02:00
Henrik Stuart
e3379206dc named branches: server branchmap wire protocol support (issue736)
The repository command, 'branchmap', returns a dictionary, branchname
-> [branchheads], and will be implemented for localrepo, httprepo and
sshrepo.

The following wire format is used for returning data:

branchname1 branch1head2 branch1head2 ...
branchname2 ...
...

Branch names are URL encoded to escape white space, and branch heads
are sent as hex encoded node ids. All branches and all their heads are
sent.

The background and motivation for this command is the desire for a
richer named branch semantics when pushing changesets. The details are
explained in the original proposal which is included below.


1. BACKGROUND

The algorithm currently implemented in Mercurial only considers the
graph theoretical heads when determining whether new heads are
created, rather than using the branch heads as a count (the algorithm
considers a branch head effectively closed when it is merged into
another branch or a new named branch is started from that point
onward).

Our particular problem with the algorithm is that we'd like to see the
following case working without forcing a push:

Upsteam has:

(0:dev) ---- (1:dev)
\
 `--- (2:stable)

Someone merges stable into dev:

(0:dev) ---- (1:dev) ------(3:dev)
\                         /
 `--- (2:stable) --------´

This can be pushed without --force (as it should).
Now someone else does some coding on stable (a bug fix, say):

(0:dev) ---- (1:dev) ------(3:dev)
\                          /
 `--- (2:stable) ---------´---------(4:stable)

This time we need --force to push.

We allow this to be pushed without using --force by getting all the
remote branch heads (by extending the wire protocol with a new
function).

We would, furthermore, also prefer if it is impossible to push a new
branch without --force (or a later --newbranch option so --force isn't
shoe-horned into too many disparate functions, if need be), except of
course in the case where the remote repository is empty.

This is what our patches accomplish.


2. ALTERNATIVES

We have, of course, considered some alternatives to reconstructing
enough information to decide whether we are creating new remote branch
heads, before we added the new wire protocol command.

2.1. LOOKUP ON REMOTE

The main alternative is to use the information from remote.heads() and
remote.lookup() to try to reconstruct enough graph information to
decide whether we are creating new heads. This is not adequate as
illustrated below.

Remember that each lookup is typically a request-response pair over
SSH or HTTP(S).

If we have a simple repository at the remote end like this:

(0:dev) ---- (1:dev) ---- (3:stable)
\
 `--- (2:dev)

then remote.heads() will yield [2, 3]. Assume we have nodes [0, 1, 2]
locally and want to create a new node, 4:dev, as a descendant from
(1:dev), which should be OK as 1:dev is a branch head.

If we do remote.lookup('dev') we will get [2]. Thus, we can get
information about whether a branch exists on the remote server or not,
but this does not solve our problem of figuring out whether we are
creating new heads or not.

Pushing 4:dev ought to be OK, since after the push, we still only have
two heads on branch a.

Using remote.lookup() and remote.heads() is thus not adequate to
consistently decide whether we are creating new remote heads (e.g. in
this situation the latter would never return 1:dev).

2.2. USING INCOMING TO RECONSTRUCT THE GRAPH

An alternative would be to use information equivalent to hg incoming
to get the full remote graph in addition to the local graph.

To do this, we would have to get a changegroup(subset) bundle
representing the remote end (which may be a substantial amount of
data), getting the branch heads from an instantiated bundlerepository,
deleting the bundle, and finally, we can compute the prepush logic.

While this is backwards compatible, it will cause a possibly
substantial slowdown of the push command as it first needs to pull in
all changes.


3. FURTHER ARGUMENTS IN FAVOUR OF THE BRANCHMAP WIRE-PROTOCOL EXTENSION

Currently, the commands incoming and pull, work based on the tip of a
given branch if used with "-r branchname", making it hard to get all
revisions of a certain branch only (if it has multiple heads). This
can be solved by requesting the remote's branchheads and letting the
revisions to be used with the command be these heads. This can be done
by extending the commands with a new option, e.g.:

hg pull -b branchname

which will be turned into the equivalent of:

hg pull -r branchhead1 -r branchhead2 -r branchhead3

We have a simple follow-up patch that can do this ready as well
(although not submitted yet as it is pending the acceptance of the
branch patch).


4. WRAP-UP

We generally find that the branchmap wire protocol extension can
provide better named branch support to Mercurial. Currently, some
things, like the initial push scenario in this mail, are fairly
counter-intuitive, and the more often you have to force push, the more
it is likely you will get a lot of spurious and unnecessary merge
nodes. Also, restricting incoming and pull to all changes on a branch
rather than changes on the tip-most head would be a sensible extension
to making named branches a first class citizen in Mercurial.
Currently, named branches sometimes feel like a late-coming unwanted
step-child.

We have run it in a production environment for a while, with fewer
multiple heads occurring in our repositories and fewer confused users
as a result.

Also, it fixes the long-standing issue 736.

Co-contributor: Sune Foldager <cryo@cyanite.org>
2009-05-23 17:02:49 +02:00
Nicolas Dumazet
21b374a449 inotify: introduce debuginotify, which lists which paths are under watch 2009-04-22 00:37:35 +09:00
Steve Borho
2cd8aa240a merge: give hint as to how to discover uncommitted changes
Many users will try 'hg diff' here, and it will not show them missing files.
2009-05-22 11:42:21 -05:00
Patrick Mezard
75d91d6ef2 test-merge-tools: windows fixes
- /bin/cat does not exist, expect 'cat'
- non-interactive mode is not correctly detected in pysh, force it
2009-05-21 22:43:38 +02:00
Benoit Boissinot
58c694795e remove: warn if unversionned files are specified (issue1454) 2009-05-20 21:16:04 +02:00
Benoit Boissinot
5b1d4a56ec filelog encoding: move the encoding/decoding into store
the escaping of directories ending with .i or .d doesn't
really belong to filelog.

we put the encoding/decoding in store instead, for backwards
compat, streamclone and the fncache file format still uses the
partially encoded filenames.
2009-05-20 18:35:47 +02:00
Jeremy Whitlock
c090150d2d hgweb: make hgwebdir handle dict/list paths the same as config paths
Before this patch, the only way to get hgwebdir to honor the recursive paths
was to create a config object or a config file with the recursive paths in it.
This patch makes hgwebdir treat paths the same whether passed in as a list,
tuple, config or however hgwebdir supports passing paths.
2009-05-20 16:04:37 +02:00
Martin Geisler
92a59fc839 tests: replace #...# syntax with {...} 2009-05-19 23:02:17 +02:00
Dirkjan Ochtman
d99b64b14b patchbomb: don't localize Date headers 2009-05-19 15:10:45 +02:00
Benoit Boissinot
aa464dbde5 alias: e916ee90bfbd did not correctly handle whitespace in the args 2009-05-19 14:14:07 +02:00
Benoit Boissinot
fc43ae9519 update --clean: do not unlink added files (issue575) 2009-05-19 03:59:58 +02:00
Cédric Duval
781163e886 patchbomb: with --in-reply-to, still thread message under first in series
When specifying --in-reply-to for a message M, have
  [M]
    [0/2]
      [1/2]
      [2/2]

instead of
  [M]
    [0/2]
    [1/2]
    [2/2]

which is more consistent with the way messages are being threaded
when --in-reply-to is not used.
2009-05-19 01:37:38 +02:00
Martin Geisler
5571c196f3 merge with mpm 2009-05-19 01:17:54 +02:00
Matt Mackall
16d4ef56bc commit: explain how to abort commit in editor 2009-05-18 17:36:24 -05:00
Matt Mackall
89cb6de980 commit: move editor outside transaction
The commit editor is now invoked before files and manifest are
committed. The editor is now run with only the wlock held and aborting
an edit no longer requires rolling back a transaction. Changes to
files during a commit still result in undefined behavior.

(This is preliminary work for committing subrepositories)
2009-05-18 17:36:24 -05:00
Martin Geisler
ecadaada56 spartan: ensure equal heights for file and annotate views
The display used to jump up and down when switching from the file view
to the annotate view. It now stays still: when switching from the file
view to the annotate view it looks like the file content is simply
right-shifted to make room for the author names.
2009-05-19 00:28:47 +02:00
Martin Geisler
301bf629e6 spartan: simplify CSS colors (#xxxxxx -> #xxx) 2009-05-18 23:35:27 +02:00
Martin Geisler
12caf17e05 coal/paper/spartan: remove extra line break in annotate view 2009-05-18 23:27:51 +02:00
Benoit Boissinot
6743bf50c5 merge with crew 2009-05-17 23:07:23 +02:00
Martin Geisler
3952bb3de2 coal, paper: add newlines when displaying a file in hgweb
The newlines make the HTML somewhat readable and gives much smaller,
readable diffs when the tests change.
2009-05-17 22:51:50 +02:00
Benoit Boissinot
bee6cb3d55 addremove/findrenames: find renames according to the match object (issue1527)
Instead of only finding similarities in the added/removed files found
by the addremove step, follow the match object:

hg addremove -s80 foo -> add and removes files in foo
                         + find similarities between files in foo
hg addremove -s80 -> add and removes files in the whole repo
                     + find similarities between files in the whole repo

hg import --similarity will still work correctly (only find similarities
between files found in the patch).
2009-05-17 22:51:17 +02:00
Martin Geisler
f51ce71d96 test-highlight: decouple test from get-with-headers.py
The test copied get-with-headers.py from $TESTDIR and committed it to
a test repository. The test output therefore depended unnecessarily on
the exact content of get-with-headers.py. It has now been replaced
with another small Python script.
2009-05-17 21:47:24 +02:00
Patrick Mezard
e76a7010bb Merge with crew-stable 2009-05-17 20:00:11 +02:00
Patrick Mezard
3e92f126a2 Add tests for qfold 2009-05-17 19:54:26 +02:00
Benoit Boissinot
44f0b80109 alias: honor the [defaults] section, fix issue1642 2009-05-17 16:15:37 +02:00
Patrick Mezard
e391da8024 convert/bzr: warn when source is a lightweight checkout (issue1647) 2009-05-17 14:35:06 +02:00
Martin Geisler
9b272e271a tests: add missing interpreter lines 2009-05-17 02:15:21 +02:00
Martin Geisler
c40b8bf294 cvsnt-mergepoints test: use sh instead of bash 2009-05-17 02:10:09 +02:00
Martin Geisler
aedc0ac57f tests: removed unnecessary execute bit on Python tests 2009-05-17 01:42:21 +02:00
Martin Geisler
a645da9ed1 tests: renamed Python tests to .py 2009-05-17 01:39:31 +02:00
Martin Geisler
5930e2185d tests: renamed helper to avoid clash with stdlib repr module 2009-05-17 02:31:12 +02:00
Martin Geisler
9aedf5dabd tests: fix doc string in get-with-headers.py 2009-05-17 01:24:45 +02:00
Marti Raudsepp
1d10c4d979 tests: use repr.py to avoid binary characters in test output 2009-05-17 01:16:56 +02:00
Martin Geisler
4bdb838b6b tests: new helper for tests with binary output 2009-05-17 01:10:35 +02:00
Martin Geisler
fc8a97dac3 changelog: refuse to add revisions with empty usernames
An empty username or a username with a "\n" will make the revision
text contain two "\n\n" sequences -> corrupt repository.

The problem is that changelog.read expects to find exactly one "\n\n"
separator and thus cannot unpack the revision.
2009-05-16 11:12:49 +02:00
Patrick Mezard
d3d9100f4a convert/bzr: fix symlinks target (issue1626/2) 2009-05-15 16:12:09 +02:00
Martin Geisler
f138e91851 merge with crew-stable 2009-05-16 11:16:23 +02:00
Patrick Mezard
8a575f0b78 Merge with crew-stable 2009-05-15 16:17:56 +02:00
Dirkjan Ochtman
1e9b20dc8f mq: qpush shouldn't complain if working dir is at a non-tip head 2009-05-15 15:21:17 +02:00
Brett Carter
d69cd3912f clone: try updating to the actual changeset specified in options
When cloning with the -r option or # url format from a tag the destination
repo most likely won't have the tag. We can save the lookup result to get to
the correct parent anyway. Similar to issue1306, but for tags.
2009-05-14 22:00:56 +02:00
Matt Mackall
fa65ae0679 remove deprecated rawcommit 2009-05-14 13:20:40 -05:00
Peter Arrenbrecht
35e8011b63 verify: detect manifest revs not in any changeset 2009-05-14 16:22:49 +02:00
Martin Geisler
2dec1cac72 test-debugcomplete: add --show merge option to output 2009-05-14 17:28:26 +02:00
Dirkjan Ochtman
2f19dcd8ee merge: add -S/--show option to review revisions without merging 2009-05-14 16:03:17 +02:00
Martin Geisler
a231ff4f38 highlight: updated changed test output
It was changed in 00697060e4d8, but I forgot to update it.
2009-05-14 13:21:47 +02:00
Michael J. Pedersen
5874aad1d7 convert: adding branchmap functionality to convert extension 2009-05-13 15:03:31 -04:00
Martin Geisler
e03fc942e6 spartan: break long lines in map file 2009-05-13 22:42:40 +02:00
Martin Geisler
80ce65be72 gitweb: break long lines in map file 2009-05-13 22:41:58 +02:00
Martin Geisler
264d2453c3 paper: break long lines in map file 2009-05-13 22:40:49 +02:00
Rocco Rutte
a7d36bb777 coal/paper: Wrap diff in <pre/>
In text-mode browsers the diff is otherwise rendered
as just one long line per file. Other styles do the same.
2009-05-13 16:31:19 +02:00
Dirkjan Ochtman
9b104a6a4a mq: add -P/--push option to qimport 2009-05-12 11:15:54 +02:00
Dirkjan Ochtman
6f7f8e3dec templater: make the templating engine pluggable to some extent 2009-05-12 12:05:19 +02:00
Dirkjan Ochtman
ffa181f4fd tests: add test for branches webcommand 2009-05-12 11:05:13 +02:00
Sune Foldager
e88b228e4c spartan: add branches page 2009-05-12 11:58:39 +02:00
Sune Foldager
ffb22da91d paper/coal: add branches page 2009-05-12 12:00:54 +02:00
Rocco Rutte
4ed7542551 test-patchbomb: fix style
Specifying revisions without -r is deprecated, break long lines.
2009-05-12 11:27:26 +02:00
Martin Geisler
aa4858058d tests: avoid export FOO=bar bashism 2009-05-11 23:42:03 +02:00
Martin Geisler
ccf16e42d8 record: better formatting for qrecord help 2009-05-10 01:18:38 +02:00
Alexander Solovyov
d57b80d44e add verbose output to compact template style 2009-05-11 13:03:34 +03:00
Sune Foldager
4a665141b4 allow http authentication information to be specified in the configuration 2009-05-04 20:26:27 +02:00
Rocco Rutte
00891e0e67 patchbomb: quoted-printable encode overly long lines
RfC2822 mandates a line length limit of 998 byte + CRLF.
Python mail tools break lines at 990 byte. To prevent
that, we quoted-printable encode overly long lines.
2009-05-08 18:30:44 +02:00
Mads Kiilerich
61b324eeb6 test-glog: Remove sed hack - '...$HGTMP...' isn't expanded anyway 2009-05-02 12:57:20 +02:00
Mads Kiilerich
9a2371955d test-convert-baz: hide GNU tar deprecation warning 2009-05-02 12:13:24 +02:00
Patrick Mezard
832313e290 rebase: fix bug where --keepbranches could leave wrong branch in dirstate
Report and original fix by Augie Fackler <durin42@gmail.com>
2009-05-01 12:26:37 +02:00
Patrick Mezard
bd41c37f9b convert/svn: keep latest and not oldest tag value 2009-04-29 21:44:25 +02:00
Martijn Pieters
0a6e43e789 Fix typeerror when specifying both --rebase and --pull 2009-04-29 11:39:49 +02:00
Matt Mackall
ee9ffff851 Merge with crew-stable 2009-04-26 16:49:47 -05:00
Patrick Mezard
ccca7abe8e convert/bzr: make it work with filemaps (issue1631)
The bzr converter maintains a child -> parents mapping and drop entries
whenever a child is read. It does not work with filemaps, getchangedfiles() may
be called more than once when filtered files belong to merge revisions.
getchanges() still works that way but it is not clear whether a similar issue
can arise when interacting with merges.
2009-04-26 11:35:53 +02:00