Commit Graph

4721 Commits

Author SHA1 Message Date
Martin Geisler
fee1365c04 commands: removed redundant text in manifest help 2009-04-04 16:46:50 +02:00
Martin Geisler
0512095ede commands: stress that commit is a local operation 2009-04-04 00:32:06 +02:00
Martin Geisler
695e12c72b commands: use single-quotes for 'hg help ...' hints 2009-04-04 00:27:55 +02:00
Dirkjan Ochtman
049b5daa9b merge with crew-stable 2009-04-04 19:43:00 +02:00
Dirkjan Ochtman
7856ee8225 cmdutil: refactor handling of templating in show_changeset() 2009-04-04 17:55:52 +02:00
Dirkjan Ochtman
0b1a57839b templater: move stylemap function from hgweb to templater 2009-04-04 17:46:11 +02:00
Alexander Solovyov
86b994e311 extensions loading: don't fail if path to extension ends with a '/' 2009-04-01 12:11:14 +03:00
Justin Peng
d4938a90ee Correct a bug on date formats with '>' or '<' accompanied by space characters. 2009-04-01 09:11:00 -07:00
Matt Mackall
d60aaf81dc windows: get Abort from error 2009-04-03 14:52:03 -05:00
Matt Mackall
642f4d7151 move encoding bits from util to encoding
In addition to cleaning up util, this gets rid of some circular dependencies.
2009-04-03 14:51:48 -05:00
Matt Mackall
2cddde0437 move util.Abort to error.py 2009-04-03 13:20:52 -05:00
Matt Mackall
019a0b138e pure/parsers: fix circular imports, import mercurial modules properly 2009-04-03 12:37:38 -05:00
Matt Mackall
c36ce7ba2b pure/bdiff: fix circular import 2009-04-03 12:37:30 -05:00
Matt Mackall
bcbc752a6f posix: kill some trailing newlines 2009-04-03 12:37:07 -05:00
Matt Mackall
579fb2ffc2 mention default branch in branch and clone help 2009-04-03 12:37:06 -05:00
Steve Borho
63d4e6092c on clone failure, only remove directories we created
If the user created the clone target directory before running
the clone command, only cleanup the .hg/ repository when errors
occur.  Leave the empty target directory in place.
2009-03-31 21:21:53 -05:00
Martin Geisler
df38a73894 windows: break import cycle with util 2009-04-02 18:04:42 +02:00
Sune Foldager
a909400362 windows: fix missing import of util.Abort 2009-04-02 17:09:17 +02:00
Sune Foldager
9aaf69227a windows: fix import of win32.py (was util_win32.py) 2009-04-02 16:49:34 +02:00
Martin Geisler
541fd005f1 merge with -stable 2009-03-31 23:11:11 +02:00
Martin Geisler
b5e430c97b hgweb: better English in IPv6 error message 2009-03-31 22:48:16 +02:00
Steve Borho
ad54f46fa2 allow clone into existing but empty directories 2009-03-29 16:15:06 -05:00
Wagner Bruna
b2fafee0f4 verify, i18n: fix unmarked strings 2009-03-29 19:56:53 -03:00
Martin Geisler
2d9bab6890 httprepo: lowercase debug output 2009-03-29 21:52:43 +02:00
Benoit Boissinot
868a1f07ed merge with -stable 2009-03-30 01:30:58 +02:00
Alexander Solovyov
609db13729 ability to load hooks from arbitrary python module 2009-03-27 01:28:09 +02:00
Steve Borho
582e7e6612 windows: add various missing import 2009-03-26 23:02:21 -05:00
Steve Borho
67420334f3 windows: hoist expand_glob() back into util.py
The windows version of expand_glob() requires patkind(). To
avoid a circular dependency, move function back into util.py.
2009-03-26 22:07:01 -05:00
Rocco Rutte
895d037e99 Add missing imports for posix.py for OS X
These don't seem to do harm on Linux.
2009-03-27 17:56:18 +01:00
Dongsheng Song
da72eadd2c Clarify the usage of HGRCPATH 2009-03-07 16:06:46 +08:00
Benoit Boissinot
6469b223b7 bisect: use integer division 2009-03-28 17:29:14 +01:00
Martin Geisler
05b3dfb2cf cmdutil: fix untranslatable string in copy 2009-03-27 17:35:00 +01:00
Matt Mackall
0952760f82 util: split out posix, windows, and win32 modules 2009-03-26 13:54:44 -05:00
Matt Mackall
b6fd334dd0 Merge with -stable 2009-03-24 16:41:41 -05:00
Nicolas Dumazet
3ced073c3b revlog: faster hash computation when one of the parent node is null
Because we often compute sha1(nullid), it's interesting to copy a precomputed
hash of nullid instead of computing everytime the same hash. Similarly, when
one of the parents is null, we can avoid a < comparison (sort).

Overall, this change adds a string equality comparison on each hash() call,
but when p2 is null, we drop one string < comparison, and copy a hash instead
of computing it. Since it is common to have revisions with only one parent,
this change makes hash() 25% faster when cloning a big repository.
2009-03-23 15:32:29 +01:00
Nicolas Dumazet
5c8c0a663b ancestor: caching the parent list to improve performance
When computing the DAG depth, we walk through all ancestors: this commit adds
memoization during that first step. Then, the memorized parents are fetched
from a dict instead of calling parents() on each vertex.

