Commit Graph

2868 Commits

Author SHA1 Message Date
Alexis S. L. Carvalho
93eb041452 Merge with crew-stable 2007-03-04 09:03:21 -03:00
Brendan Cully
464fa9a95b Add _xmlplus to the demandimport blacklist. (HGCIA was failing to load.) 2007-03-03 18:59:54 -08:00
Brendan Cully
d71b00e6f3 Suppress <stdout> before hg export -v (regression from previous patch). 2007-03-02 14:03:30 -08:00
Brendan Cully
507ce565c1 Let patch.export handle any fp-like object 2007-03-01 20:53:38 -08:00
Matt Mackall
8a5facf32e Merge with crew 2007-02-27 16:48:17 -06:00
Matt Mackall
53a83c6c22 Merge with stable 2007-02-27 16:47:16 -06:00
Brendan Cully
38e3078f07 Break core of repo.tag into dirstate/hook-free repo._tag for convert-repo 2007-02-27 12:58:40 -08:00
Thomas Arendsen Hein
d104165f50 Use only integer part of mtime in workingfilectx.date(), fixes test-context.py
Similar to what is done in dirstate.status() (changeset db96436edaee)
and has to be removed when Mercurial switches to subsecond granularity.
2007-02-26 21:57:33 +01:00
Thomas Arendsen Hein
c20f16ea94 Fixed workingfilectx.date() (found by Thomas Waldmann) with test. 2007-02-23 17:31:00 +01:00
Thomas Arendsen Hein
134efad44c merge with crew-stable 2007-02-20 20:55:23 +01:00
Alexis S. L. Carvalho
c235d44d85 util_win32.py: fix user_rcpath
Fixes issue504.
2007-02-16 05:53:03 -02:00
Shane Holloway
79d891fab8 Combined the two os_rcpath methods into a single one near rcpath in mercurial/util.py
The os_rcpath method delegates to system_rcpath and user_rcpath from the
different platform implementations.
2007-02-15 09:51:57 -07:00
Alexis S. L. Carvalho
d4de823a64 merge with crew-stable 2007-02-16 05:27:37 -02:00
Alexis S. L. Carvalho
6dc09d1834 Fix hg showconfig traceback with values that aren't strings 2007-02-15 10:15:08 -02:00
Alexis S. L. Carvalho
b95f1add5a hgweb: allow static files to be served directly by the HTTP server 2007-02-15 08:51:32 -02:00
Shane Holloway
02d303cdfe Unified *_rcpath so the interface is similar across operating systems
Changed os_rcpath to combine system_rcpath and user_rcpath.  Changed
system_rcpath and user_rcpath to both return a list of paths to add to the
combined rcpath for both Windows NT and other platforms.
2007-02-14 15:20:06 -07:00
Alexis S. L. Carvalho
744364abd4 merge with crew-stable 2007-02-13 10:25:45 -02:00
Andrew Bachmann
3b2c3dac24 BeOS compatibility support 2007-01-02 21:40:20 -08:00
Alexis S. L. Carvalho
20406a3e01 Handle functions as the value of a hooks.<name> config variable
This should make it easier for extensions to add a hook when
they're loaded.
2007-02-09 03:48:28 -02:00
Alexis S. L. Carvalho
e9dc052e2a allow values that aren't strings in util.configparser 2007-02-09 03:48:26 -02:00
Matt Mackall
28f682beac Merge with stable 2007-02-06 16:12:22 -06:00
Brendan Cully
53a62dfb33 lazyindex: handle __delitem__ in loadblock 2007-02-04 16:08:56 -08:00
Alexis S. L. Carvalho
83ec2b9f11 commit: catch IOError
filecommit can still raise IOError if we're on a filesystem without
support for symlinks.
2007-01-30 21:11:10 -02:00
Alexis S. L. Carvalho
fff454d591 Merge with crew-stable 2007-01-30 19:36:56 -02:00
Michael Gebetsroither
ca10271bf3 hgwebdir: class hgwebdir should also accept a configparser instance 2007-01-30 22:07:22 +01:00
Thomas Arendsen Hein
f599c21b8e merge with stable 2007-01-24 23:07:09 +01:00
Alexis S. L. Carvalho
678568081f Don't use ints in HTTP headers 2007-01-18 22:16:26 -02:00
Benoit Boissinot
4af82ec145 merge with -stable 2007-01-15 18:23:21 +01:00
Patrick Mezard
784a42ef92 Flush stderr after write.
stderr can be buffered under win32 when redirected to a file,
including stdout.
2007-01-10 20:35:27 +01:00
Thomas Arendsen Hein
109316bf14 Merge branchname changes in localrepo.commit. 2007-01-11 23:13:32 +01:00
Thomas Arendsen Hein
3981689794 Use local encoding for "HG: branch" line in commit editor. 2007-01-11 23:12:21 +01:00
Simon 'corecode' Schubert
ffdf5f19dd Add branch name to editor text. 2007-01-11 19:47:51 +01:00
Simon 'corecode' Schubert
0d6daa7c2a When committing, record the changeset in the branchcache. 2007-01-11 19:33:34 +01:00
Alexis S. L. Carvalho
5f9eb6b9d4 Allow adding symlinks that don't point to files 2007-01-05 00:01:53 -02:00
Alexis S. L. Carvalho
4f27c0fe1c catch AttributeError in util.checklink
There's no symlink function in the os module on windows.

