Commit Graph

5424 Commits

Author SHA1 Message Date
Thomas Arendsen Hein
a439f8bdd1 merge with stable 2009-11-08 17:03:24 +01:00
Thomas Arendsen Hein
5490333861 Branch name printed since 00655544b9f3 now in local encoding. 2009-11-07 23:35:46 +01:00
Matt Mackall
ca298b21c0 subrepo: do a linear update when appropriate 2009-11-07 16:31:43 -06:00
Matt Mackall
34dc7c3fa5 subrepo: notice dirty subrepo states when merging 2009-11-07 16:30:42 -06:00
Matt Mackall
7900d62499 subrepo: add some debug output to submerge 2009-11-07 16:29:49 -06:00
Martin Geisler
93008b71a6 ui: refer to "hg help config" when no username is set 2009-11-07 22:13:09 +01:00
Martin Geisler
d9281d88ed help: add "hg help config" topic
This is a condensed version of the first two sections of hgrc.5.txt.
After a slight upgrade of minirst, we can move the whole of hgrc.5.txt
into the config help topic and just let the man page include it.
2009-11-07 22:12:50 +01:00
Matt Mackall
03aa7b74f1 subrepo: more robust split for .hgsubstate parsing 2009-11-07 14:09:16 -06:00
Matt Mackall
010544e3e6 filectx: shortcut unrelated files in ancestor() (issue1327) 2009-11-07 14:07:45 -06:00
Matt Mackall
d1a9a67d84 merge: first part of fix for issue1327
When there are no renames involved, we shortcut to the changeset
ancestor. This resolves most cases.

Note that Mercurial's rename philosophy elsewhere is that a file's
name is signficant and rename data is only consulted when a file of
the same name is absent.
2009-11-07 14:07:45 -06:00
Jesse Glick
7966725b4b Related to Issue919: ui.progress, apparently unused before now, is busted. 2009-11-05 16:40:48 -05:00
Jesse Glick
7656a30c59 Sometimes pushing to an HTTP repo fails with a useless message.
abort: 'https://.../.../' does not appear to be an hg repository!

Ought to produce a better diagnostics on the client. With patched 1.3.1,
observed to produce an Apache HTML error message (from cgitb) including the
vital text:

  File ".../hgwebdir.cgi", line 70, in ?
    wsgicgi.launch(application)
  File "mercurial/hgweb/wsgicgi.py", line 68, in launch
  File "mercurial/hgweb/hgwebdir_mod.py", line 91, in __call__
  File "mercurial/hgweb/hgwebdir_mod.py", line 148, in run_wsgi
  File "mercurial/hgweb/hgweb_mod.py", line 100, in run_wsgi
  File "mercurial/hgweb/protocol.py", line 156, in unbundle
  File "mercurial/localrepo.py", line 2031, in addchangegroup
  File "mercurial/revlog.py", line 1204, in addgroup
LookupError: 00manifest.i@......: unknown parent

Might also be helpful if server's hgweb_mod.run_wsgi caught unexpected errors
and returned a well-formed error response including the stack trace. The client
patch would still be useful in this case, because it would let you diagnose
issues with HTTP proxy servers and so on.
2009-10-17 14:00:41 -04:00
timeless@mozdev.org
9445630fe0 hg help resolve grossly mischaracterizes the --all switch 2009-10-26 02:06:23 +02:00
Benoit Boissinot
124669d7e0 sshrepo: move mkstemp() out of the try block, we don't use the exception
simpler fix for 434f13ccc1f6
2009-11-07 13:25:25 +01:00
Martin Geisler
cfb7949d48 minirst: update module docstring 2009-11-07 03:22:03 +01:00
Martin Geisler
5bd9b1a347 commands: use enumerated lists in help texts 2009-11-07 03:16:23 +01:00
Martin Geisler
4c7564177a minirst: support enumerated lists 2009-11-07 03:14:56 +01:00
Martin Geisler
04f9650185 minirst: prepare for general types of bullet lists
The old code worked for '-' bullets only, but we can easily support
variable width bullets.
2009-11-07 03:04:46 +01:00
Martin Geisler
182015cfeb minirst: combine list parsing in one function
Bullet, option, field, and definition lists were parsed very similar
code. They are now parsed by a single function (splitparagraphs).

