Commit Graph

1682 Commits

Author SHA1 Message Date
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
Will Maier
213ea70ab4 Don't use the -i option with sed
This patch fixes test-keyword on platforms without GNU sed (like
OpenBSD).
2008-01-09 10:00:18 -06:00
Jesse Glick
500b64344a Issue #880: Simple misspelling ('occured') in web error message. 2008-01-05 15:35:46 -05:00
Michele Cella
0e20a92c0f adding "prefix" option to "hg serve" (command line and [web] section)
allows "hg serve" to serve from a different path than '/' (server root)
2008-01-09 11:15:00 +01:00
Maxim Dounin
690088d7ef test-mq-header: don't fail with different patch(1)
At least under FreeBSD patch(1) won't fail on empty patch and will print
'Hmm...' warning instead. Sanitize output so tests won't fail unexpectedly.
2008-01-08 06:56:21 +03:00
Matt Mackall
e834530a71 Fix up tests for XHTML validation bits 2008-01-08 15:56:12 -06:00
Christian Ebert
459ae2dd85 keyword: add test 2008-01-04 18:22:39 +01:00
Alexandre Vassalotti
60c2f6f43d restore branch after rollback (issue 902) 2008-01-07 15:26:12 -06:00
Maxim Dounin
4d9877b4eb Fix copies reporting in log and convert.
If copy logged in file revision, we report copy for changeset only
if file revisions linkrev points back to the changeset in question
or both changeset parents contain different file revisions.

This fixes extra copies reported when executable bit was changed for
previously copied file.
2007-12-29 17:11:48 +03:00
Maxim Dounin
940a0afd31 context: preserve changeset in filectx if we have one
If we know original changeset we are working with - try hard to
preserve it. Fallback to filelog.linkrev() only if we have no way
to get original changeset, since linkrev() may point to other
changeset.
2007-12-29 16:57:43 +03:00
Patrick Mezard
d6fbb24257 test-convert-hg-svn: make it more windows friendly 2008-01-05 17:36:16 +01:00
Patrick Mezard
7bfa89c3df test-convert-svn-sink: wrap repetitive svn checks in a function 2008-01-05 17:36:16 +01:00
Patrick Mezard
336268093f Merge with crew-stable 2008-01-05 22:52:28 +01:00
Patrick Mezard
4200777a7b test-convert: test before() and after() conversion actions 2008-01-04 23:43:55 +01:00
Patrick Mezard
afdb5ad6e2 test-convert-svn-source: test convert/multiple extra fields 2008-01-04 23:43:55 +01:00
Bryan O'Sullivan
497bf2ca7a fetch: hide authentication details 2008-01-04 11:58:27 -08:00
Peter Arrenbrecht
30621bccda mq: add --currentdate and --date options to qnew and qrefresh
These options make qnew add and qrefresh update a "# Date "-style
header line. This allows proper recording of creation / last
modification dates of patches in patch queues.

Note that `qrefresh -D` only updates existing header lines. It never
adds them, and does not warn about this. This is because I expect
people to have `[default] qrefresh -D` in their .hgrc so patches with
tracked dates get updated, others are left unchanged. The suggested
setup in .hgrc is, in fact,

  [default]
  qnew = -D -U
  qrefresh = -D

I tried to not mix header styles, so `qnew -D -U` now writes the user in
"# User "-style, while `qnew -U` still writes it "From: "-style. Also, if
`qrefresh -U` must add the user, it does so in "# User "-style if the
header contains a "# HG changeset patch" line. (This is caused by mq
not supporting the "Date: "-style header line at all - a reasonable choice
given its standard date format.)
2008-01-02 16:24:13 +01:00
Kevin Christen
1b023c6158 Fixed XHTML validation errors 2008-01-03 13:39:26 -06:00
Thomas Arendsen Hein
35cbed7baa Move aliases section in help below synopsis (issue362)
This should avoid confusion why e.g. "hg help co" shows help
for "hg update" instead.
2008-01-02 20:22:10 +01:00
Patrick Mezard
2c5d3eddb4 test-convert-svn-source: test stop revision 2008-01-01 23:12:48 +01:00
Thomas Arendsen Hein
fdf4576462 Obfuscate (instead of just escape) contact/owner in gitweb summary.
This could contain an email address.
2008-01-01 17:12:37 +01:00
Thomas Arendsen Hein
1566cda979 Don't let ui.username override web.contact (issue900)
63beab327d26 introduced using ui.username before web.contact, but this was
never documented and might cause commit accidents.

