Commit Graph

142 Commits

Author SHA1 Message Date
Matt Mackall
9d556277c8 context: avoid using None for working parent 2008-06-25 17:35:20 -05:00
Patrick Mezard
a19a271534 Merge with crew-stable 2008-06-07 11:43:16 +02:00
Maxim Dounin
1ce305a01e addremove: correctly handle intermediate symlinks
This fixes problems mentioned in issue660 comments (unrelated to original
issue) where directory was renamed, and symlink was added instead.
In such situation addremove wasn't able to correctly detect that old files
no longer here, but tried to add symlink (and failed due collision with
old files).
2008-05-07 14:32:00 +04:00
Matt Mackall
fb88571d19 match: remove files arg from repo.status and friends 2008-05-12 11:37:08 -05:00
Matt Mackall
6f8150b03d match: stop passing files through commitfunc 2008-05-12 11:37:08 -05:00
Matt Mackall
643bf14a33 match: use helpers for cmdutil 2008-05-12 11:37:08 -05:00
Matt Mackall
7a52386b9e walk: return a single value 2008-05-12 11:37:08 -05:00
Matt Mackall
aa95163304 walk: remove cmdutil.walk 2008-05-12 11:37:08 -05:00
Matt Mackall
5768074e71 walk: remove rel and exact returns 2008-05-12 11:37:08 -05:00
Matt Mackall
e02d6f5a75 walk: remove remaining users of cmdutils.matchpats 2008-05-12 11:37:07 -05:00
Matt Mackall
7e3e676e09 cmdutil: switch commit to match 2008-05-12 11:37:07 -05:00
Matt Mackall
9adaad6c57 walkchangerev: use new match objects 2008-05-12 11:37:07 -05:00
Matt Mackall
fb724552a5 walk: pass match object to cmdutil.walk
- introduce cmdutil.match
- change args to cmdutil.walk
- create match objects for walk calls
2008-05-12 11:37:07 -05:00
Matt Mackall
1897262320 walk: begin refactoring badmatch handling 2008-05-12 11:37:07 -05:00
Matt Mackall
15d8da57c1 walk: remove files arg from repo.walk and dirstate.walk 2008-05-12 11:37:07 -05:00
Matt Mackall
20f7afebf8 walk: introduce match objects 2008-05-12 11:37:07 -05:00
Matt Mackall
fd009cd512 walk: kill util.cmdmatcher and _matcher 2008-05-12 11:37:07 -05:00
Alexis S. L. Carvalho
56a207a5a7 rename --after: do not unlink source file (issue910)
"rename --after a.txt A.txt" on case mangling systems (e.g. Windows)
erroneously deleted A.txt (even if modified).
2008-04-19 10:42:30 +02:00
Dirkjan Ochtman
06d8e99e57 remove trailing spaces 2008-04-16 12:09:16 +02:00
Patrick Mezard
e6d132922b cmdutil: handle and warn about missing copy revisions 2008-04-14 22:31:33 +02: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
Joel Rosdahl
5dae3059a0 Expand import * to allow Pyflakes to find problems 2008-03-06 22:23:26 +01:00
Thomas Arendsen Hein
5727413b6a Move finding/checking the log limit to cmdutil 2008-02-29 01:51:23 +01:00
Alexis S. L. Carvalho
26b304926b cmdutil.walkchangerevs: use '-1:0' instead ot 'tip:0'
This avoids a possibly expensive tag lookup.
2008-02-19 19:20:10 -03: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
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
Matt Mackall
41e5c79455 templates: move filters to their own module
This eliminates just about all Mercurial dependencies in templater.py
2008-01-31 14:44:19 -06:00
Christian Ebert
5c18a69d2e Prefer i in d over d.has_key(i) 2008-01-20 14:39:25 +01:00
Shun-ichi GOTO
188e44cf4b Add endswithsep() and use it instead of using os.sep and os.altsep directly.
This change is intended to allow hooking endswithsep() by win32mbcs
extension for MBCS support.
2008-01-09 21:30:35 +09:00
mark.williamson@cl.cam.ac.uk
75ee62ea88 Tweak finddate to pass date directly.
Previous implementation was passing (date + "to" + date), which fails
when "<" and friends are prepended to the date specifier.

Signed-off-by: Mark Williamson <mark.williamson@cl.cam.ac.uk>
2008-01-11 01:36:20 +00:00
Kirill Smelkov
c35576c935 cmdutil.commit: extract 'addremove' from opts carefully
we are going to use cmdutil.commit for qrecord, and it's brother
qrefresh does not support addremove.
2008-01-10 12:07:18 +03:00
Bryan O'Sullivan
a3e3ece3f7 serve: Don't change directory in the child if invoked with -d and --cwd 2008-01-04 11:52:24 -08:00
Thomas Arendsen Hein
347da85c36 Removed tabs and trailing whitespace in python files 2007-12-29 19:49:48 +01:00
Matt Mackall
c205c57746 cmdutil: make bail_if_changed bail on uncommitted merge 2007-12-27 23:55:39 -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
9c9f979f96 copy: move rename logic 2007-12-07 02:03:42 -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
Matt Mackall
7ccba02a77 copy: minor cleanups
- add after and dryrun variables
- add some comments
2007-12-07 02:01:10 -06:00
Matt Mackall
5078c44417 copy: propagate errors properly 2007-12-06 15:15:47 -06:00
Matt Mackall
6d83b8c76f copy: refactor okaytocopy into walkpat
- rename core copy function to copyfile
- move origsrc details into copyfile
- turn okaytocopy loop into walkpat
2007-12-06 14:58:57 -06:00
Matt Mackall
60b67b58aa copy: fix copying back with -A (issue836) 2007-12-02 18:41:22 -06:00
Matt Mackall
87c040230a move commands.docopy to cmdutil.copy 2007-12-02 18:11:59 -06: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
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
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
1d9daf6473 move parseurl from cmdutil to hg 2007-08-15 16:10:36 -05:00
Thomas Arendsen Hein
325c8db06b merge with crew-stable 2007-08-04 22:27:52 +02:00
Thomas Arendsen Hein
ae0d60a260 Simplify/correct finding the hg executable (fixes issue644)
Simply use find_exe('hg') as the default value for $HG and require to manually
set it if you have special requirements.

While the default will not always be 100% correct (i.e. the identical hg
version) for many users it is and for the others the hg executable found in
the PATH should do most things correctly.

Developers or other users with multiple installs can set $HG or run something
like util.set_hgexecutable in their shell or python scripts.

Additionally util.hgexecutable() is now available so extensions can access
the value with a public interface, too.
2007-08-04 22:25:12 +02:00
Bryan O'Sullivan
3bcee4b94e commands: move commit to cmdutil as wrapper for commit-like functions 2007-07-31 16:28:05 -07:00