Commit Graph

5424 Commits

Author SHA1 Message Date
Benoit Boissinot
8265d7b666 transaction: initialize self.journal to None after deletion
This avoid a warning when having an empty transaction, where hg would try to
delete the journal twice.
2010-01-11 21:40:19 +01:00
Patrick Mezard
f8872c1d27 ui: display progress with decimal notation 2010-01-08 23:15:24 +01:00
Patrick Mezard
be67c8a241 win32: close file when leaving _getfileinfo() 2010-01-08 23:15:22 +01:00
Siddharth Agarwal
eab3968819 Add support for relinking on Windows.
Test and minor code change by Patrick Mézard <pmezard@gmail.com>
2010-01-08 18:48:39 +05:30
Greg Ward
bfaf5baac2 commands: fix help string for pull -u and unbundle -u.
They update to new branch head, not new tip -- same as 'hg update'.
2010-01-05 15:07:38 -05:00
Martin Geisler
cc5314a970 commands: update copyright year to 2010 2010-01-04 01:09:23 +01:00
Patrick Mezard
c6da65973e patch: explicitely close input patch files when leaving
If applydiff() raises an exception, the opened patch file is kept alive in the
exception context. If it is a temporary file (for instance supplied by import
command with stdin input), Windows cannot clean it up.
2010-01-03 19:47:07 +01:00
Patrick Mezard
9c67b65ee1 hgweb: improve IIS PATH_INFO fix 0aba3cc1ee81 (issue1580)
Copy PHP IIS detection.
2010-01-03 17:26:39 +01:00
Patrick Mezard
a9ef9386bc mq: preserve --git flag when merging patches
Without this, merging a patch queue without diff.git=1 downgrades all git
patches to regular patches, losing data in the process.
2010-01-01 19:53:05 +01:00
Patrick Mezard
62d346efa4 copies: don't report copies with unrelated branch 2010-01-01 13:58:30 +01:00
Greg Onufer
5056bcbd9e patch: better handling of sequence of offset patch hunks (issue1941)
The built-in patch implementation applied the hunks to the wrong lines of the
file if the file in the repo has been modified to skew the patch line numbers
and the file contains repetitive sequences of lines.
2009-12-09 16:56:00 -08:00
Sune Foldager
afbe5c8543 hook: fix bug (reuse of variable) introduced in 4f2cae90dd77
For binary installs, the 'name' argument would be reused as a local variable,
destroying its original value. The patch fixes that, and also avoids copying
sys.path when it's not necessary.
2009-12-21 16:12:43 +01:00
Brendan Cully
9c496e1d92 share: use defaultdest to compute unspecified destination
This harmonizes with clone, and avoids creating a .hg in the current directory if
the source ends with a /
2009-12-19 22:55:33 -08:00
Nicolas Dumazet
a7b35aa08b graphlog: fix output when both a limit and a path are provided
Limit was interpreted as absolute, from the topmost revision, without
counting the number of revisions matching a given file.
Which caused "glog -lN file" to show sometimes less than N csets if
the file was not modified in all of the N previous csets.

glog will now match the behavior of log.
2009-12-11 15:25:33 +09:00
Matt Mackall
4387f67807 subrepo: add default path to new clones 2009-12-14 15:01:13 -06:00
Greg Ward
d9c710d107 revlog: rewrite several method docstrings
- methods: findmissing(), nodesbetween(), descendants(), ancestors()
- the goal is precise, concise, accurate, grammatical, understandable,
  consistently formatted docstrings
2009-12-10 09:35:43 -05:00
Martin Geisler
46bbcdcea6 config: raise ConfigError on non-existing include files
Before, an %include directive for a non-existing file resulted in an
IOError and a traceback.
2009-12-12 16:46:16 +01:00
Dirkjan Ochtman
0513f13503 cmdutil: copy auth section in remoteui
This allows me to specify an auth section in a .hg/hgrc instead of just
a global or user-level hgrc.
2009-12-10 12:31:21 +01:00
Sune Foldager
0d1feca701 handle file URIs correctly, according to RFC 2396 (issue1153)
The new code aims to implement the RFC correctly for file URIs.
Previously they were handled incorrectly in several ways, which
could cause problem on Windows in particular.
2009-12-03 11:06:55 +01:00
Nicolas Dumazet
686db2d57f alias: do not crash when aliased command has no usage help text 2009-12-03 14:14:44 +09:00
Matt Mackall
07d8da7a2f share: fix interaction with clone 2009-12-01 19:28:15 -06:00
Martin Geisler
542da45c3a commands: mark "ssh://" as inline literals in help texts 2009-12-01 00:15:45 +01:00
Sune Foldager
9318efef10 fix bug in prepush logic involving merge changesets
When creating new branches and merging them into existing ones, you would
sometimes be able to push some changesets (the existing branches) without using
--force, even when that creates a new head on the remote.

A test which triggers the error has been added.
2009-11-30 14:58:52 +01:00
timeless@mozdev.org
15e268f188 commands: add missing options in command line help 2009-11-28 23:44:18 +01:00
Martin Geisler
7fb918d179 commands: mark strings for translation 2009-11-28 23:23:16 +01:00
Thomas Arendsen Hein
51b9419544 Do not overwrite motd attribute of hgwebdir instances on refresh.
This allows using
application = hgwebdir(...)
application.motd = (string or object with __str__ method)
in WSGI (like it is possible in CGI).

Changed web.motd in the config file is still read with this, because
hgwebdir.templater.motd() does not store the config value.
2009-11-22 11:25:01 +01:00
Nicolas Dumazet
bf5cba2457 cmdutil.service: do not _exit(0) in the parent process
The fact that a parent process spawns a daemon does not necessarily means that
it is the only think it has to do. This was forcing since e8efd88001e7 inotify
processes launched implicitely to exit prematurely:
when no inotify server was running, "hg st" for example would only launch a
inotify server, _exit(0) and thus would not return file statuses.