Fixes issue468
2007-01-05 00:01:51 -02:00
Thomas Arendsen Hein
46055c07ca sync with -stable 2007-01-02 22:40:52 +01:00
Matt Mackall
de434078f7 symlinks: minimal support for symlinks in merge/update
This will get angry, confused, and sad if you try to merge a symlink
with a regular file.
2006-12-29 20:04:31 -06:00
Matt Mackall
9a533e02cb symlinks: add flags param to wwrite
Now wwrite can set symlink and exec for files
2006-12-29 20:04:31 -06:00
Matt Mackall
8ed93098b6 replace filehandle version of wwrite with wwritedata 2006-12-29 20:04:31 -06:00
Matt Mackall
5c878f727f unify encode/decode filter routines 2006-12-29 20:04:31 -06:00
Matt Mackall
dae088ccfd symlinks: add _link checking function 2006-12-29 20:04:31 -06:00
Matt Mackall
2e27ddd82b symlinks: use is_link wherever is_exec is used 2006-12-29 20:04:31 -06:00
Matt Mackall
770d679638 symlinks: don't complain about symlinks 2006-12-29 20:04:31 -06:00
Matt Mackall
1dc3ac012f symlinks: add a linkfunc 2006-12-29 20:04:31 -06:00
Matt Mackall
5a767e44a9 symlinks: add basic symlink functions to util.py 2006-12-29 20:04:31 -06:00
Matt Mackall
4b1ae5ef0a symlinks: check whether a filesystem supports symlinks 2006-12-29 20:04:31 -06:00
Matt Mackall
30b8c51a84 exec: remove last flag from is_exec 2006-12-29 20:04:31 -06:00
Matt Mackall
9d8e9305e4 pull umask-checking up 2006-12-29 20:04:30 -06:00
Matt Mackall
b875ad6c04 exec: add execfunc to simplify exec flag support on non-exec filesystems 2006-12-29 20:04:30 -06:00
Matt Mackall
1ee7fd016e pull umask-checking up 2006-12-29 20:04:30 -06:00
Matt Mackall
a76da2edbe exec: checkexec checks whether filesystem supports exec flags 2006-12-29 20:04:30 -06:00
Benoit Boissinot
9b95329263 various doc fixes
- update can no longer be used to merge
- short summary start with lowercase
- add merge to short help list
- fix tests
2006-12-29 06:37:43 +01:00
Benoit Boissinot
e12e825086 catch socket.error
fix issue394
2006-12-29 06:08:46 +01:00
Benoit Boissinot
0a972b6964 fix handling of multiple Content-type headers
This can happen if an error happens while sending
application/mercurial-0.1 content. The error page will
be sent resulting (for at least lighttpd) in the following
headers:
Content-type: application/mercurial-0.1
Content-type: text/html
which result in req.proto = 'application/mercurial-0.1, text/html'

fix issue344
2006-12-29 05:27:48 +01:00
Benoit Boissinot
8e594b6a32 inst.reason isn't alway in the form (errno, strerror)
urllib2.urlopen("foobar://foo") is an example
where inst.reason is a string
fix issue383
2006-12-28 01:14:12 +01:00
Benoit Boissinot
4247929c84 fix hg help <ext> for extension that do not define any command
solve issue462
2006-12-26 21:59:01 +01:00
Thomas Arendsen Hein
28f17c0cc7 Improved error message for extensions overriding commands (with test):
- Old text "module foo overrides bar" was misread as overriding module bar.
- Only print a single warning line per extension instead of one for each
  command.
