Commit Graph

2974 Commits

Author SHA1 Message Date
Matt Mackall
ac962c3cef commit: fix bug where dirstate for removed file is confused
This fixes issue586
2007-06-10 21:16:58 -05:00
Matt Mackall
934033161c hg serve: don't lookup user-supplied names/addresses 2007-06-10 19:16:20 -05:00
Thomas Arendsen Hein
7a4d62e035 Removed trailing \n in calls to util.Abort() 2007-06-09 13:25:54 +02:00
Alexis S. L. Carvalho
50d5690f2a Avoid extra filelogs entries.
Right now, there are some situations in which localrepo.filecommit can
create filelog entries even though they're not needed.  For example:

- permissions for a file have changed;

- qrefresh can create a filelog entry identical to its parent (see the
  added test);

- convert-repo creates extra filelog entries in every merge where the
  first parent has added files (for example, changeset ebebe9577a1a of
  the kernel repo added extra filelog entries to files in the
  arch/blackfin directory, even though the merge should only touch the
  drivers/ata directory).  This makes "hg log file" in a converted repo
  less useful than it could be, since it may mention many merges that
  don't actually touch that specific file.

They all come from the same basic problem:  localrepo.commit (through
filecommit) creates new filelog entries for all files passed to it
(except for some cases during a merge).

Patch and test case provided by Benoit.

This should fix issue351.
2007-06-09 01:04:28 -03:00
Alexis S. L. Carvalho
a8f5faee29 Make sure the changelog mentions files whose flags changed
These changes don't actually need a new filelog entry (see next patch),
but if we don't mention the files in the changelog, it becomes much
harder to find all changesets that touch a file (not even a
"hg log --removed file" will work).
2007-06-09 01:04:28 -03:00
Alexis S. L. Carvalho
af3964b248 Add ui.slash hgrc setting
This will make most commands print paths using "/", regardless of
the value of os.sep.
2007-06-08 23:49:12 -03:00
Alexis S. L. Carvalho
7ca05536b5 docopy: use repo.pathto to format paths for printing 2007-06-08 23:49:12 -03:00
Alexis S. L. Carvalho
e1bf8e80c5 Add dirstate.pathto and localrepo.pathto.
Every time util.pathto is called, we have to pass the repo root and the
repo cwd.

dirstate.pathto is a simple convenience function that knows about the
root and the cwd arguments.  It's still possible to pass the cwd as an
optimization.

localrepo.pathto is a convenience function that just calls
dirstate.pathto, just like localrepo.getcwd.

dirstate.pathto becomes a single point that converts most (all?) paths
from the internal representation to some OS-specific relative path for
display purposes.
2007-06-08 23:49:12 -03:00
Alexis S. L. Carvalho
12e1854b67 Use absolute paths in revert. 2007-06-08 23:49:12 -03:00
Alexis S. L. Carvalho
0d958ed072 Use absolute paths in docopy. 2007-06-08 23:49:12 -03:00
Alexis S. L. Carvalho
4949bc9033 Use absolute paths in addremove.
This is more consistent with other places in the code, which only use
the "relpath" returned by cmdutil.walk for display purposes.
2007-06-08 23:49:12 -03:00
Patrick Mezard
a55efff966 ui: make readsections() abort when configuration cannot be read. 2007-06-03 22:11:25 +02:00
Thomas Arendsen Hein
49220695bc Removed trailing whitespace and tabs from python files 2007-06-06 20:22:52 +02:00
Thomas Arendsen Hein
cf1ee4e625 Issue a warning if "-r ." is used with two working directory parents.
Rationale for not aborting instead:
The first parent is usually more important as it is the local branch
during a merge and commands like 'hg diff' and 'hg diff -r.' behave still
identically (except for the warning of course).

Added a test for log -r. with one and two parents.
2007-06-06 19:05:18 +02:00
Alexis S. L. Carvalho
54dcd12c54 Remove atomicfile class.
The interface provided by opener(atomic=True) is inherently unsafe:
if an exception is raised in the code using the atomic file, the
possibly incomplete file will be renamed to its final destination,
defeating the whole purpose of atomic files.

