Commit Graph

2047 Commits

Author SHA1 Message Date
Patrick Mezard
7155946405 convert/svn: fix warning when repo detection failed 2009-11-16 14:09:31 +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
Nicolas Dumazet
fd600dc328 inotify: Do not access inotify when dirstate is dirty (issue1811)
Original patch was provided by Simon Heimberg

It delegates dirstate computation to dirstate.status when dirstate is dirty:
better be slow from time to time instead of using wrong data.

This solves issue1719. As the last component, issue1810, is still not solved,
test-inotify-dirty-dirstate will fail for now. It emphasizes a regression due
to e8efd88001e7:

changeset:   9515:e8efd88001e7
user:        Nicolas Dumazet <nicdumz.commits@gmail.com>
date:        Sun Aug 16 11:11:37 2009 +0900
summary:     inotify: use cmdutil.service instead of local daemonizing code

Ancestors of 7c01599dd30 are passing the test, when applied this patch.
Regression has to be investigated, but this patch is important since it affects
often mq operations.
2009-11-11 14:38:59 +09:00
Nicolas Dumazet
800658e086 inotify: mark directories visited during lookup (issue1844)
Emulate the match.dir calls that are made in dirstate.walk:
 * first mark the visited directories on the server side
 * then extend the transmitted response to include this directory list
 * and lastly call match.dir on each directory
2009-11-13 08:31:10 +09:00
Brodie Rao
4f62e5a654 pager: provide a default attend list
The default list includes commands which normally print large amounts of
text. This should be more user-friendly than paging all commands by default,
which can be confusing when the pager swallows input prompts (with, e.g.,
record, merge, HTTP/SSH authentication, etc.)
2009-11-12 10:29:40 -05:00
Patrick Mezard
709ae7efd4 convert/svn: fix HTTP detection bug introduced by bf008106de6f
The probe expected response is a 404 with content, and while urllib returns the
response body in this case, urllib2 raises an HTTP error.
2009-11-12 12:05:43 +01:00
Martin Geisler
2f62f669cf record: handle translated prompt correctly
The prompt function would return 'y' or 'n' untranslated. This should
therefore not be compared to _('y') and _('n'). However, it turns out
that prompt could just as well return a good old Boolean.
2009-11-11 22:53:01 +01:00
Patrick Mezard
e5e2172bf6 convert/svn: delegate to svn bindings if HTTP probe fails
convert extension tries to guess the remote repository type with HTTP probes.
Unfortunately, it does not handle authentication or HTTPS handshakes, so regular
svn repositories may be excluded. Instead, when a non-404 error is retrieved,
we keep trying with the svn bindings. The drawback is missing svn bindings will
make the conversion to fail even for non-svn targets. This can be avoided with
--source.
2009-11-11 19:45:00 +01:00
Martin Geisler
ff95857722 mq: fix literal blocks in docstrings 2009-11-11 00:05:12 +01:00
Patrick Mezard
1edfa4d1df convert/mtn: handle change in mtn 0.45 certs output 2009-11-10 23:45:24 +01:00
Patrick Mezard
d8a8eb5584 convert: reenable SVN support after license issue solved 2009-11-10 22:32:17 +01:00
Patrick Mezard
29f1e65f87 patchbomb: normalize date format in generated mboxes
mbox format should use time.asctime(). Unfortunately, this function writes
2-characters day of week on Windows while unix one writes a single character.
Normalize to Windows version since the other one can hardly be written with
strftime().
2009-11-08 18:08:24 +01:00
Christian Boos
62e4f8e6b2 rebase: make sure the newancestor is used during the whole update
(issue1561)

Before this change, newancestor was used only once as a replacement
for ancestor.ancestor, but merge.update calls ancestor.ancestor
several times, so it ends up with the "wrong" ancestor (the real
ancestor, but we want the parent of the rebased changeset for all but
the first rebased changeset).

Added a new test case for this: test-rebase-newancestor.