- Drop web.author (deprecated since 2005)
- Try ui.username or $EMAIL as a fallback to display something useful.
- Update docs for the fallbacks.
2008-01-01 17:07:15 +01:00
Matt Mackall
6b6b2e0e73 bisect: improve tests
- test skipping
- test noupdate
- test bad->good search
- test inconsistent state
2007-12-31 18:20:34 -06:00
Matt Mackall
917f5ce70a bisect: handle search for bad to good transitions
Automatically detect whether we're looking for a bad to good
transition rather than the usual good to bad transition by detecting
when badrev is inside the good set and flipping good/bad.
2007-12-31 18:20:34 -06:00
Matt Mackall
bee8b54b36 bisect: make bisect a built-in command 2007-12-31 18:20:34 -06:00
Matt Mackall
ecc644d5d1 Merge backout 2007-12-31 18:20:25 -06:00
Matt Mackall
62cb860a38 Backed out changeset f019d9201ff4
Unfortunately, this breaks backward compatibility.
2007-12-31 17:47:02 -06:00
Thomas Arendsen Hein
fd0ebb6a0c Show number of changesets written to bundle files by default (issue569)
This was only shown with -v before.
2007-12-30 19:46:13 +01:00
Thomas Arendsen Hein
2be743c9ed "C" status code considered harmful, so changed to "=" (issue899)
C means conflict in other SCMs, and = is more intuitive anyway.
2007-12-30 17:45:26 +01:00
Thomas Arendsen Hein
087cac8a21 Adjust changed test output after 24f7cb0e6b71 (trailing whitespace) 2007-12-30 17:36:49 +01:00
Thomas Arendsen Hein
347da85c36 Removed tabs and trailing whitespace in python files 2007-12-29 19:49:48 +01:00
Thomas Arendsen Hein
d63fbb0105 merge with crew 2007-12-28 17:10:57 +01:00
Thomas Arendsen Hein
8dbd54d63d Clarify some messages during commit:
- use "branch 'foo'" to distinguish from "branch merge".
- commit messags can be empty (to abort commits)
- Added value for editor message: Tell about HG: lines like CVS does.
2007-12-28 17:10:25 +01:00
Patrick Mezard
f7a359686e Merge with crew-stable 2007-12-28 16:46:44 +01:00
Thomas Arendsen Hein
f1499b31ef merge with crew 2007-12-28 16:32:14 +01:00
Patrick Mezard
d9be0f3383 Prompt for a commit message in editor, improve error message 2007-12-28 14:51:16 +01:00
Patrick Mezard
d404bfca4f test-convert-cvs: force cvs -f options to avoid cvsrc
There are some reference to a CVS_OPTIONS environment variable doing that but
it does not work on my system (cvs 1.11.20, macosx).
2007-12-27 19:23:22 +01:00
Maxim Dounin
54de122616 convert: svn-sink: copy and set properties after adding dirs/files
We can't store properties for files we haven't added to repo. Similarly,
we can't copy file to directory we haven't added to svn yet. Remember
needed changes and apply them in putcommit().
2007-12-27 03:14:46 +03:00
Maxim Dounin
a8a4715876 convert: don't read ~/.cvsrc in test-convert-cvs 2007-12-27 19:59:44 +03:00
Thomas Arendsen Hein
d02cbcaa88 merge with crew-stable 2007-12-27 13:39:59 +01:00
Thomas Arendsen Hein
3cd6fe199f merge with crew-stable 2007-12-26 23:03:32 +01:00
Mirko Friedenhagen
2a87bfec34 server: append to logfiles 2007-12-24 17:21:40 +01:00
Patrick Mezard
2c06488c05 Move diffing missing file test and remove test-notfound
No point to have a test dedicated to this diff behaviour.
2007-12-24 12:22:33 +01:00
Patrick Mezard
fd1268357e commands: add exits(1) if a specified file cannot be added (issue 891) 2007-12-24 12:14:43 +01:00
Patrick Mezard
7af6ee2ffb test-hgweb-commands: replace all "XX years ago" occurences 2007-12-24 01:50:07 +01:00
Lee Cantey
8c88af89e3 Switch to using cat with EOF doc instead of trying to quote newlines for echo. 2007-12-21 14:26:20 -08:00
Thomas Arendsen Hein
cb74375be7 Use skipped: instead of hghave: for skipping tests, use this in test-merge-types 2007-12-21 21:50:19 +01:00
Thomas Arendsen Hein
4a19a0186d merge with crew-stable 2007-12-21 12:14:35 +01:00
Thomas Arendsen Hein
3aa5d6c16c Use common readlink.py instead of own implementations per test script. 2007-12-21 10:24:03 +01:00
Thomas Arendsen Hein
becde51102 Use test -h instead of test -L for portability
Citing from the GNU autoconf manual:
"either form conforms to Posix 1003.1-2001, but older shells like Solaris 8
 /bin/sh support only -h"