To get around this, we would either need some bad hacks involving
sys.exc_info (to make sure things work in except: blocks), or an
interface to say "file is complete; rename it".

This is the exact interface provided by atomictempfile.  Since there
are no remaining users of the atomicfile class, just remove it.
2007-06-05 19:55:27 -03:00
Alexis S. L. Carvalho
b53e571f31 Use atomictemp files to write the dirstate.
atomic files are not safe in all cases.
2007-06-05 19:55:27 -03:00
Joel Rosdahl
27bc08a3cc Fix bug in "hg serve -v" 2007-06-04 21:49:01 +02:00
Alexis S. L. Carvalho
ae21f631dc merge with crew-stable 2007-06-04 00:26:53 -03:00
Alexis S. L. Carvalho
976e7af22b patch.diff: avoid calling workingctx().manifest()
Right now, to generate the manifest of the working dir, we have to
perform a full walk of the working dir, which will be very slow,
especially if we're interested in only a small part of it.

Since we use the manifest only to find out the mode of files for git
patches, manually build an execf function to do it.

This should fix issue567.
2007-06-03 14:38:52 -03:00
Bryan O'Sullivan
747ba13e75 Merge with crew. 2007-06-02 09:04:23 -07:00
Matt Mackall
41d9aaebb8 Add support for url#id syntax
This allows you to do:

 hg clone http://server/repo#stable

which is equivalent to:

 hg clone -r stable http://server/repo

Future incoming, outgoing, and push commands will default to using
this id because it's recorded in the default path.

Other commands that accept URLs (push, pull, bundle, incoming, and
outgoing) also accept this syntax.
2007-06-01 18:40:14 -05:00
Matt Mackall
aa00d22e56 clone: checkout the "default" branch if available 2007-06-01 18:52:18 -05:00
Matt Mackall
3959b588cd Warn about large files on hg add 2007-06-01 14:07:42 -05:00
Thomas Arendsen Hein
2366afd684 merge with stable 2007-06-01 19:49:09 +02:00
Thomas Arendsen Hein
3c2ee08111 Make "hg incoming -r revision_number" work for remote repos (issue566)
Uses the remote repository's lookup method as pull does and only transfers
what is needed to calculate incoming changesets.

One minor problem:
As only the needed changesets are transfered and stored in a local bundle
repository, the tip tag of this bundle is shows despite not being the tip
changeset of the remote repository.
(see "+tag: tip" in tests/test-incoming-outgoing.out in this patch)
2007-06-01 19:45:05 +02:00
Thomas Arendsen Hein
128193f3e9 addremove: comparing two empty files caused ZeroDivisionError
(found by Giorgos Keramidas)
2007-06-01 16:00:40 +02:00
Josef "Jeff" Sipek
77b18ca042 gitweb: Fixed-up search template
It seems that the search template has been forgoten over time, and needed
major revamping.
2007-05-31 20:12:40 -04:00
Thomas Arendsen Hein
3005b8655d hgweb: use generator to count parity of horizontal stripes for easier reading.
- use web.stripes in all places and consistently
- start with parity0 for lists generated in reverse (e.g. changelog)
2007-05-29 16:42:05 +02:00
Josef "Jeff" Sipek
0e1bc7bd9a hgweb: manifest: pass parity for the '[up]' link 2007-05-29 05:08:01 -04:00
Bryan O'Sullivan
4eff752451 Automated merge with http://hg.intevation.org/mercurial/crew 2007-05-27 14:43:29 -07:00
Bryan O'Sullivan
37507376a2 patchbomb: Validate email config before we start prompting for info. 2007-05-27 14:40:14 -07:00
Bryan O'Sullivan
d67a234671 Introduce find_exe. Use instead of find_in_path for programs.
The behaviour of find_in_path was broken for config options containing
path names, because it always searched the given path, even when not
necessary.  The find_exe function is more polite: if the name passed
to it contains a path component, it just returns it.
2007-05-27 14:26:54 -07:00
Bryan O'Sullivan
ebb57c99be ui: Rename has_config to has_section. 2007-05-27 13:50:59 -07:00
Patrick Mezard
6db235d2bb Fix issue 562: .hgignore requires newline at end.
End-of-lines characters where discarded without any check for existence.
2007-05-19 22:47:01 +02:00
Daniel Holth
5faf58b019 accept -r REV in more places
Commands affected:
* update
* merge
* backout
2007-05-17 13:55:24 -04:00
Eric Hopper
ba811c3509 Fix hg import --exact bug that hangs hg on failure. 2007-05-17 09:29:30 -07:00
Patrick Mezard
0bf2bda86a Merge with crew-stable. 2007-05-19 22:51:43 +02:00
Eric Hopper
04bb1c642e Make hg import --exact work when a new branch is created by an import. 2007-05-17 20:09:52 -07:00
Eric Hopper
9da473c4e8 Add ability to parse branch information to hg import 2007-05-17 20:09:47 -07:00
Eric Hopper
119a887cdc Add branch information to hg export. 2007-05-10 13:42:36 -07:00
Patrick Mezard
3e2c29954d Add ui.patch option.
ui.patch overrides the default patch/gpatch command and options.
2007-05-12 21:09:31 +02:00
Patrick Mezard
37afbaec09 Fix issue483 - mq does not work under windows with gnu-win32 patch.
Add --binary option to patch command under win32.
2007-05-12 21:09:29 +02:00
Matt Mackall
6bf7f7256d merge: fix spurious merges for copies in linear updates
We make better use of contexts to accurately identify copies that
don't need merges.

