Commit Graph

1232 Commits

Author SHA1 Message Date
Brendan Cully
b969d388db Make fast-forward merges full merges 2007-06-18 12:38:54 -07:00
Matt Mackall
5ecb0cb232 dispatch: fix handling of incorrect number of arguments 2007-06-18 13:24:34 -05:00
Matt Mackall
579d9e3b44 encoding: pull fallbackencoding out of localrepo into early parsing 2007-06-18 13:24:34 -05:00
Brendan Cully
988e3fb1da Fix up tests for new branch message 2007-06-18 11:13:16 -07:00
Patrick Mezard
f2a33f2a1b Merge with crew-stable 2007-06-17 20:08:06 +02:00
Patrick Mezard
571e9d813f patchbomb: flush ui before delegating to pager. 2007-06-17 19:40:02 +02:00
Patrick Mezard
14cbb9abf5 test-patchbomb: fix non-existing --date parameter and filtering regexps. 2007-06-17 19:39:47 +02:00
Brendan Cully
3aa4171ea6 Merge with crew 2007-06-14 10:59:17 -07:00
Brendan Cully
228060290f Make parents with a file but not a revision use working directory revision. 2007-06-14 10:58:49 -07:00
Thomas Arendsen Hein
19530763e6 Reverted changesets a812fb9bfa26 and f1c9e4d4a477: show @ as glog parent again.
Repainted the bikeshed with its original color.
2007-06-14 12:54:06 +02:00
Alexis S. L. Carvalho
587c06ebc5 commands.commit: symlinks are supported 2007-06-13 19:15:58 -03:00
Brendan Cully
6b21b9d123 Merge with crew 2007-06-13 13:50:29 -07:00
Brendan Cully
e96607cf35 extensions: load modules in module/__init__.py form.
For example, convert=/path/to/convert now works.
2007-06-13 13:46:40 -07:00
Giorgos Keramidas
76dbb3042a test-patchbomb: sed -e may not work with extended regexps
Non-GNU versions of the sed(1) utility (i.e. on Solaris or BSD)
may not support extended regexps (i.e. including \| branches),
or may need a special option to enable it (like -E instead of -e).

Expand the sed RE in tests/test-patchbomb to fix running this
test on FreeBSD and Solaris.
2007-06-13 15:02:09 +03:00
Brendan Cully
d9c890b630 Make parents with a file but not a revision use working directory revision. 2007-06-14 10:58:49 -07:00
Giorgos Keramidas
0d93ef80bc test-patchbomb: sed -e may not work with extended regexps
Non-GNU versions of the sed(1) utility (i.e. on Solaris or BSD)
may not support extended regexps (i.e. including \| branches),
or may need a special option to enable it (like -E instead of -e).

Expand the sed RE in tests/test-patchbomb to fix running this
test on FreeBSD and Solaris.
2007-06-13 15:02:09 +03:00
Thomas Arendsen Hein
b1b749399a Correct tests/test-patchbomb* files:
mv test-patchbomb test-patchbomb.out
hg revert -r 5ab985243f28 test-patchbomb
2007-06-13 08:24:40 +02:00
Bryan O'Sullivan
323388d025 patchbomb: add --date option 2007-06-12 14:52:34 -07:00
Bryan O'Sullivan
d16530621b Don't validate email config if we're not sending email. 2007-06-12 14:44:47 -07:00
Brendan Cully
37671e0260 dispatch: restore a dropped shlex import
Add test-dispatch as a place for command parsing and dispatch tests.
2007-06-12 13:21:42 -07:00
Matt Mackall
1621c30af5 dispatch: use the repo path found by early parsing
This lets us simplify things a bit.
2007-06-11 21:09:24 -05:00
Matt Mackall
7daba33088 dispatch: move dispatching code to cmdutil 2007-06-11 21:09:24 -05:00
Alexis S. L. Carvalho
dd4d403b90 use .extend instead of .append in readtags 2007-06-04 00:24:48 -03:00
Matt Mackall
ac962c3cef commit: fix bug where dirstate for removed file is confused
This fixes issue586
2007-06-10 21:16:58 -05:00
Thomas Arendsen Hein
7a4d62e035 Removed trailing \n in calls to util.Abort() 2007-06-09 13:25:54 +02:00
Alexis S. L. Carvalho
50d5690f2a Avoid extra filelogs entries.
Right now, there are some situations in which localrepo.filecommit can
create filelog entries even though they're not needed.  For example:

- permissions for a file have changed;

- qrefresh can create a filelog entry identical to its parent (see the
  added test);

- convert-repo creates extra filelog entries in every merge where the
  first parent has added files (for example, changeset ebebe9577a1a of
  the kernel repo added extra filelog entries to files in the
  arch/blackfin directory, even though the merge should only touch the
  drivers/ata directory).  This makes "hg log file" in a converted repo
  less useful than it could be, since it may mention many merges that
  don't actually touch that specific file.

They all come from the same basic problem:  localrepo.commit (through
filecommit) creates new filelog entries for all files passed to it
(except for some cases during a merge).

Patch and test case provided by Benoit.

This should fix issue351.
2007-06-09 01:04:28 -03:00
Alexis S. L. Carvalho
a8f5faee29 Make sure the changelog mentions files whose flags changed
These changes don't actually need a new filelog entry (see next patch),
but if we don't mention the files in the changelog, it becomes much
harder to find all changesets that touch a file (not even a
"hg log --removed file" will work).
2007-06-09 01:04:28 -03:00
Alexis S. L. Carvalho
2f82b4ffa3 run-tests.py: set ui.slash = True
This should make things easier for pysh.
2007-06-08 23:49:12 -03:00
Alexis S. L. Carvalho
39ab533239 test-config-case: print only the Section we're interested in.
This allows us to add additional settings to the global hgrc file
created by run-tests.py without breaking this test.
2007-06-08 23:49:12 -03:00
Patrick Mezard
a55efff966 ui: make readsections() abort when configuration cannot be read. 2007-06-03 22:11:25 +02:00
Thomas Arendsen Hein
49220695bc Removed trailing whitespace and tabs from python files 2007-06-06 20:22:52 +02:00
Thomas Arendsen Hein
bed0d64777 Fixed test output for changed glog (. instead of @) 2007-06-06 19:06:43 +02:00
Thomas Arendsen Hein
cf1ee4e625 Issue a warning if "-r ." is used with two working directory parents.
Rationale for not aborting instead:
The first parent is usually more important as it is the local branch
during a merge and commands like 'hg diff' and 'hg diff -r.' behave still
identically (except for the warning of course).

