Commit Graph

2514 Commits

Author SHA1 Message Date
Nicolas Dumazet
2476f9eec3 merge with stable 2010-07-31 11:41:58 +09:00
Nicolas Dumazet
fd74fbf55f merge crew and main 2010-07-31 11:05:11 +09:00
Nicolas Dumazet
1f6d6b4984 merge crew and main 2010-07-31 11:04:33 +09:00
Nicolas Dumazet
5d294189fa mq: clarify the fact that qimport is trying to read a file
"hg qimport tip" would throw "abort: unable to read tip" before this.
2010-07-31 10:50:29 +09:00
Nicolas Dumazet
e1fdb57c43 mq: correct qimport documentation 2010-07-29 17:18:17 +09:00
Nicolas Dumazet
255cce8ee5 merge with stable 2010-07-29 12:10:22 +09:00
Patrick Mezard
f59b5d9c39 mq: fix qimport --name --existing --force on win32
os.rename() does not overwrite existing targets on Windows.
2010-07-28 11:07:20 +02:00
Matt Mackall
671535ddb7 Merge with stable 2010-07-25 21:20:05 -05:00
Christian Ebert
e697dd5558 keyword: move collecting of [keyword] patterns to reposetup (issue2303)
When cloning, prevent [keyword] filename patterns configured locally
in the source directory to persist during the update in the destination.

a) move [keyword] retrieval (back) to reposetup
b) remove the corresponding global kwtools attributes

Add test cases.
2010-07-25 20:01:33 -05:00
Idan Kamara
5f043a6812 bookmarks: don't allow name to contain whitespaces only 2010-07-24 11:20:21 +03:00
Nicolas Dumazet
32a65647b1 mq: document possible combination of -e and -n for qimport 2010-07-23 23:43:43 +09:00
Nicolas Dumazet
fa54ef46b3 mq: support "qimport --existing --name renametothis thatexistingpatch"
Before this change, the command would abort with a not too clear "patch
renametothis does not exist" error.

This change makes:
  qimport --existing --name renametothis thatexistingpatch
equivalent to:
  qimport --existing thatexistingpatch; qrename thatexistingpatch renametothis
2010-07-21 11:53:09 +09:00
Patrick Mezard
3153012325 cleanup: typos 2010-07-26 22:29:49 +02:00
Patrick Mezard
56b24c94c7 bookmarks: sort diffbookmarks() output 2010-07-26 22:26:12 +02:00
Mads Kiilerich
ef1e88d17c convert: warn on superfluous / in paths
shlex is really a bad parser for this line-based format ...
2010-07-20 15:49:28 +02:00
David Soria Parra
a1c3bcbbfe inotify: remove unused variable 2010-07-24 22:15:22 +02:00
Matt Mackall
3a240dadce convert: handle closed branch heads in hg-hg conversion (issue2185) 2010-07-25 17:18:35 -05:00
Nicolas Dumazet
cea01fc92a bookmarks: rewrite _bookmarks method documentation 2010-07-21 12:41:18 +09:00
Greg Ward
692cfc05a8 transplant: crash if repo.commit() finds nothing to commit
(makes issue2135, issue2264 more obvious, but does nothing to fix
either one)

This seems to happen in two distinct cases:
  * patch.patch() claims success but changes nothing (e.g.
    the transplanted changeset adds an empty file that already
    exists)
  * patch.patch() makes changes, but repo.status() fails to report them

Both of these seem like bugs in other parts of Mercurial, so arguably
it's not transplant's job to detect the failure to commit.  However:
  * detecting the problem as soon as possible is desirable
  * it prevents a more obscure crash later, in transplants.write()
  * there might be other lurking (or future) bugs that cause
    repo.commit() to do nothing

Also, in the case of issue2264 (source changesets silently dropped by
transplant), the only way to spot the problem currently is the crash
in transplants.write().  Failure to transplant a patch should abort
immediately, whether it's user error (patch does not apply) or a
Mercurial bug (e.g. repo.status() failing to report changes).
2010-07-18 21:29:29 -04:00
Vishakh H
fb390f5f84 mq: cleanup status if applied mq is stripped (issue1881)
stripping of applied mq patches leads to wrong state recorded in status
file. find all mq patches that will be affected and clean up status file
before strip.
2010-07-20 20:37:29 +05:30
Greg Ward
08b5f707c3 inotify: make inotifydirstate.status() returns a tuple of lists.
This makes it consistent with dirstate.status(), which is important if
there are other extensions messing with the output of status().  Those
extensions can safely assume that dirstate.status() returns a tuple of
lists, because its docstring says it does.  But
inotifystatus.dirstate() returns a list of lists, which can break
those other extensions.
2010-07-20 14:00:47 -04:00
Brodie Rao
e68a4f5865 bookmarks: ensure current bookmark is updated when specified with -r .
"hg bookmark -r . foo" should be equivalent to "hg bookmark foo".
2010-07-14 11:02:20 -04:00
Nicolas Dumazet
517eb64655 merge with stable 2010-07-22 15:14:22 +09:00
Matt Mackall
33994da433 Merge with stable 2010-07-20 15:07:10 -05:00
Christian Ebert
15f0c93000 keyword: add extra datefilters in a single update call 2010-07-15 10:24:31 +02:00
Brendan Cully
5c49b19eb5 mq: evaluate --user before invoking editor with -e (issue2289) 2010-07-15 10:41:41 -07:00
Renato Cunha
b6d6b8775c removed exception args indexing (not supported by py3k)
Py3k removed __getitem__ for exception classes. The correct way of
getting the exception arguments is by using the args method.
2010-07-14 23:03:21 -03:00
Renato Cunha
0ef348b9d4 record: removed 'has_key' usage
Py3k has removed the dictionary has_key method. This patch implements
a one argument function that can be used as a callback by hg.revert in
the record extension.
2010-07-14 22:58:29 -03:00
Martin Geisler
b620743b6b Merge with stable 2010-07-14 21:30:50 +02:00
Henrik Stuart
c4714744e5 merge stable to default 2010-07-14 20:41:01 +02:00
Nicolas Dumazet
658e3fee6a merge with stable 2010-07-13 22:56:01 +09:00
Nicolas Dumazet
9085ce94e6 mq: qrepo.add(mq.added) inside save_dirty inside of doing it manually
This should make the MQ API more transparent: callers only have to
call save_dirty, and no mq.added magic or knowledge is required.
2010-07-13 22:30:01 +09:00
Renato Cunha
6de8a70a9d inotify: check all components of filenames against hgignore (issue884)
With inotify enabled, files that should be ignored could be detected as
untracked by mercurial. This behavior was wrong because inotify's filestatus
implementation only matched filenames against ignore patterns, instead of
checking if other elements of their paths matched them. This patch fixes the
behavior by checking the file paths against the ignore patterns.