This tweak, according to Kcachegrind, improves ancestor() performance by 16%
when cloning a big repository.
2009-03-23 15:36:30 +01:00
Dirkjan Ochtman
7b5b0945c3 kill another trailing space 2009-03-23 13:49:16 +01:00
Dirkjan Ochtman
33d6485beb add debugcommands command: an easy to parse command + option index 2009-03-23 13:43:48 +01:00
Alexander Solovyov
475ce753d3 templater: ability to display diffstat for log-like commands 2009-03-23 10:41:42 +01:00
Alexander Solovyov
7ea3611901 templater: use contexts consistently throughout changeset_templater 2009-03-23 13:15:57 +01:00
Peter Arrenbrecht
ce6e853a0b cleanup: drop enumerate() when index is not used 2009-03-23 13:13:11 +01:00
Peter Arrenbrecht
19591b6a8c cleanup: drop unused assignments 2009-03-23 13:13:06 +01:00
Peter Arrenbrecht
a2d3e23eef cleanup: drop variables for unused return values
They are unnecessary. I did leave them in localrepo.py where there is
something like:

  _junk = foo()
  _junk = None

to free memory early. I don't know if just `foo()` will free the return
value as early.
2009-03-23 13:13:02 +01:00
Peter Arrenbrecht
bc21361ed2 cleanup: drop unused imports 2009-03-23 13:12:07 +01:00
Dirkjan Ochtman
66fabbd9b4 merge with crew-stable 2009-03-23 13:12:44 +01:00
Matt Mackall
68f6893175 Merge with -stable 2009-03-20 18:55:20 -05:00
Matt Mackall
4cd17487f7 Merge with stable 2009-03-17 13:46:53 -05:00
Benoit Boissinot
1651c346c7 merge with -stable 2009-03-07 20:30:20 +01:00
Brendan Cully
8ecc8f3e92 Merge with main 2009-03-06 12:35:48 -08:00
Mads Kiilerich
e39fe5275e Optimization of pure.base85.b85encode
This makes pure python base85 encoding 3x faster than before. Now it is only
40x slower than the C version.
2009-03-04 23:23:59 +01:00
Matt Mackall
7c27807553 audit: check for casefolding of .hg (issue1450) 2009-02-16 17:37:23 -06:00
Matt Mackall
2e1730294c patch: teach selectfile about symlinks (issue1438) 2009-02-16 17:37:23 -06:00
Matt Mackall
b649059d2b keepalive: borrow code from newer httplib to patch ValueError (issue1088) 2009-02-16 17:37:23 -06:00
Matt Mackall
f547c37df5 rename: simplify forced renaming
This should help work around virus scanner issues with rename on Windows.
2009-02-16 17:37:23 -06:00
Matt Mackall
ca1b896eac log: ignore --removed if no files specified (issue1166)
Otherwise we filter out merge changesets with no changed files
2009-02-16 17:37:23 -06:00
Matt Mackall
9b12427bc1 Don't fail on clone on win98 (issue1492) 2009-02-16 17:37:23 -06:00
Martin Geisler
0c5c608631 pure/mpatch: use StringIO instead of mmap (issue1493)
This is more portable than memory mapping /dev/zero: Windows obviously
does not have /dev/zero and mapping /dev/zero failed on Mac OS X.
2009-02-16 00:09:47 +01:00
Augie Fackler
7131a2f8b7 fancyopts: Parse options that occur after arguments.
This changes the behavior of qguard in the case of setting negative guards, as -- will now always be required.
Fixes issue1402.
Doc fixes for mq by mpm.
2009-02-10 13:26:00 -06:00
Peter van Dijk
f1e34ebcb9 fix disappearing symlinks [issue1509] 2009-02-15 11:14:20 -06:00
Matt Mackall
d7c2a2e49b merge: mark kept local files as readded on linear update (issue539) 2009-02-15 10:50:48 -06:00
Will Maier
fbbafcd5d7 Use shutil.copystat in copyfile(). 2009-02-09 07:55:42 -06:00
Simon Heimberg
c771452af5 resolve: accepts walkopts (-I and -X) 2009-02-08 08:44:33 +01:00
timeless
8cc41e9367 help: better formatting in "Date Formats" section 2009-02-15 12:56:38 +01:00
Jim Correia
be78d0e512 log-like commands now use -G for --graph, -g for --git 2009-02-14 22:41:18 +01:00
Jim Correia
78e5b53d7d add --git option to commands supporting --patch (log, incoming, history, tip)
No short -g form, since it would conflict with -g from the graphlog extension.
2009-02-14 22:40:39 +01:00
Dirkjan Ochtman
73563fa8ff identify: have consistent output for local repositories
Also, add some extensive testing for it (hardly any in the suite so far).
2009-02-13 11:32:33 +01:00
Dirkjan Ochtman
a61aacf5f2 patch: no need to instantiate a match catch-all in diff() 2009-02-12 12:35:48 +01:00
Steve Borho
506abe9706 close sockets on httprepository deletion (issue1487)
With this destructor in place, I no longer see tracebacks
on the server after using win32 clients for pull, push, etc.
2009-01-28 20:06:59 -06:00
Martin Geisler
e57d1f32e1 commands: fix paths command docstring indention 2009-02-09 00:09:24 +01:00
Dirkjan Ochtman
2ab2fbac87 hgweb: commit forgotten update to 94505a170e84 2009-02-09 13:08:32 +01:00
Sune Foldager
190a26b26d hgweb: support custom http headers in ErrorResponse 2009-02-09 11:31:52 +01:00
Dirkjan Ochtman
b2c394e625 hgweb: pass ErrorResponses directly into req.respond() 2009-02-09 11:29:09 +01:00
Dirkjan Ochtman
5de1ecaba0 merge with mpm 2009-02-07 23:29:12 +01:00
Martin Geisler
a36469bb6d commands: removed unnecessary string concatenation 2009-02-04 20:55:44 +01:00
Martin Geisler
fdc5030e00 patch: turned strings with backslashes into raw strings
In Python, the backslash in an unrecognized escape sequence is left
behind, which makes '\.' the same as r'\.'. Relying on this feature is
quite brittle, IMHO.

