Commit Graph

1578 Commits

Author SHA1 Message Date
Patrick Mezard
449fc02367 Make churn an official extension 2008-03-22 18:01:46 +01:00
Dirkjan Ochtman
2778ac21ea improved semantics for remove (issue438)
- Added files are never deleted (only removed with --force).
- Modified files can only be removed with --force.
- With --after, only deleted files are removed.
- With --after --force, all files are removed but not deleted.
2008-03-22 10:07:49 +01:00
Matt Mackall
a3c45346bb test: fix mixing exec bit on test-hgwebdirsym 2008-03-21 17:22:47 -05:00
Matt Mackall
16115cc42c tests: make test-rebuildstate repeatable 2008-03-21 15:57:22 -05:00
Matt Mackall
f9e70fb40e tests: teach -i about fails list 2008-03-21 15:57:22 -05:00
Matt Mackall
647da75fbe tests: make test-convertcvs repeatable 2008-03-21 15:57:22 -05:00
Eric Hopper
c1929a9601 test: Add tests for webdir symlinks and walkrepos. 2008-03-21 08:46:15 -07:00
Matt Mackall
dc1cdafff7 mq: warn when applying a patch to somewhere other than tip 2008-03-21 15:44:11 -05:00
Adrian Buehlmann
153675561e clone: print "updating working directory" status message
With this change, "hg clone" looks like this:

% hg clone http://example.com/repo/big big
requesting all changes
adding changesets
adding manifests
adding file changes
added XXX changesets with XXX changes to XXX files
updating working directory
XXX files updated, XXX files merged, XXX files removed, XXX files unresolved

So the user sees

% hg clone http://example.com/repo/big big
requesting all changes
adding changesets
adding manifests
adding file changes
added XXX changesets with XXX changes to XXX files
updating working directory

while Mercurial is writing to disk to populate the working directory

With this change, "hg clone" looks like this:

% hg clone big big-work
updating working directory
XXX files updated, XXX files merged, XXX files removed, XXX files unresolved
2008-03-21 14:52:24 +01:00
Dirkjan Ochtman
c9f3b5991c give better error message on non-existent mapfile (issue813) 2008-03-21 12:05:01 +01:00
Dirkjan Ochtman
3e3b0d62eb warn about new heads on commit (issue842) 2008-03-21 11:06:02 +01:00
Dirkjan Ochtman
d049a05886 hgweb: only accept POST requests for unbundle 2008-03-21 00:55:53 +01:00
Dirkjan Ochtman
187ae17c7e fix test-serve breakage for other hostnames 2008-03-20 22:58:53 +01:00
Matt Mackall
cbb0bb78a6 tests: fix repeatability for test-filebranch with dirstate granularity 2008-03-20 15:59:54 -05:00
Matt Mackall
49e96f2d3e tests: remove some unnecessary sleeps 2008-03-20 14:14:15 -05:00
Matt Mackall
c517f4bb58 dirstate: refactor granularity code, add a test
- rename option dirstate.granularity
- move option reading into .write()
- add a simple test
2008-03-20 13:53:59 -05:00
Alexis S. L. Carvalho
d40b29d203 dirstate: ignore stat data for files that were updated too recently
This should fix the race where

  hg commit foo
  <change foo without changing its size>

happens in the same second and status is fooled into thinking foo
is clean.

A configuration item is used to determine the timeout, since different
filesystems may have different requirements (I think VFAT needs 3s,
while most Unix filesystems are fine with 1s).
2008-03-19 17:55:21 -03:00
John Coomes
7b1227d192 tag: allow multiple tags to be added or removed
- Example:  "hg tag -r 42 build-25 beta-1" will add tags build-25 and beta-1
  for rev 42.
- The deprecated and undocumented usage "hg tag arg1 arg2" used to emit a
  warning, then add tag arg1 for rev arg2 (equivalent to "hg tag -r arg2 arg1").
  It will now add tags arg1 and arg2 for the current revision.
- If one tag triggers an error, no tags are added/removed (all or nothing).
2008-03-14 15:38:56 -07:00
Giorgos Keramidas
3831b4f59e tests: update test-command-template for the new {isodatesec} filter 2008-03-17 19:28:46 +02:00
John Mulligan
8c882ea990 Add tests for cloning from a all-history bundle 2008-03-15 12:22:15 -04:00
Matt Mackall
ab757b1627 convert: fix test complaint for mtn bits 2008-03-20 11:12:35 -05:00
Alexis S. L. Carvalho
d1ab1c350e Fix thinko in test-inherit-mode
If we don't change any rwx bit in the last test, hg will skip the
calls to chmod since it'll assume they're not needed.

This might fix things on BSD systems.
2008-03-18 18:14:59 -03:00
Patrick Mezard
6d9511f197 test-serve: replace copy/paste with shell function 2008-03-17 16:15:43 +01:00
Alexis S. L. Carvalho
f5a37c37de revert: update state of files in the "checkout" list
This can make a difference when there are filters involved and

    decode(encode(working-dir-data)) != working-dir-data

even though

    encode(decode(repo-data)) == repo-data

An example is a working dir file that uses only \n when you're using
the win32text extension.
2008-03-18 04:07:39 -03:00
Alexis S. L. Carvalho
dc7b734ee2 normallookup: during merges, restore the state saved by remove 2008-03-18 04:07:39 -03:00
Alexis S. L. Carvalho
cfe6940b56 dirstate.remove: during merges, remember the previous file state
We encode the previous state as a negative file size (AFAICS, previous
versions of hg always have size == 0 when state == 'r').

We save the state of 'm'erged and dirty files, because they're the
two states that indicate that a file has to be committed on a merge
to correctly record per-file history.
2008-03-18 04:07:39 -03:00
Alexis S. L. Carvalho
21fa54fe2f debugstate: add --nodates
This can be useful for tests.
2008-03-18 04:07:39 -03:00
Patrick Mezard
d65e9c81dd patch: fix corner case with update + copy patch handling (issue 937)
The self patching of files when diffed with a backup is a bit peculiar to me.
It makes sense in mpatch, that's less clear in mercurial patching code. Let's
document and preserve it for now.
2008-03-17 23:36:45 +01:00
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