2006-12-26 15:33:50 +01:00
Benoit Boissinot
e0f69e934d hgweb: fix unused import 2006-12-26 03:17:34 +01:00
Benoit Boissinot
49c4016ea6 hgweb: use contexts, fix coding style 2006-12-26 03:16:54 +01:00
Benoit Boissinot
b9f841c38f commands.py: use contexts in various places (debug*state, revert) 2006-12-26 03:13:57 +01:00
Benoit Boissinot
2f422472c6 cmdutil.py: use contexts in findrenames 2006-12-26 03:12:51 +01:00
Benoit Boissinot
7451685c26 commands.py: use contexts in export 2006-12-26 03:12:23 +01:00
Benoit Boissinot
56d04add11 archival.py: use contexts 2006-12-26 00:40:28 +01:00
Benoit Boissinot
a05f887d12 patch: use contexts for diff 2006-12-25 17:43:49 +01:00
Benoit Boissinot
35f1d19852 context: create a filectxt with filelog reuse 2006-12-25 18:57:55 +01:00
Benoit Boissinot
a8be9617b4 context: fix a bug in workingfilectx.renamed 2006-12-25 17:43:47 +01:00
Benoit Boissinot
6b47271f10 make it possible to use changectx to create a filectx 2006-12-25 17:43:44 +01:00
Benoit Boissinot
cd66ae056f remove various unused import 2006-12-25 13:37:00 +01:00
Benoit Boissinot
36bf020419 add date attribute to workingfilectx 2006-12-24 22:55:34 +01:00
Benoit Boissinot
6c61f6a933 fix tab vs space 2006-12-24 22:29:29 +01:00
Matt Mackall
a50320c448 Fix removed file cornercase for CVS convert-repo 2006-12-22 17:59:37 -06:00
Benoit Boissinot
e55b0be33e grep: remove count handling, simplify, fix issue337 2006-12-22 22:51:39 +01:00
Benoit Boissinot
0c9cf6b950 grep: incrementing is always False during 'iter' 2006-12-22 22:16:05 +01:00
Edouard Gomez
8978405fb9 pass the extra dict in rawcommit 2006-12-20 23:41:27 +01:00
Matt Mackall
5ca25c473f Merge with crew 2006-12-20 13:11:35 -06:00
Brendan Cully
828c5b99b4 Teach hgweb about revlog.LookupError 2006-12-19 16:40:09 -08:00
Matt Mackall
af555b0128 hg in: if no incoming csets, remove existing bundle 2006-12-19 16:37:45 -06:00
Matt Mackall
7bd6a2278b writebundle: overwrite existing bundle file 2006-12-19 08:59:41 -06:00
Matt Mackall
2be2df78fe incoming/outgoing: return failure if no changes found 2006-12-19 08:58:56 -06:00
Brendan Cully
8a6eea2483 Add revlog.LookupError exception, and use it instead of RevlogError.
Remove repo.LookupError, which devolves to the revlog version.
2006-12-18 12:22:43 -08:00
Matt Mackall
4aa5ee68ce Add some modules to the demandimport ignore list for Windows 2006-12-17 22:16:57 -06:00
Matt Mackall
887599574c Sync with -stable 2006-12-17 21:48:22 -06:00
Brendan Cully
eab04761d3 demandimport: blacklist _hashlib again (imported in ImportError try block) 2006-12-17 18:45:46 -08:00
Brendan Cully
99bac46845 demandimport: handle already-loaded nested modules in subload 2006-12-17 18:34:42 -08:00
Matt Mackall
669740175a Merge with crew 2006-12-17 15:00:56 -06:00
Matt Mackall
aa18646078 demandimport: fix import x.y.z as a when x.y is already imported. 2006-12-17 14:56:12 -06:00
Benoit Boissinot
fc997dfbf2 fix calculation of new heads added during push with -r
fix issue450
2006-12-17 05:00:22 +01:00
Thomas Arendsen Hein
f2c2df1ab1 merge with crew-stable 2006-12-16 23:36:06 +01:00
Thomas Arendsen Hein
c0034c572a doc fix: hg tags defaults to current parent revision, too.
Additionally use better language for the help text for tag,
cat and manifest.
2006-12-16 22:58:10 +01:00
Thomas Arendsen Hein
fb1cbb4570 doc string fix: hg cat and manifest default to current parent revision. 2006-12-16 22:33:39 +01:00
Thomas Arendsen Hein
66709dc5f7 Using --date "" isn't possible, so don't document epoch. (see issue447) 2006-12-16 22:13:56 +01:00
Alexis S. L. Carvalho
d725a42fd8 merge with crew-stable 2006-12-16 02:51:16 -02:00
Alexis S. L. Carvalho
88251bd81b util.system: fix quoting on windows 2006-12-16 02:38:18 -02:00
Alexis S. L. Carvalho
2726e242c0 templater.py: fix obfuscate 2006-12-16 02:21:46 -02:00
Brendan Cully
6f4a09d3f4 Make demandimport pass all tests on python2.5. 2006-12-15 20:16:20 -08:00
Brendan Cully
8c26621151 Merge with crew-stable 2006-12-15 18:38:09 -08:00
Brendan Cully
8934db36d1 Merge with main 2006-12-15 11:14:55 -08:00
Matt Mackall
ec6238db65 demandimport: ignore _hashlib and email.mime
This makes things work with Python2.5. A better fix would be to fix
demandload to use __getattribute__ to be more transparent.
2006-12-15 12:38:18 -06:00
Thomas Arendsen Hein
a6c0381996 Don't use node length for calculating revision number length.
Done by moving repo.lookup of revisions from commands.export to patch.export
2006-12-15 19:30:20 +01:00
Thomas Arendsen Hein
f0c446ce6e Make sequence number on hg export start at 1 (as documented for %n). Add test. 2006-12-15 19:09:10 +01:00
Benoit Boissinot
a173274d83 merge with main 2006-12-15 05:38:54 +01:00
Matt Mackall
296d6a7cb8 Simplify i18n imports 2006-12-14 20:25:19 -06:00
Matt Mackall
4492623506 Fix a pygettext complaint 2006-12-14 17:32:25 -06:00
Matt Mackall
4a935821ae Fix a pygettext complaint 2006-12-14 17:32:25 -06:00
Matt Mackall
d1c48b4dad Enable gettext translations
The new demandimport eliminates most of the gettext performance hit of
importing gettext, which was doubling the run time for 'hg'.