Some logic from the old parsing functions has been moved down to
formatblock. This simplifies the parsing while putting the logic where
it's really needed.
2009-11-06 00:30:35 +01:00
Martin Geisler
25e020bb8c minirst: remove unnecessary "elif:" statements 2009-11-05 21:30:50 +01:00
Martin Geisler
c3718b9d5b commands: call ui.username carefully in debuginstall
After 54b67f7bd5df, 'hg debuginstall' would abort halfway through if
no username was set. We now catch and display the exception instead.
2009-11-07 01:46:27 +01:00
Dirkjan Ochtman
c81462828e util: sort paths in walkrepos() (fixes test failures in test-hgwebdir) 2009-11-06 22:54:51 +01:00
Dirkjan Ochtman
0032b55ff7 hgweb: treat rev as raw-rev if user agent is hg 2009-11-06 22:46:46 +01:00
Dirkjan Ochtman
82f6492ad3 graphlog: don't pass filectxs to the templater (issue1896) 2009-11-06 08:27:17 +01:00
Augie Fackler
c66ce37035 keepalive: handle broken pipes gracefully during large POSTs 2009-11-02 11:03:22 -05:00
Yannick Gingras
ed1d8b7e7a diff: add --inverse option
Most of the time, one can reverse a diff by swapping the revisions passed with
-r but it happens that if you use the global -R, and diff against the tip of
the current repo, you can't swap the revisions. One use-case for that is
reviewing changes from a bundle before unbundling. One could also pipe the
output of `hg diff` to a command line filter that reverses the diff, but that
would remove the benefit from color diffs. Therefore, having an option in
`hg diff` to reverse a diff is a good thing.

The option flag selection was tricky. GNU patch uses -R/--reverse but -R is
already used as a global option and --reverse would make --rev ambiguous.
2009-11-05 15:18:56 +01:00
Dirkjan Ochtman
cc8f0501e9 hgweb: keep original order from hgwebdir config files (issue1535) 2009-11-05 15:06:35 +01:00
Dirkjan Ochtman
ae12866ae1 hgweb: use a tuple-list instead of dictionary for append-only store 2009-11-05 15:01:00 +01:00
Dirkjan Ochtman
c08c589861 templater: readable dates older than 24 months revert to ISO8601 (issue1006) 2009-11-05 15:19:54 +01:00
Dirkjan Ochtman
2f9a035003 templater: put 'ago' inside the age template filter 2009-11-05 14:44:29 +01:00
Stuart W Marks
f27d77ba1d help: describe new cross-branch behavior in update help text, plus cleanups 2009-11-05 10:59:33 +01:00
Stuart W Marks
c06e10d43b update: allow branch crossing without -c or -C, with no uncommitted changes
Update will now allow crossing branches within the same named branch,
when given a specific revision, if the working dir is clean, without
requiring the -c or -C option. Abort if no revision is given and
this would cross branches.  Minor change to abort message if
uncommitted changes are found.