Add a simple test and update other tests.
2007-05-08 02:59:13 -05:00
Matt Mackall
8c51ae9f74 branch.cache: silently ignore I/O and OS errors 2007-05-08 02:57:05 -05:00
Matt Mackall
d4deb74aa1 context: fix workingfilectx._changectx 2007-05-07 22:30:36 -05:00
Matt Mackall
5fa7270b2d Merge with stable 2007-05-08 11:42:48 -05:00
Brendan Cully
fb4b5549c3 Add fast-forward branch merging 2007-05-06 20:27:45 -07:00
Patrick Mezard
b4ca391b19 Move win32 find_in_files from util_win32 to util. 2007-05-06 16:40:53 +02:00
Matt Mackall
5290628c48 Merge with stable 2007-05-03 17:27:21 -05:00
Matt Mackall
32c298df8a merge: reorganize some hunks in findcopies 2007-05-03 17:24:43 -05:00
Matt Mackall
e05a1595b6 merge: simplify a check in checkcopies 2007-05-03 17:24:43 -05:00
Matt Mackall
b3ab26f105 merge: expand and simplify the invalid handling for directory moves 2007-05-03 17:24:43 -05:00
Matt Mackall
691e10a07c merge: fix a bug detecting directory moves
When all the files in a directory are moved, it may be incorrectly marked as moved even if it contains subdirectories.
2007-05-03 17:24:43 -05:00
Matt Mackall
47ec1c2825 merge: clarify the findcopies code 2007-05-03 17:24:43 -05:00
Matt Mackall
cd2a1e0251 verify: hold write lock
Verify will report spurious errors if commits or pulls happen during verify.
2007-05-01 14:42:54 -05:00
Brendan Cully
46c9d09fa2 Also restore old rm -A behavior for inexact patterns 2007-04-30 09:32:44 -07:00
Brendan Cully
9759da5859 Fix rm -A with no patterns, which I just broke. 2007-04-30 09:13:27 -07:00
Brendan Cully
bd110b0cd3 Make rm --after simply mark files as removed, unless --force is also given 2007-04-30 08:51:59 -07:00
Matt Mackall
6a3545846a Merge with crew 2007-04-29 12:33:24 -05:00
Alexis S. L. Carvalho
13b54a8829 Fix minor mismerge.
The caching of umask ended up being duplicated.
2007-04-28 17:55:45 -03:00
Patrick Mezard
6af99d87d5 Use patch.patch() when checking for patch availability.
The test is closer to what we want to know. It also makes sense when you deal with patched versions of patch() as most people do under win32.
2007-04-28 11:53:36 +02:00
Brendan Cully
ff66cca34d Merge with crew 2007-04-28 09:03:47 -07:00
Patrick Mezard
5ec31f4a50 Fix find_in_path not including some file extension logic under win32.
Windows shell resolves utility path by combining PATH, the utility name and a set of file extensions from PATHEXT.
2007-04-28 11:43:31 +02:00
Joel Rosdahl
57515f7282 Fix bad reference to RepoError in import command 2007-04-28 16:28:54 +02:00
Bryan O'Sullivan
7b6d636f19 Refactor commands.serve to allow other commands to run as services.
This introduces a new function, cmdutil.service.
2007-04-27 21:30:55 -07:00
Matt Mackall
6f71aab47d Merge with stable 2007-04-26 18:41:18 -05:00
Brendan Cully
3787b004e8 Do not automatically rename an atomicfile if a write to it has generated an exception. 2007-04-25 13:14:01 -07:00
Matt Mackall
584e6c9643 hg serve: don't do DNS lookups 2007-04-25 13:35:18 -05:00
Thomas Arendsen Hein
b4fc156022 merge with stable 2007-04-25 18:43:55 +02:00
Brendan Cully
86e588eafb Make copy --after work for files that have been hg added. 2007-04-24 18:43:18 -07:00
Bryan O'Sullivan
06ea864877 When reloading the dirstate, recompute ignore information if needed. 2007-04-24 12:02:51 -07:00
Bryan O'Sullivan
3b15a417aa dirstate: speed up write by 50%. 2007-04-24 12:02:42 -07:00
Bryan O'Sullivan
6518558080 dirstate: make parents() faster.
This allows localrepository.status() to avoid reading all but the
first 40 bytes of the dirstate in the common case of running "hg
status".
2007-04-24 11:46:15 -07:00
Bryan O'Sullivan
b9daf16a19 localrepository.status: only acquire wlock if actually needed.
This speeds up the common case of not needing to update the dirstate,
and avoids the need to reload and parse the dirstate "just in case".
2007-04-24 11:05:39 -07:00
Bryan O'Sullivan
390039e974 util._matcher: speed up regexp matching.
In cdc7e3627e1b, Benoit made a change that substantially slows matching
when a big .hgignore file is in play, because it calls into the regexp
matching engine potentially hundreds of times per file to be matched.