Added a test for log -r. with one and two parents.
2007-06-06 19:05:18 +02:00
Alexis S. L. Carvalho
9473b6e676 test-serve: let run-tests.py kill the daemons
If the daemons die while the tests are still running, we'll get additional
"killed!" messages, making the test fail.
2007-06-05 19:26:36 -03:00
Joel Rosdahl
59069084bb Add test reproducing a bug in "hg serve -v" 2007-06-04 21:48:59 +02:00
Alexis S. L. Carvalho
ae21f631dc merge with crew-stable 2007-06-04 00:26:53 -03:00
Patrick Mezard
ed018bae98 Merge with crew-stable 2007-06-03 17:18:48 +02:00
Thomas Arendsen Hein
2366afd684 merge with stable 2007-06-01 19:49:09 +02:00
Thomas Arendsen Hein
3c2ee08111 Make "hg incoming -r revision_number" work for remote repos (issue566)
Uses the remote repository's lookup method as pull does and only transfers
what is needed to calculate incoming changesets.

One minor problem:
As only the needed changesets are transfered and stored in a local bundle
repository, the tip tag of this bundle is shows despite not being the tip
changeset of the remote repository.
(see "+tag: tip" in tests/test-incoming-outgoing.out in this patch)
2007-06-01 19:45:05 +02:00
Thomas Arendsen Hein
cc234197e2 Corrected similarity parameter used in test-addremove
0.5 meant 50% in the early stages of addremove -s, now 50 has to be used.
2007-06-01 16:02:49 +02:00
Thomas Arendsen Hein
128193f3e9 addremove: comparing two empty files caused ZeroDivisionError
(found by Giorgos Keramidas)
2007-06-01 16:00:40 +02:00
Patrick Mezard
9bf3ac6325 Test issue 562: .hgignore requires newline at end 2007-05-19 22:46:59 +02:00
Alexis S. L. Carvalho
5dde9c8a57 improve warning for hg add foo; hg mv foo bar 2007-07-11 19:56:16 -03:00
Alexis S. L. Carvalho
c2a8afba01 archive: add symlink support 2007-07-11 17:40:41 -03:00
Emanuele Aina
92444d96b1 purge: add --include and --exclude options 2007-05-11 17:05:44 +02:00
Patrick Mezard
0bf2bda86a Merge with crew-stable. 2007-05-19 22:51:43 +02:00
Eric Hopper
e075c7b81c Alter test to test import --exact to make sure it works with branches. 2007-05-17 20:09:49 -07:00
Eric Hopper
50863b1d0d Add a test for the Branch header being in hg export. 2007-05-17 20:09:44 -07:00
Brendan Cully
32c5d5cbaa Make mergepatch save queue now that qpush isn't. 2007-05-13 19:15:54 -07:00
Brendan Cully
b100fabe27 Fix up patchbomb test 2007-05-08 12:36:34 -07:00
Bryan O'Sullivan
5fe1c5d4b7 add test for patchbomb extension. 2007-05-08 12:20:13 -07:00
Matt Mackall
6bf7f7256d merge: fix spurious merges for copies in linear updates
We make better use of contexts to accurately identify copies that
don't need merges.

Add a simple test and update other tests.
2007-05-08 02:59:13 -05:00
Bryan O'Sullivan
fd12095b02 mq: add qgoto command. 2007-05-08 13:10:27 -07:00
Brendan Cully
6fae8c6b65 Fix test-patchbomb for crew 2007-05-08 13:08:20 -07:00
Matt Mackall
5fa7270b2d Merge with stable 2007-05-08 11:42:48 -05:00
Patrick Mezard
ad66e2aba5 Test qtop breaking when series ends with guarded patches. 2007-05-06 18:19:25 +02:00
Brendan Cully
fb4b5549c3 Add fast-forward branch merging 2007-05-06 20:27:45 -07:00
Patrick Mezard
2aa0553705 Merge with crew-stable.
HG: changed hgext/mq.py
2007-05-07 00:12:35 +02:00
Brendan Cully
46c9d09fa2 Also restore old rm -A behavior for inexact patterns 2007-04-30 09:32:44 -07:00
Brendan Cully
9759da5859 Fix rm -A with no patterns, which I just broke. 2007-04-30 09:13:27 -07:00
Brendan Cully
bd110b0cd3 Make rm --after simply mark files as removed, unless --force is also given 2007-04-30 08:51:59 -07:00
Alexis S. L. Carvalho
274bce0c1c run-tests.py: pass -L/--label to simplemerge
This should give us conflict markers that don't change from one run
to another.

Remove some sed's/egrep's from some tests.
2007-04-28 17:55:45 -03:00
Brendan Cully
86e588eafb Make copy --after work for files that have been hg added. 2007-04-24 18:43:18 -07:00
Thomas Arendsen Hein
1a74aebc73 Work around problem where 'del os.environ["FOO"]' doesn't update environment.
test-hook failed since changeset f4d1d9e93f1a because of this on Solaris 8.
2007-04-19 13:04:26 +02:00
Thomas Arendsen Hein
bc615bbf0b Use python instead of shell printf with \x for test-simplemerge-cmd
Needed e.g. to be compatible with Solaris.
2007-04-19 12:47:55 +02:00
Alexis S. L. Carvalho
a4fb0722ca change tests to use simplemerge by default 2007-04-16 20:17:39 -03:00
Alexis S. L. Carvalho
2fe1ec9254 polish the simplemerge command; add a test 2007-04-16 20:17:39 -03:00
Alexis S. L. Carvalho
f65315991b actually port simplemerge to hg
- use bdiff instead of patiencediff;  this is a larger change, since
  bdiff works on 2 multi-line strings, while patiencediff works on 2
  lists;

- rename the main class from Merge3 to Merge3Text and add a Merge3
  class that derives from Merge3Text.  This new Merge3 class has
  the same interface from the original class, so that the tests
  still work;

  - Merge3 uses util.binary to detect binary data and raises
    util.Abort instead of a specific exception;

- don't use the @decorator syntax, to keep python2.3 compatibility;

- the test uses unittest, which likes to print how long it took to
  run.  This obviously doesn't play too well with hg's test suite,
  so we override time.time to fool unittest;