A new test has also been added to the main inotify test to prevent any
regressions.
2010-07-06 22:22:18 -03:00
Renato Cunha
f1db4f7c25 inotify: Port of the C module to py3k.
This patch accomplishes the port of the inotify C module to py3k by #including
mercurial's util.h file, and by defining the necessary boilerplate code
required by py3k through conditional compilation.
2010-07-02 16:22:59 -03:00
Renato Cunha
e091197571 inotify: Better implementation of the event string representation.
This patch reimplements the event_repr function. It got mostly rewritten to
eliminate the need for conditional compilation of the module when building in
py3k. The trick there (thanks to Antoine Pitrou) is to use the % operator to
let the python interpreter format the string to be returned.
2010-07-02 16:21:46 -03:00
Renato Cunha
d43bcc0e6e inotify: make proper use of Python API to get object size.
In older python versions, it was ok to access an object's type by accessing its
ob_type "member". With python 2.6+, the proper way of accessing it is via
Py_TYPE(object). This patch implements the correct call for the inotify
extension. When under python < 2.6, this macro is defined in mercurial's
util.h.
2010-07-02 16:21:42 -03:00
Martin Geisler
5fbbb27c25 Merge with stable 2010-07-09 14:21:45 +02:00
Mads Kiilerich
337e489bbe convert: cleanup of filemap help text
Clarify that:
- Specified paths are matched by comparing name of file or directory.
- Line order (thus) doesn't matter.
- Rename doesn't imply include.
2010-07-08 15:44:14 +02:00
Martin Geisler
9fd4048b8f Merge with stable 2010-07-06 20:43:19 +02:00
Martin Geisler
03193efb11 Merge with stable 2010-07-03 02:06:07 +02:00
Martin Geisler
7b12009341 zeroconf: small fixes in docstring
Use reST role for consistency, import small part of Debian's
proposed_upstream__correct-zeroconf-doc patch from

  http://svn.debian.org/viewsvn/python-apps/packages/mercurial/trunk/debian/patches/
2010-07-03 01:56:09 +02:00
Nicolas Dumazet
2d7fd252ec rebase: small cosmetic cleanups 2010-07-12 19:04:07 +09:00
Nicolas Dumazet
a34bba6494 rebase: re-add patches to mq repo after rebase
Since b4eaab2f8dee, we are adding patches after the qimport call, and not
inside it anymore. Correct updatemq to match the new behaviour.
2010-07-13 20:12:32 +09:00
Nicolas Dumazet
5651c754f9 mq: reset self.added after the mq transaction instead of inside qimport
It seems wiser to reset mq.added at the end of the mq transaction instead of at
the beginning of a qimport call: this way, calling several times qimport()
without saving mq state in-between does not overwrite the previous value of
mq.added (this happens, for example in rebase, where we import several patches
in a batch before calling .save_dirty() )
2010-07-12 17:55:23 +09:00
Brodie Rao
6f58bfc15e color/progress: subclass ui instead of using wrapfunction (issue2096)
This resolves the issue of hg cmd --mq not being colorized. This was due
to color wrapping only the instance of ui passed to dispatch._runcommand(),
which isn't the same ui object that mq.mqcommand() receives. After dispatch
calls extensions.loadall(), it makes sure any changes to ui.__class__ in
uisetup are propagated.

progress is updated to wrap ui in the same manner because wrapfunction
doesn't play well when ui.__class__ has been replaced by another extension
(orig will point to the old class method instead of color's).
2010-07-01 19:23:26 -05:00
Renato Cunha
1b3435e951 churn: remove tuple parameter unpacking (deprecated in py3k) 2010-07-01 19:27:03 -03:00
Renato Cunha
baef416ee4 record: removed 'reduce' calls (unsupported by py3k)
Quoting python's documentation, "Note that sum(range(n), m) is
equivalent to reduce(operator.add, range(n), m)". The "sum" function
is a builtin from 2.3 on and there's no reason for not to use it.
2010-07-01 19:27:03 -03:00
Renato Cunha
17e6945d72 record: tuple parameter unpacking is deprecated in py3k 2010-07-01 19:27:03 -03:00
Renato Cunha
5766b997d7 convert: tuple parameter unpacking is deprecated in py3k 2010-07-01 19:27:02 -03:00
Vishakh H
7839628449 mq: qimport cleanup on fail (issue2214)
save state of successfully added patches and ensure
cleanup on the way out.
2010-06-29 03:09:42 +05:30