Commit Graph

2492 Commits

Author SHA1 Message Date
Brodie Rao
e752297abf convert: properly set encoding for gnuarch converter 2010-08-18 10:53:50 -04:00
Mads Kiilerich
b27d1fd3b8 mq: don't inherit default and default-push paths with --mq (issue2333)
Configuration from the outer repo is inherited to the patches repo when --mq is
used.

In case the patches repo only has paths.default configured but the outer repo
has paths.default-push then the inherited default-push will win. Very
confusing.

Inheriting the default paths is however wrong in all sane cases, so now we
explicitly remove them.
2010-08-18 02:43:45 +02:00
Benoit Boissinot
21c145b776 rebase: recompute the set of skipped rev when using --continue (issue2330) 2010-08-13 18:02:02 +02:00
Martin Geisler
14ab4a3d21 convert: less shouting in SVN sink warning 2010-08-11 12:29:20 +02:00
Daniel J. Lauk
770d0f10a6 convert: Using --dest-type svn crashed, if the source repo used tags.
The convert extension requires puttags(self, tags) to return a sequence
for a multi-variable assignment.  If puttags implicitly returns None,
the code will break when trying to un-pack None for assignment.
2010-08-11 11:46:06 +02:00
Martin Geisler
b81cf438a9 graphlog: mark --branch as incompatible with --graph
The --only-branch option was deprecated in e783d3972bda and --branch
was added instead. But the graphlog extension was not updated to match
the change.
2010-08-11 12:19:01 +02:00
Brodie Rao
6d1ff05d76 color: call correct superclass method in write_err
Without this fix, any calls to write_err would go to stdout instead of
stderr, and calls during pushbuffer would cause unpack ValueErrors on
popbuffer.
2010-08-02 10:48:31 -04:00
timeless
4c60b4bbe9 convert/progress: use plural and avoid retrieving 2010-07-30 10:38:54 +03:00
Brodie Rao
52fb27575c color: pass write/write_err to win32print correctly (issue2312) 2010-08-01 16:26:02 -04:00
Gilles Moris
6e5b8353f9 qpush --move: move the right patch even with comment lines
9af52509546a caused that we find the index of the moving patch in self.series
but look it up in self.full_series. The difference between these is that
full_series also contains comment lines, and we thus moved the wrong patch.

Use back self.full_series to find the moving patch, but take care of striping
the patch guard markers before comparing the patch name. Test cases have been
added for comments and empty lines in self.full_series, and for the case of
guarded patches.

Original patch contributed by Mads Kiilerich <mads@kiilerich.com>
2010-07-10 21:23:00 +02: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
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
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
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
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
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
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
Yuya Nishihara
adbae861a8 mq: fixed ENOENT when qrename to new/directory.patch
MQ patch name can contain slashes, e.g. 'foo/bar.patch'.

Currently "qnew foo/bar.patch" works, but
"qrename foo/bar.patch new/dir.patch" fails with
"No such file or directory".

Also added test case for "qnew foo/bar.patch"
2010-03-28 15:23:11 +09: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
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
Augie Fackler
be26c0a474 progress: check stderr.isatty() before each print
This prevents writing progress information to a non-tty stderr if one is
swapped in after startup, which happens in `hg serve`.
2010-06-27 22:20:47 -05:00
Eric Eisner
09e0759fc2 glog: fix crash on empty revision range 2010-06-24 21:35:52 -07:00
Matt Mackall
80fcc54f22 bookmarks: fix in/out return values 2010-06-26 12:26:03 -05:00
Matt Mackall
ae9cea9fad bookmarks: fix bogus cut and paste for outgoing 2010-06-26 12:24:55 -05:00
Matt Mackall
e4cf775b71 addchangegroup: pass in lock to release it before changegroup hook is called
Currently, callers of addchangegroup first acquire the repository
lock, usually to check that an unbundle request isn't racing. This
means that changegroup hook actions that might write to a repo get
stuck waiting for a lock. Here, we add a new optional lock parameter
and update all the callers. Post-1.6 we may make it non-optional.
2010-06-25 13:47:28 -05:00
Matt Mackall
526f8c09e9 bookmarks: touch changelog on write to force hgweb reload 2010-06-23 13:38:52 -05:00
Gilles Moris
de632dde6b mq: explicit exit code when patch is already on top 2010-06-22 21:36:09 +02:00
Gilles Moris
ed9f9e6f02 mq: fix qpush --move for selected guarded patches
In the case of guarded patch, the patch could not be found because the
full_series list contains also the guard value appended to each patch name.
As we already checked that the patch is pushable above in the code, we just
have to use the series list (which doesn't contains guard value) to get the
patch index.
2010-06-22 09:49:51 +02:00
Javi Merino
9da23a6f37 zeroconf: Use BadDomainName exception instead of string exceptions
String exceptions no longer work in python 2.6. Use exception classes
instead.
2010-06-23 10:45:53 +02:00
David Soria Parra
5b87f2b170 bookmarks: Use error message consistently
The 'updating bookmark %s failed!' message is better than
'failed to update bookmark %s'. To have more consistent error
messages we use just 'updating bookmarks %s failed'.
2010-06-23 11:53:59 +02:00
David Soria Parra
62a88dc827 bookmarks: Add -B option to incoming/outgoing to compare bookmarks
We add a -B/--bookmarks option to hg incmoing and hg outgoing. If the option
is passed we compare bookmarks instead of changesets. This can be used
to see which bookmarks do not exists on the remote site.
2010-06-20 12:26:48 +02:00
Martin Geisler
f455cb5a95 Merge with mpm 2010-06-20 23:37:09 +02:00
Martin Geisler
f08fb80ec0 acl: delete trailing whitespace in docstring 2010-06-20 19:48:28 +02:00
Yuya Nishihara
968bdb2fd0 pager: respect HGPLAIN
Pager shouldn't be enabled for scripting use.
2010-06-20 01:20:12 +09:00
Christian Ebert
60b4f2db95 patchbomb: reduce number of opts.get calls
Rename outgoing() function to getoutgoing() analogous to
getbundle() etc. to avoid name conflict.
2010-06-16 00:37:21 +02:00
Georg Brandl
9033acc5dc transplant: when reading journal, treat only lines starting with "# " special like patch.extract() does 2010-06-19 12:51:57 +02:00
Matt Mackall
0b177f47ca bookmarks: add support for push --bookmark to export bookmarks 2010-06-17 15:54:26 -05:00
Matt Mackall
624998f1b4 bookmarks: add support for pull --bookmark to import remote bookmarks 2010-06-17 14:26:23 -05:00
Dirkjan Ochtman
75e5a3fcef mq: __str__ falls back to __repr__ 2010-06-17 15:53:26 +02:00
Matt Mackall
bb9bb2f2c0 bookmarks: update known bookmarks on the target on push 2010-06-17 12:22:21 -05:00
Matt Mackall
58c8d93978 bookmarks: pull known bookmarks from server that are newer 2010-06-17 12:10:47 -05:00