- one test has a different (but still valid) output because of the
  different diff algorithm used;

- the TestCase class used by bzr has some extras to help debugging.
  test-merge3.py used 2 of them:

  - log method to log some data

  - assertEqualDiff method to ease viewing diffs of diffs

  We add a dummy log method and use regular assertEquals instead of
  assertEqualDiff.

- make simplemerge executable and add "#!/usr/bin/env python" header
2007-04-16 20:17:39 -03:00
Alexis S. L. Carvalho
50315bfe3b Import 3-way merge code from bzr
merge3.py is imported as contrib/simplemerge
test_merge3.py is imported as tests/test-simplemerge.py
2007-04-16 20:17:39 -03:00
Matt Mackall
e2dfe968ea Merge with stable 2007-04-16 12:37:30 -05:00
TK Soh
cd2f400311 test-command-template: improve test coverage 2007-04-10 16:25:21 -05:00
Alexis S. L. Carvalho
62e2a7bfb7 command line templates: add formatnode filter
This will print a full hash node with --debug and a short one otherwise.

Use it with some default templates and in map-cmdline.default to print
the parents.  This should fix issue538.
2007-04-16 13:00:23 -03:00
Alexis S. L. Carvalho
4b47aae3d4 fix 'hg <not-log> -v --template foo' with revisions without copies 2007-04-16 13:00:23 -03:00
Patrick Mezard
c06d45d1c7 mq: test qtop with holes in the patch sequence. 2007-04-12 22:41:50 +02:00
Joel Rosdahl
cd9e37bddc Add graphlog extension 2007-04-09 10:39:28 +02:00
Brendan Cully
ef31abfcc7 Merge with crew-stable 2007-04-12 15:07:05 -07:00
Alexis S. L. Carvalho
ea51c7fac2 Merge with crew-stable. 2007-04-09 04:57:25 -03:00
Patrick Mezard
5c6309243f Add test for issue 529 - "mq aborts when merging patch deleting files". 2007-04-07 19:42:26 +01:00
Alexis S. L. Carvalho
047c4b002b Merge with crew-stable. 2007-04-07 04:45:27 -03:00
Brendan Cully
b2c127323e Merge with Matt 2007-04-05 15:20:42 -07:00
Matt Mackall
808f098616 Merge with stable 2007-04-05 17:09:31 -05:00
Matt Mackall
ebc2b5ccc8 merge: fix a bug where copies were ignored 2007-04-05 16:43:18 -05:00
Alexis S. L. Carvalho
31232bf5ab run-tests.py: use coverage.py with "#!/usr/bin/env python" tests 2007-04-07 04:27:55 -03:00
Alexis S. L. Carvalho
63574c7e40 run-tests.py: small cleanup 2007-04-07 04:27:55 -03:00
Alexis S. L. Carvalho
5dd065da79 run-tests.py: use coverage.py with *.py tests 2007-04-07 04:27:55 -03:00
Alexis S. L. Carvalho
77c152a933 run-tests.py: tell coverage.py to ignore errors
Otherwise there'll be some IOErrors when it tries to open python
files created during the execution of e.g. test-hook.
2007-04-07 04:27:55 -03:00
Alexis S. L. Carvalho
766df29f00 test-bad-pull: try to avoid timing-related failures 2007-04-07 04:27:55 -03:00
Alexis S. L. Carvalho
8e9491052e Add a pointer to "hg -v help" to the bottom of hg help {,cmd} output
This should make it easier to discover global options.

As a bonus, they are no longer displayed by something like a
hg -v help dates
2007-04-07 04:27:55 -03:00
Matt Mackall
84a6ecd211 tags: require -f to replace an existing tag
based on a patch from Johan Herland <johherla@online.no>
2007-03-23 00:12:28 -05:00
Matt Mackall
6d86b7e7d9 tags: fix abababa case, with test case 2007-03-22 23:52:50 -05:00
Thomas Arendsen Hein
1bd533bfe0 hg qseries -m: guards file was not ignored 2007-03-18 20:37:47 +01:00
Thomas Arendsen Hein
b05341e0d2 Tests for qapplied/qunapplied fixes (10a3604dafc6 and 394fae2055db) 2007-03-18 19:41:28 +01:00
Alexis S. L. Carvalho
33d6c26f90 test-ssh-clone-r: avoid a shell script 2007-03-27 01:41:23 -03:00
Alexis S. L. Carvalho
ba3bf8a6ef test-ssh: avoid a shell script 2007-03-27 01:41:22 -03:00
Alexis S. L. Carvalho
a0b1283443 test-init: avoid a shell script 2007-03-27 01:41:21 -03:00
Alexis S. L. Carvalho
2e32993a6a test-rename-merge2: avoid a shell script 2007-03-27 01:41:20 -03:00
Alexis S. L. Carvalho
91aeb4643e test-merge6: avoid a shell script 2007-03-27 01:41:18 -03:00
Alexis S. L. Carvalho
03fea0246c test-merge1: avoid a shell script 2007-03-27 01:41:17 -03:00
Alexis S. L. Carvalho
e16d5f9b1a test-filebranch: avoid a shell script 2007-03-27 01:41:16 -03:00
Alexis S. L. Carvalho
beebce1bec avoid a traceback with hg branch newbranch; hg up 2007-03-16 00:22:59 -03:00
Alexis S. L. Carvalho
e488c0e84f Fix handling of paths when run outside the repo.
The main problem was that dirstate.getcwd() returned just "",
which was interpreted as "we're at the repo root".  It now returns
an absolute path.

The util.pathto function was also changed to deal with the "cwd is
an absolute path" case.
2007-03-16 00:22:58 -03:00
Emanuele Aina
c4577db686 Move back the purge extension in hgext 2007-02-27 09:05:36 +01:00
Emanuele Aina
eb67de0025 purge: abort with missing files avoiding problems with name-mangling fs
In a name mangling filesystem (e.g. a case insensitive one)
dirstate.walk() can yield filenames different from the ones
stored in the dirstate. This already confuses the status and
add commands, but with purge this may cause data loss.

To prevent this purge refuses to work if there are missing
files and has a 'force' option if the user knows it is safe.

