Commit Graph

1700 Commits

Author SHA1 Message Date
Alexis S. L. Carvalho
dd492604df filectx.ancestor: use fctx._repopath to cache filelogs (issue1035)
_repopath may be different from _path for workingfilectx when there
are renames involved.
2008-03-16 06:10:47 -03:00
Alexis S. L. Carvalho
03368f5190 Revert 854bf5451519, fixing the output of 2 tests 2008-03-15 22:03:18 -03:00
Alexis S. L. Carvalho
dd2922fa95 test-mv-cp-st-diff: avoid linkrev collisions
The copy detection code relies heavily on the linkrevs, so it's better
to avoid collisions in this test.
2008-03-15 22:03:18 -03:00
Patrick Mezard
107a228e2f patch: check filename is /dev/null for creation or deletion (issue 1033)
Otherwise, file creation or deletion is ambiguous with file being filled or
emptied.
2008-03-16 00:35:12 +01:00
Matt Mackall
9f54c46920 update tests for copy detection changes 2008-03-15 16:51:53 -05:00
Matt Mackall
fac4139990 copies: add tests for status -C/diff --git
This goes through 42 combinations of copy/rename branch/parent/working dir.
2008-03-15 16:49:27 -05:00
Alexis S. L. Carvalho
e42ba91ec9 hook.py: fix redirections introduced by 59a5ced38398
The only non-obvious part is the use of sys.{__stderr__,__stdout__},
which is needed because sshserver overrides sys.stdout.

This makes a test that I added back in revision d71c96fd819f ineffective.
2008-03-14 21:57:46 -03:00
Thomas Arendsen Hein
12e60b5991 adjust test-http output to non-default HGPORT, e.g. with run-tests.py -j 2008-03-14 23:51:58 +01:00
Stephen Deasey
b6ba89dcec hgweb: clarify which address and port can/cannot be bound at startup (bug 769)
The error message at startup when the address/port could not be bound
was confusing:

    hg serve
    abort: cannot start server: Address already in use

Be more explicit:

    $ hg serve -a localhost
    abort: cannot start server at 'localhost:8000': Address already in use

Also be more explicit on success, showing hostname and ip address/port:

    $ hg -v serve -a localhost -p 80
    listening at http://localhost/ (127.0.0.1:80)


We are careful to handle a missconfigured machine whose hostname does not
resolve, falling back to the address given at the command line.

Remove a dead-code error message.
2008-03-10 19:25:34 +00:00
Alexis S. L. Carvalho
6f8858904c Fix issue995 (copy --after and symlinks pointing to a directory)
I haven't looked at other places that call os.path.isdir to make
sure they're OK.
2008-03-14 10:32:19 -03:00
Alexis S. L. Carvalho
fa062ecb4c merge: require --force when there are deleted files 2008-03-14 09:56:58 -03:00
Alexis S. L. Carvalho
43ac0bffb6 add a test for 6acd9ff3f1ac 2008-03-14 09:56:58 -03:00
Alexis S. L. Carvalho
4789a32b07 localrepo.commit: normalize commit message even for rawcommit.
This normalization consists of:
- stripping trailing whitespace
- always using "\n" as the line separator

I think the main reason rawcommit was skipping this normalization was
an attempt to preserve hashes during an hg->hg conversion.

While this is a nice goal, it's not particularly interesting in
practice.  Since SHA-1 is so strong, the only safe way to do it is to
have absolutely identical revisions.  But:

- if the original revision was created with a recent version of hg,
  the commit message will be the same, with or without that
  normalization

- if it was created with an ancient version of hg that didn't do any
  normalization, even if the commit message is identical, the file list
  in the changelog is likely to be different (e.g. no removed files),
  and there were some old issues with e.g. extra file merging, which
  will end up changing the hash anyway

- in any case, if one *really* has to preserve hashes, it's easier
  (and faster) to fake a partial conversion using something like:

  hg clone -U -r rev orig-repo new-repo
  hg -R new-repo log --template '#node# #node#\n' > new-repo/.hg/shamap

Additionally, we've had some reports of problems arising from this lack
of normalization - e.g. issue871, and a user that was wondering why
hg export/hg import was not preserving hashes when there was nothing
unusual going on (it was just import doing the normalization that had
been skipped).