Now, with 'hg tip':

dummy: .09530s no translations: .09638s translations: .09755s
2006-12-14 17:32:00 -06:00
Benoit Boissinot
4bf7b440fe use parent.__setattr__ instead of __dict__ 2006-12-14 23:51:41 +01:00
Matt Mackall
d38d83ce6b Merge with crew 2006-12-14 15:55:46 -06:00
Brendan Cully
19123a0330 Merge with main 2006-12-14 13:49:33 -08:00
Thomas Arendsen Hein
429e98a404 Corrected synopsis for many commands.
Use CMD instead of FILE for -e and --remotecmd (thanks, Neal Becker)
2006-12-14 19:30:18 +01:00
Thomas Arendsen Hein
025e2533af merge with hg-stable 2006-12-14 19:10:05 +01:00
Thomas Arendsen Hein
bf61bfecec Set charset encoding for hgwebdir, too.
(And remove extra spaces in the corresponding place in hgweb)
2006-12-14 16:07:29 +01:00
Matt Mackall
f17a4e1934 Replace demandload with new demandimport 2006-12-13 13:27:09 -06:00
Matt Mackall
2623870448 Remove deprecated old-style branch support 2006-12-12 18:16:23 -06:00
Matt Mackall
d9f0b69ae5 Fix copy detection corner case
We were aborting if the copied from rev was before the cut-off limit,
rather than the copied _to_ rev. The copied from rev can be
arbitrarily old.
2006-12-12 17:52:33 -06:00
Thomas Arendsen Hein
a721ac99f0 Add instructions how to redo/finish failed merge with local working directory.
d29fcc4d1e2a already implemented this for branch merges.
2006-12-11 18:09:52 +01:00
Alexis S. L. Carvalho
63ae667098 Use UTF-8 in .hg/branch 2006-12-10 20:35:28 -02:00
Thomas Arendsen Hein
ff6b40fc67 Indicate the purpose of the dummy changelog file in itself.
Otherwise people getting an error message with an old installation might
wonder why this file is corrupted.
2006-12-10 23:03:53 +01:00
Benoit Boissinot
def42107f3 fix reserved char on windows, '[]+' are allowed 2006-12-10 21:53:01 +01:00
Benoit Boissinot
e5024feef0 fix errors spotted by pychecker 2006-12-10 19:41:57 +01:00
Benoit Boissinot
2d8b8124d8 debuginstall: fix an incorrect variable 2006-12-10 16:24:21 +01:00
Mathieu Clabaut
6913b00ffd Uniformisation of commit help for -m and -l.
Addition of the -m and -l options for hg import.
 'hg tag' still lacks the --logfile option which short form conflicts with
 its --local option.