Removed unnecessary string concatenation as well.
2009-02-04 20:53:38 +01:00
Dirkjan Ochtman
309bdac20d demandimport: patch __builtin__ instead of __builtins__
This helps on implementations other than CPython, where __builtins__ isn't
necessarily defined (as it's an implementation detail for CPython).
2009-02-05 17:40:25 +01:00
Dirkjan Ochtman
c7c236a145 hgweb: expose sibling branches to templater 2009-01-26 15:52:10 +01:00
Matt Mackall
880396d2b7 Merge with stable 2009-01-25 12:09:51 -06:00
Matt Mackall
a8a2c25a67 wire protocol: avoid infinite loop (issue1483) 2009-01-25 10:16:45 -06:00
Martin Geisler
1c820b3f61 move mercurial.osutil to mercurial.pure.osutil 2009-01-24 00:13:49 +01:00
Martin Geisler
06c9d07d91 pure Python implementation of bdiff.c 2009-01-24 00:12:20 +01:00
Martin Geisler
acbc15eded pure Python implementation of diffhelpers.c 2009-01-24 00:12:19 +01:00
Matt Mackall
3ff835714e verify: don't trip over binary files starting with 01 0a 2009-01-21 11:15:47 -06:00
Patrick Mezard
a70c4ebc9d merge: fix execute bit update issue introduced by db8aabe14ff1 2009-01-13 22:41:06 +01:00
Benoit Boissinot
75e98806a7 web: use the correct filectx in filelog 2009-01-09 17:34:06 +01:00
Benoit Boissinot
9eaa24618d correctly update dirstate after update+mode change (issue1456) 2009-01-07 02:11:17 +01:00
Patrick Mezard
c8f0bb9bb7 mq: drop copy records when refreshing regular patches (issue1441)
Copy information was saved in a common loop, then refined in a git-only block.
The problem was the latter did filter out renames occuring in the current
patch and irrelevant to commit. In the non-git case, copy records still existed
in the dirstate, referencing removed files, making the commit to fail. Git and
non-git copy handling paths are now separated for simplicity.

Reported by Gary Bernhardt
2009-01-04 21:32:40 +01:00
Dirkjan Ochtman
074cf082f4 hgweb: fix problems with empty repositories 2009-01-04 19:10:42 +01:00
Patrick Mezard
7930704b3e localrepo: fix bad manifest delta generation (issue1433)
The issue came from the 63f9ab8034d1 fix for issue586 working only for
manifest.add() fast path, where the incorrect removed file set was
ignored. This path was no longer taken after 5958346d119e refactoring.
2009-01-03 20:16:10 +01:00
Mark Edgington
fcbe766152 hgweb: send HTTP unauthorized error when denying pull 2009-01-03 20:50:06 +01:00
Mark Edgington
173e246bb8 hgweb: allow static content when deny_read denies access 2009-01-03 20:33:19 +01:00
Dirkjan Ochtman
5d131cc7a2 patch: kill some trailing whitespace 2009-01-03 20:33:37 +01:00
Patrick Mezard
b49af937a1 hgwebdir_mod: fix a performance issue with static files 2009-01-03 01:00:46 +01:00
Brendan Cully
6cdf9dd11f Pure python base85 fallback
Encoding takes about 100x longer than native on a large binary.
2008-12-30 18:58:58 -08:00
Martin Geisler
00f6dbb2f7 pure Python implementation of parsers.c 2009-01-24 00:12:18 +01:00
Martin Geisler
203d953203 pure Python implementation of mpatch.c 2009-01-24 00:12:17 +01:00
Matt Mackall
6a6762635c simplify colwidth a bit 2009-01-23 14:51:09 -06:00
Shun-ichi GOTO
fccc1f5345 Also find correct column width of wide characters.
Use unicodedata.east_asian_width() to determine wide/full width
characters if available. Otherwise, return character count as before.
2009-01-21 20:29:47 +09:00
Bill Barry
89fd1de384 consolidated url help into urls help topic and added information about path aliases 2009-01-22 11:02:50 -07:00
Bill Barry
6735b38937 Clarified 'hg paths' command help 2009-01-22 08:39:34 -07:00
Patrick Mezard
1977ae7dbb Merge with crew-stable 2009-01-25 18:58:12 +01:00
Patrick Mezard
56a4e737a8 Fix a corner case when committing a rename after a merge (issue1476) 2009-01-25 18:55:29 +01:00
Alexander Solovyov
cbb580ef87 status: make options optional (issue1481) 2009-01-25 11:27:53 +02:00
Dirkjan Ochtman
4e4940dc82 templater: fix age filter to state the obvious on future timestamps 2009-01-22 16:07:44 +01:00
Dirkjan Ochtman
52dd3220bf help: some improvements for the templating topic 2009-01-22 14:19:29 +01:00
Alexander Solovyov
55cafc7065 help: add a topic about some of the templating features 2009-01-22 14:18:08 +01:00
Matt Mackall
193584d590 Merge with stable 2009-01-21 14:14:56 -06:00
Dirkjan Ochtman
d4c13c737f hgweb: simplify parents/children generation code 2009-01-19 13:20:47 +01:00
Dirkjan Ochtman
0f821bb2e9 kill some trailing whitespace 2009-01-19 12:59:56 +01:00
Alexander Solovyov
18946af340 cmdutil.logmessage: options should be optional 2009-01-19 12:38:54 +02:00
Patrick Mezard
7ab8b3fde9 diffstat: don't fail on merges
First version by Alexander Solovyov <piranha@piranha.org.ua>
2009-01-13 20:28:06 +02:00
John Mulligan
664f4bfd51 branch closing: referencing open and closed branches/heads
Treat fully closed branches similarly to "inactive" in the output of
'hg branches'. They will be suffixed with "(closed)" where inactive branches
are marked with "(inactive)". If the -a/--active option is given both
inactive and closed branches will not be shown.

Partially closed branches (multiple heads, at least one not closed)
will display the next (tipmost) open head.

Add -a/--active option to "hg heads" which will hide closed heads iff the
option is specified.

In other hg commands, when multiple branch heads exist the branch name will
refer to the tipmost open head, and if none exist, then the tipmost closed
head.
2009-01-14 21:47:38 -05:00
John Mulligan
778b3b9d49 branch closing: mark closed branches with a 'close' extra
Adds a --close-branch option to commit.
When --close-branch is present the commit will mark the changeset
with close=1 in the changeset extras field.

If a regular changeset is added on top of a closed head the branch
is no longer considered closed, and thus re-opened.
2009-01-14 21:47:38 -05:00
John Mulligan
9e580fc6f7 store all heads of a branch in the branch cache
All heads of branches will be stored in a new cache file 'branchheads.cache'
within the .hg directory. The old 'branch.cache' file from older versions
will be ignored.

The new cache contents are formatted line-by-line as '{node} {branchtag}\n'.
This is the same as the previous format. Now, every head is recorded in
an oldest -> tipmost order.

The localrepo.branchheads function is reworked to use the data from the cache.
2009-01-14 21:47:38 -05:00
Martin Geisler
7f3f8dbbe2 i18n: encode output in user's local encoding
This makes the translated output obey the HGENCODING environment
variable or the preferred encoding as set by the LANG or LC_ALL
environment variables.

Python 2.4 has a lgettext method which is similar, except that it
doesn't know about HGENCODING or the settings in .hgrc.
2009-01-15 00:14:36 +01:00
Martin Geisler
b8064b97f3 i18n: lookup .mo files in private locale/ directory
This default is to look for /usr/share/locale/xx/LC_MESSAGES/hg.mo for
language xx, but this code will instead do the lookup from locale/ or
mercurial/locale/ relative to the root of the Mercurial source tree.
2009-01-15 00:12:35 +01:00
Matt Mackall
104a85dee5 error: move SignatureError 2009-01-12 13:51:43 -06:00
Matt Mackall
9db9afd227 dispatch: sort exception handlers 2009-01-12 13:35:35 -06:00
Matt Mackall
7f3bf9b19d error: move SignalInterrupt
now derived from KeyboardInterrupt to simplify catches
2009-01-12 11:48:05 -06:00
Matt Mackall
e61d364b61 error: move UnknownCommand and AmbiguousCommand 2009-01-12 11:39:38 -06:00
Matt Mackall
c148b50f2e sshrepo: change raise_ to abort 2009-01-12 11:28:30 -06:00
Matt Mackall
534da54d07 error: move UnexpectedOutput (now ResponseError) 2009-01-12 11:28:28 -06:00
Matt Mackall
76c90d50e6 error: move lock errors
rename LockException to LockError
2009-01-12 11:09:14 -06:00
Matt Mackall
e0735a1762 error: move repo errors
rename NoCapability to CapabilityError
2009-01-12 10:42:31 -06:00
Matt Mackall
d3bf622cc2 error: move ParseError 2009-01-11 23:04:24 -06:00
Matt Mackall
b28ccc9a94 revlog: kill from-style imports
They're slow.
2009-01-11 22:55:36 -06:00
Matt Mackall
d15d559b7c errors: move revlog errors
- create error.py for exception classes to reduce demandloading
- move revlog exceptions to it
- change users to import error and drop revlog import if possible
2009-01-11 22:48:28 -06:00
Matt Mackall
356502607f refactor version code
- simplify version detection code
- move detection code into setup.py
- move version reading function into util.py
- drop version.py code

This makes hg more closely follow its own recommendation of how to deal with
versioning your builds: use hg id in your build script.
2009-01-10 18:02:38 -06:00
Patrick Mezard
6aa7cd6f84 Merge with crew-stable 2009-01-13 23:17:19 +01:00
Stepan Koltsov
321c35acaa diff: add --change option to display single changeset diff (issue1420) 2009-01-13 10:44:16 +01:00
Benoit Boissinot
10822b7c00 bdiff: add comment about normalization 2009-01-12 17:51:57 +01:00
Dirkjan Ochtman
574603a8c0 use dict.iteritems() rather than dict.items()
This should be faster and more future-proof. Calls where the result is to be
sorted using util.sort() have been left unchanged. Calls to .items() on
configparser objects have been left as-is, too.
2009-01-12 09:16:03 +01:00
Benoit Boissinot
6b71924a1b merge with -stable 2009-01-09 18:12:53 +01:00
Benoit Boissinot
11526cacc9 patch: export shouldn't close files received as a parameter
We rely on __del__ to close the fd instead. Patchbomb was relying
on this behaviour, fix it.
Thanks to Manuel Barkhau for reporting it.
2009-01-09 01:36:35 +01:00
Benoit Boissinot
b3e502e61c merge with -stable 2009-01-07 02:13:32 +01:00
Benoit Boissinot
722aaa1329 merge with crew 2009-01-04 21:49:37 +01:00
Patrick Mezard
93125a20b3 Merge with crew-stable 2009-01-04 21:44:06 +01:00
Benoit Boissinot
48a254ae20 bisect: improve hg bisect -c (relative paths, error handling)
hg bisect -c failed with a relative path or when the executable wasn't found.
Use util.find_exe()+os.spawnl() instead of os.spawnlp() and improve the
handling of errors (killed process, exe not found).
Thanks to Georg Brandl for reporting it.
2009-01-04 19:38:41 +01:00
Dirkjan Ochtman
ad878f12a5 merge with crew-stable 2009-01-04 19:13:02 +01:00
Patrick Mezard
66fcf68fa2 Merge with crew-stable 2009-01-03 21:54:58 +01:00
Dirkjan Ochtman
e91c670197 hgweb: fix long line lengths introduced in 9c98746d7c2b 2009-01-03 21:44:15 +01:00
Dirkjan Ochtman
25cd3135ab merge with crew-stable 2009-01-03 21:24:31 +01:00
Martin Geisler
bcc3bda9f7 lowercase prompts
The prompts are interactive and not meant for scripts.
2009-01-03 17:15:21 +01:00
Martin Geisler
cbcd677f60 lowercase ui.debug and assert output
This does not effect the log or status commands and should be okay
according to the compatibility rules.
2009-01-03 17:15:21 +01:00
Martin Geisler
23608038bf lowercase help output
Changes docstrings to begin with a lowercase word. Only docstrings
used in help output is changed.

Scripts are not expected to grep the output of 'hg help' so this
change should pose no problem with regard to the compatibility rules.
2009-01-03 17:15:15 +01:00
Martin Geisler
be288bd4e2 commands: remove redundant paragraph from tags help 2009-01-03 16:15:05 +01:00
Patrick Mezard
1eea95712b Merge with crew-stable 2009-01-03 01:05:13 +01:00
Martin Geisler
336bd98e22 use repo.wjoin(f) instead of os.path.join(repo.root, f) 2009-01-02 22:53:33 +01:00
Matt Mackall
a25d874c56 Merge with -stable 2008-12-31 18:00:35 -06:00
Matt Mackall
71a02e35c5 audit: reject paths with .hg (issue 1450)
Spotted by Peter Arrenbrecht
2008-12-31 16:27:20 -06:00
Bernhard Leiner
586b4a2c7c Circumvent removal of valid bisect candidates due to previously skipped ones
As reported in issue 1445:
A valid candidate revision for a bisect test is not considered for testing
due to its skipped ancestor. If this revision is the only untested one left
an assertion error occurs.
2008-12-27 19:05:26 +01:00
Martin Geisler
8d98ac17bc reset mergestate after commit 2008-12-25 10:42:01 +01:00
Matt Mackall
3296a955b6 warn if --repository provided for norepo commands 2009-01-28 14:27:44 -06:00
Mads Kiilerich
d775f5aa2a Make util.find_exe alway returns existing file, fixing issue1459
It seems like the old behaviour with different handling for commands with and
without path was intended, but I think this behaviour of util.find_exe is
better:
* Always returns existing file
* or None if command not found - no default
* Windows: Returned file thus always ends with extension from PATHEXT

This fixes http://www.selenic.com/mercurial/bts/issue1459. The change might
fix other unintended behaviour too.
2009-01-25 21:20:13 +01:00
John Mulligan
5622da3160 branch closing: permit closing the default branch
There was no good reason to special case the 'default' branch.
Allow the 'default' branch to be closed if the user wants it.

If you're uncomfortable about mistakenly closing the default branch,
you can always reopen the branch by commiting a "normal" changeset onto
the closed branch.
2009-01-25 13:20:43 -05:00
Alexander Solovyov
c1774bb6c3 python implementation of diffstat
Implemented as two functions: diffstat, which yields lines of text,
formatted as a usual diffstat output, and diffstatdata, which is called
inside diffstat to do real performing and yield file names with
appropriate data (numbers of added and removed lines).
2008-12-25 10:48:24 +02:00
Benoit Boissinot
abff8a39e9 add a comment about the need of hg._update() 2008-12-28 19:59:42 +01:00
Dirkjan Ochtman
934178e495 merge with stable 2008-12-20 13:09:05 +01:00
Matt Mackall
bb9114d8ba resolve: clarify and simplify help 2008-12-19 20:58:33 -06:00
Matt Mackall
96311238c8 archive: fix bogus error message with no working directory 2008-12-19 16:48:31 -06:00
Matt Mackall
966fa4be08 resolve: require -a switch to resolve all files
Like revert -a, this should make this command slightly safer
2008-12-19 16:47:36 -06:00
Dirkjan Ochtman
265b2d6c5c merge with crew-stable 2008-12-19 18:49:02 +01:00
Dirkjan Ochtman
600f058f30 hgweb: mq repos should be in non-recursive collections, too 2008-12-19 18:24:49 +01:00
Dirkjan Ochtman
8215a72dd6 merge with crew-stable 2008-12-19 08:20:19 +01:00
Benoit Allard
6edf6273f0 hgweb: recurse down collections only if ** in [paths]
collections: direct child repos only
paths *: direct child repos only (like collections)
paths **: recursive discovery

When ** is used, the mq repository (if any) is also shown.
2008-12-18 22:32:48 +01:00
Brendan Cully
81d39df2bc Merge with crew-stable 2008-12-14 23:05:18 -08:00
Brendan Cully
6e6159b63f patch: handle git patches that remove symlinks (issue1438) 2008-12-14 23:04:29 -08:00
Patrick Mezard
6f86a4092b context: enforce memctx.files() unicity
localrepo.commitctx() expects changed files lists to contain unique items and
does not sort itself. Passing duplicates makes them evaluated more than once
and changes the committed changelog id.
2008-12-14 17:35:19 +01:00
Adrian Buehlmann
b2991e8893 store: encode trailing period and space on directory names (issue1417)
Windows won't create directories with names ending in period or space, so
we encode the last period/space character in directory names of non-hashed
paths in the store using reversible ~xx encoding (' ' -> '~20', '.' -> '~2e').

With this change it is possible to remove a directory ending in period or space
that was inadvertantly checked in on a linux system while still being able
to clone such a repository with its full history to Windows (see also issue793).
2008-12-13 18:32:29 +01:00
Adrian Buehlmann
9a0526b2cd store: don't create dirs ending in period or space for hashed paths (issue1417)
Windows won't create directories with names ending in period or space, so
we replace the last period/space character in truncated directory names of
hashed paths with some other character (underbar).
2008-12-13 17:39:56 +01:00
Bartosz SKOWRON
5c9eae5dcc patch: simplify linereader 2008-12-05 14:51:50 +01:00
Patrick Mezard
1620a3ec34 Merge with crew-stable 2008-12-14 18:13:41 +01:00
Brendan Cully
383f1ab54c Merge with crew 2008-12-12 12:34:57 -08:00
Patrick Mezard
50f814764a Merge with crew-stable 2008-12-11 23:36:43 +01:00
Patrick Mezard
1ac6f464a8 patch: catch only IOError from makedirs() 2008-12-11 22:59:35 +01:00
Brendan Cully
8fa18a6932 Merge with crew-stable 2008-12-09 17:02:52 -08:00
Brendan Cully
3cfb5b4e74 issue1419: catch strange readline import error on windows 2008-12-09 17:01:14 -08:00
Patrick Mezard
42823196e7 Merge with crew-stable 2008-12-10 00:29:10 +01:00
Patrick Mezard
1ab0600f40 util: disable walkrepo() recursive behaviour
Revert b1aea76f700 and c6d3b233571e for performances reasons. Traversing
checkout working directories may be too expensive.
2008-12-10 00:16:12 +01:00
Stefan Rusek
601a15ee5f When applying a git diff, ensure that the target dir exists for new files 2008-12-09 14:27:47 +01:00
Benoit Boissinot
4668c151a4 use inst.args instead of using __getitem__ directly
DeprecationWarning: __getitem__ not supported for exception classes in 3.x;
use args attribute
2008-12-06 15:57:11 +01:00
Benoit Boissinot
de1bbc2aa9 exceptions should inherit the Exception class 2008-12-06 15:53:57 +01:00
Benoit Boissinot
d954d76b97 use repr() instead of backticks 2008-12-06 14:27:31 +01:00
Brendan Cully
6ff7919199 Make debugcomplete -v print aliases as well as commands 2008-12-04 11:21:15 -08:00
Matt Mackall
013115d873 encoding: normalize some silly encoding names 2008-12-02 13:05:40 -06:00
Benoit Boissinot
e5063ce27a push: use the fast changegroup() path on push
The race doesn't happen on push (because the discovery is done
in the same hg process), so use the fast path instead.
2008-12-02 19:36:43 +01:00
Patrick Mezard
9b8cb99ec1 hgweb: extend [paths] syntax to match repositories recursively (issue852)
This feature somehow duplicates [collections] but it is simpler to use and has
less issues under Windows where using absolute path as configuration file key
is not supported.