2007-12-21 09:51:19 +01:00
Patrick Mezard
b349162295 test-hgweb: fix css update 2007-12-21 00:14:45 +01:00
Patrick Mezard
d1b62d9bf5 test-win32text: avoid unix2dos, printf extensions 2007-12-21 00:13:00 +01:00
Bryan O'Sullivan
044477626b Merge with mpm 2007-12-19 19:23:18 -08:00
Bryan O'Sullivan
0ce5bba724 Merge with crew 2007-12-19 19:21:30 -08:00
Jesse Glick
e75d3a3d78 Issue 882: add standard hook to reject text files with CRLF.
While the win32text extension does LF <-> CRLF conversion, and will issue a
warning in case a file already in the repository uses CRLF, it provides no
mechanism for verifying that incoming changes use LF. In a large development
team with some Windows users, it is virtually guaranteed that someone will
forget to set up the encode filter correctly and accidentally check in a file
using CRLF, which can cause warnings for other Windows users when they next
fetch changes. Since this is a general problem it is desirable to have a
pre-commit (or -push) hook available to reject such accidents earlier rather
than trying to fix them up after the fact.
2007-12-19 17:02:31 -05:00
peter.arrenbrecht@gmail.com
86c52a7365 mq: add --currentuser and --user options to qnew and qrefresh
These options make qnew and qrefresh add/update the "From:" header (or, if present,
the "# User" header). This allows proper attribution of patches in patch queues
with multiple contributors.
2007-12-19 22:36:18 +01:00
John Coomes
5c790a2f5f hg tag: run tag hook just once 2007-12-18 12:45:30 -08:00
Matt Mackall
3d2020e6ca add debugfsinfo to check fs capabilities 2007-12-27 23:55:40 -06:00
Matt Mackall
98edd8fe9d bisect: use more standard command syntax and help 2007-12-27 23:55:40 -06:00
Matt Mackall
5fef1977f2 update test-merge-types 2007-12-27 23:55:36 -06:00
Matt Mackall
49c18f282e wwrite: simplify with util.set_flags
- always attempt to delete the file (gets rid of read-only message)
- always write as a normal file
- use set_flags to convert to link or set exec
2007-12-27 22:27:47 -06:00
Matt Mackall
2af988f28f add --debug to test-merge-types 2007-12-27 22:27:43 -06:00
Peter Arrenbrecht
18fb9f5e5e Fix income/pull with bundle and -R (issue 820).
Uses ui.setconfig() to tell bundlerepo where the main repo is. This is
needed for when the --repository option is used.

Adds tests to test-bundle and a new test script
test-mq-pull-from-bundle, which plays out the situation that initially
made me detect this bug