2006-11-20 23:37:21 +01:00
Benoit Boissinot
f4cac82bde streamclone: remove unnecessary test, pconvert names 2006-12-10 14:39:51 +01:00
Benoit Boissinot
78479233cd debuginstall: fix a copy/paste error 2006-12-10 12:46:47 +01:00
Matt Mackall
6d9bbc8702 Merge Benoit's .hg/store support 2006-12-10 02:11:02 -06:00
Matt Mackall
6665cfa7a3 Add some remedies and a username check to debuginstall 2006-12-10 01:05:00 -06:00
Matt Mackall
306a24652c Make debuginstall actually attempt to use external patch and merge
This will catch some tricky problems with tools and setup.
2006-12-10 00:44:52 -06:00
Matt Mackall
135cce014c Add debuginstall command to do basic install tests 2006-12-10 00:05:47 -06:00
Matt Mackall
03f3b2efc4 make transcoding more robust
default to ASCII
abort if unknown encoding
wrap abort strings with _
add test
2006-12-09 12:46:01 -06:00
Benoit Boissinot
89233a98c7 remove unnecessary call to umask 2006-12-09 18:49:24 +01:00
Thomas Arendsen Hein
731e6e0280 Show the destionation for clone if not specified manually. 2006-12-09 14:19:52 +01:00
Thomas Arendsen Hein
a0d2ead148 Removed unneeded OSError exception handler.
OSErrors will already be handled in the outside try/except.
2006-12-09 14:00:36 +01:00
Thomas Arendsen Hein
0729b92012 Use util.always instead of creating a new lambda function in show_changeset
and simplify the expression.
2006-12-09 09:30:29 +01:00
Matt Mackall
daf6a67d1c Fix log regression where log -p file showed diffs for other files 2006-12-08 20:44:58 -06:00
Brendan Cully
eed329d895 Fix hg serve -6 getsockname handling 2006-12-08 17:10:40 -08:00
Alexis S. L. Carvalho
edf9fef62b Allow the user to specify the fallback encoding for the changelog
Example: use EUC-JP instead of ISO-8859-1:

[ui]
fallbackencoding = EUC-JP
2006-12-08 22:01:05 -02:00
Matt Mackall
3d47c99e83 Merge with crew 2006-12-08 15:05:39 -06:00
Matt Mackall
a32d76f358 Add doc notes about revert and hg status vs diff 2006-12-08 14:55:45 -06:00
Matt Mackall
6148417831 context: don't spuriously raise abort when a file goes missing. 2006-12-08 13:14:57 -06:00
Matt Mackall
de9b7a5647 Add notes about diff/merge asymmetry to export, diff, and log 2006-12-08 13:04:10 -06:00
Alexis S. L. Carvalho
2b3be537b8 log: convert branch names to the local encoding 2006-12-08 01:36:50 -02:00
Alexis S. L. Carvalho
3b575d7b19 fix encoding conversion of branch names when mq is loaded 2006-12-07 14:35:43 -02:00
Alexis S. L. Carvalho
8e669882ac fix hg diff -r '' 2006-12-07 14:15:11 -02:00
Thomas Arendsen Hein
71fc0d1372 Fixed indentation, spacing and a typo (debugdata->debugdate) in commands.table. 2006-12-07 11:22:17 +01:00
Matt Mackall
a2f6a56708 Remove date parameter from merge 2006-12-06 17:58:45 -06:00
Matt Mackall
2c751c4197 Add --date support to update and revert
Add finddate to find the tipmost revision that matches a date spec
Add --date option to update
Add --date option to revert
Don't pass backout's -d option to revert
2006-12-06 17:58:09 -06:00
Matt Mackall
d589171997 Add --date support to log
Add --date opt
Filter log with matchdate
Fix "-{days}" match format
2006-12-06 15:29:17 -06:00
Matt Mackall
d7141083eb Add date matching support
Add extended date formats (eg "Dec", "2006")
Add a couple missing basic date formats
Improve default date element scheme to parsedate
Add matchdate function to match a date spec
Add -e switch and range matching to debugdate
2006-12-06 15:11:44 -06:00
Matt Mackall
8e281a7b62 Update dates help topic 2006-12-06 13:36:23 -06:00
Matt Mackall
dcf070dde9 parsedate: add UTC and GMT timezones 2006-12-06 13:13:42 -06:00
Matt Mackall
63c91a1801 improve date parsing for numerous new date formats
Add lots of new date formats
Formats without year, month, or day default to current
Strip leading and trailing whitespace
2006-12-06 13:13:31 -06:00
Matt Mackall
fb391fcb13 parsedate: allow '' for epoch 2006-12-06 13:13:27 -06:00
Matt Mackall
9630fc215f parsedate: use Abort rather than ValueError 2006-12-06 13:13:26 -06:00
Matt Mackall
506998b3ec add debugdate command 2006-12-06 13:13:25 -06:00
Matt Mackall
bda7cb8e35 Merge with crew 2006-12-06 12:45:27 -06:00
Matt Mackall
33b4d3e066 move patterns topics 2006-12-05 16:36:06 -06:00
Matt Mackall
85c7dc0db1 move environment topic 2006-12-05 16:31:08 -06:00
Matt Mackall
7f630bda19 Allow topics to be callables 2006-12-05 16:28:56 -06:00
Thomas Arendsen Hein
f6d571d204 Don't report an error when closing heads during local push (issue387) 2006-12-05 23:25:28 +01:00
Matt Mackall
6a2edd9f43 Add basic support for help topics and a dates topic 2006-12-05 16:06:13 -06:00
Thomas Arendsen Hein
0bd400f0b7 Removed unused parameters/options of update command. 2006-12-05 22:46:36 +01:00
Brendan Cully
0de5c9a6d8 Add "null" pseudo-tag pointing to nullid 2006-12-05 13:41:42 -08:00
Benoit Boissinot
0fba88fde3 use forward "/" for internal path and static http, fix issue437 2006-12-05 16:33:40 +01:00
Benoit Boissinot
84f8507dc8 introduce localrepo.spath for the store path, sopener fixes 2006-12-05 11:28:23 +01:00
Benoit Boissinot
c3c63edfe1 localrepo: change aftertrans to be independant of the store path 2006-12-05 11:28:21 +01:00
Matt Mackall
9d7aacb988 Merge with crew 2006-12-04 17:43:37 -06:00
Benoit Boissinot
d701ab590c bundlerepo: don't hardcode the revlog filename 2006-12-04 09:38:49 +01:00
Thomas Arendsen Hein
9b62ceebc7 Move ellipsis code to util.ellipsis() and improve maxlength handling. 2006-12-02 22:35:17 +01:00
Thomas Arendsen Hein
5a535feaec Use UnexpectedOutput exception instead of RepoError in sshrepo, too. 2006-12-02 22:16:00 +01:00
Thomas Arendsen Hein
50e4cfc1b5 Change sshrepo.repoerror() into a more flexible sshrepo.raise_().
Now every exception can be raised with a cleanup, not only hg.RepoError.
2006-12-02 22:15:18 +01:00
Thomas Arendsen Hein
b5dd2b79f8 Don't show traceback on 'hg clone -r unknown ssh://hg.example.com/'. 2006-12-02 21:57:20 +01:00
Alexis S. L. Carvalho
f52b6657a0 changegroup.py: delay the loading of the bz2 and zlib modules 2006-12-02 16:08:00 -02:00
Alexis S. L. Carvalho
e953792af4 Ignore all errors while parsing the branch cache. 2006-12-02 03:38:55 -02:00
Thomas Arendsen Hein
aaa1f20f5a Use unsigned version format.
This way can use one additional bit, and when encountering invalid revlogs
with the first bit set don't produce python warnings or strange error messages.
2006-12-01 23:27:53 +01:00
Thomas Arendsen Hein
d279e55ca0 Improve error message for unknown revlog flags.
Old: unknown flags 120000 for ...
New: unknown flags 0x0012 for ...
2006-12-01 23:16:12 +01:00
Alexis S. L. Carvalho
ea7eb1125c additional fixes for issue436 2006-12-01 16:18:16 -02:00
Benoit Boissinot
e005ffc8c4 switch to the .hg/store layout, fix the tests 2006-12-01 13:34:09 +01:00
Benoit Boissinot
31a06c4e2b create the encode and decode functions for the store 2006-12-10 00:07:02 +01:00
Benoit Boissinot
69d31c9562 add "requires" file to the repo, specifying the requirements 2006-12-10 00:06:59 +01:00
Benoit Boissinot
e2ded4fa21 move code around 2006-12-10 00:06:45 +01:00
Benoit Boissinot
c9f89fd48e don't use localrepo.__init__ to create the dest repo with clone+hardlinks 2006-12-10 00:06:43 +01:00
Matt Mackall
2ac5552785 verify: add rename link checking 2006-12-01 02:35:46 -06:00
Matt Mackall
b4165617fe Make revlog error slightly less scary 2006-12-01 02:24:56 -06:00
Matt Mackall
f2217f67ed Fix argument handling for hg -v pull -v x (issue 436) 2006-12-01 01:42:52 -06:00
Matt Mackall
4674f1ed5e use ui buffering in changeset printer
delete old uibuffer class
delete old stringio class
move show to _show
add new show that uses ui.pushbuffer to buffer
add new flush that writes buffered data
add props arg to changeset_printer to match _templater
2006-12-01 01:28:19 -06:00
Matt Mackall
5ee2088301 add a simple nested buffering scheme to ui 2006-12-01 01:28:18 -06:00
Matt Mackall
2085d36412 make manifest friendlier
switch to using context code
..which uses first parent by default
show file hashes only with debug switch
show permissions with verbose
fix up tests
2006-11-30 22:38:48 -06:00
Matt Mackall
05748f203d merge: handle directory renames
commit: handle new copy dirstate case correctly
findcopies:
 keep a map of all copies found for directory logic
 add dirs filter
 check for merge:followdirs config option
 generate a directory move map
 find files that match directory move map