Suggested by Dirkjan Ochtman <dirkjan@ochtman.nl>
2008-12-01 14:20:20 +01:00
Georg Brandl
d745fa487d help: try topics before commands to avoid "diffs" showing help for diffstat 2008-12-01 13:44:34 +01:00
Dirkjan Ochtman
9bf5b2380e diff: fix obscure off-by-one error in diff -p 2008-11-27 17:00:54 +01:00
Dirkjan Ochtman
35a7a2d857 bundlerepo doesn't really have a dirstate, throw AttributeError if requested 2008-11-27 16:07:17 +01:00
Dirkjan Ochtman
d963dd0023 kill some trailing spaces 2008-11-27 16:07:13 +01:00
Benoit Boissinot
7c64bcb65d merge with mpm 2008-11-27 01:35:12 +01:00
Mads Kiilerich
f97a1f6cd5 util: use existing never() instead of custom lambda 2008-11-27 00:57:32 +01:00
Patrick Mezard
406c7e1194 util_win32: fix Windows version checking (issue1358)
shell.SHGetPathFromIDList() segfaults when called in Apache.
2008-11-26 22:27:37 +01:00
Benoit Boissinot
ea0e021c3d protocol: use changegroupsubset() if possible (issue1389)
Due to the fix to the pull race, to avoid sending unnecessary
changesets, use changegroupsubset if possible.
This will increase the load on the server.
2008-11-25 23:26:33 +01:00
Matt Mackall
c163f654f6 Merge with crew 2008-11-25 16:24:22 -06:00
Dirkjan Ochtman
50396f781f coal/paper: show branch name in changeset view 2008-11-25 22:53:01 +01:00
Benoit Allard
85a72f1622 coal/paper: display tags and branch in filelog page 2008-11-25 21:54:28 +01:00
Dirkjan Ochtman
5e58c613ca hgweb: support broken IIS 5 behavior with .cgi in PATH_INFO 2008-11-25 17:54:49 +01:00
Patrick Mezard
8cb1782f3b manifest: fix _search() corner-case
It failed when searching the empty string in the null revision.
2008-11-25 22:23:17 +01:00
Brendan Cully
99c25ba716 Improved error message for log --follow
Mads Kiilerich notes that the existing message was unclear
when a nonexistent file was supplied.
2008-11-24 17:16:39 -08:00
Brendan Cully
aad17924e9 import: add similarity option (issue295) 2008-11-22 00:21:57 -08:00
Jesse Long
29064bc39c hooks: restore io correctly on exception 2008-11-25 16:40:54 -06:00
Matt Mackall
648df6f0b1 dispatch: generalize signature checking for extension command wrapping 2008-11-18 16:02:14 -06:00
Matt Mackall
4e3875be62 update help on git diffs 2008-11-18 15:35:34 -06:00
Matt Mackall
d725fd83a0 lookup: fast-paths for int and 'tip' 2008-11-14 14:12:43 -06:00
Dirkjan Ochtman
367d64160c extensions: copy __module__ for wrapped commands 2008-11-14 14:17:42 +01:00
Benoit Allard
7fb31ff7cc pull: update to branch tip if there is only one head on the current branch
On pull, if the current named branch has only one head, update to it.
2008-11-14 14:36:17 +01:00
Dirkjan Ochtman
9ef9b3e5db cmdutil: use change contexts for cset-printer and cset-templater 2008-11-14 13:59:25 +01:00
Dirkjan Ochtman
d5bf581a69 context: use descriptors to speed up lazy attributes 2008-11-14 12:44:26 +01:00
Dirkjan Ochtman
c8e4c03aa9 context: special-case changectx setup for integer changeid 2008-11-13 21:09:51 +01:00
Matt Mackall
4bb1cd5f2b lookup: speed up partial lookup 2008-11-12 19:11:34 -06:00
Matt Mackall
6febe04c5f help: remove redundant 'hg <command>' from command synopses 2008-11-12 19:11:09 -06:00
Matt Mackall
4205fad04a revlog: speed up parents() 2008-11-12 15:58:46 -06:00
Matt Mackall
0770924171 revlog: remove delta function 2008-11-12 15:32:16 -06:00
Matt Mackall
b2807810c6 linkrev: take a revision number rather than a hash 2008-11-12 15:19:14 -06:00
Dirkjan Ochtman
2b37453255 merge with mpm 2008-11-08 00:29:04 +01:00
Dirkjan Ochtman
f8d7226e5f hgweb: fix up the less/more links on the graph page
Previously, they pointed to a non-intuitive revision, and got borked when
using a URL-specified style combined with alternate revcounts.
2008-11-07 23:31:12 +01:00
Matt Mackall
e91df23e48 protocol: avoid sending outrageously large between requests 2008-11-07 15:30:25 -06:00
Mads Kiilerich
acb5117176 More verbose logging when filemerge searches for merge-tool
Previously it was very hard to find out what was going on when the expected
merge tool wasn't used. This patch tries to improve that.