Even with the force option purge checks if any of the missing
files is still available in the working dir: if so there
may be some problem with the underlying filesystem, so it
unconditionally aborts.
2007-03-28 21:34:12 +02:00
Alexis S. L. Carvalho
8cf3bc3446 Merge last few matcher/locate fixes. 2007-04-04 04:22:08 -03:00
Alexis S. L. Carvalho
d766331e6f locate: don't print "file not found" messages.
This should fix issue204.
2007-04-04 04:22:06 -03:00
Alexis S. L. Carvalho
e021806e69 change relglob: patterns to be consistent with glob: patterns
With this change, you have to use "hg locate 'hgweb/**'" to locate
all the files in directories named hgweb.  OTOH, "hg locate '*l'"
will locate only files that end with "l" - e.g. a file called "hg.py"
will not be matched just because it's in a directory whose name ends
with "l" (e.g. "mercurial").
2007-04-04 04:22:06 -03:00
Alexis S. L. Carvalho
8d4f62f9f3 Revert changeset 8e97d9d074da; add another test for glob: patterns
With that changeset, it's impossible to use a glob: pattern to match
e.g. all files ending in .py - glob:**.py would also match all files
in a directory called dir.py.
2007-04-04 04:22:05 -03:00
Alexis S. L. Carvalho
db8accc4c6 glob:<directory> patterns match the files in that directory.
This makes the behaviour of glob: patterns more consistent:
hg status glob:dir  and   hg status -I glob:dir  will match
the same files.

It's also consistent with the fact that {rel,}path patterns
recursively match the contents of a directory.
2007-03-20 22:09:55 -03:00
Giorgos Keramidas
e8919a398e tests: expand test-commit a bit to test 'hg commit .' too 2007-03-18 22:49:05 +02:00
Alexis S. L. Carvalho
5d84095fb2 add some more tests to hg locate 2007-03-16 22:48:22 -03:00
Alexis S. L. Carvalho
9a96852018 make the output of test-locate more readable 2007-03-16 22:48:21 -03:00
Alexis S. L. Carvalho
a782e3309d util._matcher: use "." as the root of empty {rel,}path patterns
Should fix issue332. Really.
2007-03-16 22:48:20 -03:00
Alexis S. L. Carvalho
bc0e37f5ff locate: exit(1) if we didn't print any file 2007-03-10 23:00:58 -03:00
Alexis S. L. Carvalho
b53e6f3897 change locate to use relglobs by default
This makes its default behaviour useful again (issue108), and
changes it search the entire repository by default (instead
of just the cwd), just like all other commands.

It also hides issue204 by default, but you'll still see the
same behaviour if you give it a relpath: pattern.
2007-03-10 23:00:57 -03:00
Alexis S. L. Carvalho
21115ad8b7 localrepo.walk: if we're walking a specific revision, sort the files
This is more consistent with our behaviour while walking the working directory.
2007-03-10 23:00:55 -03:00
Alexis S. L. Carvalho
393022dbbb dirstate.statwalk: explicitly test for ignored directories
This removes a hack where we appended '/' to a dirname so that:
- it would not appear on the "dc" dict
- it would always be matched by the match function

This was a contorted way of checking if the directory was matched by
some hgignore pattern, and it would still fail with some uses of
--include/--exclude patterns.

Things would still work fine if we removed the check altogether and
just appended things to "work" directly, but then we would end up
walking ignored directories too, which could be quite a bit of work.

This allows further simplification of the match function returned by
util._matcher, and fixes walking the working directory with a
--include pattern that matches only the end of a name.
2007-03-10 23:00:54 -03:00
Alexis S. L. Carvalho
6ccee3793b util._matcher: unify pattern normalization
This should fix issue347.

It also highlights one issue with the directory walking code when
you have an --include pattern that matches the end of a filename.
This is fixed by the next patch.
2007-03-10 23:00:53 -03:00
Alexis S. L. Carvalho
b1a0b259b7 make the output of test-walk more readable 2007-03-10 23:00:52 -03:00
Alexis S. L. Carvalho
cc4356d95d util.*matcher: change default "names" argument
names=['.'] means "include (recursively) only files from the current subdir";
the function then did a hack to walk the whole tree.  Clean that up.

This also fixes a problem where "--include ." works in a subdir, but not
on the tree root.
2007-03-10 23:00:51 -03:00
Alexis S. L. Carvalho
7a7a8339ec util._matcher: fix handling of path: patterns 2007-03-10 23:00:49 -03:00
Alexis S. L. Carvalho
a2bea59405 util._matcher: fix handling of relglob: patterns 2007-03-10 23:00:48 -03:00
Alexis S. L. Carvalho
c83e2fe93d A 'glob:foo?bar' pattern determines a root - the tree root 2007-03-10 23:00:47 -03:00
Alexis S. L. Carvalho
c576480d83 Leave normalization of patterns to util._matcher
Passing [] to util.cmdmatcher accidentally fixes walking of files
with "\n" in the name.
2007-03-10 23:00:46 -03:00
Brendan Cully
28541ac316 Test update to branch tip 2007-03-10 17:36:29 -08:00
Alexis S. L. Carvalho
d3e0262e32 fix qrefresh'ing an empty patch
This is not superefficient (the commit will have to walk the whole tree),
but it works.
2007-03-10 22:03:23 -03:00
Thomas Arendsen Hein
5329cb6bed Add tests for .hg/branches.cache feature list. 2007-03-09 19:57:26 +01:00
Thomas Arendsen Hein
71a353f733 Add a features list to branches.cache to detect caches of old hg versions.
The leading space in the written file makes sure that the feature list never
can match an existing version, even if the first feature can be read as hex.
Additionally old hg versions display the id with --debug, too.
2007-03-09 19:12:03 +01:00
Thomas Arendsen Hein
92fa573aed Store empty (default) branch in branch cache, too.
Operations on this branch don't work otherwise.

Reading branches.cache had to be adjusted to allow an empty label.
Adjusted reading of the cache tip for symmetry, no functional change here.
2007-03-09 18:09:02 +01:00
Thomas Arendsen Hein
76f9bcadf6 Fix sed expression in test-notify to be more portable. 2007-03-07 15:06:32 +01:00
Thomas Arendsen Hein
1de135fc65 Fix help text for hg status -i 2007-03-06 12:52:07 +01:00
Thomas Arendsen Hein
2c5a2d1059 Don't truncate tag and branch names after 30 chars (introduced 42bf4f46781a)
with test added for a long (local) tag name.
2007-03-05 19:48:21 +01:00
Christian Ebert
cf8f1b83bb mq: abort cleanly when invalid patch name is given to qguard 2007-03-03 17:54:13 +01:00
Patrick Mezard
c887e90ae6 web/server: disable address reuse option for BaseHTTPServer on windows
On windows, a socket with the SO_REUSEADDR option set is able to bind to
any port, even if there's already an active socket listening on it.