manifestmerge:
 add directory rename cases
applyupdates:
 skip actions with None file
 add "d" action
recordupdates:
 add "d" action
add simple directory rename test
2006-11-30 17:36:33 -06:00
Matt Mackall
452ab5fc24 merge: pull findcopies helpers inside, refactor checkpair to checkcopies 2006-11-30 17:36:33 -06:00
Matt Mackall
f8e4088f12 merge: move check for empty ancestor into findcopies 2006-11-30 17:36:33 -06:00
Matt Mackall
f9ab52977a merge: only store one direction of copies in the copy map
simplify checkpair
generate copied hash from copy map
make copy cases more symmetrical
2006-11-30 17:36:33 -06:00
Matt Mackall
224d8a5d1f merge: add copied hash to simplify copy logic 2006-11-30 17:36:33 -06:00
Matt Mackall
1c0e2e44bd merge: remove unused match logic from findcopies 2006-11-30 17:36:33 -06:00
Matt Mackall
8732a61bab merge: report destinations of moves in merge action messages 2006-11-30 17:36:33 -06:00
Benoit Boissinot
3bad25e752 only print a warning when no username is specified
- revert most of 8b55c0ba
- display the username during interactive commit
2006-11-28 21:16:05 +01:00
Benoit Boissinot
6d0bb2e251 add a comment about '\n' and '\r' and streaming clone 2006-11-28 19:11:46 +01:00
Alexis S. L. Carvalho
3ef2e9ed94 fix hg log -r '' 2006-11-27 22:56:26 -02:00
Alexis S. L. Carvalho
7781594dc0 handle files with more than one git binary patch 2006-11-27 22:03:36 -02:00
Alexis S. L. Carvalho
b0141a470e handle files with both git binary patches and copy/rename ops 2006-11-27 22:03:31 -02:00
Brendan Cully
261404dfe1 Make context __eq__ handle arbitrary RHS values 2006-11-27 15:27:09 -08:00
Benoit Boissinot
684e2e23c3 don't create the .hg/data at init time 2006-11-27 22:22:44 +01:00
Benoit Boissinot
97597496aa context: None is not a valid filenode (revert from ae31fe77b54b) 2006-11-27 20:55:50 +01:00
Brendan Cully
791078de93 merge: Don't search for copies across unrelated manifests 2006-11-23 22:45:00 -08:00
Thomas Arendsen Hein
ea20cdf3f7 Removed unused ui parameter from revpair/revrange and fix its users. 2006-11-22 23:02:28 +01:00
Thomas Arendsen Hein
873d44b19d Use 'bundletype' instead of 'type' to not shadow built-in function. 2006-11-22 22:33:57 +01:00
Thomas Arendsen Hein
a73c25c144 BZ2Compressor already defaults to compresslevel=9. 2006-11-22 22:32:23 +01:00
Benoit Boissinot
0427029f2e fix writebundle for bz2 bundles 2006-11-22 22:08:00 +01:00
Alexis S. L. Carvalho
cebbac3269 fix push over HTTP to older servers 2006-11-21 23:08:29 -02:00
Alexis S. L. Carvalho
7d0dc1d604 make hg commit <dirname> work again 2006-11-21 20:00:15 -02:00
Matt Mackall
a8fff7f220 imported patch collision 2006-12-04 17:10:31 -06:00
Matt Mackall
2356030286 imported patch folding 2006-12-04 17:10:29 -06:00
Matt Mackall
cdbe57fc80 hgweb: report detected character set
Add comments on overriding charset to CGI scripts
2006-12-03 18:47:05 -06:00
Matt Mackall
6b3e2955b8 Add global options for setting encoding and encodingmode 2006-12-03 16:16:33 -06:00
Matt Mackall
aaf36f881a Handle transcoding of branch names 2006-12-03 16:16:33 -06:00
Matt Mackall
299a930c93 Handle transcoding of tags 2006-12-03 16:16:33 -06:00
Matt Mackall
82c5ca8fac Handle transcoding of username and description in changelog 2006-12-03 16:16:33 -06:00
Matt Mackall
3982f645e8 Add functions for transcoding and manipulating multibyte strings 2006-12-03 16:16:33 -06:00
Matt Mackall
8b091a9c1d Add encoding detection 2006-12-03 16:16:33 -06:00
Alexis S. L. Carvalho
6d99bd2633 Don't generate git patches that rename a file to multiple destinations
With this patch, instead of generating N renames, we'll generate
1 rename and N-1 copies.