Also, in one scenario in test-rebase-collapse, there was a spurious
conflict caused by the same issue, so that test case was fixed by
removing the now unneeded conflict resolution and the output was
adapted accordingly.
2009-11-09 20:15:49 +01:00
Martin Geisler
3da08922b3 relink: do not translate format string with no text 2009-11-08 00:11:34 +01:00
Martin Geisler
1f42ec8873 mq: do not call ui.username unless it is necessary
After changeset 54b67f7bd5df, ui.username will abort by default if no
username is set. It is therefore wrong to call ui.username when a
username was provided on the command line.
2009-11-07 00:13:05 +01:00
Jesse Glick
1c304ddf8b Issue919: add a standard extension to recreate hardlinks between repositories.
Having to run a standalone Python script from the contrib dir is a nuisance.
Also makes various improvements to locking, file discovery, etc.
Should also update: http://www.selenic.com/mercurial/wiki/index.cgi/RecreateHardlinksBetweenRepositories
2009-11-05 17:38:03 -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
12c5890a70 kill trailing whitespace 2009-11-05 10:44:36 +01:00
Martin Geisler
769cf16d06 color: wrap qrecord
The qrecord command is registered in uisetup phase, so we do our
wrapping in extsetup phase.
2009-11-05 01:11:28 +01:00
Martin Geisler
c8914d5f89 record: use uisetup instead of extsetup to register qrecord
New commands should be registered in uisetup so that other extensions
have a change of wrapping them in extsetup.
2009-11-05 01:10:43 +01:00
Benoit Boissinot
fe9a5e5ec3 record: get the right position (account for skipped files) 2009-11-01 02:57:11 +01:00
Alexander Solovyov
1c0a00c05d churn: fix --progress (broken by 37a70f0b3ab8) 2009-10-30 15:43:01 +02:00
Alexander Solovyov
6b680abcf9 churn: fix changeset count (broken by 0fc99cecabb9) 2009-10-30 13:40:23 +02:00
Alexander Solovyov
af41ec3842 churn: ability to display added/removed lines separately 2009-10-29 20:50:24 +02:00
Matt Mackall
4d8e4508a9 walkchangerevs: drop ui arg 2009-10-29 19:03:16 -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
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
Matt Mackall
67e7c0b434 walkchangerevs: yield contexts 2009-10-25 18:43:59 -05:00
Matt Mackall
69f8478d8c walkchangerevs: pull out matchfn
* * *
imported patch mercurial/commands.py
2009-10-25 18:43:56 -05:00
Alexander Solovyov
3603882f18 patchbomb: accept default if it is empty string
This fixes Cc: prompt.
2009-10-25 14:28:02 +01:00
Martin Geisler
d0b16ead31 patchbomb: fix double-spaces in prompts 2009-10-25 14:24:39 +01:00
Alexander Solovyov
2a7b51f2e1 bookmarks: use API to determine if repo is local 2009-10-25 12:05:07 +02: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
2306a92219 color: colorize diff --stat 2009-10-25 02:52:36 +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
Martin Geisler
5a115c8c69 convert: document parent order in splicemap help (issue1764) 2009-10-23 22:55:28 +02:00
Peter Arrenbrecht
cd8ecf5642 graphlog: hide internal state of ascii() from users 2009-10-21 14:16:37 +02:00
Alexander Solovyov
e3586100e3 fix patchbomb prompt when sending series of patches 2009-10-19 23:27:20 +03:00
Mads Kiilerich
0f7110ec11 Merge with redone 9660769e6539 (issue1860) 2009-10-16 11:19:39 +02:00
Mads Kiilerich
1c7c19b2e6 Redo 9660769e6539 (issue1860) 2009-10-16 11:16:42 +02:00
Martin Geisler
48349e3ff0 Merge with crew-stable 2009-10-16 00:45:18 +02:00
Benoit Allard
f444222eca mq: fix traceback for qpush inexistant-patch with no patch applied 2009-10-16 00:09:18 +02:00
Patrick Mezard
990e7895a0 Merge with crew-stable 2009-10-16 00:06:23 +02:00
Patrick Mezard
f235a47953 convert/svn: better error when hg cannot call itself (issue1838) 2009-10-15 23:15:30 +02:00
timeless@mozdev.org
1ee61bd64c rebase: change rebase help to talk about changesets and branch names 2009-10-14 20:55:39 +03:00
Stephen Rasku
15c682540c mq: changed help for qpop -f to reflect actual behaviour 2009-10-14 21:21:09 -07:00
Sune Foldager
ded10074e6 rebase: return early when source is descendant of destination
This only happens when using --base (or no source selection options), as
rebase already aborts in this situation when using --source.

Without this change you get an abort from the underlying merge, and the
repository is in a different state than you started with (the working
dir parent is changed).
2009-10-08 10:39:43 +02:00
Sune Foldager
4ecbc53304 rebase: improve error and debug messages 2009-10-08 10:07:41 +02:00
Matt Mackall
879810b360 Merge with -crew-stable 2009-10-07 23:45:30 -05:00