This changeset adds a test for implicitely launched inotify processes.
Change to output of test-inotify-1208 is correct: it reflects the normal
error message of "hg st" when not dying during "hg inserve" daemon creation.
2009-11-17 15:00:00 +09:00
Faheem Mitha
1bec9addf2 commands: improve help for "hg clone -r" 2009-11-19 17:33:41 -05:00
Martin Geisler
fe0b7cb0b8 commands, dates: use real lists instead of literal blocks 2009-11-19 23:29:02 +01:00
Martin Geisler
f70df45cf9 commands: use field lists instead of literal blocks in docstrings
The literal blocks were mis-used for alignment, but this of course
changes the font of the entire block to a fixed width font in the HTML
version. Using a proper list solves this.
2009-11-19 23:27:11 +01:00
Martin Geisler
20491e2b07 commands: do not indent list in clone help string 2009-11-19 22:25:38 +01:00
Sune Foldager
a2d25fc09b branchmap: fix defective fallback fix a3d9c67908ca
The fix applied as a3d9c67908ca doesn't work and is essentially a no-op.
This fix also adds a comment about the nature of the problem, and a test.
2009-11-18 15:20:08 +01:00
Matt Mackall
aa87974fcd summary: note non-default branches with -q 2009-11-17 16:23:05 -06:00
Henrik Stuart
1d4d06ceca support encoding fallback in branchmap to maintain compatibility with 1.3.x 2009-11-16 13:35:36 +01:00
Benoit Boissinot
8b1492e457 lock: the correct way to do a trylock() is to use a timeout of 0 2009-11-16 11:55:29 +01:00
Martin Geisler
85252bdcb6 diff: change --inverse to --reverse
This fixes an incompatibility with patch(1), which also uses --reverse
for reversed diffs. The --inverse flag was added in 0f0383897d54. That
name was chosen over --reverse since it was thought that --reverse
would make --rev ambiguous.

It turns out that both flags can co-exist, with the cost that --rev
can no longer be shortened to --r and --re. Since one can always use
the short -r option, this is not a real problem.
2009-11-14 14:21:53 +01:00
Henrik Stuart
73716b5954 Merge with crew-stable 2009-11-13 06:36:26 +01:00
Henrik Stuart
f5163bdcf6 url: generalise HTTPS proxy handling to accomodate Python changes
Python 2.6.3 introduced HTTPS proxy tunnelling in a way that interferes with
the way HTTPS proxying is handled in Mercurial. This fix generalises it to work
on Python 2.4 to 2.6.
2009-11-13 06:29:49 +01:00
Bryan O'Sullivan
4035f1dfaa Make it possible to debug failed hook imports via use of --traceback
Prior to this change, if a Python hook module failed to load (e.g. due
to an import error or path problem), it was impossible to figure out
why the error occurred, because the ImportErrors that got raised were
caught but never displayed.

If run with --traceback or ui.traceback=True, hg now prints tracebacks
of both of the ImportError instances that get raised before it bails.
2009-11-12 14:05:52 -08:00
Matt Mackall
948fcf8eac merge: fix changectx.ancestor(workingctx) (issue1327) 2009-11-12 12:03:39 -06:00
Dirkjan Ochtman
c93b170e46 hgweb: don't choke when an inexistent style is requested (issue1901) 2009-11-12 16:39:11 +01:00
Dirkjan Ochtman
91d7a1e376 help: don't show extension list on extension help 2009-11-12 13:43:36 +01:00
Stuart W Marks
ee6cd48d72 help: improve wording of update help text 2009-11-10 22:27:31 -08:00
Patrick Mezard
2f3f5f28ea mdiff: fix diff -b/B/w on mixed whitespace hunks (issue127)
Previous code was computing hunks then checking if these hunks could be ignored
when taking whitespace/blank-lines options in accounts. This approach is simple
but fails with hunks containing both whitespace and non-whitespace changes, the
whole hunk is emitted while it can be mostly made of whitespace. The new
version normalize the whitespaces before hunk generation, and test for
blank-lines afterwards.
2009-11-11 18:31:42 +01:00
Bill Schroeder
a75ddfba7d dispatch: better error message for --config option 2009-11-04 13:44:15 -06:00
Peter Arrenbrecht
6a8e51ae73 bundle: don't send too many changesets (Issue1704)
The fast path in changegroupsubset can send too many csets. This happens
because it uses the parents of all bases as common nodes and then goes
forward from this again. If a base has a parent that has another child,
which is -not- a base, then this other child will nevertheless end up in
the changegroup.

The fix is to not use findmissing(), but use nodesbetween() instead, as
do the slow path and incoming/outgoing.

The change to test-notify.out is correct, because it actually hits this
bug, as can be seen by glog'ing the two repos:

@    22c88
|\
| o  0a184
| |
o |  0647d
|/
o  cb9a9

and

o  0647d
|
@  cb9a9

It used to pull 0647d again, which is unnecessary.
2009-11-07 12:28:30 +01:00
Wagner Bruna
085026ef75 clone: simplify help text 2009-11-09 17:28:40 -02:00
Matt Mackall
a24bf6a399 Merge with crew 2009-11-08 10:40:51 -06:00
Matt Mackall
238098252f submerge: properly deal with overwrites
also pull .hgsubstate check out of inner loop
2009-11-08 10:29:52 -06:00
Matt Mackall
297f3b873b subrepo: add more debugging output, lose _ markers 2009-11-08 10:24:18 -06:00