Ideally the rename should come after the copies instead of before
them, but that'd be harder to do.
2006-11-20 19:32:46 -02:00
Alexis S. L. Carvalho
7f7845c518 handle git patches that rename a file to more than one destination 2006-11-20 19:32:45 -02:00
Alexis S. L. Carvalho
f2de15a6f8 diff: better detection of renames when comparing with the working dir. 2006-11-20 19:32:38 -02:00
Alexis S. L. Carvalho
bc9e70b94a fix typo in mercurial/patch.py 2006-11-20 19:32:37 -02:00
Alexis S. L. Carvalho
fdbef41b13 renamedbetween: only return (file, node) pairs that exist in the original rev 2006-11-20 19:32:36 -02:00
Alexis S. L. Carvalho
588b7cf1f1 diff: improve detection of renames when diffing across many revisions 2006-11-20 19:32:35 -02:00
Thomas Arendsen Hein
0bafb6f99d Corrected "waiting for lock on repository FOO held by BAR" message.
BAR was the error number and not the locker name.
Use repr on BAR, so problems can be detected easier.
2006-11-20 19:55:59 +01:00
Thomas Arendsen Hein
f3d842aee0 Handle locking exceptions if streaming clone can't lock the repo. (Issue324) 2006-11-20 19:41:49 +01:00
Thomas Arendsen Hein
6046bbb871 Don't step into an endless loop when lock file is empty. 2006-11-20 19:36:28 +01:00
Matt Mackall
303ec3f442 correct remote heads test in prepush 2006-11-19 16:32:36 -06:00
Matt Mackall
9c3965d552 add docstring to reachable 2006-11-19 16:32:36 -06:00
Matt Mackall
38933f0e7f reorder tests in prepush
It's more useful to show the new branches message than the unsynced
changes message.
2006-11-19 16:32:36 -06:00
Thomas Arendsen Hein
d3c6666f73 Indentation cleanups for 16c127c30658. 2006-11-19 16:09:04 +01:00
Marcos Chaves
794888ecba fix warnings generated by pygettext.py. 2006-11-18 17:20:38 -02:00
Alexis S. L. Carvalho
3508dfb573 Update trusted_users only after we've seen a file not owned by the user 2006-11-18 23:51:15 -02:00
Alexis S. L. Carvalho
6e218edeb5 Avoid looking up usernames if the current user owns the .hgrc file
Converting uids into usernames may be somewhat expensive when NIS
or LDAP is involved.
2006-11-18 23:51:14 -02:00
Alexis S. L. Carvalho
ad6b588b55 Use a variable to explicitly trust global config files 2006-11-18 23:51:13 -02:00
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