Commit Graph

1160 Commits

Author SHA1 Message Date
Benoit Boissinot
513ea49cfc improve error message for 'hg merge' when repo already at branchtip 2007-08-25 11:30:11 +02:00
Benoit Boissinot
db7ad2ab70 merge with crew-stable 2007-08-24 00:56:56 +02:00
Benoit Boissinot
b884c9144e fix test-permissions output 2007-08-24 00:56:08 +02:00
Benoit Boissinot
e52485e94a merge with crew-stable 2007-08-24 00:53:16 +02:00
Benoit Boissinot
cfb5e37845 testcase for issue705 (fixed by 739cbeba775b) 2007-08-24 00:52:28 +02:00
Alexis S. L. Carvalho
a345c2c9da merge: forcefully mark files that we get from the second parent as dirty
After a hg merge, we want to include in the commit all the files that we
got from the second parent, so that we have the correct file-level
history.  To make them visible to hg commit, we try to mark them as dirty.

Unfortunately, right now we can't really mark them as dirty[1] - the
best we can do is to mark them as needing a full comparison of their
contents, but they will still be considered clean if they happen to be
identical to the version in the first parent.

This changeset extends the dirstate format in a compatible way, so that
we can mark a file as dirty:

Right now we use a negative file size to indicate we don't have valid
stat data for this entry.  In practice, this size is always -1.

This patch uses -2 to indicate that the entry is dirty.  Older versions
of hg won't choke on this dirstate, but they may happily mark the file
as clean after a full comparison, destroying all of our hard work.

The patch adds a dirstate.normallookup method with the semantics of the
current normaldirty, and changes normaldirty to forcefully mark the
entry as dirty.

This should fix issue522.

[1] - well, we could put them in state 'm', but that state has a
different meaning.
2007-08-23 01:48:29 -03:00
Benoit Boissinot
13bbfcaf55 make hg add of a removed file unremove the file
if a file was removed, hg add shouldn't mark the file
as added, but as normal

see issue683
2007-08-21 02:13:32 +02:00
Alexis S. L. Carvalho
3b929dfbb5 path_auditor: cache names of audited directories
We use a separate cache to avoid problems with

audit = path_auditor(repo.root)
audit("subrepo")
audit("subrepo/file")

whitelisting "subrepo" (which is fine) and then using the same whitelist
with "subrepo/file" (which is not fine).

Since we create a separate path_auditor for every path on the command line,
a "hg add dir/a dir/b dir/c" will still lstat dir 3 times just to audit
the paths.
2007-08-18 21:36:10 -03:00
Thomas Arendsen Hein
2f533bf4a6 Quote ^ and ~ chars in test-parentrevspec.
At least ^ causes problems on some sh implementations.
2007-08-18 20:21:14 +02:00
Alexis S. L. Carvalho
1ee06d75a7 Merge with crew-stable 2007-08-17 23:20:13 -03:00
Alexis S. L. Carvalho
de2d9c54e8 run-tests.py: pass --install-scripts to setup.py
This avoids possible problems when the user has a ~/.pydistutils.cfg.
Fixes issue638.  Patch provided by Ralf Schmitt.
2007-08-17 22:43:38 -03:00
Alexis S. L. Carvalho
e60e53981a Add parentrevspec extension 2007-08-17 17:33:27 -03:00
Matt Mackall
c08427e0e8 dispatch: move command dispatching into its own module
- move command dispatching functions from commands and cmdutil to dispatch
- change findcmd to take a table argument
- remove circular import of commands in cmdutil
- privatize helper functions in dispatch
2007-08-15 16:55:13 -05:00
Matt Mackall
abd8b8c87b Merge with stable 2007-08-15 15:56:39 -05:00
Matt Mackall
8f44013035 test-grep: use lowercase hg command 2007-08-15 15:30:33 -05:00
Patrick Mezard
4ad44c80f1 Merge with crew-stable 2007-08-15 16:43:40 +02:00
Patrick Mezard
04cf5bb0f5 test-grep: test issue 685 2007-08-15 16:18:40 +02:00
Patrick Mezard
8169b36e09 Merge with crew-stable 2007-08-14 19:30:14 +02:00
Patrick Mezard
e1556e1cd2 hghave: test hotshot dependencies (debian does not provide profile) 2007-08-14 19:25:49 +02:00
Patrick Mezard
f54fb44413 Merge with crew-stable 2007-08-14 19:06:10 +02:00
Patrick Mezard
3f797895fa test-profile: fix grep, check hotshot availability 2007-08-14 18:53:45 +02:00
Patrick Mezard
1c4c581aa9 Merge with crew-stable 2007-08-14 16:30:38 +02:00
Patrick Mezard
0e4dfe7a43 Test --time, --profile and --lsprof 2007-08-14 16:27:35 +02:00
Alexis S. L. Carvalho
a866998db8 merge with crew-stable 2007-08-12 12:43:52 -03:00
Alexis S. L. Carvalho
664fc9f5dd merge: fix a copy detection bug (issue672)
When merging rev1 and rev2, we want to search for copies that happened
in rev1 but not in rev2 and vice-versa.  We were starting the search at
rev1/rev2 and then going back, stopping as soon as we reached the revno
of the ancestor, but that can miss some cases (see the new
test-issue672).