This also means that it's even more unlikely to get identical revisions
when going $VCS->hg->$VCS.
2008-03-14 09:56:58 -03:00
Alexis S. L. Carvalho
88defcf937 update output of test-hgweb 2008-03-14 09:56:58 -03:00
Thomas Arendsen Hein
597f358322 adjust test-fetch output to non-default HGPORT, e.g. with run-tests.py -j 2008-03-14 01:39:15 +01:00
Benoit Boissinot
3a35d838ed run-tests.py: add a summary of failed tests at the end 2008-03-13 17:39:30 +01:00
Patrick Mezard
b31dc66c25 convert: rename MAPFILE into REVMAP to disambiguate with filemap 2008-03-12 23:21:01 +01:00
Thomas Arendsen Hein
61fdf43543 Add tests for the fixes to issue1014 (fractional timezones) 2008-03-12 22:20:10 +01:00
Thomas Arendsen Hein
36ad657bd7 test-fetch failed due to non-zero exit code 2008-03-12 09:04:20 +01:00
Matt Mackall
865487e7f2 revlog: report node and file when lookup fails 2008-03-11 17:42:29 -05:00
Bryan O'Sullivan
f9f5e47a2f fetch: don't proceed if working directory is missing files (issue988) 2008-03-11 11:38:12 -07:00
Peter Arrenbrecht
33ae436dd8 hgweb: fix test results missed by 6218:94688fe8c7c3 2008-03-07 08:38:07 +01:00
Joel Rosdahl
9c3f9d4bd6 imerge: Fix unbound name error and add a test case 2008-03-06 22:23:41 +01:00
Joel Rosdahl
4f8012378a Remove unused imports 2008-03-06 22:23:41 +01:00
Thomas Arendsen Hein
deb94bc7fe Removed trailing spaces from everything except test output 2008-03-07 00:24:36 +01:00
Thomas Arendsen Hein
9ff01ae3fe Replaced tab in run-tests.py 2008-03-07 00:01:13 +01:00
Peter Arrenbrecht
85ef77aca1 tests: add --keep-tmp to run-tests.py to debug test environment
When set, you can find the working dir of the test run as a
uniquely named subdirectory of --tmpdir so you can inspect
it.
2008-03-05 08:00:05 +01:00
Bryan O'Sullivan
7ccd4e897d fetch: make test reproducible, tiny code cleanup 2008-03-05 09:20:57 -08:00
Bryan O'Sullivan
d160458ee9 fetch: switch the default parent used for a merge
This treats newly pulled changes as authoritative, and local changes as
the "satellite" changes.

The prior default behaviour is still available, via the --switch-parent
option.
2008-03-05 09:10:45 -08:00
Peter Arrenbrecht
b99cdae6e3 mq: test for qclone of http repo+queue
tests 4fa9f56bd8a3 and 4afb45fca538
2008-03-03 21:48:43 +01:00
Jesse Glick
5a5b96808a When failing to load an extension, show where Hg tried to load it from. 2008-03-03 12:46:57 -05:00
Thomas Arendsen Hein
d291778049 test-status: Make assert function definition sh compatible. 2008-03-02 20:54:00 +01:00
Thomas Arendsen Hein
d659d68d7a Extend/correct f488b5acd598 regarding -qA and ignored files.
hg status -qA will now hide untracked files as described in the doc string.
2008-03-02 13:52:34 +01:00
Zoran Bosnjak
ddaa8e2b8b 'hg status -q' output skips non-tracked files.
The '-q' flag was ignored in status command. But this flag
can be used to hide non-tracked files in hg status output.
This small correction makes status command more general,
similar to 'svn status', where '-q' flag has the same effect.

The '-u' and '-A' flags have priority over '-q'.

A testcase and doc-string for status was extended to cover
'-q' flag.
2008-03-01 22:30:03 +01:00
Thomas Arendsen Hein
5ef42250f9 Add option -l/--limit to hg incoming and hg outgoing. 2008-02-29 02:15:31 +01:00
Thomas Arendsen Hein
da3b50be51 Add config option to disable putting .hg_archival.txt inside archives. 2008-02-28 22:39:59 +01:00
Dirkjan Ochtman
90d248f9a6 warning on push should mention heads, not branches
This makes the concept easier to relate to similar messages given on pull,
and allows for a distinction between heads and (named) branches.
2008-02-28 17:51:04 +01:00
Patrick Mezard
d5040b6003 patch: fix iterhunks() with trailing binary file removal
Like some renames or copy operations, binary file removal does not generate any
"file" or "hunk" action, but was not tagged as such and let iterhunk() assume
no hunk was applied for the deleted file.
2008-02-28 00:07:37 +01:00
Thomas Arendsen Hein
f4fe19c813 Renamed "manifest" to "files" in web templates.
manifest.tmpl is still used, so people having their own templates don't have
to change them. "cmd=manifest" still works, new style URLs are not affected,
because they already used "/file/".
2008-02-26 22:42:37 +01:00
Jesse Glick
cf2fd9f31a Permit XML entities to be escaped in template output.
Useful for creating XML documents directly from Hg logging. Can also be used for
HTML. For use in content, will escape '&', '<', and for completeness '>'
(although it is not strictly necessary). For use in attributes, will also escape
' and ". Will also replace nonprinting (ASCII) control characters with spaces,
since these are illegal in XML.
2008-01-28 22:19:12 -05:00
Patrick Mezard
1bee8eb741 convert: add shallow, single branch svn conversions via svn.startrev 2008-02-24 17:58:55 +01:00
Patrick Mezard
e6c6545487 convert: allow svn trunk/branches/tags detection to be skipped
- eluding convert.svn.branches defaults to "branches"
- convert.svn.branches= disables branches detection
- convert.svn.branches=/ is equivalent to former convert.svn.branches=
2008-02-24 17:58:53 +01:00
John Mulligan
868fd6b157 Add --all option to bundle command 2008-02-21 08:24:58 -05:00
Patrick Mezard
7a9633ffc5 Fix test-convert.out after 7258ee216b30 2008-02-23 19:37:44 +01:00
Dirkjan Ochtman
b1672f1ac2 hgweb: fix parameter mixup (issue1001) 2008-02-23 11:19:59 +01:00
Dirkjan Ochtman
6297ff3f5b tests: easier hg serve error diagnosis 2008-02-23 11:18:34 +01:00
Thomas Arendsen Hein
66db9ab9a2 Document log date ranges and mention 'hg help dates' for all commands (issue998) 2008-02-22 21:18:48 +01:00
Thomas Arendsen Hein
9db0aea4ab Add test case for backout on named branches (issue665) 2008-02-22 11:28:14 +01:00
Gilles Moris
09841be9f6 Reverse the way backout is doing the merge
Currently, backout is creating a backout revision as a child node of the
backed out node and will leave you at this new head. This has several
drawbacks:
* this changes the current head
* when there is a long history between the backed out node and the
current head, this will generate a huge number of diffs that are scary
at first sight, and not very natural to review before commit.
The change consists to switch back to the original node as soon as the
backout node (which becomes the new tip) has been created. Then the
--merge option can just merge this new tip in the current node.
* the current head/node is not changed from the user's point of view
* even without using the --merge option, the backout revision is still
easy to locate, as this is the tip
* the merge is much more intuitive as diffs of the merge is right you
are looking to backout
2008-02-21 08:52:52 +01:00
Alexis S. L. Carvalho
5cae264d5a tests: hide the name of the branch cache file 2008-02-21 16:22:31 -03:00
Alexis S. L. Carvalho
a34bc213b5 test-mq-pull-from-bundle: don't print the contents of $HGRCPATH 2008-02-21 16:22:31 -03:00
Alexis S. L. Carvalho
e8fbf94f2c repo.status: also compare flags for files in the lookup list.
We might be able to do something smarter about this in dirstate.status
for files in normallookup state, but that would require some extra
care to keep backwards compatibility.
2008-02-21 16:22:31 -03:00
Alexis S. L. Carvalho
c028f52c83 keyword: remove "identify" and "remove" from nokwcommands
These two commands care about the list of modified files returned
by repo.status and we may need to do a full content comparison to
populate that list.
2008-02-21 16:22:31 -03:00
Alexis S. L. Carvalho
ab8ab21710 test-glog: pass the list of files to commit
test-glog uses debugsetparents instead of update+merge to create
some funky DAGs, and so the dirstate contents won't be consistent
with the checked out revision.