test-http: check server address cannot be reused.
2007-02-19 10:08:59 +01:00
Thomas Arendsen Hein
a93551d740 Unified #! paths for python scripts and removed them for test modules. 2007-03-01 22:15:17 +01:00
Matt Mackall
4458a1780a merge: fix renaming of subdirectories under renamed directories 2007-02-27 16:20:06 -06:00
Christian Ebert
d0e9855977 test-notify: adapt to sed shipped with MacOS
MacOS X' sed does not have the \? repetition operator.
2007-02-17 09:54:44 +01:00
Alexis S. L. Carvalho
8cab83c8ec git binary patches: don't print the header for identical files 2007-02-17 09:55:00 -02:00
Alexis S. L. Carvalho
42cf1a555f add test for diffing identical binary files 2007-02-17 09:54:58 -02:00
Alexis S. L. Carvalho
f03ddd16f8 notify: don't try to fix addresses if notify.domain is not set 2007-02-16 04:54:49 -02:00
Alexis S. L. Carvalho
14c4429263 git patches: handle renames of binary files 2007-02-16 04:54:46 -02:00
Alexis S. L. Carvalho
86353c5094 qclone: don't call reposetup manually 2007-02-15 08:44:08 -02:00
Jun Inoue
db15047102 Fix accessing the repo through a symlink. 2007-02-15 05:18:23 -02:00
Alexis S. L. Carvalho
06a58ad86b Try to pass repo.ui to reposetup hooks
The ui object we received in this function may belong to another repo,
which could be confusing from the hook point of view.  Trying to use
the ui object from the newly created repo should avoid this confusion.
2007-02-08 16:31:21 -02:00
Alexis S. L. Carvalho
5357b68523 fix strip'ping the second parent of a merge 2007-02-06 15:54:58 -02:00
Alexis S. L. Carvalho
60b9229aaa install reposetup hook right after loading the extension 2007-02-06 15:43:01 -02:00
Alexis S. L. Carvalho
9248b0bde4 filecommit: don't forget the local parent on a merge with a local rename 2007-01-30 19:09:08 -02:00
Thomas Arendsen Hein
1be2af280f Abort on empty username so specifying a username can be forced.
This behaviour was introduced by d5601ef79d86 and broken by c608116532fe.
Added test for this.
2007-01-24 23:04:51 +01:00
Alexis S. L. Carvalho
83a6730e68 add test for 8d53ef723a6c 2007-01-15 16:13:50 -02:00
Giorgos Keramidas
d80dabf492 Use printf(1) instead of using bash-specific shell code.
Submitted by:  Benoit Boissinot <bboissin@gmail.com>
2006-12-30 21:33:45 +02:00
Alexis S. L. Carvalho
86f6bc24c9 test-ssh: use printenv.py 2007-03-26 23:50:04 -03:00
Alexis S. L. Carvalho
103261031e test-static-http: use printenv.py 2007-03-26 23:50:03 -03:00
Alexis S. L. Carvalho
d4b1857115 test-http: use printenv.py 2007-03-26 23:50:01 -03:00
Alexis S. L. Carvalho
407a615eda test-push-http: use printenv.py 2007-03-26 23:50:00 -03:00
Alexis S. L. Carvalho
ecc207348d test-bundle: use printenv.py 2007-03-26 23:49:59 -03:00
Alexis S. L. Carvalho
c035cb5e84 test-hook: use printenv.py 2007-03-26 23:49:58 -03:00
Alexis S. L. Carvalho
a216429aba Add tests/printenv.py
This is a small script that can be used as a hook to print the
HG_* environment variables without relying on the shell.
2007-03-26 23:49:56 -03:00
Matt Mackall
035527c39a Merge with crew 2007-03-24 02:57:27 -05:00
Matt Mackall
4ae8d87bd3 changelog: optimize delayed updates for clone vs pull
pull index updates get redirected to memory, then appended on finalize
clone index updates get sent to 00changelog.i.a, then renamed on finalize
2007-03-24 02:47:33 -05:00
Matt Mackall
1139bf86fc Merge with -stable 2007-03-24 02:45:08 -05:00
Alexis S. L. Carvalho
68182e8946 Add some tests for symlink tracking 2007-03-23 23:40:24 -03:00
Alexis S. L. Carvalho
ec44599dd1 Merge additional fixes for my matcher changes 2007-03-20 22:21:05 -03:00
Thomas Arendsen Hein
be73c0d3f9 merge with crew-stable 2007-03-18 20:44:58 +01:00
Alexis S. L. Carvalho
dd2869375e Merge some matcher fixes/cleanups and add some more hg locate tests 2007-03-16 22:58:49 -03:00
Alexis S. L. Carvalho
47cb22b5a2 Merge with crew-stable 2007-03-16 00:45:18 -03:00
Brendan Cully
a9c9e44ab7 Merge with mpm 2007-03-14 18:01:24 -07:00
Matt Mackall
ec3d12a085 Merge with -stable 2007-03-14 19:17:40 -05:00
Matt Mackall
d6ce65f557 tags: add --remove 2007-03-14 19:13:04 -05:00
Matt Mackall
6788bba79c Make the tags algorithm smarter 2007-03-14 18:47:29 -05:00
Brendan Cully
c7cf8a52b7 mq: add qparent tag (first parent of qbase) 2007-03-14 10:45:18 -07:00
Matt Mackall
e896adead6 Merge with -stable, fix small test failure 2007-03-14 01:26:09 -05:00
Matt Mackall
c1ade819b5 Remove dummy branch hack from tests 2007-03-13 18:53:23 -05:00
Matt Mackall
c2bb73121f Move branch read/write to dirstate where it belongs 2007-03-13 18:50:02 -05:00
Matt Mackall
2e188aa5f4 Move branches.cache to branch.cache
Keeps old clients from conflicting with new caches, makes features
logic unnecessary.
2007-03-13 15:18:10 -05:00
Alexis S. L. Carvalho
fd69fe8d91 "default" is the default branch name 2007-03-13 15:02:33 -03:00
Brendan Cully
38ced1ab4c Add test for branch shadowing 2007-03-12 14:50:19 -07:00
Alexis S. L. Carvalho
641d95a966 Merge a bunch of matcher and locate fixes. 2007-03-10 23:21:33 -03:00
Brendan Cully
5641becd5a Merge with crew-stable 2007-03-10 17:45:32 -08:00
Thomas Arendsen Hein
93517f55c3 merge with crew-stable 2007-03-09 20:08:13 +01:00
Alexis S. L. Carvalho
5aa5bd63db small fixes for the parent patch
- format.usestore is a boolean option
- python wart: ("revlogv1") is a string, not a tuple
- only create a dummy changelog if we're using a store
- add a test
2007-03-08 20:08:24 -03:00
Alexis S. L. Carvalho
459a418ffd incoming/outgoing: print the name of the other repo 2007-03-07 15:26:03 -03:00
Thomas Arendsen Hein
893fecd5c8 merge with crew-stable 2007-03-07 15:06:57 +01:00
Alexis S. L. Carvalho
d879f85126 purge.py: fix invocation of statwalk 2007-03-06 17:45:50 -03:00
Emanuele Aina
91ceddb96e Add a test for the purge extension 2007-03-06 17:45:38 -03:00
Thomas Arendsen Hein
92f5af0b0d merge with crew-stable 2007-03-05 19:54:21 +01:00
Alexis S. L. Carvalho
a966d29355 test-abort-checkin: use a hook to abort the commit
This should make it more portable.
2007-03-04 14:35:11 -03:00
Alexis S. L. Carvalho
d6f4e70b38 test-bad-extension: avoid printing the file name
This should make it simpler on windows
2007-03-04 14:09:29 -03:00
Alexis S. L. Carvalho
74da623ca7 make test-acl a bit more digestable for windows 2007-03-04 14:04:42 -03:00
Giorgos Keramidas
e12d68d5ce Create the parent directory when checking out symlinks. 2007-02-23 17:54:34 +02:00
Erling Ellingsen
77c63b0f24 Avoid some false positives for addremove -s
The original code uses the similary score

  1 - len(diff(after, before)) / len(after)