Modify test-update-branches and output to reflect the altered case. Modify
test-merge5.out to reflect the altered case. Modify
test-up-local-change.out with new message.
2009-11-05 10:53:59 +01:00
Stuart W Marks
34fa5664cf update: add comments and test cases for updating across branches
Add comment to merge.py:update() showing various cases of 'hg update': to a
descendant, crossing named branches, and crossing branches within a named
branch; with no option, -c or -C; with or without uncommitted changes; and
with or without a specific revision. Add tests for all of these cases.
2009-11-05 10:53:36 +01:00
Marti Raudsepp
da98f0beee patchbomb: fix handling of email addresses with Unicode domains (IDNA)
dom.encode('idna') requires dom to be a Unicode string.
2009-11-05 10:49:28 +01:00
Adrian Buehlmann
ba9637aae6 clone: add option -u/--updaterev 2009-11-05 11:05:13 +01:00
Dirkjan Ochtman
d1740999b1 hgweb/sshserver: extract capabilities for easier modification 2009-11-05 11:07:01 +01:00
Dirkjan Ochtman
12c5890a70 kill trailing whitespace 2009-11-05 10:44:36 +01:00
Sune Foldager
d9c1a3a0ca merge: supply base node to merge tools in the environment
Merge tools will be able to exploit this to correctly merge backouts.
This won't work fully, though, until issue 1327 is solved, since the
node information is not necessarily correct.
2009-11-04 15:18:19 +01:00
Martin Geisler
87e32229f6 commands: slightly better help for --traceback 2009-11-02 20:50:57 +01:00
Benoit Boissinot
da797b3b32 byterange: backport fix from upstream 2009-11-02 17:54:19 +01:00
Sune Foldager
ee001cdc90 hgweb: send proper error messages to the client
Fixes a bug in protocol which caused an exception during exception handling in
some cases on Windows. Also makes sure the server error message is correctly
propagated to the client, instead of being thrown away.
2009-11-02 10:20:04 +01:00
Sune Foldager
46c649736d transaction: always remove empty journal on abort
When transactions without entries were aborted, the journal (of size 0) was not
unlinked, which prevents subsequent operations until hg recover is run on the
repository.

We also make sure the journal is unlinked when committing, even if the provided
hook doesn't do so.
2009-11-02 10:19:14 +01:00
Sune Foldager
88f8c97e4b change 'journal already exists' to 'abandoned transaction found'
Journal already exists is a pretty internal piece of information, which
doesn't necessarily mean much to people who are not familiar with the code.
The new text is a more well-known concept.
2009-11-02 10:17:20 +01:00
Sune Foldager
36a958fe4d verify: report existence of journal 2009-11-02 10:15:04 +01:00
Benoit Boissinot
a5cd832d0e bisect: no need to save the state if it wasn't changed 2009-11-01 03:26:10 +01:00
Benoit Boissinot
b146297220 log --limit: break after a limited number of csets (broken by 37a70f0b3ab8) 2009-11-01 02:54:32 +01:00
Benoit Boissinot
864f95d532 transaction: more specific exceptions, os.unlink can raise OSError 2009-10-31 18:17:59 +01:00
Benoit Boissinot
16abbe4cd8 lock: catch specific exceptions 2009-10-31 18:10:52 +01:00
Benoit Boissinot
01d3fbbbd0 patch: use the public ctx API instead of the internals 2009-10-31 18:02:34 +01:00
Benoit Boissinot
9015e8911f patch: don't use mutable object as default argument 2009-10-31 18:02:13 +01:00
Benoit Boissinot
1c058dc6e9 patch: initialize all attributes of the hunk class 2009-10-31 18:01:08 +01:00
Benoit Boissinot
667b87aaec patch: simplify logic 2009-10-31 18:00:05 +01:00
Benoit Boissinot
d2dcc4c950 lock: use '==' instead of 'is' for integer equality ('is' may not work) 2009-10-31 17:07:12 +01:00
Benoit Boissinot
80a458a464 pychecker: remove unused local variables 2009-10-31 17:04:46 +01:00
Benoit Boissinot
f7540399b7 remove unused imports 2009-10-31 16:56:58 +01:00
Benoit Boissinot
ce970b2d3e changelog: do not use a mutable default value 2009-10-31 16:49:27 +01:00
Benoit Boissinot
61f058fa0c bundlerepo: keep the bundlerevlog interface in sync with revlog 2009-10-31 16:42:51 +01:00
Benoit Boissinot
77d119c7c3 localrepo/branchcache: remove lbranchmap(), convert users to use utf-8 names
We don't need a "local-charset" aware branchmap() function, we can convert the
names when needed during the output.
2009-10-31 00:31:08 +01:00
Benoit Boissinot
724ff6d9b3 localrepo/branchcache: kill unused localrepo.branchcache
The UTF-8 version of the branchcache is the master, always up-to-date, we can
rename it to localrepo._branchcache.
2009-10-31 00:27:50 +01:00
Benoit Boissinot
55d087a0fc localrepo/branchcache: rebuild the "charset-aware" branchcache when needed
It's simpler and the two cache weren't always in sync otherwise:
localrepo.branchcache would not be updated after calling branchmap()
2009-10-31 00:20:28 +01:00
Henrik Stuart
8e476f8bf5 transfer branchmap branch names over the wire in utf-8 2009-10-26 13:37:39 +01:00
Dirkjan Ochtman
78e70cd53d cmdutil: fix bug in finddate() implementation 2009-10-30 09:54:39 +01:00
Dirkjan Ochtman
c47d609475 merge changes from mpm 2009-10-30 09:53:39 +01:00
Matt Mackall
4d8e4508a9 walkchangerevs: drop ui arg 2009-10-29 19:03:16 -05:00
Matt Mackall
caf5c5ecca walkchangerevs: reset cache between windows 2009-10-29 19:03:13 -05:00
Matt Mackall
1c290c8b2e log: tidy up some filter tests 2009-10-29 17:07:54 -05:00
Matt Mackall
de712b58f9 walkchangerevs: move 'add' to callback
Now walkchangerevs is a simple iterator over contexts
2009-10-29 17:07:51 -05:00
Steve Borho
ab6b033d40 cmdutil: update finddate()
walkchangerevs() now returns contexts, does not take a cache func.
2009-10-28 22:47:46 -05:00
Yuya Nishihara
ac33bbc42b extensions: changed to call extsetup() from extensions.loadall()
previously uisetup() was invoked by extensions.loadall(), but
extsetup() was by _dispatch().