Passing an explicit list of files to commit reduces a bit the
dependency on the dirstate.

Using a non-deprecated rawcommit might be better here.
2008-02-21 16:22:31 -03:00
Bryan O'Sullivan
feae4e35dd Merge with crew 2008-02-20 13:38:16 -08:00
Alexis S. L. Carvalho
6b25d3970d update output of test-convert 2008-02-19 19:34:18 -03:00
Jesse Glick
d21d195944 Infer a --repository argument from command arguments when reasonable.
In particular: if invoked without -R from a CWD not inside a repo, having been
passed one or more file paths as command arguments, where the nearest enclosing
repo of all of those paths is the same, quietly infer a -R option for that repo.
Otherwise abort with an error message as before.
2008-01-25 04:11:32 -05:00
Thomas Arendsen Hein
a1c1677af4 Fix bad behaviour when specifying an invalid date (issue700)
commit (aborts _after_ typing in a commit message)
backout (aborted after the initial revert)
tag (edited .hgtags and couldn't commit)
import (patch applied, then commit fails)
qnew (aborts on bad dates, but writes any valid date into the # Date header)
qrefresh (like qnew)
sign (like tag)
fetch (merge, merge, merge, merge, abort)
2008-02-17 21:34:28 +01:00
Thomas Arendsen Hein
d7cabb1e8d Report filenames with disallowed characters as suggested by Mika Eloranta
(see issue671)
2008-02-17 12:53:57 +01:00
Thomas Arendsen Hein
b04d324f97 hgweb: Quote filenames when downloading raw files. 2008-02-16 18:12:30 +01:00
Thomas Arendsen Hein
a285a14d02 hgweb: Pass only filename instead of full path when downloading raw files.
Before this patch "filename=foo/bar" was sent and e.g. Firefox offered to save
the file as "foo-bar" instead of just "bar".
2008-02-16 17:51:30 +01:00
Patrick Mezard
c909c274fa Merge with crew-stable 2008-02-16 12:46:28 +01:00
Patrick Mezard
b6695538ff convert: fix --datesort ordering
Two branches a and b starting at root, with commits interleaved like:
root a0 a1 b0 a2 a3 b1
were converted in the following order:
root a0 b0 a1 b1 a2 a3

Replace depth based toposort with a more classic traversal method.
2008-02-16 11:55:33 +01:00
Peter Arrenbrecht
a04490ff3f bundlerepo: fix inconsistency of parsed and internal name (issue #821) 2008-02-10 08:53:39 +01:00
Peter Arrenbrecht
3b87e3073c bundlerepo: test exposing inconsistency of parsed and internal name (issue #821) 2008-02-10 08:52:50 +01:00
Alexis S. L. Carvalho
124987b6ed Simplify the output of test-bheads
Also remove unneeded -d and -u commit options.
2008-02-15 23:38:18 -02:00
Thomas Arendsen Hein
c2c0709092 fix test output after 2517d68af91e 2008-02-15 20:06:47 +01:00
Christian Ebert
b2bd63ef17 keyword: add test for patch.diff monkey 2008-02-15 18:36:49 +01:00
Alexis S. L. Carvalho
0ec07a9e3b try to fix test-inherit-mode on HFS+
HFS+ doesn't like setgid directories, so avoid them in most
of the test and do a quick check that doesn't change the
output when everything's OK.
2008-02-15 10:51:35 -02:00
Alexis S. L. Carvalho
d3f4694609 cmdutil.commit: use relative paths in the error messages
This is more consistent with other error messages and requires
less makeup in test-commit and test-symlink-basic.
2008-02-15 10:38:37 -02:00
Alexis S. L. Carvalho
85673c1586 status: put added files that have disappeared in the deleted list
This gives the user an indication that something went wrong with this file:

$ hg add foo
$ rm foo
$ hg status foo
! foo

Fixes issue212.
2008-02-14 18:08:16 -02:00
Alexis S. L. Carvalho
2af8c0c0fe revert: unify forget and remove lists
This doesn't make a difference right now, but after the next revision
some files in state 'a' may end up in the deleted list, and revert
won't be able to just remove all files in that list.
2008-02-14 18:08:16 -02:00
Alexis S. L. Carvalho
9c841e3f7b commands.revert: don't call hg.revert
commands.revert calculates everything that has to be done and then
calls hg.revert to checkout and remove files.  Unfortunately,
hg.revert has to recalculate everything and that can take a long
while, since it always operates on the whole working dir.

Changing commands.revert to manually checkout and remove files
makes things considerably faster, especially if we're reverting
a single file in a repo with a huge number of files.

This should be enough to close issue857.
2008-02-14 18:08:16 -02:00
Thomas Arendsen Hein
f9eaeef169 Fix test-hgweb-commands.out after b72a7dbf78e0 2008-02-14 20:54:52 +01:00
Alexis S. L. Carvalho
10b0412eee push: exit(1) if "push creates new remote branches!" 2008-02-15 15:44:32 -02:00
Alexis S. L. Carvalho
d7bfbe69bb clone: expand the path before saving it in .hg/hgrc
This should fix issue976
2008-02-13 18:37:38 -02:00
Alexis S. L. Carvalho
0a6e6532aa qinit -c: add ^\.hg and ^\.mq to .hgignore 2008-02-08 18:07:55 -02:00
Alexis S. L. Carvalho
c32e3d63c7 dirstate.status: avoid putting ignored files in the unknown list
If list_ignored was false, we would blindly add files not in the
dirstate to the unknown list.

This should finish fixing issue886.
2008-02-08 18:07:55 -02:00
Alexis S. L. Carvalho
72ccf087ac dirstate: don't walk ignored directories
With a pattern like '^directory$' in .hgignore, a "hg status directory"
would still walk "directory" and all its subdirs.

This is the first half of a fix for issue886.
2008-02-08 18:07:55 -02:00
Alexis S. L. Carvalho
0cc1119511 revert: don't assume ignored files will be returned in the unknown list
That's just an artifact of the current implementation, and I'll change
that soon.

Bonus points:
- we don't care about the unknown list at all
- we don't print an extra message if we try to revert a removed file
  that is not present in the target revision
2008-02-08 18:07:55 -02:00
Alexis S. L. Carvalho
4eaa054575 revert: revert clean files when only a change of flags is needed 2008-02-08 18:07:55 -02:00
Dirkjan Ochtman
3539f58d90 make static-http work with empty repos (issue965) 2008-02-08 11:50:37 +01:00
Patrick Mezard
83e45fd5f7 mq: qimport must read patches in binary mode 2008-02-06 23:09:13 +01:00
Dirkjan Ochtman
c185787ac3 cleanly abort on unknown archive type (issue966) 2008-02-05 15:54:42 +01:00
Alexis S. L. Carvalho
e61b27b1b7 update the branch cache at the end of addchangegroup
This should avoid a bad performance problem when the branch cache is
not up-to-date, and hgweb can't write an updated version because it
lacks permissions.
2008-02-03 21:03:46 -02:00
Alexis S. L. Carvalho
68bddaa728 hg import: write the dirstate after every commit
This allows the transaction system to backup the correct file, so
that a future rollback can do the right thing.

This should fix issue963.
2008-02-03 21:03:46 -02:00
Alexis S. L. Carvalho
56322c7a24 mq: don't allow patches with some reserved names
The current list of reserved names includes only mq control files.

Also, reserve names starting with ".hg" (to avoid troubles with
e.g. .hgignore and .hgtags), and with ".mq" (to allow future
extensions).

This should fix issue841.
2008-02-03 21:03:46 -02:00
Alexis S. L. Carvalho
9dbbca9b5c mq: pop/refresh: avoid losing revisions not managed by mq
We already disallow committing on top of an mq revision exactly
to avoid losing this new revision during a qpop/qrefresh, so this
can be seen as an additional safety check.

If this is not enough to fix issue844, it should at least prevent
it from happening.
2008-02-03 21:03:46 -02:00
Alexis S. L. Carvalho
d4fc1890f0 mqrepo: don't abort if the status file has an unknown node 2008-02-03 21:03:46 -02:00
Alexis S. L. Carvalho
65d93076b9 sshrepo: be more careful while reading data
This should avoid some tracebacks when the server sends some garbage.
2008-02-03 21:03:46 -02:00
Patrick Mezard
fd2ee26173 convert: hg.clonebranches must pull missing parents (issue941) 2008-01-26 19:55:04 +01:00
Thomas Arendsen Hein
76157ccf47 CVS convert: Find correct parent for new branch (issue704)
Previously the parent was determined by the last changeset where the branched
file was changed even if the branch is based on an earlier revision.
Fix written by mpm.
2008-01-22 00:16:50 +01:00
Thomas Arendsen Hein
01046fa09f Test for converting a CVS branch 2008-01-22 00:08:43 +01:00
Patrick Mezard
2e6086567e convert: enforce svn_source.getchanges() files unicity 2008-01-21 10:04:35 +01:00
Patrick Mezard
2d2126f043 patch: handle empty vs no file in git patches (issue906) 2008-01-12 19:35:11 +01:00
John Coomes
e9eb2749fb hg tag: run tag hook just once 2007-12-18 12:45:30 -08:00
Patrick Mezard
47378bdecc Make run-tests.py --interactive work on Windows 2008-01-05 17:55:16 +01:00
Patrick Mezard
0f68a55738 patchbomb: make --bundle respect --desc 2007-12-27 22:40:07 -06:00
Thomas Arendsen Hein
e6f1571179 Tests for 2d14cb7e2a9e and a60a6bd11ed6 (interactive prompts during merge) 2007-12-27 13:39:03 +01:00
Thomas Arendsen Hein
94bdbd585c Fix misleading error and prompts during update/merge (issue556) 2007-12-26 22:47:16 +01:00
Thomas Arendsen Hein
98901c4f4d Fix test-convert-darcs output on Debian etch (issue779)
The CR characters of darcs get confused the output.
Additionally this darcs version printed:
darcs: <stdin>: hGetLine: end of file
2007-12-21 12:07:02 +01:00
Patrick Mezard
4bd17cf5de mq: missing target files do not make qpush to fail immediately (issue 835)
Reported and explained by Peter Arrenbrecht <peter.arrenbrecht@gmail.com>.
Following file additions were skipped but empty files were still created. This situation could lead to qrefresh losing patch information.
2007-12-02 13:53:29 +01:00
Patrick Mezard
f280a41d83 test-import: test fuzziness, ambiguous patch locations 2007-11-25 12:17:30 +01:00
Patrick Mezard
8ae803be30 mq: avoid qnew committing everything on invalid paths (issue 803)
If paths are supplied but resolve to nothing, localrepo.commit() is called with an empty set and commits the whole dirstate. Avoid this by passing the match function to commit.
2007-11-20 14:31:58 +01:00
Alexis S. L. Carvalho
0086f97dc7 mq: really remove undo after a qpush (and after a strip)
For qpush, removeundo has to be called after the transaction has finished.

strip may use unbundle, which also leaves an undo file.

Fixes issue780.
2007-11-09 20:21:35 -02:00
Manuel Holtgrewe
4a33cb8d98 Do not display passwords with pull/push/incoming/outgoing
Passwords specified in the repository URL are now displayed as '***'
when accessing the remote repository.
2007-11-05 20:29:32 +01:00
Alexis S. L. Carvalho
9877d9e85e run-tests.py: add a default --date "0 0" argument to commit et al
Part of test-tags was modified just to be sure this works.

The change in test-archive-symlinks is necessary to avoid a "helpful"
warning from GNU tar ("implausibly old time stamp 1970-01-01 00:00:00").
2007-11-09 20:21:35 -02:00
Alexis S. L. Carvalho
cde5fb5024 tests/*: avoid losing the original settings from $HGRCPATH 2007-11-09 20:21:35 -02:00
Alexis S. L. Carvalho
959d3f5cd4 test-convert-darcs: skip if we can't find the elementtree module
This patch is a bit dirty to avoid having to repeat the dance required
to import elementtree.
2007-11-09 20:21:35 -02:00
Alexis S. L. Carvalho
bb984a6137 test-permissions: add a chmod +w to allow the directory to be removed 2007-11-09 20:21:35 -02:00
Alexis S. L. Carvalho
8dd3103fe5 run-tests.py: don't print a dot for skipped tests 2007-11-09 20:21:35 -02:00
Alexis S. L. Carvalho
c4d02f3fdf purge: simplify safety net for case mangling filesystems
Relying on the exact return of statwalk would cause us to abort
when there was at least one tracked file inside an ignored directory.

This patch forces an extra walk of the whole working directory even
on sane filesystems, where it wouldn't be needed.

Fixes issue621.
2007-11-09 20:21:35 -02:00
Maxim Dounin
084e15f969 Fix dir-changed-to-file updates on clean workdir.
Workaround for dir-changed-to-file updates mentioned
in rev c3f3393b9096 doesn't actually work since tests
introduced in mentioned changeset prevented dirstate
updates even if working directory updates succeded.

Make tests more relaxed for dirstate operations
not directly accessible from cli. See also issue660.

While here, move _dirs existance check from _decpath()
to _changepath() for unification.
2007-11-07 22:57:28 +01:00
Bryan O'Sullivan
2e7ccc7ee4 See if execute bit is honoured when we go back in time 2007-10-26 16:43:13 -07:00
Benoit Boissinot
37290329f4 fix typo in convert help text, update test 2007-11-05 20:15:33 +01:00
Maxim Dounin
8561d688a1 Fix file-changed-to-dir and dir-to-file commits (issue660).
Allow adding to dirstate files that clash with previously existing
but marked for removal. Protect from reintroducing clashes by revert.

This change doesn't address related issues with update. Current
workaround is to do "clean" update by manually removing conflicting
files/dirs from working directory.
2007-11-05 20:05:44 +03:00
Dustin Sallings
bebcdac954 Use both the from and to name in mdiff.unidiff.
This fixes a compatibility issue with git diffs.
* * *
2007-11-01 12:17:59 -07:00
Jim Hague
4446a9901a tests: make test-mq-guards work with ksh 2007-10-19 19:20:33 +00:00
Matt Mackall
c9db98f2e6 tests: tidy up reporting of skipped tests
if not verbose:
 - print 's' rather than '.'
 - pass skipped test reports back to parent for -j
 - report which tests were skipped at the end

- print '.' after test completion
2007-10-19 12:53:43 -05:00
Patrick Mezard
f6738551fb test-convert-baz: set username with baz, not tla 2008-02-14 19:35:40 +01:00
Patrick Mezard
698a3806aa Define tla username locally in baz and tla tests
Suggested by Alexis S. L. Carvalho.
2008-02-13 00:40:18 +01:00
Matt Mackall
2bd998b87d hgweb: Fix stray quote in logo img tag 2008-02-14 10:55:17 -06:00
Thomas Arendsen Hein
61a257a6d9 cat --decode: Drop short option, use opts.get() instead of opts[]
- hg archive --no-decode has no short option, too, and maybe both could use
  -d in the future to select revisions by date.
- opts.get makes python scripts calling cat() happy, because they don't have
  to pass the new option.
2008-02-14 11:25:30 +01:00
Jesse Glick
1a18d77174 Option --decode for hg cat to apply decode filters.
(Does not trigger expansion of keyword arguments when using keyword
extension, though that might be desirable as well.)
2008-02-09 13:05:22 -05:00
Alexis S. L. Carvalho
ffa3574a24 merge with crew-stable 2008-02-13 19:34:28 -02:00
Patrick Mezard
939033ef4a Document and fix tla/baz conversion tests 2008-02-12 23:35:44 +01:00
Aleix Conchillo Flaque
4b38213355 convert: added GNU Arch (tla) tests and related fixes 2008-02-12 11:35:06 +01:00
Aleix Conchillo Flaque
996e817ac1 convert: added gnu arch (baz) tests 2008-02-12 10:38:34 +01:00
Thomas Arendsen Hein
d67660a733 Use chmod 0770 and g+s instead of 02770 which does't work on Solaris 8. 2008-02-10 13:19:24 +01:00
Bryan O'Sullivan
2cfb66a49d Automated merge with http://hg.west.spy.net/hg/hacks/hg 2008-02-09 20:43:42 -08:00
Jesse Glick
8006327c6e Strip filter name from command before passing to filter function.
The new registration of in-process data filters (introduced in
75177cef51d3 & 8c9fa240ac96) failed to correctly strip the filter name
from its arguments before passing the "command" to the filter
function. Thus a registration such as

[decode]
*.gz = compress: -9

would result in the associated filter function being called with the
argument 'compress: -9' rather than just '-9' as expected.
2008-02-09 12:27:58 -05:00
Alexis S. L. Carvalho
6b4c649e55 make the journal/undo files from transactions inherit the mode from .hg/store 2008-02-09 18:38:54 -02:00
Alexis S. L. Carvalho
515043ee36 add test-inherit-mode 2008-02-09 18:38:54 -02:00
Alexis S. L. Carvalho
98b47a9a38 hghave: detect unix-style permissions
By "unix-style" I mean:

- user/group/other permissions
- umask determines original permissions
2008-02-09 18:38:54 -02:00
Patrick Mezard
fec8b8be62 test-keyword: make it run under Windows
- don't cat symlink, content differs
- rewrite OS specific messages
- generate symlink with a bundle
2008-02-09 20:17:09 +01:00
Thomas Arendsen Hein
7bedf7e312 Do not abort rollback if undo.branch isn't available, but warn. 2008-02-09 19:39:01 +01:00
Thomas Arendsen Hein
d8e42b5304 Remove trailing ! from two error messages as this was confusing. 2008-02-09 19:13:57 +01:00
Thomas Arendsen Hein
4c531a9dd1 Print less scary warning when invalidating the branch cache. 2008-02-09 18:58:31 +01:00
Dustin Sallings
87e7fca8b0 Option to log to only show changesets within a specified branch. 2008-02-08 21:31:03 -08:00
Alexis S. L. Carvalho
8b9b7ae9bd Merge with crew-stable 2008-02-08 18:31:55 -02:00
Alexis S. L. Carvalho
8bc112b4f6 fix syntax in coverage.py, fixing run-tests.py -C
b93b3556cea6 accidentally broke things.
2008-02-08 13:16:49 -02:00
Thomas Arendsen Hein
9c2727d318 merge with crew-stable 2008-02-08 11:55:17 +01:00
Bryan O'Sullivan
2c95b6aab9 Merge with crew 2008-02-06 20:00:35 -08:00
Bryan O'Sullivan
4a012ef2b9 Merge with crew 2008-02-06 19:57:52 -08:00
Thomas Arendsen Hein
1c6bad32e4 Update help output of test-convert for GNU arch entry. 2008-02-07 00:41:30 +01:00
Patrick Mezard
bf4d100b3a Merge with crew-stable 2008-02-06 23:24:15 +01:00
Christian Ebert
4f67830b93 keyword: safeguards against erroneous behaviour or aborts
prevent issues due to global [keyword] filename patterns:
- add email to nokwcommands
- protect everything under .hg from expansion
  (tested with qcommit)
- exclude everything starting with .hg* just in case

prevent abort when pulling from bundlerepo:
- do not set up kwrepo for bundlerepo
  expansion inside a bundle is nonsense

bundlerepo issue spotted and test case provided by pmezard.
2008-02-06 23:14:33 +01:00
Thomas Arendsen Hein
347cc1cda8 merge with crew-stable 2008-02-05 15:59:10 +01:00
Matt Mackall
9d996cd13f merge: allow smarter tool configuration
Add [merge-tool] hgrc section with:
 <tool>.executable = name or path (<tool>)
 <tool>.args = args with $local/base/other/output ($local $base $other)
 <tool>.priority = priority (default 0)
 <tool>.binary = handles binary (False)
 <tool>.symlink = handles symlinks (False)
 <tool>.checkconflict = check for conflict markers (False)
 <tool>.premerge = try internal simplemerge (True if not binary or symlink)

Four built-in tools: internal:{merge,local,other,fail}

Add [merge-patterns] section of the form:
 <pattern> = <tool>

Priority of settings is:
 HGMERGE
 merge-patterns
 ui:merge
 merge-tools by priority
 hgmerge, if it can be found

Changes:
 unsuccessful merges leave .orig files
2008-02-03 19:29:05 -06:00
Matt Mackall
346758f77c merge: move the bulk of simplemerge into core
- keep existing simplemerge command in contrib
- clean up test interface
2008-02-03 19:29:05 -06:00
Alexis S. L. Carvalho
961a45df72 merge with crew-stable 2008-02-03 21:47:07 -02:00
Thomas Arendsen Hein
da87e7b4ae test-serve: wait before killing to always hide the "killed!" message.
Without the sleeps slower systems never display never display "killed!"
while faster systems sometimes or nearly always display it.
2008-02-02 21:01:43 +01:00
Thomas Arendsen Hein
73a0d43985 Clarify help for hg status and make it consistent. 2008-02-02 14:49:31 +01:00
Michele Cella
76206039da tests for hg serve prefix option 2008-01-22 23:06:37 +01:00
Jesse Glick
dc05781c40 Provide better context for custom Python encode/decode filters.
While some can function with just some text and an optional command name,
others may want a repository object, a ui object, and a file path.
Use the enhanced information to good effect in win32text.dumbdecode's warning.
2007-12-21 23:21:17 -05:00
Patrick Mezard
79c0636ca8 Merge with crew-stable 2008-01-26 20:04:31 +01:00
Patrick Mezard
517ab12c84 convert: prevent svn branches to leave the root module tree 2008-01-26 14:45:04 +01:00
Patrick Mezard
440a00cc2c convert: fix svn_source.latest() 2008-01-26 14:45:04 +01:00
Patrick Mezard
8eb60ebaa2 convert: display source revision id with --verbose 2008-01-26 14:45:04 +01:00
Jesse Glick
b6fdc96f71 Permitting the import command to accept a --user option.
The prose section of the help text for the command already said that -u and -m
are accepted, but -u was not listed in the table of options, and did not work.
Useful when accepting patches from other people made by hg diff rather than hg
export. For completeness, also accepting -d DATE.
[CHANGES: rebased against 2f0da487820f, --no-commit option.]
2008-01-25 19:49:15 -05:00
Bryan O'Sullivan
7f94d92bf3 Merge with crew 2008-01-25 16:24:00 -08:00
Bryan O'Sullivan
af713110c4 Simplify test-paths 2008-01-25 16:18:00 -08:00
Thomas Arendsen Hein
10700bb24c merge with crew 2008-01-26 01:06:31 +01:00
Jesse Glick
e01183da16 Permit glob patterns to use nested curly braces. 2008-01-25 15:54:25 -05:00
Thomas Arendsen Hein
3648abc9d4 glog shows at most one file: correct synopsis 2008-01-26 00:14:20 +01:00
Thomas Arendsen Hein
950cdcafb9 Update usage message in test-glog.out
AKA: Remind Thomas to run tests even after trivial changes.
2008-01-25 21:09:14 +01:00
Steve Borho
d28f833304 graphlog: add test for filelog graph 2008-01-25 10:35:04 -06:00
Thomas Arendsen Hein
4ae55d1279 Test case for hg import --no-commit 2008-01-25 16:18:49 +01:00
Kirill Smelkov
f2664bfd13 qrecord: add tests 2008-01-23 21:49:44 +03:00
Dirkjan Ochtman
4ea6b6bcae send conservatively capitalized HTTP headers 2008-01-23 14:28:25 +01:00
Bryan O'Sullivan
a9cf7ce6a3 Merge with crew 2008-01-25 15:56:22 -08:00
Dirkjan Ochtman
702f1f50b2 hgweb: move HTTP content types out of header templates
This removes the ability for templates to add custom HTTP headers, which can
easily be re-added if someone needs it. Thanks to asak for repeatedly reviewing
this patch and helping to iron out the quirks.
2008-01-22 10:45:55 +01:00
Dirkjan Ochtman
a51e4d434d hgweb: revert to showing file instead of offering for download 2008-01-22 10:45:52 +01:00
Dirkjan Ochtman
cef255cf2f better error reporting for hg serve errors in tests 2008-01-22 09:11:11 +01:00
Dirkjan Ochtman
f4b035d012 hgweb: fix a stupid KeyError introduced in 109699000009
Thanks to Christian Ebert for finding this. Also added a test to prevent this
from happening again.
2008-01-22 09:11:08 +01:00
Thomas Arendsen Hein
ddce807d45 merge with crew-stable 2008-01-22 00:55:01 +01:00
Christian Ebert
5c18a69d2e Prefer i in d over d.has_key(i) 2008-01-20 14:39:25 +01:00
Alexis S. L. Carvalho
4f4e7fdb65 fix test-strip-cross on solaris
Apparently "ENVVAR=value command" doesn't work when command is a shell
function.

Reported by Richard Lowe.
2008-01-21 13:37:27 -02:00
Patrick Mezard
8c795eef45 Merge with crew-stable 2008-01-21 14:15:38 +01:00
Alexis S. L. Carvalho
d600347898 test-strip-cross: test handling of linkrev crosses in the manifest 2008-01-20 08:12:07 -02:00
Richard Lowe
14130985ea Fix test-strip-cross on Solaris
Solaris /sbin/sh doesn't do brace expansion
2008-01-19 22:16:15 -05:00
Alexis S. L. Carvalho
8b35462ec9 strip: calculate list of extra nodes to save and pass it to changegroupsubset
When we remove revision N from the repository, all revisions >= N are
affected: either it's a descendant from N and will also be removed, or
it's not a descendant of N and will be renumbered.

As a consequence, we have to (at least temporarily) remove all filelog
and manifest revisions that have a linkrev >= N, readding some of them
later.

Unfortunately, it's possible to have a revlog with two revisions
r1 and r2 such that r1 < r2, but linkrev(r1) > linkrev(r2).  If we try
to strip revision linkrev(r1) from the repository, we'll also lose
revision r2 when we truncate this revlog.

We already use changegroupsubset to create a temporary changegroup
containing the revisions that have to be restored, but that function is
unable to detect that we also wanted to save the r2 in the case above.

So we manually calculate these extra nodes and pass it to changegroupsubset.

This should fix issue764.
2008-01-19 18:01:16 -02:00
Alexis S. L. Carvalho
7f21081e68 repair.py: don't import commands.py 2008-01-19 18:01:16 -02:00
Patrick Mezard
fd3c52fd38 test-no-symlinks: fix unbundle output 2008-01-18 23:59:40 +01:00
Christian Ebert
3f18608289 keyword: add very simple mq test 2008-01-19 03:06:01 +01:00
Bryan O'Sullivan
97d2f7c1b5 Fix test output 2008-01-18 13:54:33 -08:00
Christian Ebert
a07599ee0c keyword: avoid extra diffs when not comparing against working dir
When diffing against specified revisions expanded keywords
only get in the way.

Update test output.
2008-01-15 14:39:53 +01:00
Christian Ebert
e655be0aaf keyword: support mq; handle (q)record more gracefully
mq:
Ensure that expanded keywords do not make it into patches.
- disable expansion when reading filelog
- shrink expanded keywords when reading from working dir (wread)

(q)record:
Avoid additional hunks due to expanded keywords. However this is
still a compromise, as keyword expansions are not updated in
working directory because record should not overwrite files.

Mention above shortcomings and "hg kwexpand" workaround in help
and update test output.

system argument parsing:
Command detection might be slightly more expensive with
dispatch._parse, but we will need this for improving "hg diff"
output.
2008-01-15 13:58:22 +01:00
Matt Mackall
93afbf490d Merge with crew 2008-01-18 10:07:36 -06:00
Giorgos Keramidas
b766302801 tests: Use /bin/sh for test-journal-exists, /bin/bash may not be available 2008-01-18 03:06:05 +02:00
Patrick Mezard
bfc0212349 Test subversion branches conversion 2008-01-17 23:46:56 +01:00
Matt Mackall
a68910fcf1 transactions: don't show a backtrace when journal exists
Now we simply print a message on how to recover.
2008-01-16 11:32:25 -06:00
Matt Mackall
11423d02c7 diff: don't show function name by default
We'd mistakenly made the -p option always on, which meant there was no
way to turn it off. It also meant that we were sometimes splitting
multibyte characters in function name, which isn't a good default.
2008-01-16 11:14:24 -06:00
Giorgos Keramidas
ce5f6f93a6 Display debugstate dates as '%Y-%m-%d %H:%M:%S' 2008-01-11 23:30:56 +02:00
Matt Mackall
262c766059 merge: add a bit more sanity to divergent copy checks 2008-01-14 16:28:32 -06:00
Christian Ebert
3cecc890c2 keyword: test that expansion is done filewise
Checks issue fixed in e56f3648b9a0.
2008-01-11 23:36:56 +01:00
Thomas Arendsen Hein
3b2b9afe52 Solaris compatibility fixes for test-keyword:
- do not use /bin/false (yields 255 instead of 1)
- do not use "cd -", simply use "cd .." instead.
2008-01-14 09:00:23 +01:00
Jesse Glick
b63e70848a Ensure that absolutized paths from hgrc do not contain ../ segments. 2008-01-08 22:40:51 -05:00
Edouard Gomez
a51d1ef742 convert: separate trunk detection from branch layout detection
In some subversion repositories, trunk is present but no branches
are used. The current code is assuming that both trunk and branches
must exist before adding trunk's head to the heads list.

It's just better to separate the branch layout stuff from the trunk one.
2008-01-05 01:51:21 +01:00
Patrick Mezard
d1c841154d Merge with crew-stable 2008-01-12 20:49:07 +01:00