Matt Mackall
aff448fc36
archive: remove spurious flag_bits setting
...
This makes zip -T on resulting archives work. File permissions are
still retained.
2007-06-23 14:02:41 -05:00
Thomas Arendsen Hein
2e76adae49
Remember path to 'hg' executable and pass to external tools and hooks as $HG.
2007-06-23 20:21:10 +02:00
Thomas Arendsen Hein
45612e4757
Merge with main
2007-06-23 12:05:00 +02:00
Alexis S. L. Carvalho
cc6e60f60e
merge: fix small bug with a failed merge across a rename
...
If $HGMERGE wasn't able to fix the conflicts, we wouldn't copy
f to fd, and util.set_exec wouldn't find the file.
2007-06-22 20:44:40 -03:00
Matt Mackall
8dc00c8475
rollback: update help for issue316
2007-06-22 17:29:49 -05:00
Alexis S. L. Carvalho
e85eaa593d
git patches: correct handling of filenames with spaces
...
Add a trailing TAB to the "--- filename" lines if there's a space
in the file name. This allows patch(1) to work correctly. The
same is done for diff --nodates.
This was originally suggested by Andrei Vermel, but at the time
I thought git was doing something different.
2007-06-22 19:06:04 -03:00
Alexis S. L. Carvalho
b8f177ebbe
Work around urllib2 digest auth bug with Python < 2.5
...
This should fix issue570.
2007-06-22 14:32:54 -03:00
Alexis S. L. Carvalho
64a37442ed
dirstate.status: if a file is marked as copied, consider it modified
...
After a "hg copy --force --after somefile cleanfile", cleanfile
shouldn't be considered clean anymore.
2007-06-21 23:42:06 -03:00
Matt Mackall
265560b37a
Merge with Eric Hopper
2007-06-21 18:05:14 -05:00
Matt Mackall
a38809cf9e
merge: warn user about divergent renames
2007-06-21 18:02:03 -05:00
Patrick Mezard
21ea8128a8
Merge with crew
2007-06-21 22:19:41 +02:00
Marcos Chaves
f5c072cbc9
Handle CTRL+C in serve under Windows.
2007-06-21 21:58:18 +02:00
Matt Mackall
613a7dfcea
identify: take a path to a remote repo
...
Rather than using -R, we take a path as an argument. This lets us use
url#branch syntaxes that may be in hgrc.
2007-06-21 13:09:01 -05:00
Matt Mackall
f0400ad7b9
dispatch: parse local hgrc for paths
2007-06-21 13:09:00 -05:00
Eric Hopper
964ff0a5e3
Change branches to sort 'active' branches first, and add an option to show only active branches.
2007-06-21 10:40:09 -07:00
Thomas Arendsen Hein
1b20c30e25
hgweb_mod.archive(): Use 'key' instead of builtin 'id'.
2007-06-21 19:38:44 +02:00
Thomas Arendsen Hein
9a78cd828a
Remove useless variable assignments in util.opener.
...
The original idea might have been to prevent circular references, but
as this assignment would have created another reference, this makes
no difference.
2007-06-21 19:24:27 +02:00
Matt Mackall
b5a98f60fd
identify: work with remote repos
2007-06-21 11:54:16 -05:00
Matt Mackall
7d837ca833
identify: add support for output flags
2007-06-21 11:54:13 -05:00
Matt Mackall
a0395f3952
identify: accept a revision argument
2007-06-21 11:54:11 -05:00
Matt Mackall
0ca818e7d0
identify: use contexts
2007-06-21 11:42:39 -05:00
Matt Mackall
7be33e5057
context: add tags() method
2007-06-21 11:42:39 -05:00
Matt Mackall
1f80f939a9
identify: show nullid for empty repo
2007-06-21 11:42:39 -05:00
Thomas Arendsen Hein
3019bb7a0b
Kill trailing spaces
2007-06-21 09:25:49 +02:00
Alexis S. L. Carvalho
d4cae7d8a5
dirstate.invalidate: clear dirty flag
2007-06-21 00:34:14 -03:00
Alexis S. L. Carvalho
3beeb3356f
dirstate: fix typo
2007-06-21 00:34:14 -03:00
Brendan Cully
f7e826dad3
Fix dispatch error message when not in a repo
2007-06-20 20:13:31 -07:00
csaba.henk@creo.hu
e069b7ea12
timestamp of gzip archives taken from changeset context
2007-06-11 19:09:01 +02:00
TK Soh
abffe2b1c3
tag: abort when trying to remove nonexistent tags
2007-06-15 14:48:21 -05:00
Brendan Cully
95c08c2bfc
Small fixes for 3acdabb0ef1d (hg heads branch)
2007-06-20 17:53:11 -07:00
Eric Hopper
0bcc9fc15c
Add option to heads to show only heads for current branch.
2007-06-19 08:37:43 -07:00
Eric Hopper
bdc1293e28
Provide a version independent way to use the set datatype.
2007-06-19 08:37:41 -07:00
Patrick Mezard
9a43b6739b
Fix read mode when importing patch.
2007-06-19 17:03:31 +02:00
Patrick Mezard
8f4c2f4b77
patch: fix ui.patch regression introduced by ef94caf261ce.
...
The idea is ui.patch is either empty or wisely filled by user.
2007-06-19 17:02:07 +02:00
Patrick Mezard
0b90ff3d83
Merge with crew-stable
2007-06-20 00:22:51 +02:00
Patrick Mezard
aae84719a5
Fix issue 589: "undelete" sequence leads to crash.
2007-06-20 00:10:21 +02:00
Patrick Mezard
ded8d8999d
Fix debugrename --rev option
2007-06-20 00:09:30 +02: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
30a1419154
dispatch: report failed imports nicely
2007-06-18 21:30:27 -05:00
Matt Mackall
ab72eb680f
demandimport: fix issue579 and add a test
...
fix suggested by Brendan
2007-06-18 19:43:26 -05:00
Matt Mackall
c61bc27ccc
dispatch: add generic pre- and post-command hooks
2007-06-18 17:49:56 -05:00
Lee Cantey
c2221237be
Merge with crew
2007-06-18 15:06:14 -07:00
Lee Cantey
416c20c0e1
Fix for demandimport.py and Windows compiled version.
...
From Shun-ichi Goto in BTS issue 457 http://www.selenic.com/mercurial/bts/msg2780
2007-06-18 15:03:55 -07:00
Brendan Cully
4a2d1da1c5
Work around heisenbug in Popen3.__del__
2007-06-18 14:52:31 -07:00
Brendan Cully
a4f4ecdc68
Merge with mpm
2007-06-18 12:39:43 -07:00
Brendan Cully
b969d388db
Make fast-forward merges full merges
2007-06-18 12:38:54 -07:00
Matt Mackall
c5b84a3392
hooks: separate hook code into a separate module
2007-06-18 13:24:34 -05:00
Matt Mackall
5ecb0cb232
dispatch: fix handling of incorrect number of arguments
2007-06-18 13:24:34 -05:00
Matt Mackall
b99ae11550
dirstate: pull ignore smarts out of ui
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
8395ca26f3
extensions: pull extension-aware bits out of ui
2007-06-18 13:24:34 -05:00
Matt Mackall
2033c5f43d
dirstate: refactor checkinterfering
2007-06-18 13:24:34 -05:00
Matt Mackall
be01255569
dirstate: hide some more internals
2007-06-18 13:24:34 -05:00
Matt Mackall
c71a2b10a7
dirstate: hide internal vars
...
Add an __iter__ method so commands don't need to poke at _map.
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
Matt Mackall
5b067f098a
dirstate: simplify dirty handling
2007-06-18 13:24:34 -05:00
Matt Mackall
dd962fae26
dirstate: lazify and lambdafy _slash
2007-06-18 13:24:34 -05:00
Matt Mackall
12c1ce4938
dirstate: simplify state()
2007-06-18 13:24:34 -05:00
Matt Mackall
38474db3cb
dirstate: move ignore to its own file
2007-06-18 13:24:34 -05:00
Matt Mackall
c0a4aebd3c
dirstate: replace clear()
2007-06-18 13:24:34 -05:00
Matt Mackall
90c0194d9b
dirstate: fold parse into read
2007-06-18 13:24:33 -05:00
Matt Mackall
dd38b9f308
dirstate: make reload lazy
2007-06-18 13:24:33 -05:00
Matt Mackall
6a2d255741
dirstate: lazify initdirs
2007-06-18 13:24:33 -05:00
Matt Mackall
bb39ad22fb
dirstate: lazify copymap, _branch, and _pl
2007-06-18 13:24:33 -05:00
Matt Mackall
3da450bd87
dirstate: use getattr rather than lazyread
2007-06-18 13:24:33 -05:00
Brendan Cully
b6d2fc3ac4
Notify the user that hg branch does not create a branch until commit
2007-06-18 10:44:43 -07:00
Patrick Mezard
d37b2026d5
cmdutil: add missing "time" import.
2007-06-17 20:35:32 +02:00
Thomas Arendsen Hein
1bdf3feac6
Make --import-branch option actually work (- is translated to _)
2007-06-17 14:11:30 +02:00
Eric Hopper
4e64ad3b5a
Add --import-branch option to hg import to pull in branch information without --exact
2007-06-14 09:01:51 -07:00
Brendan Cully
228060290f
Make parents with a file but not a revision use working directory revision.
2007-06-14 10:58:49 -07:00
Thomas Arendsen Hein
75327fd456
merge with main
2007-06-14 11:33:32 +02:00
Brendan Cully
5686dde045
Merge with crew
2007-06-13 19:11:20 -07:00
Brendan Cully
9b610cb44c
extensions: fix load of module/__init__.py on OS X
2007-06-13 19:05:20 -07: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
2a15874eb2
commands.remove: don't use the unknown list
2007-06-13 19:15:58 -03:00
Alexis S. L. Carvalho
f5f49df61e
commands.commit: don't use the unknown list
2007-06-13 19:15:58 -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
Alexis S. L. Carvalho
12900975cc
revert: use util.lexists
2007-06-13 19:15:58 -03:00
Alexis S. L. Carvalho
8b373440d8
addremove: use util.lexists
2007-06-13 19:15:58 -03:00
Alexis S. L. Carvalho
587c06ebc5
commands.commit: symlinks are supported
2007-06-13 19:15:58 -03:00
Brendan Cully
e96607cf35
extensions: load modules in module/__init__.py form.
...
For example, convert=/path/to/convert now works.
2007-06-13 13:46:40 -07:00
Matt Mackall
123d0f2541
extensions: fix lookup of hgext.foo modules
2007-06-13 13:15:53 -05:00
Matt Mackall
a4399f5062
localrepo: demand-load changeset, manifest, and dirstate
2007-06-13 13:15:51 -05:00
Brendan Cully
d9c890b630
Make parents with a file but not a revision use working directory revision.
2007-06-14 10:58:49 -07:00
Brendan Cully
37671e0260
dispatch: restore a dropped shlex import
...
Add test-dispatch as a place for command parsing and dispatch tests.
2007-06-12 13:21:42 -07:00
Thomas Arendsen Hein
03a476e13f
merge with main
2007-06-12 18:55:47 +02:00
Thomas Arendsen Hein
635f47fb1d
Revive commands.dispatch as a simple way to call hg from other pythons scripts.
...
This was already used by hg-ssh and others and is really convenient if you
just want a native equivalent of calling the command line version.
2007-06-12 17:39:57 +02:00
Matt Mackall
42349e08dc
extensions: add missing sys import
2007-06-12 10:34:54 -05:00
Matt Mackall
7092619ffc
dispatch: accept an abbreviation of --repository
2007-06-11 21:09:24 -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
1621c30af5
dispatch: use the repo path found by early parsing
...
This lets us simplify things a bit.
2007-06-11 21:09:24 -05:00
Matt Mackall
b37003d1a6
dispatch: parse and apply -R early
...
This allows us to use extensions specified in .hg/hgrc. Unfortunately,
this requires us to parse that file twice, but performance impact on
the version command appears to be less than 1%.
2007-06-11 21:09:24 -05:00
Matt Mackall
a0218b2be7
dispatch: parse and apply cwd opt early
2007-06-11 21:09:24 -05:00
Matt Mackall
eec35bbc8f
dispatch: rename variables after code motion
2007-06-11 21:09:24 -05:00
Matt Mackall
671f8a455f
dispatch: hoist debugging hook to runcatch
2007-06-11 21:09:24 -05:00
Matt Mackall
7daba33088
dispatch: move dispatching code to cmdutil
2007-06-11 21:09:24 -05:00
Matt Mackall
fc13f3eb60
dispatch: move runcommand to cmdutil
2007-06-11 21:09:24 -05:00
Matt Mackall
fe0bc5497b
dispatch: pull final command execution into its own function
2007-06-11 21:09:24 -05:00
Matt Mackall
9ddb5e812f
dispatch: reduce nesting by moving parsing exceptions
2007-06-11 21:09:23 -05:00
Matt Mackall
904b4d70df
dispatch: move signal and exception handling to its own function
2007-06-11 21:09:23 -05:00
Matt Mackall
67bd5873db
Create a separate module for managing extensions
2007-06-11 21:09:23 -05:00
Matt Mackall
cb98d050d6
extensions: separate function for loading single extensions
2007-06-11 21:09:23 -05:00
Matt Mackall
5e5d2fc9f8
dispatch: reorder functions
2007-06-11 21:09:23 -05:00
Matt Mackall
d157dd7e9f
localrepo: break out the repo-finding walk into its own function
2007-06-11 21:09:23 -05:00
Brendan Cully
497f138a19
Respect locale environment variables on darwin.
...
In python 2.4+ on darwin, locale.getpreferredencoding() returns
mac-roman regardless of what LC_CTYPE, LANG etc are set to. This can
produce hard-to-notice conversion errors if input text is not in
mac-roman. So this patch overrides it with setlocale/getlocale if the
environment has been customized, on the assumption that the user has
done so deliberately.
2007-06-11 12:14:31 -07:00
Brendan Cully
73b9a0fd82
Small cleanups for the new tag code
2007-06-11 11:06:42 -07:00
Alexis S. L. Carvalho
0e52789888
wsgicgi: change stdin to binary mode
2007-06-04 00:24:48 -03:00
Alexis S. L. Carvalho
f0513bf1bb
Also check the index file size when deciding whether to reload a revlog.
...
This should fix some spurious failures from test-clone-pull-corruption
(issue552).
2007-06-04 00:24:48 -03:00
Alexis S. L. Carvalho
dd4d403b90
use .extend instead of .append in readtags
2007-06-04 00:24:48 -03:00
Josef "Jeff" Sipek
066eaf6a84
gitweb: Display branch and tag labels
...
Pages which display labels:
- summary
- shortlog
- changelog
- changeset
- search
2007-06-01 19:56:39 -04: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
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
Edouard Gomez
52552f6c05
Fix inconsistency for the stream_out capability in hgweb
...
During some experiments of mine, the uncompressed cloning could not
be enabled for hgweb.cgi nor hgwebdir.cgi though the server claimed
to be stream_out capable.
The only solution was to enable it using the user's .hgrc file.
This solution is not acceptable when publishing the repos through
an HTTP server because the CGI runs as a www dedicated user whose's
home hgrc file may not be accessible to users publishing their repos
through their userdir.
For such cases we could end up with this typical debug output:
hg --debug clone --uncompressed http://server/hg/project
destination directory: project
sending capabilities command
capabilities: lookup changegroupsubset stream=1
unbundle=HG10GZ,HG10BZ,HG10UN
sending stream_out command
abort: operation forbidden by server
The error lies in the fact the hgweb object defines new accessors
to the repo configuration that trust things by default (untrusted=True)
but the streamclone:stream_out function uses the usual accessors to the
repo.ui object, which do not trust by default (untrusted=False)
Fix this inconsistency, adding a new parameter to the stream_out function.
hgweb then forces a "trust by default" behavior.
2007-05-12 00:41:30 +02:00
Alexis S. L. Carvalho
5dde9c8a57
improve warning for hg add foo; hg mv foo bar
2007-07-11 19:56:16 -03:00
Alexis S. L. Carvalho
3739335e3b
util._hgexecutable: default to 'hg'
...
This should make hooks work even if util.set_hgexecutable is not called
(e.g. hgweb.cgi).
Fixes issue625.
2007-07-11 18:15:21 -03:00
Alexis S. L. Carvalho
c2a8afba01
archive: add symlink support
2007-07-11 17:40:41 -03:00
Alexis S. L. Carvalho
ecefa1684a
archive: use util.opener when archiving files.
...
This simplifies the code a bit and makes it easier to support symlinks.
2007-07-11 17:40:41 -03:00
Alexis S. L. Carvalho
ea93afaf3c
localrepo.wwrite: use opener.symlink
...
This makes us fall back to regular files if symlinks are not supported.
2007-07-11 17:40:41 -03:00
Alexis S. L. Carvalho
422bcbcb1d
Add symlink method to util.opener.
...
Differences from os.symlink:
- the symlink name is relative to the opener base directory
- if a file with that name already exists, it's removed
- if necessary, parent directories are created
- if the system (OS or filesystem) doesn't support symlinks, a
regular file is created. Its contents are the symlink target.
2007-07-11 17:40:41 -03:00
Alexis S. L. Carvalho
2a73361d92
turn util.opener into a class
2007-07-11 17:40:41 -03: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