I've partly rolled back his change, so that we only call into the matcher
once per file, but preserved the ability to report a meaningful error
message if there's a syntax error in the regexp.
2007-04-24 10:53:25 -07:00
Brendan Cully
33f64bb34f Merge with crew-stable 2007-04-24 10:47:41 -07:00
Brendan Cully
c779d79c71 Work around python 2.5.1 tarfile regression 2007-04-24 10:44:13 -07:00
Thomas Arendsen Hein
5cf9fd7310 Merge with crew-stable 2007-04-19 17:54:43 +02:00
Thomas Arendsen Hein
f828391cdc Avoid float rounding errors when checking http protocol version. 2007-04-19 17:52:42 +02:00
Alexis S. L. Carvalho
425cc6372f add mdiff.get_matching_blocks 2007-04-16 20:17:39 -03:00
Matt Mackall
e2dfe968ea Merge with stable 2007-04-16 12:37:30 -05:00
Matt Mackall
b8f97a9a35 Merge with crew 2007-04-16 12:27:49 -05:00
Matt Mackall
f63e728c54 merge: fix quadratic behavior in find-copies 2007-04-16 12:24:52 -05:00
Matt Mackall
765aba6082 Merge with stable 2007-04-16 09:52:37 -05:00
Matt Mackall
8392cf0d15 hgweb: fix rfind bug in PATH_INFO handling 2007-04-16 09:51:50 -05:00
Matt Mackall
bc0f074639 Merge with stable 2007-04-15 18:42:38 -05:00
Matt Mackall
a6178f3d01 Merge with crew 2007-04-12 12:42:22 -05:00
Matt Mackall
65b380693b hgweb: make PATH_INFO handling slightly more robust 2007-04-12 11:00:21 -05:00
Alexis S. L. Carvalho
62e2a7bfb7 command line templates: add formatnode filter
This will print a full hash node with --debug and a short one otherwise.