hg merge -v now shows which tools were searched for but not found.
2008-11-07 02:47:12 +01:00
Brendan Cully
f4cee1477f templater: return data in increasing chunk sizes
Currently hgweb is not streaming its output -- it accumulates the
entire response before sending it. This patch restores streaming
behaviour. To avoid having to synchronously write many tiny fragments,
this patch also adds buffering to the template generator. Local
testing of a fetch of a 100,000 line file with wget produces a slight
slowdown overall (up from 6.5 seconds to 7.2 seconds), but instead of
waiting 6 seconds for headers to arrive, output begins immediately.
2008-11-21 15:51:40 -08:00
Patrick Mezard
b4165c254b patch: isolate patchfile filesystem calls into methods
This is a first step toward an svn-like patch driver and makes patchfile
monkeypatching much easier. The latter is currently required to support
in-memory patching until the code is refactored.
2008-11-19 13:27:57 +01:00
Patrick Mezard
b023997f48 patch: pass an opener to patchfile 2008-11-19 13:27:57 +01:00
Patrick Mezard
80b7eb3c69 util_win32: implement posixfile_nt.readlines() 2008-11-18 13:20:55 +01:00
Patrick Mezard
c7c4e521be patch: remove useless unlink() call 2008-11-19 13:27:57 +01:00
Matt Mackall
076f93ace1 hgweb: Change default style to paper 2008-11-06 11:56:01 -06:00
Mark Edgington
bf5852441b hgweb: support for deny_read/allow_read options
reimplementation of a patch provided by Nilton Volpato.