The diff can at most be the size of the 'before' file, so any small
'before' file would be considered very similar. Removing an empty file
would cause all files added in the same revision to be considered
copies of the removed file.

This changes the metric to

  bytes_overlap(before, after) / len(before + after)

i.e. the actual percentage of bytes shared between the two files.
2007-02-18 20:39:25 +01:00
Alexis S. L. Carvalho
93eb041452 Merge with crew-stable 2007-03-04 09:03:21 -03:00
Thomas Arendsen Hein
05d497adec merge with crew-stable 2007-03-01 22:15:56 +01:00
Matt Mackall
53a83c6c22 Merge with stable 2007-02-27 16:47:16 -06:00
Thomas Arendsen Hein
c20f16ea94 Fixed workingfilectx.date() (found by Thomas Waldmann) with test. 2007-02-23 17:31:00 +01:00
Thomas Arendsen Hein
134efad44c merge with crew-stable 2007-02-20 20:55:23 +01:00
Alexis S. L. Carvalho
b380c48d7c add some tests for qpush/qpop error codes 2007-02-17 04:50:06 -02:00
Alexis S. L. Carvalho
d4de823a64 merge with crew-stable 2007-02-16 05:27:37 -02:00
Alexis S. L. Carvalho
6dc09d1834 Fix hg showconfig traceback with values that aren't strings 2007-02-15 10:15:08 -02:00
Alexis S. L. Carvalho
744364abd4 merge with crew-stable 2007-02-13 10:25:45 -02:00
Alexis S. L. Carvalho
d8dc29a091 mq: qinit -c creates a repo even after a regular qinit 2007-02-09 03:48:30 -02:00
Alexis S. L. Carvalho
20406a3e01 Handle functions as the value of a hooks.<name> config variable
This should make it easier for extensions to add a hook when
they're loaded.
2007-02-09 03:48:28 -02:00
Alexis S. L. Carvalho
e9dc052e2a allow values that aren't strings in util.configparser 2007-02-09 03:48:26 -02:00
Matt Mackall
28f682beac Merge with stable 2007-02-06 16:12:22 -06:00
Alexis S. L. Carvalho
fff454d591 Merge with crew-stable 2007-01-30 19:36:56 -02:00
Brendan Cully
137383b259 transplant: test non-local source 2007-01-30 11:40:17 -08:00
Thomas Arendsen Hein
f599c21b8e merge with stable 2007-01-24 23:07:09 +01:00
Brendan Cully
3a0b27de15 Make test-transplant test pull case 2007-01-16 12:52:03 -08:00
Brendan Cully
71cca7d694 Minor test-transplant cleanup 2007-01-16 12:38:26 -08:00
Thomas Arendsen Hein
46055c07ca sync with -stable 2007-01-02 22:40:52 +01:00
Matt Mackall
2e27ddd82b symlinks: use is_link wherever is_exec is used 2006-12-29 20:04:31 -06:00
Benoit Boissinot
9b95329263 various doc fixes
- update can no longer be used to merge
- short summary start with lowercase
- add merge to short help list
- fix tests
2006-12-29 06:37:43 +01:00
Benoit Boissinot
4247929c84 fix hg help <ext> for extension that do not define any command
solve issue462
2006-12-26 21:59:01 +01:00
Thomas Arendsen Hein
28f17c0cc7 Improved error message for extensions overriding commands (with test):
- Old text "module foo overrides bar" was misread as overriding module bar.
- Only print a single warning line per extension instead of one for each
  command.