Use it with some default templates and in map-cmdline.default to print
the parents.  This should fix issue538.
2007-04-16 13:00:23 -03:00
Alexis S. L. Carvalho
4b47aae3d4 fix 'hg <not-log> -v --template foo' with revisions without copies 2007-04-16 13:00:23 -03:00
Matt Mackall
e293a4cd6d Merge with stable 2007-04-10 14:05:15 -05:00
Brendan Cully
3c3e3924c4 Merge with crew-stable 2007-04-10 10:34:43 -07:00
TK Soh
424b1a050d minor typo fix in templater's docstring 2007-04-10 12:24:28 -05:00
Alexis S. L. Carvalho
ea51c7fac2 Merge with crew-stable. 2007-04-09 04:57:25 -03:00
Alexis S. L. Carvalho
c250e89b1e atomicfile: don't copy the original file if it'll be truncated 2007-04-09 04:24:17 -03:00
Alexis S. L. Carvalho
9497591b05 use atomictemp files to write the dirstate 2007-04-09 04:24:17 -03:00
Alexis S. L. Carvalho
9c723b4f96 use atomictemp files to write branch.cache 2007-04-09 04:24:17 -03:00
Alexis S. L. Carvalho
c9f461c7af util.opener: if requested, use atomicfile even if the file doesn't exist
Right now, surprisingly enough, if you request an atomic file but the
file still doesn't exist, you get a regular file.  AFAICS, the only time
this happens is during the initial creation of the dirstate.
2007-04-09 04:24:17 -03:00
Alexis S. L. Carvalho
cbe674cc00 cache os.umask even on windows 2007-04-09 04:24:17 -03:00
Alexis S. L. Carvalho
047c4b002b Merge with crew-stable. 2007-04-07 04:45:27 -03:00
Brendan Cully
49e8f31f9f Merge with Matt 2007-04-05 14:55:27 -07:00
Matt Mackall
1e8fed06d8 merge: fix a bug where copies were getting ignored 2007-04-05 16:25:47 -05:00
Matt Mackall
746c62bff7 Fixups for recent changes in revlog version handling 2007-04-02 14:16:44 -05:00
TK Soh
8a4ed5c177 help: log --keyword is case-insensitive 2007-03-29 10:25:19 -05:00
TK Soh
bdd80aea95 hgweb: expand keyword search to full list of files 2007-03-29 09:32:59 -05:00
TK Soh
9f11c60f21 log: expand keyword search to full list of files 2007-03-29 09:28:10 -05:00
Alexis S. L. Carvalho
0489c59b5e Try to find diffstat in PATH before calling it
At least on Solaris, /bin/sh will print a "command not found" message
even if we redirect stderr.
2007-04-07 04:27:55 -03:00
Alexis S. L. Carvalho
8e9491052e Add a pointer to "hg -v help" to the bottom of hg help {,cmd} output
This should make it easier to discover global options.

As a bonus, they are no longer displayed by something like a
hg -v help dates
2007-04-07 04:27:55 -03:00
Alexis S. L. Carvalho
b98b34fc2e revlog.py: fix/tweak read ahead code in lazyparser 2007-04-07 04:27:55 -03:00
Matt Mackall
ebc2b5ccc8 merge: fix a bug where copies were ignored 2007-04-05 16:43:18 -05:00
Alexis S. L. Carvalho
d6886d1abf hgweb: don't display heads in gitweb-style summary page 2007-03-27 01:41:25 -03:00
Matt Mackall
84a6ecd211 tags: require -f to replace an existing tag
based on a patch from Johan Herland <johherla@online.no>
2007-03-23 00:12:28 -05:00
Matt Mackall
6d86b7e7d9 tags: fix abababa case, with test case 2007-03-22 23:52:50 -05:00
Alexis S. L. Carvalho
1ff95ba799 debugsetparents: wlock the repo before updating the dirstate 2007-03-19 19:07:40 -03:00
Alexis S. L. Carvalho
3082154fa5 avoid _wsgioutputfile <-> _wsgirequest circular reference
We use the _wsgirequest object itself as the output file object.

