Commit Graph

1578 Commits

Author SHA1 Message Date
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