Alexis S. L. Carvalho
858dee209b
Revert almost all of 0ab603017f82; add a test
...
Because of file copies, we should update the manifest dict only after
committing all files.
2006-11-18 19:44:42 -02:00
Matt Mackall
f9f3aa2d91
avoid unnecessary copy merges
2006-11-18 11:34:19 -06:00
Thomas Arendsen Hein
411d64ce3e
white space and line break cleanups
2006-11-17 08:06:54 +01:00
Thomas Arendsen Hein
55e3c776d7
Merge with crew.
2006-11-16 08:52:55 +01:00
Thomas Arendsen Hein
3b57d6c4a0
Use nullrev+count instead of count-1 in a newly introduced expression.
...
Before that repo.changelog.tip() was used, but this yields a node.
Of course many more places should be changed like this, this was just done
as an example.
2006-11-16 08:51:22 +01:00
Matt Mackall
06b33366dc
abort if explicitly committed files are not found or not tracked
2006-11-15 23:59:39 -06:00
Matt Mackall
312ace343c
unduplicate bundle writing code from httprepo
2006-11-15 23:37:45 -06:00
Matt Mackall
96305ed7ba
remove duplicate zgenerator in httprepo
2006-11-15 15:51:58 -06:00
Matt Mackall
14645d0488
create a readbundle function
2006-11-15 15:51:58 -06:00
Matt Mackall
85f6bef03c
move write_bundle to changegroup.py
2006-11-15 15:51:58 -06:00
Matt Mackall
972bf0065b
remove legacy hg parents REV syntax
2006-11-15 15:51:58 -06:00
Matt Mackall
a43442fa8e
add log --removed
2006-11-15 15:51:58 -06:00
Matt Mackall
cb7c83c3e4
rename and copy are no longer experimental
2006-11-15 15:51:58 -06:00
Matt Mackall
53c22f6cd3
alphabetize help_ in commands
2006-11-15 15:51:58 -06:00
Matt Mackall
c526dfb885
remove relpath
2006-11-15 15:51:58 -06:00
Matt Mackall
367f4361b1
refactor rawcommit
2006-11-15 15:51:58 -06:00
Matt Mackall
37174271f4
refactor debugrenamed
2006-11-15 15:51:58 -06:00
Matt Mackall
040dd9d149
move show_version to version_
2006-11-15 15:51:58 -06:00
Matt Mackall
8e5a9075b7
move walkchangerevs to cmdutils
2006-11-15 15:51:58 -06:00
Matt Mackall
c8bc764d1e
Consolidate brinfo handling
2006-11-15 15:51:58 -06:00
Matt Mackall
40946417bd
changeset templater: convert some unnecessary yields to returns
2006-11-15 15:51:58 -06:00
Matt Mackall
2fe74d8035
further simplify stringify
2006-11-15 15:51:58 -06:00
Matt Mackall
0809871d9a
ui: remove last vestiges of header buffering
2006-11-15 15:51:58 -06:00
Alexis S. L. Carvalho
7598647c43
commands.docopy: pay attention on whether paths use "/" or os.sep
2006-11-15 19:18:57 -02:00
Alexis S. L. Carvalho
2a74758338
fix util.pathto
...
All users of this function pass a local path (which uses os.sep) as the
first argument and a "/"-separated path as the second argument.
2006-11-15 18:56:47 -02:00
Alexis S. L. Carvalho
f83694a0f9
don't use readline() to read branches.cache
...
The posixfile_nt class used on windows doesn't have that method.
2006-11-15 17:56:57 -02:00
Benoit Boissinot
ed582050f9
merge with upstream
2006-11-13 21:50:09 +01:00
Matt Mackall
f40fcaac75
Refactor log ui buffering and patch display
2006-11-13 13:26:57 -06:00
Matt Mackall
b0f86b4331
refactor header handling for changelog formatting
2006-11-13 13:26:57 -06:00
Matt Mackall
c50c09da0a
templates: move changeset templating bits to cmdutils
2006-11-13 13:26:57 -06:00
Matt Mackall
6950309cf6
templater: changeset templater reorganization and optimizations
2006-11-13 13:26:57 -06:00
Matt Mackall
e0d8e4b198
templater: speed up changeset writes and stringify
2006-11-13 13:26:57 -06:00
Matt Mackall
9d8ded34e9
changeset_templater: remove changes arg
2006-11-13 13:26:57 -06:00
Matt Mackall
5c95b0e092
templater: simplify parsestring
2006-11-13 13:26:57 -06:00
Matt Mackall
c517977e84
template: fold template() into __call__, minor optimizations
...
- use non-grouping operator to avoid some extra processing
- avoid copying and updating defaults
- unnest main template body
- avoid returning extra empty string if format
2006-11-13 13:26:57 -06:00
Matt Mackall
6fe92f16bb
templater: simplify cache and remove filter argument in __call__
2006-11-13 13:26:57 -06:00
Matt Mackall
1b0a187e45
templater: simplify template function
2006-11-13 13:26:57 -06:00
Matt Mackall
aceb3199d6
templater: take cStringIO out of indent
2006-11-13 13:26:57 -06:00
Matt Mackall
3c62f52384
templater: remove cStringIO from stringify
2006-11-13 13:26:57 -06:00
Matt Mackall
00715e3a82
templater: remove cStringIO for fill
2006-11-13 13:26:57 -06:00
Matt Mackall
4fe7850499
templater: use str.decode in parse_string
2006-11-13 13:26:57 -06:00
Matt Mackall
fe891628e2
bundle: don't use sets.Set
2006-11-13 13:26:57 -06:00
Matt Mackall
aa97044b36
revlog: reachable actually takes a node
2006-11-13 13:26:57 -06:00
Matt Mackall
0cc86247a3
util: add copyfile function
2006-11-13 13:26:57 -06:00
Matt Mackall
d23c8e6356
hgweb: internalize some socket details
2006-11-13 13:26:57 -06:00
Matt Mackall
b69bc800d7
remove unused imports
2006-11-13 13:26:57 -06:00
Thomas Arendsen Hein
3982b314a6
issue228: Fix repositories at the filesystem root (/ or C:\)
...
Thanks to Robert Shaw and other people on the list for the suggestions.
2006-11-09 21:53:45 +01:00
Brendan Cully
438aa7d879
Export changelog dict in localrepo.commit
2006-11-08 11:28:33 -08:00
Thomas Arendsen Hein
73ed740a36
Fix accessing a repository via -R/--repository through a symlink.
...
Sometimes the repository root was compared to os.getcwd(), which always uses
the canonical path without symbolic links in it.
This would changes self.root of the localrepo objects to always use os.sep as
the directory separator, which is implicitly assumed in some places, but may
not be the case if somebody uses -R foo/repo on windows.
2006-11-07 22:35:07 +01:00
Thomas Arendsen Hein
5da1570f3e
Merge with upstream
2006-11-07 22:18:34 +01:00
Benoit Boissinot
0e56ff2f66
localrepo: factor commit and rawcommit
...
note: rawcommit with an empty text will now launch the editor
2006-11-07 21:43:19 +01:00
Benoit Boissinot
e8fd91f783
localrepo.commit: little cleanups
...
- use a list for new fileids
- sort the removed files
2006-11-07 21:43:15 +01:00
Matt Mackall
6b5e168d5c
Fix up parent display in logging
...
For changesets with a first parent nullid, but not rev 0, we ought to
display a null parent.
2006-11-07 14:04:15 -06:00
Thomas Arendsen Hein
d5d0b90730
Fixed directory name having an extra dot on "hg archive -t tbz2 foo.tbz2".
...
Problem reported by Rob Landley.
2006-11-02 19:23:55 +01:00
Thomas Arendsen Hein
641503fdd4
Try hgweb unbundle methods in the order presented by the server.
...
If no common bundle format is found, push is aborted.
2006-11-02 15:30:45 +01:00
Thomas Arendsen Hein
b933ddcd3f
Client support for hgweb unbundle with versions.
2006-11-02 14:58:55 +01:00
Thomas Arendsen Hein
944124b40d
Add allowed bundle types as argument to hgweb unbundle capability.
...
Arguments to capabilities were added before the 0.9.1 release, so there
are no compatibility issues. Mercurial 0.9 didn't support http push.
Using HG10GZ, HG10BZ and HG10UN has the advantage that new bundle types can
be added later and the client doesn't have to try sending them first and
reacting on errors sent by the server.
2006-11-02 14:39:08 +01:00
Matt Mackall
6239f7b678
Clarify untracked file merge message
2006-11-01 21:47:55 -06:00
Alexis S. L. Carvalho
444ab6d2a3
hgweb: remove debugging print
2006-11-01 19:59:26 -03:00
Benoit Boissinot
b15071fd87
hgweb: introduce a new capability for sending a compressed bundle
...
the header of the bundle is the same as a on-disk bundle
HG10UN: uncompressed
HG10BZ: bz2
HG10GZ: gzip
no header means uncompressed (old client)
2006-11-01 22:06:24 +01:00
Benoit Boissinot
f8e3315daa
hgweb: if the server supports it, send a compressed bundle
2006-11-01 22:01:30 +01:00
Alexis S. L. Carvalho
7c0dca42a7
Use httpconnection even with proxies.
...
This should give us HTTP keepalive when we talk to proxies and
should allow us to stream a file in unbundle (instead of
reading everything into a string).
This should fix issue376.
2006-11-01 14:53:11 -03:00
Benoit Boissinot
7d00e37112
issue352: disallow '\n' and '\r' in filenames (dirstate and manifest)
2006-11-01 17:56:55 +01:00
Brendan Cully
5f6282dd1c
hgweb: split URLs containing spaces or other escaped characters correctly
2006-10-31 18:10:23 -08:00
Benoit Boissinot
6358cf0eea
sshrepo: fix the parsing of the ssh url
2006-10-31 23:56:52 +01:00
Benoit Boissinot
0465719da8
hgweb: fix handling of path for old style template
...
- path from old style are prefixed by '/', make cleanpath strip them
- make manifest() use relative paths, that was the only function using
'/' prefixed paths
2006-10-31 13:09:43 +01:00
Benoit Boissinot
e12d0530f2
merge with crew
2006-10-31 13:03:52 +01:00
Benoit Boissinot
83a68d580f
merge with backout
2006-10-31 13:03:23 +01:00
Benoit Boissinot
3f2046d235
Backed out changeset 0fc94973be4ffeb0b5ace8a920dec676a9a51130
2006-10-31 13:02:49 +01:00
Benoit Boissinot
cf4e46def6
Backed out changeset 7a5175105148071d93677d257feb784dd19b5c90
2006-10-31 13:01:28 +01:00
Brendan Cully
803c7dd950
git patch: create empty added files
2006-10-30 16:10:58 -08:00
Benoit Boissinot
ec5738cb6d
filelog: rename filelog.size() to filelog.len()
...
filelog.size() is misleading for users of revlog.size() since
it doesn't return the size of the revision.
2006-10-29 16:33:46 +01:00
Benoit Boissinot
46893fed9e
revlog: more nullrev fixes
2006-10-29 16:14:55 +01:00
Benoit Boissinot
a0c2a353ec
revlog: return 0 as offset for nullid
2006-10-29 16:14:02 +01:00
Benoit Boissinot
7c04127ce4
doc: clone doesn't create a working directory in remote repos
2006-10-29 15:09:01 +01:00
Benoit Boissinot
a2d320e112
revlog.size() fix handling of rev == -1
2006-10-29 14:41:14 +01:00
Benoit Boissinot
b8176cb795
use workingcontext.files() to detect if the repo is unclean
2006-10-29 14:18:55 +01:00
Benoit Boissinot
58322272ec
allow update to switch to a different branch if the repo is clean
2006-10-29 13:08:10 +01:00
Thomas Arendsen Hein
9813e25f31
Explicitly use REVLOGV0 instead of 0 in bundlerepo.
2006-10-29 10:55:38 +01:00
Thomas Arendsen Hein
687e4a7111
Define and use nullrev (revision of nullid) instead of -1.
2006-10-29 10:53:51 +01:00
Alexis S. L. Carvalho
17f016acd0
Correct optimization from 56bc6966622e; add a test.
...
If there are two (or more) heads that point to the same .hgtags
node, we can safely skip parsing the file in all but the last head.
(In 56bc6966622e, we were parsing the file in the first head and
skipping all the others.)
2006-10-28 23:37:59 -03:00
Alexis S. L. Carvalho
c8198124de
log speedup: don't call revlog.node if we don't have to
2006-10-28 20:21:59 -03:00
Alexis S. L. Carvalho
e925a154ec
log speedup: use list.extend to avoid an explicit loop
2006-10-28 20:21:57 -03:00
Alexis S. L. Carvalho
661a579963
log speedup: use parentrevs in log and changeset_printer.show
2006-10-28 20:21:56 -03:00
Alexis S. L. Carvalho
9b7121fcf6
log speedup: set quiet/verbose/debugflag in the fake ui object
2006-10-28 20:21:55 -03:00
Alexis S. L. Carvalho
c4f0ee1324
log speedup: use only ui.write in changeset_printer.show
...
- ui.status is not very useful, since this code is never
executed when ui.quiet is true.
- explicitly checking for ui.debug allows a regular hg log to
run without looking at the manifest index
- the calls to ui.note were converted for consistency
2006-10-28 20:21:54 -03:00
Alexis S. L. Carvalho
dda0210dc4
log speedup: walkchangerevs: filter the files only if we need them
...
This speeds up hg log and significantly reduces memory usage (max RSS
goes from ~92MB to ~21MB on the kernel repo), since we no longer store
all the revisions in the cache.
2006-10-28 20:21:52 -03:00
Thomas Arendsen Hein
4d0e63ed13
Inform the user about the new URL when being redirected via http.
...
Additionally the changed code ensures that the new URL is used,
even if it doesn't end with the query string.
2006-10-28 23:05:57 +02:00
Thomas Arendsen Hein
fcfb50e224
Stripping of query string (since b7aa16033ab7) stripped too much (issue327)
...
rstrip(qs) not only strips qs from the right, but it continues stripping
every char at the end of the URL that occurs on qs.
2006-10-28 11:00:59 +02:00
Thomas Arendsen Hein
11cdc6b21b
Merge with upstream
2006-10-27 23:09:46 +02:00
Matt Mackall
64f1cb83ae
small refactoring of path normalization in dirstate.statwalk
2006-10-27 14:10:01 -05:00
Matt Mackall
e803b50ef2
Make util.unique return a list
2006-10-27 14:06:32 -05:00
Thomas Arendsen Hein
cdecbefe20
Turn bundle file into a string for http push, for urllib2 over proxies.
2006-10-27 19:24:57 +02:00
Matt Mackall
7f3045c670
Simplify ignore logic in dirstate.walk
...
- kill blockignore hack
- pull pconvert out of imatch
- skip imatch when not ignoring
2006-10-27 12:09:33 -05:00
Thomas Arendsen Hein
d3647fdf40
Force the content-length header to be a string in httprepo.unbundle.
...
(Needed for Python2.3 compatibility)
2006-10-27 18:30:53 +02:00
Matt Mackall
24c7fbb0f1
shortname: truncate at '.' too
2006-10-27 11:30:20 -05:00
Matt Mackall
5186d07f32
improve walk docstrings
2006-10-27 11:24:10 -05:00
Thomas Arendsen Hein
a0f9f54446
Use the new UnexpectedOutput exception in httprepo, too.
2006-10-27 18:20:28 +02:00
Thomas Arendsen Hein
a0477d89a5
New UnexpectedOutput exception to catch server errors in localrepo.stream_in
...
If the unexpected is a string, the empty string will be mentioned, and long
strings are cut to at most 400 chars.
2006-10-27 18:17:12 +02:00
Thomas Arendsen Hein
46a2065971
Some clarifications for pull/push protocols:
...
- List file:// and static-http://
- Mention that you can pull from bundle files
- List http and https as valid push targets, but emphasize that this
feature has to be enabled.
2006-10-27 15:56:34 +02:00
Benoit Boissinot
a44e11eb87
httprepo: record the url after a request, makes pull + redirect works
...
POST+redirect doesn't work in python, as a workaround we record the url
from the previous GETs so that when we do a POST it uses the redirected url
fix issue327
2006-10-27 15:02:27 +02:00
Benoit Boissinot
40a55ea6a3
add AIX to the list of compilers that don't have inline keyword
2006-10-27 10:24:19 +02:00
Matt Mackall
9297d4db5f
convert dict(zip(x,x)) to dict.fromkeys(x)
2006-10-27 00:38:42 -05:00
Matt Mackall
fc94bcf116
minor hg grep simplification
2006-10-26 23:59:21 -05:00
Matt Mackall
f84252f879
simplify dirstate walking
...
- kill walkhelper
- stop passing dc around
- remove unused stat arg from statmatch (renamed imatch)
2006-10-26 23:54:24 -05:00
Matt Mackall
16cbfeb13b
kill makewalk function
2006-10-26 18:43:57 -05:00
Matt Mackall
95ac6e3bc1
Pull getchange out of walkchangerevs
2006-10-26 17:45:03 -05:00
Matt Mackall
6ff42f7ea8
Make revrange return a list of ints so that callers don't have to convert
2006-10-26 17:27:07 -05:00
Matt Mackall
9062f155f7
simplify revrange and revpair
2006-10-26 17:15:55 -05:00
Matt Mackall
89015daf47
lookup(str(x)) -> lookup(x)
2006-10-26 14:09:15 -05:00
Matt Mackall
53e3681702
Fixups for hg grep
...
- kill trimuser function
- remove ucache
- simplify descending logic
- fix files with matches logic
- correct tests
2006-10-26 14:04:58 -05:00
Thomas Arendsen Hein
f26c110d43
Turn of "Not trusting file" logging when running hgweb and hgwebdir
...
(hg serve still shows the warning)
2006-10-26 19:25:45 +02:00
Alexis S. L. Carvalho
a28f2ec0e2
use untrusted settings in hgwebdir
2006-10-26 19:25:45 +02:00
Alexis S. L. Carvalho
0f80467c85
use untrusted settings in hgweb
...
The only exceptions are web.static and web.templates, since they can
be used to get any file that is readable by the user running the CGI
script.
Other options can be (ab)used to increase the use of the cpu
(allow_bz2) or of the bandwidth (server.uncompressed), but they're
trusted anyway.
2006-10-26 19:25:45 +02:00
Alexis S. L. Carvalho
18fea415ad
add untrusted argument to patch.diffopts
2006-10-26 19:25:45 +02:00
Alexis S. L. Carvalho
66d525aa04
add --untrusted to showconfig
2006-10-26 19:25:45 +02:00
Alexis S. L. Carvalho
cb59e4de82
save settings from untrusted config files in a separate configparser
...
This untrusted configparser is a superset of the trusted configparser,
so that interpolation still works.
Also add an "untrusted" argument to ui.config* to allow querying
ui.ucdata.
With --debug, we print a warning when we read an untrusted config
file, and when we try to access a trusted setting that has one value
in the trusted configparser and another in the untrusted configparser.
2006-10-26 19:25:45 +02:00
Alexis S. L. Carvalho
c44cea1532
Only read .hg/hgrc files from trusted users/groups
...
The list of trusted users and groups is specified in the [trusted]
section of a hgrc; the current user is always trusted; "*" can be
used to trust all users/groups.
Global hgrc files are always read.
On Windows (and other systems that don't have the pwd and grp modules),
all .hg/hgrc files are read.
This is essentially the same patch that was previously applied as
revision f077d29b114d.
2006-10-26 19:25:44 +02:00
Matt Mackall
35471c1ba4
Remove update -m, deprecated for 0.9.1
2006-10-25 18:29:54 -05:00
Matt Mackall
a8665c71fb
Remove the undo command, deprecated pre-0.9
2006-10-25 17:53:24 -05:00
Matt Mackall
750733af82
Remove forget command, deprecated pre-0.9
2006-10-25 17:47:53 -05:00
Matt Mackall
4a4ec34349
Fix excessive complaining from hg log -b
2006-10-25 17:45:35 -05:00
Matt Mackall
2bfb4ca72e
Remove some more deprecated options from help syntax summaries
2006-10-25 17:40:03 -05:00
Matt Mackall
98488f6543
Hide deprecated flags in help unless verbose
2006-10-25 17:38:17 -05:00
Thomas Arendsen Hein
47d731406a
Show number (-v) and list (--debug) of changesets with bundle/pull/push etc.
2006-10-25 18:45:18 +02:00
Benoit Boissinot
821330610a
fix graph traversal in commands.bundle (it wasn't O(n))
2006-10-25 18:22:04 +02:00
Thomas Arendsen Hein
48fd160764
Corrected help text for bundle.
2006-10-25 17:20:39 +02:00
Thomas Arendsen Hein
be2e89d008
Corrected synopsis of hg heads
2006-10-25 08:11:17 +02:00
Alexis S. L. Carvalho
7342f50f68
revlog.py: always return tuples from parents and parentrevs
...
There's at least one place doing parentrevs(rev) != (rev-1, -1),
which is always true with revlog v0, since parentrevs returns a list
in this case.
2006-10-24 23:00:43 -03:00
Matt Mackall
8adb03c697
Remove [-b] options from help syntax lines
2006-10-24 17:22:07 -05:00
Matt Mackall
8b1ec529ff
Deprecate old --branch/branches options
2006-10-24 17:07:11 -05:00
Matt Mackall
afebc36749
add branch and branches commands
2006-10-24 16:49:36 -05:00
Brendan Cully
45cd7b7440
Merge with mpm
2006-10-24 13:42:21 -07:00
Brendan Cully
13601730e7
hgweb: add heads to gitweb summary
2006-10-24 13:31:01 -07:00
Matt Mackall
49503fb772
Merge with crew
2006-10-24 13:46:04 -05:00
Alexis S. L. Carvalho
9ede4a440a
Split branchtags into two additional functions.
...
This makes it easier to override only parts of the cache saving process.
2006-10-23 23:32:56 -03:00
Matt Mackall
862620d6bf
localrepo: add separate methods for manipulating repository data
...
This change adds new methods sjoin and sopener for accessing the
following elements:
- changelog
- manifest
- data/
- journal and undo log
- repo lock
This will simplify sharing this data and escaping paths
2006-10-23 17:12:20 -05:00
Thomas Arendsen Hein
37655ca869
Commit username: Better error message, abort on empty name, fix documentation.
2006-10-23 14:56:51 +02:00
Alexis S. L. Carvalho
5d26c882ab
hgweb: make #motd# available for all templates
2006-10-22 21:47:37 -03:00
Thomas Arendsen Hein
a686645595
Fix "templater object got multiple values for keyword argument 'motd'"
...
caused by adding motd to the call to the index template (dcb6e0ff8606)
2006-10-21 20:51:24 +02:00
Thomas Arendsen Hein
b6713ee084
Add #motd# to gitweb pages. Needs to pass self.motd to index template, too.
2006-10-21 20:19:46 +02:00
Benoit Boissinot
7c004b60e9
fix errors spotted by pychecker
2006-10-19 16:55:34 +02:00
Benoit Boissinot
3f09dfef56
use xrange instead of range
2006-10-19 14:16:51 +02:00
Benoit Boissinot
2c66934a73
use xrange instead of range
2006-10-19 14:03:41 +02:00
Thomas Arendsen Hein
cdef5ba8bf
Corrected SSH configuration example in pull help.
2006-10-19 13:00:02 +02:00
Benoit Boissinot
1bccbf1e1e
revlog.children: use parentrevs instead of parents
2006-10-19 10:23:27 +02:00
Matt Mackall
8be8fbef1f
Minor tags optimization
2006-10-18 22:38:23 -05:00
Brendan Cully
8b8e098e6a
Add --rev option to status
2006-10-18 14:24:38 -07:00
Benoit Boissinot
dc9483558a
makes username mandatory
2006-10-18 22:24:03 +02:00
Matt Mackall
aa8e8c430f
Use file contexts in tags code
2006-10-18 14:14:59 -05:00