(hg -R .hg/patches pull ../bundle.hg).
2007-12-18 14:11:13 -06:00
Patrick Mezard
1fb759fad1 patch: write rej files for missing targets (issue 853) 2007-12-17 23:42:46 +01:00
Patrick Mezard
c43b58242b patch: move diff parsing in iterhunks generator 2007-12-17 23:06:01 +01:00
Matt Mackall
fda4cb5390 Merge with crew 2007-12-07 14:59:33 -06:00
Matt Mackall
06d5fbf2a5 copy: handle rename internally
- add rename parameter
- don't collect copied list
- report "moving" rather than "copying"
- remove renamed files
- don't return copied list
- simplify callers
2007-12-07 02:29:55 -06:00
Matt Mackall
e777df13c0 copy: simplify inner copy
- save dirstate lookup and exists check
- do all fs work inside a single dryrun clause
- move unlinking into inner copy section
- move target dir creation
- eliminate undelete mess
- fix a bug on mv a -> b -> a after merge
2007-12-07 02:01:13 -06:00
Dirkjan Ochtman
5cda3f99f4 hgwebdir: split out makeindex function, facilitate test failure diagnosis 2007-12-03 18:40:37 +01:00
Bryan O'Sullivan
f504f42466 coverage: return to not assuming that python is in /usr/bin 2007-12-02 21:54:56 -08:00
Bryan O'Sullivan
96070392c5 Fix breaking test from aa641bdbd843 2007-12-02 21:52:40 -08:00
Matt Mackall
7d8a71a539 churn: avoid division by zero 2007-12-02 17:04:16 -06:00
Matt Mackall
1d88526edb update test output 2007-12-02 16:26:56 -06:00
Dirkjan Ochtman
fa26469f51 import latest coverage.py version 2007-12-02 23:26:40 +01:00
Dirkjan Ochtman
f0a64b1743 add more tests for hgweb commands 2007-12-02 23:26:40 +01:00
Matt Mackall
2e547ddf4b doc: add repo/ to .hgignore and .hgtags
These names were disappearing in the asciidoc output and no form of
escaping seems to help. Let's just add repo/ to make it explicit that
they're in the repository root.
2007-12-02 15:52:36 -06:00
Patrick Mezard
30d1cd81b7 hgwebdir: test virtual paths leading or trailing separators are stripped 2007-12-02 19:39:29 +01:00
Patrick Mezard
e7dc152912 Merge with crew-stable 2007-12-02 14:06:10 +01:00
Dirkjan Ochtman
857b34f4d7 Fix style nit and add some comments to tests. 2007-12-02 10:12:26 +01:00
Dirkjan Ochtman
a20c52b449 Use SCRIPT_NAME and PATH_INFO instead of REQUEST_URI. This is required by WSGI (fixes issue846). 2007-12-01 19:19:08 +01:00
Dirkjan Ochtman
2aa00c9c81 Add tests for hgwebdir repository names with slashes in them. 2007-12-01 19:10:00 +01:00
Dirkjan Ochtman
9851dc942e CGI compatibility fix for 77bd163fb48d. 2007-12-01 18:26:27 +01:00
Dirkjan Ochtman
eb63af80e4 Less indirection in the WSGI web interface. This simplifies some code, and makes it more compliant with WSGI. 2007-11-30 18:23:18 +01:00
Bryan O'Sullivan
43a520697c hgweb: account for Python 2.4 in one test 2007-11-28 11:54:39 -06:00
Bryan O'Sullivan
e19dabc11f hgweb: return meaningful HTTP status codes instead of nonsense 2007-11-28 08:38:42 -08:00
Bryan O'Sullivan
314630c85c convert: some tidyups, doc improvements, and test fixes
The various back end options are now documented.
The hg source can now be configured not to hand out a revision ID.
2007-11-27 09:44:09 -08:00
Bryan O'Sullivan
a364fef5fb Merge with crew 2007-11-26 17:24:21 -08:00
Bryan O'Sullivan
eff109c7b0 convert: tell the source repository when a rev has been converted
This lets us roundtrip changes between svn and hg.
2007-11-26 17:23:20 -08:00
Patrick Mezard
eeff34ef5f Merge with crew-stable 2007-11-25 12:42:06 +01:00
Patrick Mezard
cbf322b12c cmdutil: make "files" list all files, add "file_mods" for modified files 2007-11-24 20:16:59 +01:00
Patrick Mezard
8f3f01adea cmdutil: always expose "files_add", "files_del" and "manifest" templater properties 2007-11-24 17:56:15 +01:00
Patrick Mezard
80735bf58c Merge with crew-stable 2007-11-20 14:41:47 +01:00
Patrick Mezard
808b254fe1 test-convert-svn-sink: test directory additions 2007-11-17 18:41:31 +01:00
Patrick Mezard
c182383712 test-import: read email payload in binary mode 2007-11-10 21:30:43 +01:00
Alexis S. L. Carvalho
2e160ca8ff merge with crew-stable 2007-11-09 21:24:25 -02:00
Matt Mackall
d3de4f56b7 Merge with crew 2007-11-07 21:13:56 -06:00
Bryan O'Sullivan
68c398d741 convert: add support for Subversion as a sink 2007-11-07 18:26:59 -08:00
Matt Mackall
10b354f4a5 Mark failing test as a known bug 2007-11-07 14:38:04 -06:00
Bryan O'Sullivan
33c2bc9eb9 Merge with -stable 2007-11-05 13:20:24 -08:00
Peter Arrenbrecht
cf89ef2576 Add output markers to test-bundle so it's easier to spot the source of
output diffs.
2007-11-03 11:11:13 +01:00
Osku Salerma
e2010f2b5b Add --verbose support to tags command. 2007-12-09 17:14:38 +09:00
Osku Salerma
cb7de57ab7 Properly check tag's existence as a local/global tag when removing it. 2007-12-09 16:32:05 +09:00
Bryan O'Sullivan
6605c95531 Test a merge of a symlink against an executable file.
This should result in a conflict, but the symlink always wins.
2007-11-02 14:02:28 -07:00
Bryan O'Sullivan
e08db629ad Merge with crew-stable. 2007-11-01 15:22:10 -07:00
Patrick Mezard
7df367eed1 test-execute-bit: skip if execute-bit is not supported 2007-10-27 20:23:46 +02:00
Bryan O'Sullivan
209f13bbaf See if execute bit is honoured when we go back in time 2007-10-26 16:43:13 -07:00
Matt Mackall
4412e65957 backout: disallow across branches (issue655) 2007-12-01 13:09:27 -06:00
Matt Mackall
3c8b7b8583 rename: add test for moving untracked files in directories 2007-12-01 12:54:34 -06:00
jorendorff@mozilla.com
c3848517a7 commands.py, patch.py: add -U option to hg diff command 2007-07-26 07:56:04 -04:00
Matt Mackall
3dfe783ec5 transactions: avoid late tear-down (issue641)
We use weak references (ugh) to avoid having to manually delete
transaction references out of each call frame when an exception occurs.
2007-07-22 14:53:57 -05:00
Thomas Arendsen Hein
b35814d4c2 merge with crew-stable 2007-07-22 09:45:18 +02:00
Bryan O'Sullivan
a09e8936ae addremove: print meaningful error message if --similar not numeric 2007-07-21 19:07:18 -07:00
Matt Mackall
cd72dc7f1b Merge with crew 2007-07-21 16:44:38 -05:00
Matt Mackall
3fdaa5a42e Use a weakref for recursive transactions 2007-07-21 16:02:10 -05:00
Alexis S. L. Carvalho
e0b6efcdbf help: avoid traceback if an extension has only debug commands 2007-07-19 19:43:25 -03:00
Alexis S. L. Carvalho
a8e3b41c40 merge with crew-stable 2007-07-19 19:48:24 -03:00
Thomas Arendsen Hein
0fccb9b2ae merge with crew-stable 2007-07-18 16:46:01 +02:00
Thomas Arendsen Hein
085838b3dc fix test-tag on Solaris 2007-07-18 16:41:45 +02:00
Bryan O'Sullivan
bbc8c72100 Update test output to reflect small changes in patch chattiness. 2007-07-17 09:39:30 -07:00