there's no need to split them because we have nothing to do
between uisetup() and extsetup().

this fixes issue1824 indirectly.
2009-10-28 23:55:23 +09:00
Sune Foldager
ba068758a6 hook: only redirect stdout if it and stderr are valid files
When using hgwebdir with WSGI via the IIS ISAPI-WSGI extension, both
stdout and stderr filenos are set to -2, which makes the os.dup call
in hook.py fail.
2009-10-28 21:35:57 +01:00
Matt Mackall
a777761788 verify: filter the candidate list for broken linkrevs 2009-10-28 13:17:03 -05:00
Matt Mackall
74ca11743b Merge with crew 2009-10-27 17:14:19 -05:00
Matt Mackall
0366236cf5 walkchangerevs: internalize ctx caching 2009-10-27 17:01:32 -05:00
Sune Foldager
acad01d54e bundlerepo: fix small bug in exception raising 2009-10-27 10:33:41 +01:00
Matt Mackall
67e7c0b434 walkchangerevs: yield contexts 2009-10-25 18:43:59 -05:00
Matt Mackall
201d81ac28 walkchangerevs: kill window step of iterator 2009-10-25 18:43:58 -05:00
Matt Mackall
69f8478d8c walkchangerevs: pull out matchfn
* * *
imported patch mercurial/commands.py
2009-10-25 18:43:56 -05:00
timeless@mozdev.org
1834479e5a minor documentation improvements 2009-10-25 14:45:38 +02:00
timeless
1ed92a7db7 commands: adding --no-status to resolve to match status 2009-10-25 13:27:54 +01:00
timeless@mozdev.org
33195b8982 commands: use rev from remote repo when updating as part of a pull 2009-10-21 12:41:28 +03:00
timeless@mozdev.org
eb0032e7aa commands: highlighting that rev is based on the remote repository 2009-10-21 12:03:14 +03:00
Brodie Rao
7c2f2247c5 diffstat: with --git, mark binary files with Bin
Normally, diffs without any text insertions or deletions are reported
as having 0 lines changed by stock diffstat. Compatibility is
preserved with stock diffstat in this case, but when using --git,
binary files are marked with Bin as a means of clarification.