2006-12-26 15:33:50 +01:00
Thomas Arendsen Hein
3b41677e92 sync with stable 2006-12-26 14:54:48 +01:00
Thomas Arendsen Hein
7701e96286 Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm. 2006-12-26 14:17:48 +01:00
Benoit Boissinot
184e223932 test-manifest-merging: we only need to remove files 2006-12-24 22:28:01 +01:00
Benoit Boissinot
df9bc9df7c test-manifest-merging: we only need to remove files 2006-12-24 22:28:01 +01:00
Brendan Cully
15d31f9f1f Make test-manifest-merging less likely to delete the whole filesystem 2006-12-22 16:29:35 -08:00
Brendan Cully
1fb375cdf0 Make test-manifest-merging less likely to delete the whole filesystem 2006-12-22 16:29:35 -08:00
Benoit Boissinot
e55b0be33e grep: remove count handling, simplify, fix issue337 2006-12-22 22:51:39 +01:00
Benoit Boissinot
0c9cf6b950 grep: incrementing is always False during 'iter' 2006-12-22 22:16:05 +01:00
Brendan Cully
264442a0e4 Merge with mpm 2006-12-20 12:07:02 -08:00
Brendan Cully
c1a572ba46 hgweb: simple tests 2006-12-19 17:14:45 -08:00
Matt Mackall
671ae9b9ab Move test suite docs to the wiki 2006-12-19 16:38:14 -06:00
Matt Mackall
887599574c Sync with -stable 2006-12-17 21:48:22 -06:00
Benoit Boissinot
fc997dfbf2 fix calculation of new heads added during push with -r
fix issue450
2006-12-17 05:00:22 +01:00
Thomas Arendsen Hein
f2c2df1ab1 merge with crew-stable 2006-12-16 23:36:06 +01:00
Thomas Arendsen Hein
c72030a3d2 Adjust test-help output for the change in 28dd65def6cd. 2006-12-16 23:33:24 +01:00
Thomas Arendsen Hein
1d64670235 Fix test-hup for different output of ls on at least MacOS X and Solaris 8. 2006-12-16 23:24:30 +01:00
Thomas Arendsen Hein
c0034c572a doc fix: hg tags defaults to current parent revision, too.
Additionally use better language for the help text for tag,
cat and manifest.
2006-12-16 22:58:10 +01:00
Thomas Arendsen Hein
fb1cbb4570 doc string fix: hg cat and manifest default to current parent revision. 2006-12-16 22:33:39 +01:00
Brendan Cully
8c26621151 Merge with crew-stable 2006-12-15 18:38:09 -08:00
Thomas Arendsen Hein
a6c0381996 Don't use node length for calculating revision number length.
Done by moving repo.lookup of revisions from commands.export to patch.export
2006-12-15 19:30:20 +01:00
Thomas Arendsen Hein
f0c446ce6e Make sequence number on hg export start at 1 (as documented for %n). Add test. 2006-12-15 19:09:10 +01:00
Mathieu Clabaut
35ae1218d2 Add sending date to notify message.
When using SMTP, no date field was set into the message, which causes it to be
displayed as being send on 1st january 1970 on most MUA.
2007-05-24 16:32:38 +02:00
Brendan Cully
19123a0330 Merge with main 2006-12-14 13:49:33 -08:00
Thomas Arendsen Hein
429e98a404 Corrected synopsis for many commands.
Use CMD instead of FILE for -e and --remotecmd (thanks, Neal Becker)
2006-12-14 19:30:18 +01:00
Matt Mackall
2623870448 Remove deprecated old-style branch support 2006-12-12 18:16:23 -06:00
Thomas Arendsen Hein
ec97d785b1 Fix test output for test-mq-guards (changed by e7ca2aa11f8f) 2006-12-12 19:11:01 +01:00
Thomas Arendsen Hein
a721ac99f0 Add instructions how to redo/finish failed merge with local working directory.
d29fcc4d1e2a already implemented this for branch merges.
2006-12-11 18:09:52 +01:00
Alexis S. L. Carvalho
63ae667098 Use UTF-8 in .hg/branch 2006-12-10 20:35:28 -02:00
Matt Mackall
6d9bbc8702 Merge Benoit's .hg/store support 2006-12-10 02:11:02 -06:00
Matt Mackall
6665cfa7a3 Add some remedies and a username check to debuginstall 2006-12-10 01:05:00 -06:00
Matt Mackall
306a24652c Make debuginstall actually attempt to use external patch and merge
This will catch some tricky problems with tools and setup.
2006-12-10 00:44:52 -06:00
Matt Mackall
a9176a1e50 Make test-encoding return 0 2006-12-10 00:06:31 -06:00
Matt Mackall
135cce014c Add debuginstall command to do basic install tests 2006-12-10 00:05:47 -06:00
Matt Mackall
03f3b2efc4 make transcoding more robust
default to ASCII
abort if unknown encoding
wrap abort strings with _
add test
2006-12-09 12:46:01 -06:00
Thomas Arendsen Hein
731e6e0280 Show the destionation for clone if not specified manually. 2006-12-09 14:19:52 +01:00
Thomas Arendsen Hein
092e05b0b9 Fixes test-encoding for python2.3 and minor cleanups:
- Use koi8-r instead of euc-jp, as the later isn't available in python2.3.
- Add unicode representation for latin1 e', too.
- Use date "1000000 0" like in other tests (though not strictly needed
  because we no longer use %c as default datestr format).
2006-12-09 11:16:27 +01:00
Matt Mackall
daf6a67d1c Fix log regression where log -p file showed diffs for other files 2006-12-08 20:44:58 -06:00
Alexis S. L. Carvalho
edf9fef62b Allow the user to specify the fallback encoding for the changelog
Example: use EUC-JP instead of ISO-8859-1:

[ui]
fallbackencoding = EUC-JP
2006-12-08 22:01:05 -02:00
Thomas Arendsen Hein
82505cdc53 Removed unknown option -t in test-status 2006-12-08 23:33:32 +01:00
Matt Mackall
3d47c99e83 Merge with crew 2006-12-08 15:05:39 -06:00
Matt Mackall
a32d76f358 Add doc notes about revert and hg status vs diff 2006-12-08 14:55:45 -06:00
Alexis S. L. Carvalho
2b3be537b8 log: convert branch names to the local encoding 2006-12-08 01:36:50 -02:00
Alexis S. L. Carvalho
8e669882ac fix hg diff -r '' 2006-12-07 14:15:11 -02:00
Matt Mackall
54ad6abe29 Update tests 2006-12-06 13:13:44 -06:00
Matt Mackall
9630fc215f parsedate: use Abort rather than ValueError 2006-12-06 13:13:26 -06:00
Thomas Arendsen Hein
f6d571d204 Don't report an error when closing heads during local push (issue387) 2006-12-05 23:25:28 +01:00
Thomas Arendsen Hein
f18c368506 Use python instead of shell printf with \x sequences for test-encoding.
Needed e.g. to be compatible with Solaris.
2006-12-05 11:23:37 +01:00
Benoit Boissinot
e005ffc8c4 switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
Benoit Boissinot
69d31c9562 add "requires" file to the repo, specifying the requirements 2006-12-10 00:06:59 +01:00
Alexis S. L. Carvalho
7d0dc1d604 make hg commit <dirname> work again 2006-11-21 20:00:15 -02:00
Matt Mackall
880daa82ce Make quoting in test-encoding simpler 2006-12-04 14:32:02 -06:00
Matt Mackall
d128a67002 update test-debugcomplete 2006-12-04 01:21:53 -06:00
Matt Mackall
18df2fdfd7 test-encoding: copy a bundle from TESTDIR rather than constructing one 2006-12-03 17:28:58 -06:00
Matt Mackall
1300ae1a67 Hex-encode ! in test-encoding printf
Naked ! tends to confuse shells
2006-12-03 16:51:50 -06:00
Matt Mackall
37b816aaf1 Add output for encoding test 2006-12-03 16:31:25 -06:00
Matt Mackall
0849854893 Add a charset encoding test case 2006-12-03 16:16:33 -06:00
Matt Mackall
ab12bf1889 tests: set a default encoding for running tests (ASCII) 2006-12-03 16:16:33 -06:00
Alexis S. L. Carvalho
1f3671ab6b fix qseries -v and guards interaction
- rename "status" variable to avoid shadowing an argument
- use a better test to determine whether a patch is applied
2006-12-02 18:41:07 -02:00
Alexis S. L. Carvalho
e953792af4 Ignore all errors while parsing the branch cache. 2006-12-02 03:38:55 -02:00
Alexis S. L. Carvalho
b23caa6548 small fixes for test-newbranch
- hg tip doesn't use the branch cache; use hg log -r in its place
- commit doesn't use a HG_MERGE environment variable
- change the dates from "0 0" to "1000000 0"
2006-12-02 03:16:17 -02:00
Brendan Cully
77c7691d79 transplant: log source node when recovering too. 2006-12-01 15:00:33 -08:00
Thomas Arendsen Hein
9e4b3b8023 Don't require a diff which accepts the -N option. 2006-12-01 22:29:47 +01:00
Thomas Arendsen Hein
f3e9b24c98 Compatibility fix for 'ln -sf'.
ln of Solaris 8 only accepts "ln -f -s" (in that order), but as the -f isn't
needed here, I simply dropped it.
2006-12-01 22:09:05 +01:00
Alexis S. L. Carvalho
ea7eb1125c additional fixes for issue436 2006-12-01 16:18:16 -02:00
Thomas Arendsen Hein
ecaffdb830 Fix test-rename-dir-merge for different implementations of ls. 2006-12-01 15:40:23 +01:00
Thomas Arendsen Hein
567a43dbef Fix test-notify for systems without or with a different version of diffstat.
Some diffstat versions say "1 file changed", others "1 files changed".
2006-12-01 14:46:05 +01:00
Benoit Boissinot
14bbb468b3 add test for issue436 2006-12-01 09:42:07 +01:00
Matt Mackall
c571577922 add test for the notify extension 2006-12-01 01:29:13 -06:00
Matt Mackall
2085d36412 make manifest friendlier
switch to using context code
..which uses first parent by default
show file hashes only with debug switch
show permissions with verbose
fix up tests
2006-11-30 22:38:48 -06:00
Matt Mackall
d664d787b4 Add missing test output 2006-11-30 19:50:28 -06:00
Matt Mackall
b24119a251 Fix test permission 2006-11-30 18:22:44 -06:00
Matt Mackall
05748f203d merge: handle directory renames
commit: handle new copy dirstate case correctly
findcopies:
 keep a map of all copies found for directory logic
 add dirs filter
 check for merge:followdirs config option
 generate a directory move map
 find files that match directory move map
manifestmerge:
 add directory rename cases
applyupdates:
 skip actions with None file
 add "d" action
recordupdates:
 add "d" action
add simple directory rename test
2006-11-30 17:36:33 -06:00
Matt Mackall
f9ab52977a merge: only store one direction of copies in the copy map
simplify checkpair
generate copied hash from copy map
make copy cases more symmetrical
2006-11-30 17:36:33 -06:00
Matt Mackall
8732a61bab merge: report destinations of moves in merge action messages 2006-11-30 17:36:33 -06:00
Brendan Cully
deae5133ad transplant: recover added/removed files after failed application 2006-11-30 13:51:58 -08:00
Brendan Cully
e5abdcc7fc transplant: fix --continue; add --continue test 2006-11-30 11:09:25 -08:00
Thomas Arendsen Hein
aaab521292 Make sed expression in test-committer compatible with GNU sed 3.x. 2006-11-29 08:49:45 +01:00
Benoit Boissinot
3bad25e752 only print a warning when no username is specified
- revert most of 8b55c0ba
- display the username during interactive commit
2006-11-28 21:16:05 +01:00
Benoit Boissinot
a6e6999181 add test for issue433 2006-11-28 11:28:45 +01:00
Alexis S. L. Carvalho
3ef2e9ed94 fix hg log -r '' 2006-11-27 22:56:26 -02:00
Alexis S. L. Carvalho
7781594dc0 handle files with more than one git binary patch 2006-11-27 22:03:36 -02:00
Alexis S. L. Carvalho
b0141a470e handle files with both git binary patches and copy/rename ops 2006-11-27 22:03:31 -02:00
Brendan Cully
dc483d8d44 Add transplant extension 2006-11-27 15:13:01 -08:00
Benoit Boissinot
684e2e23c3 don't create the .hg/data at init time 2006-11-27 22:22:44 +01:00
Giorgos Keramidas
186991c839 Expand test-commit to cover one of the recent bugs. 2006-11-22 00:53:56 +02:00
Alexis S. L. Carvalho
6d99bd2633 Don't generate git patches that rename a file to multiple destinations
With this patch, instead of generating N renames, we'll generate
1 rename and N-1 copies.

Ideally the rename should come after the copies instead of before
them, but that'd be harder to do.
2006-11-20 19:32:46 -02:00
Alexis S. L. Carvalho
7f7845c518 handle git patches that rename a file to more than one destination 2006-11-20 19:32:45 -02:00
Alexis S. L. Carvalho
f6e774dd91 qrefresh: fix handling of copies in the fast path 2006-11-20 19:32:43 -02:00