Now we calculate the revisions that are ancestors of rev1 or rev2 (but
not both) and make sure the search doesn't stop too early.

Simplified test provided by mpm, based on a test case provided by
Edward Lee.
2007-08-12 12:15:10 -03:00
Thomas Arendsen Hein
beed59edcd merge with crew-stable 2007-08-11 13:35:25 +02:00
Thomas Arendsen Hein
9c6e25abcf Added test for commands.dispatch (especially 88803a69b24) 2007-08-11 13:34:19 +02:00
Thomas Arendsen Hein
87b480f2bb test-context.py: Don't create second repo instance (fixed since 3300640607e3) 2007-08-11 13:17:24 +02:00
Thomas Arendsen Hein
467db29b4a Print less scary message if the system supports symlinks:
"Skipping test-no-symlinks: system supports symbolic links"
instead of
"Skipping test-no-symlinks: unexpected feature: symbolic links"
2007-08-11 12:47:58 +02:00
Thomas Arendsen Hein
5f273063c7 Hide absolute path from test-no-symlinks output.
And add missing eol and remove trailing space which where introduced by the
patches adding this test.
2007-08-11 12:36:04 +02:00
Bryan O'Sullivan
1b98353d91 Make audit_path more stringent.
The following properties of a path are now checked for:

    - under top-level .hg
    - starts at the root of a windows drive
    - contains ".."
    - traverses a symlink (e.g. a/symlink_here/b)
    - inside a nested repository

If any of these is true, the path is rejected.

The check for traversing a symlink is arguably stricter than necessary;
perhaps we should be checking for symlinks that point outside the
repository.
2007-08-10 10:46:03 -07:00
Bryan O'Sullivan
3899e7b033 mq: teach qpop about symlinks 2007-08-09 20:16:00 -07:00
Bryan O'Sullivan
c42c6ca456 manifest: accept -r for rev specification 2007-08-09 19:42:33 -07:00
Bryan O'Sullivan
46880a1c4f record: improve docs, improve prompts 2007-08-09 17:29:16 -07:00
Patrick Mezard
6650213c7b Merge with crew-stable 2007-08-09 23:29:29 +02:00
Patrick Mezard
b69056f11a hghave: prefix temporary files with "hg-hghave-" 2007-08-09 23:14:52 +02:00
Patrick Mezard
0bbfa25ca1 test-no-symlinks: rename .bundle into .hg for consistency. 2007-08-09 23:14:50 +02:00
Patrick Mezard
7f6bafcf19 Merge with crew-stable 2007-08-08 23:11:12 +02:00
Patrick Mezard
17afbade48 Test symlink handling on platform not supporting them 2007-08-08 22:47:18 +02:00
Patrick Mezard
d0f548d7df hghave: feature absence can be checked by prefixing with 'no-' 2007-08-08 23:07:39 +02:00
Benoit Boissinot
ce6a51c4eb refactor options from cmdtable
- add extracommitopts for user and date
- factor stuff
2007-08-08 12:27:20 +02:00
Thomas Arendsen Hein
e34927453f Remove trailing spaces, fix indentation 2007-08-07 10:28:43 +02:00
Thomas Arendsen Hein
a799589be4 merge with crew-stable 2007-08-07 10:28:14 +02:00
Thomas Arendsen Hein
001b7980f8 Remove trailing spaces 2007-08-07 10:24:33 +02:00
Brad Schick
18eb282ff7 extdiff: do single file diffs from the wc with no copy
Extdiff was always making a temporary directory and copying files even when not required. This change makes extdiff avoid the copy when diffing a single file that lives in the wc. This lets external diff tools edit the working copy file directly. It also lets other extensions resuse the functions in extdiff and get in-place diffs.
2007-08-06 14:50:57 -07:00
Brad Schick
eec22b0f45 extdiff: made it less chatty in non-verbose mode
Made the status info only display in verbose mode since most hg commands aren't so chatty. This also makes it cleaner for other extensions to call extdiff.
2007-08-06 14:42:11 -07:00
Bryan O'Sullivan
4b5691e253 record: work properly if invoked in a subdirectory 2007-08-06 12:53:17 -07:00
Thomas Arendsen Hein
bbd3ff0014 merge with crew-stable 2007-08-06 20:31:15 +02:00
Thomas Arendsen Hein
502b9e407c Update on pull -u when heads were closed (fixes issue666).
Patch written by Benoit Boissinot.

This should probably be improved in the future to handle long-living
branches, as joining two "other" heads will switch to that new head.
But this is not a new problem, as adding to the "other" head would have
switched to that new head, too.
2007-08-06 20:25:50 +02:00
Patrick Mezard
6b51a27d18 Merge with crew-stable 2007-08-06 10:57:51 +02:00