git diff --stat does something similar, though it also includes the
old and new file sizes.
2009-10-25 02:53:33 +02:00
Brodie Rao
8c7629d9e4 diff: add --stat for diffstat output
diff/qdiff --stat invokes patch.diffstat() on the diff output.

When in interactive mode, the output's maximum width is determined by the
terminal's width.
2009-10-25 02:52:35 +02:00
Brodie Rao
cd4a91c73f diffstat: print 0 instead of nothing for 0 adds or removes
This is in line with how the stock diffstat behaves when processing a
single diff with no line modifications (like a binary diff).
2009-10-25 02:35:35 +02:00
Adrian Buehlmann
c0985715f7 cmdutil: minor refactoring of changeset_printer._show
- use ctx.branch() instead of directly accessing the extra field "branch"
- move definitions of locals ('extra' and 'branch') down to where they
  are used
2009-10-24 19:01:40 +02:00
Martin Geisler
881b938c98 commands: search for translated version of "DEPRECATED"
The option description is already translated at this point, so we must
search for a translation of "DEPRECATED".
2009-10-24 00:29:25 +02:00
Nicolas Dumazet
3f248fed39 util: use sys.argv[0] if $HG is unset and 'hg' is not in PATH
This is necessary when the executable name is not 'hg'. For example,
if your system-wide mercurial is name 'hgs', sys.argv[0] is more
accurate than 'hg'.
2009-09-21 19:21:32 +02:00
Matt Mackall
e4e621eb3d summary: remove reference to -p 2009-10-21 17:42:22 -05:00
Martin Geisler
fb05a0948c minirst: convert `foo` into "foo" upon display
This lets us markup many more occurances of inline literals since they
no longer look strange in the terminal output.
2009-10-20 22:16:27 +02:00
Matt Mackall
22f2e128cf summary: add --remote 2009-10-20 11:59:38 -05:00
Matt Mackall
a6af18744b summary: restore briefer commit status 2009-10-20 11:58:09 -05:00
Matt Mackall
a69545dfc3 summary: add empty repository and no revision checked out hints 2009-10-20 11:57:25 -05:00
Matt Mackall
0a74fdabf2 Merge with crew 2009-10-19 23:53:25 -05:00
Benoit Boissinot
902529ddd6 merge with crew 2009-10-20 00:30:36 +02:00
Martin Geisler
b10a5e234c ui: only use "user@host" as username in noninteractive mode
We regularly see people on IRC ask how they can correct commits they
accidentally made without having configured a username. This change
will make Mercurial abort when a commit is made without a username.

If Mercurial is run without a TTY (from a cronjob or similar), a
username is constructed as usual. Schematically the changes are as
follows:

With ui.askusername=False:

                  old         new
  interactive     user@host   abort
  noninteractive  user@host   user@host

With ui.askusername=True:

                  old         new
  interactive     prompt      prompt
  noninteractive  user@host   user@host
2009-10-20 00:17:36 +02:00
Matt Mackall
73b30861ca Remove parents from default help in favor of summary 2009-10-19 00:36:52 -05:00
Matt Mackall
e07bd87972 summary: quieter with -q 2009-10-19 00:22:49 -05:00
Matt Mackall
2a9f330665 commands: fix missing empty synopses 2009-10-19 00:21:06 -05:00
Matt Mackall
993bb8325e Introduce summary command 2009-10-18 22:31:05 -05:00
Adrian Buehlmann
a482b04850 hg.clone: report branch name on update 2009-10-16 23:57:34 +02:00