Folded into a single patch by Thomas Arendsen Hein.
2008-10-31 15:28:06 +01:00
Benoit Boissinot
becc8b09ae add missing import from d329ec89ce55 2008-11-07 18:42:43 +01:00
Benoit Boissinot
a95f4bd10d fix restart of interrupted recover
Ignore missing files if they are already removed.
Thanks maelcum on IRC for reporting it.
2008-11-07 18:41:22 +01:00
Dirkjan Ochtman
a0fd77cd87 hgweb: fix pagination for graph 2008-11-07 15:40:36 +01:00
Thomas Arendsen Hein
9ef29ab028 Enhance gitdiffs help text 2008-11-07 13:02:03 +01:00
Peter Arrenbrecht
63d1bb911f ui: log non-interactive default response to stdout when verbose
This allows test scripts that feed their output into documentation
to properly show the session as it would appear to an end-user.
2008-11-07 10:27:39 +01:00
Ronny Pfannschmidt
599e773be7 export: fixed silent output file overwriting
hg export -o outfile 1 2 3 4 had the same effect as hg -o outfile 4

This was caused by opening with 'w' instead of 'a'. This only occurs when
the filename pattern resulted in ambiguous patch filenames.
2008-11-06 11:17:38 +01:00
Dirkjan Ochtman
9cd425cc1b hgweb: move another utility function into the webutil module 2008-11-03 20:31:53 +01:00
Dirkjan Ochtman
5e743c6696 hgweb: move the diffs() generator into webutil 2008-11-03 20:41:48 +01:00
Dirkjan Ochtman
17464b3066 hgweb: use patch.diff() to make sensible diffs (issue1223, issue1258)
This gets us git diffs when enabled and doesn't pick erratic file parents.
2008-11-03 20:05:03 +01:00
Dirkjan Ochtman
2f6d26d640 patch: turn patch.diff() into a generator
This should even be a little faster than passing in an fp argument.
2008-11-03 16:48:23 +01:00
Dirkjan Ochtman
4af26a1f84 help: commands supporting --git point to the gitdiffs topic (issue1352) 2008-11-03 16:31:47 +01:00
Ry4an Brase
555314efe8 hgweb: descend empty directories in web view
When a manifest has a series of directories with nothing in them but a single
directory, displaying the entire chain of empty directories allows for
navigation down to the first non-empty directory with a single click.