To avoid a "self.out = self" which would create another circular
reference, we make the "out" attribute a trivial property.
2007-03-19 19:07:39 -03:00
Alexis S. L. Carvalho
b2ef464fc4 avoid wsgiapplication <-> MercurialHTTPServer circular reference 2007-03-19 19:07:38 -03:00
Alexis S. L. Carvalho
69ecc6b336 hgwebdir: break templater -> templater circular reference
This is essentially another instance of the same problem fixed
by the parent changeset.  See its commit message for the details.
2007-03-19 19:07:37 -03:00
Alexis S. L. Carvalho
8bb9d231ee hgweb: break templater -> templater circular reference
The problem were some functions passed in the "defaults" argument
during the templater creation which use "self.t" directly.  This
creates the cycle:

 hgweb object
  -> templater object
      -> defaults dict
          -> footer function
              -> hgweb object

Instead of completely avoding the cycle, we break it after using
the templater.
2007-03-19 19:07:35 -03:00
greg@maptuit.com
889f908913 hgweb: display named branches in gitweb-style summary page 2007-03-16 17:55:42 -04:00
Alexis S. L. Carvalho
beebce1bec avoid a traceback with hg branch newbranch; hg up 2007-03-16 00:22:59 -03:00
Alexis S. L. Carvalho
e488c0e84f Fix handling of paths when run outside the repo.
The main problem was that dirstate.getcwd() returned just "",
which was interpreted as "we're at the repo root".  It now returns
an absolute path.

The util.pathto function was also changed to deal with the "cwd is
an absolute path" case.
2007-03-16 00:22:58 -03:00
Alexis S. L. Carvalho
fcb39243b1 pass repo.root to util.pathto() in preparation for the next patch 2007-03-16 00:22:57 -03:00
Alexis S. L. Carvalho
2b2a1a8a86 hgweb: handle IOErrors and OSErrors during unbundle
This allows the client to display a reasonable message to the user
(e.g. "Permission denied: .hg/lock"), instead of the current
"<url> does not appear to be an hg repository".
2007-03-16 00:22:55 -03:00
Alexis S. L. Carvalho
8cf3bc3446 Merge last few matcher/locate fixes. 2007-04-04 04:22:08 -03:00
Alexis S. L. Carvalho
d766331e6f locate: don't print "file not found" messages.
This should fix issue204.
2007-04-04 04:22:06 -03:00
Alexis S. L. Carvalho
e021806e69 change relglob: patterns to be consistent with glob: patterns
With this change, you have to use "hg locate 'hgweb/**'" to locate
all the files in directories named hgweb.  OTOH, "hg locate '*l'"
will locate only files that end with "l" - e.g. a file called "hg.py"
will not be matched just because it's in a directory whose name ends
with "l" (e.g. "mercurial").
2007-04-04 04:22:06 -03:00
Alexis S. L. Carvalho
8d4f62f9f3 Revert changeset 8e97d9d074da; add another test for glob: patterns
With that changeset, it's impossible to use a glob: pattern to match
e.g. all files ending in .py - glob:**.py would also match all files
in a directory called dir.py.
2007-04-04 04:22:05 -03:00
Alexis S. L. Carvalho
db8accc4c6 glob:<directory> patterns match the files in that directory.
This makes the behaviour of glob: patterns more consistent:
hg status glob:dir  and   hg status -I glob:dir  will match
the same files.

It's also consistent with the fact that {rel,}path patterns
recursively match the contents of a directory.
2007-03-20 22:09:55 -03:00
Alexis S. L. Carvalho
6f408bf4cd Pass normalized directory names to the ignore function
This fixes a bad performance regression caused by b959487f328c.
2007-03-20 22:09:53 -03:00
Alexis S. L. Carvalho
a8939ea9c7 fix hg commit . in the repo root 2007-03-20 22:09:51 -03:00
Alexis S. L. Carvalho
2ed671d3fa util._matcher: remove superfluous variable 2007-03-16 22:48:23 -03:00
Alexis S. L. Carvalho
a782e3309d util._matcher: use "." as the root of empty {rel,}path patterns
Should fix issue332. Really.
2007-03-16 22:48:20 -03:00
Alexis S. L. Carvalho
ec56d01ca6 Optimize return value of util._matcher for hgignore case 2007-03-10 23:01:02 -03:00
Alexis S. L. Carvalho
05eea28e33 Optimize return value of util._matcher for common command line case
This will trigger every time somebody runs something like "hg diff"
or "hg status" without any arguments.

