Commit Graph

371 Commits

Author SHA1 Message Date
Eric Hopper
0bcc9fc15c Add option to heads to show only heads for current branch. 2007-06-19 08:37:43 -07:00
Thomas Arendsen Hein
4d29c6dc8e Updated copyright notices and add "and others" to "hg version" 2007-06-19 08:51:34 +02:00
Thomas Arendsen Hein
483231d996 Cleanup of whitespace, indentation and line continuation. 2007-06-19 08:06:37 +02:00
Matt Mackall
c5b84a3392 hooks: separate hook code into a separate module 2007-06-18 13:24:34 -05:00
Matt Mackall
579d9e3b44 encoding: pull fallbackencoding out of localrepo into early parsing 2007-06-18 13:24:34 -05:00
Matt Mackall
cdeb6ec2da extensions: kill ui readhooks
Move .hgrc extension loading into localrepo
2007-06-18 13:24:34 -05:00
Matt Mackall
e957b05434 localrepo and dirstate: rename reload to invalidate
We want to avoid actually reloading if possible.
2007-06-18 13:24:34 -05:00
Thomas Arendsen Hein
75327fd456 merge with main 2007-06-14 11:33:32 +02:00
Alexis S. L. Carvalho
574b7631bc localrepo.status: only append stuff to the clean list if list_clean is true
This is consistent with dirstate.status.
2007-06-13 21:39:45 -03:00
Alexis S. L. Carvalho
00cc2c2d06 localrepo.add: avoid some stats
There's still an extra lstat done by dirstate.update.
2007-06-13 19:15:58 -03:00
Matt Mackall
a4399f5062 localrepo: demand-load changeset, manifest, and dirstate 2007-06-13 13:15:51 -05:00
Matt Mackall
ca982cdfb5 dispatch: move findrepo to cmdutil 2007-06-11 21:09:24 -05:00
Matt Mackall
dc4befe753 localrepo: don't search from path
All current callers already pass in the repo root.

This normalizes things a bit. Now all repo types take a direct path to
repo root and only the command line interface (or the dispatcher)
searches from the current directory.
2007-06-11 21:09:24 -05:00
Matt Mackall
d157dd7e9f localrepo: break out the repo-finding walk into its own function 2007-06-11 21:09:23 -05:00
Matt Mackall
ac962c3cef commit: fix bug where dirstate for removed file is confused
This fixes issue586
2007-06-10 21:16:58 -05: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
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
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
ae21f631dc merge with crew-stable 2007-06-04 00:26:53 -03:00
Alexis S. L. Carvalho
dd4d403b90 use .extend instead of .append in readtags 2007-06-04 00:24:48 -03:00
Matt Mackall
3959b588cd Warn about large files on hg add 2007-06-01 14:07:42 -05:00
Eric Hopper
ba811c3509 Fix hg import --exact bug that hangs hg on failure. 2007-05-17 09:29:30 -07:00
Matt Mackall
5fa7270b2d Merge with stable 2007-05-08 11:42:48 -05:00
Matt Mackall
8c51ae9f74 branch.cache: silently ignore I/O and OS errors 2007-05-08 02:57:05 -05: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
Bryan O'Sullivan
06ea864877 When reloading the dirstate, recompute ignore information if needed. 2007-04-24 12:02:51 -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
Matt Mackall
e293a4cd6d Merge with stable 2007-04-10 14:05:15 -05:00
Alexis S. L. Carvalho
9c723b4f96 use atomictemp files to write branch.cache 2007-04-09 04:24:17 -03:00
Matt Mackall
035527c39a Merge with crew 2007-03-24 02:57:27 -05:00
Matt Mackall
1139bf86fc Merge with -stable 2007-03-24 02:45:08 -05:00
Alexis S. L. Carvalho
6cbf527646 use os.path.islink instead of util.is_link; remove util.is_link 2007-03-23 23:40:25 -03:00
Matt Mackall
6d86b7e7d9 tags: fix abababa case, with test case 2007-03-22 23:52:50 -05:00
Matt Mackall
40a0da6fd9 restructure changelog file appending
- make appending code proper part of changelog with delayupdate/finalize
- use simplified appender that tracks pending data in memory
- eliminate old appendfile and helper classes
- update addchangegroup to use new interface and reuse the existing changelog
2007-03-22 23:37:44 -05:00
Matt Mackall
04561e556e revlog: simplify revlog version handling
- pass the default version as an attribute on the opener
- eliminate config option mess
2007-03-22 19:52:38 -05:00
Eric St-Jean
59885059dd Fix localrepo.copy to deal with symbolic links. 2007-03-21 23:20:56 -04:00
Alexis S. L. Carvalho
47cb22b5a2 Merge with crew-stable 2007-03-16 00:45:18 -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
Matt Mackall
ec3d12a085 Merge with -stable 2007-03-14 19:17:40 -05:00
Matt Mackall
d6ce65f557 tags: add --remove 2007-03-14 19:13:04 -05:00
Matt Mackall
ba891a21b8 tags: remove unused variables 2007-03-14 18:49:10 -05:00
Matt Mackall
6788bba79c Make the tags algorithm smarter 2007-03-14 18:47:29 -05:00
Matt Mackall
bc68a5f878 Refactor tags code to prepare for improving the algorithm 2007-03-14 16:40:47 -05:00
Matt Mackall
e896adead6 Merge with -stable, fix small test failure 2007-03-14 01:26:09 -05:00
Matt Mackall
19d825d10e Minor default branch cleanups 2007-03-13 15:47:55 -05:00
Matt Mackall
2e188aa5f4 Move branches.cache to branch.cache
Keeps old clients from conflicting with new caches, makes features
logic unnecessary.
2007-03-13 15:18:10 -05:00
Alexis S. L. Carvalho
fd69fe8d91 "default" is the default branch name 2007-03-13 15:02:33 -03:00
Alexis S. L. Carvalho
641d95a966 Merge a bunch of matcher and locate fixes. 2007-03-10 23:21:33 -03:00