Because Java links package hierarchy to directory hierarchy, and because Java
conventions include at least three empty directories at the top of this
hierarchy, descending down empty directories is very common in Java web tools.
2008-11-03 10:20:28 +01:00
Thomas Arendsen Hein
b365acf675 Corrected some command synopsises 2008-11-02 17:28:03 +01:00
Patrick Mezard
2e3aa68a1d Fix util._statfiles_clustered() failing at root of a windows drive
Report and initial fix by Andrei Vermel <avermel@mail.ru>.
2008-11-01 15:15:14 +03:00
Dirkjan Ochtman
1450b6c29e hgweb: conditionally show file logs for deleted files 2008-11-01 13:07:24 +01:00
Dirkjan Ochtman
604b2a1406 kill some trailing spaces 2008-11-01 13:06:36 +01:00
Dirkjan Ochtman
3708bb4a03 hgweb: pass more information about parent/child csets to templates 2008-10-30 09:46:45 +01:00
Dirkjan Ochtman
4a5e2178e2 help: add a topic on git diffs (issue1352) 2008-10-30 08:21:20 +01:00
Brendan Cully
03a69e59f7 Allow per-file shadowing of static directory in templatepath 2008-10-28 22:24:17 -07:00
Brendan Cully
795ad024bb hgweb: handle subdirectories within static directory 2008-10-28 21:58:30 -07:00
Patrick Mezard
1c11cefeaf url: detect scheme with a regexp instead of urlsplit()
The latter says 'c' is a scheme in 'c:\foo\bar'
2008-10-28 23:54:01 +01:00
Patrick Mezard
b5e6153e70 url: fix file:// URL handling 2008-10-28 22:24:41 +01:00
Benoit Boissinot
94f1c13ccd fix missing import, spotted by pychecker 2008-10-28 20:14:45 +01:00