The important part here is returning util.always as the match function,
which is a much simpler (and faster) function than the usual return
value, and allows other code to just skip the filtering if it knows
all files will match.
2007-03-10 23:01:00 -03:00
Alexis S. L. Carvalho
c3d6308137 remove unused "head" hack from util._matcher 2007-03-10 23:00:59 -03:00
Alexis S. L. Carvalho
bc0e37f5ff locate: exit(1) if we didn't print any file 2007-03-10 23:00:58 -03:00
Alexis S. L. Carvalho
b53e6f3897 change locate to use relglobs by default
This makes its default behaviour useful again (issue108), and
changes it search the entire repository by default (instead
of just the cwd), just like all other commands.

It also hides issue204 by default, but you'll still see the
same behaviour if you give it a relpath: pattern.
2007-03-10 23:00:57 -03:00
Alexis S. L. Carvalho
21115ad8b7 localrepo.walk: if we're walking a specific revision, sort the files
This is more consistent with our behaviour while walking the working directory.
2007-03-10 23:00:55 -03:00
Alexis S. L. Carvalho
393022dbbb dirstate.statwalk: explicitly test for ignored directories
This removes a hack where we appended '/' to a dirname so that:
- it would not appear on the "dc" dict
- it would always be matched by the match function

This was a contorted way of checking if the directory was matched by
some hgignore pattern, and it would still fail with some uses of
--include/--exclude patterns.

Things would still work fine if we removed the check altogether and
just appended things to "work" directly, but then we would end up
walking ignored directories too, which could be quite a bit of work.

This allows further simplification of the match function returned by
util._matcher, and fixes walking the working directory with a
--include pattern that matches only the end of a name.
2007-03-10 23:00:54 -03:00
Alexis S. L. Carvalho
6ccee3793b util._matcher: unify pattern normalization
This should fix issue347.

It also highlights one issue with the directory walking code when
you have an --include pattern that matches the end of a filename.
This is fixed by the next patch.
2007-03-10 23:00:53 -03:00
Alexis S. L. Carvalho
cc4356d95d util.*matcher: change default "names" argument
names=['.'] means "include (recursively) only files from the current subdir";
the function then did a hack to walk the whole tree.  Clean that up.

This also fixes a problem where "--include ." works in a subdir, but not
on the tree root.
2007-03-10 23:00:51 -03:00
Alexis S. L. Carvalho
7a7a8339ec util._matcher: fix handling of path: patterns 2007-03-10 23:00:49 -03:00
Alexis S. L. Carvalho
a2bea59405 util._matcher: fix handling of relglob: patterns 2007-03-10 23:00:48 -03:00
Alexis S. L. Carvalho
c83e2fe93d A 'glob:foo?bar' pattern determines a root - the tree root 2007-03-10 23:00:47 -03:00
Alexis S. L. Carvalho
c576480d83 Leave normalization of patterns to util._matcher
Passing [] to util.cmdmatcher accidentally fixes walking of files
with "\n" in the name.
2007-03-10 23:00:46 -03:00
Alexis S. L. Carvalho
2f70c57d86 util._matcher: update comments
This should match the code better.  Except for bugs...
2007-03-10 23:00:45 -03:00
Alexis S. L. Carvalho
1ac4016af4 remove obsolete code from patch.diff
repo.status already does this filtering.  If the caller supplies a set of
changes, it's his responsibility to filter out what he doesn't want.
2007-03-10 23:00:43 -03:00
Alexis S. L. Carvalho
2593ea959d small globprefix fix 2007-03-10 23:00:42 -03:00
Brendan Cully
09cc2427b1 Make update with no node jump to the tip of the current branch 2007-03-10 17:36:27 -08:00
Alexis S. L. Carvalho
0458b30ebf statwalk: don't put self.root in the files list
That list is supposed to contain internal, normalized names ("/"-separated,
relative to the repo root), not OS-native paths.
2007-03-10 22:03:22 -03:00