Commit Graph

2126 Commits

Author SHA1 Message Date
Pierre-Yves David
e929cd5e49 discovery: introduce outgoing object for result of findcommonoutgoing
Simplifies client logic in multiple places since it encapsulates the
computation of the common and, more importantly, the missing node lists.

This also allows an upcomping patch to communicate precomputed versions of
these lists to clients.
2012-01-09 03:47:16 +01:00
Pierre-Yves David
2362e6fe6c commands: make bundle use heads computed by findoutgoing 2012-01-09 04:16:00 +01:00
Martin Geisler
e0542a7108 commands: bump copyright year 2012-01-11 15:51:02 +01:00
Matt Mackall
7ea3d8e9f3 phase: mark messages for i18n 2012-01-10 16:36:36 -06:00
Matt Mackall
7025e1c3b0 phase: fix up help string 2012-01-10 16:36:33 -06:00
Matt Mackall
ae28263f4b phase: drop reference to working directory phase 2012-01-10 16:36:32 -06:00
Pierre-Yves David
a2fe028df9 phases: add a phases command to display and manipulate phases 2012-01-10 19:45:35 +01:00
Ion Savin
029e0ada33 annotate: append newline after non newline-terminated file listings
The last line of a non newline-terminated file would mix with the first line of
the next file in multiple-file listings before this patch.

Possible compatibility issue: no longer possible to tell from the annotate
output if the file is terminated by new line or not.
2012-01-10 10:18:19 +02:00
Martin Geisler
fa8ac03b58 merge with stable 2012-01-06 11:43:17 +01:00
Martin Geisler
649b8283da commands: add link to addremove in commit help text 2012-01-06 11:15:32 +01:00
Matt Mackall
dea868ff61 cmdutil: simplify duplicatecopies 2012-01-05 20:35:10 -06:00
Matt Mackall
48738cad22 copies: rewrite copy detection for non-merge users
The existing copy detection API was designed with merge in mind and
was ill-suited for doing status/diff. The new pathcopies
implementation gives more accurate, easier to use results for
comparing two revisions, and is much simpler to understand.

Test notes:

- test-mv-cp-st.t results finds more renames in the reverse direction now
- test-mq-merge.t was always wrong and duplicated a copy in diff that
  was already present in one of the parent revisions
2012-01-04 17:55:30 -06:00
Matt Mackall
9bfa890ee6 copies: split the copies api for "normal" and merge cases (API) 2012-01-04 15:48:02 -06:00
Matt Mackall
c19e8e450d merge with stable 2012-01-03 17:13:03 -06:00
Matt Mackall
8ba239a418 grep: make multiline mode the default (BC)
This is a much more logical way to deal with ^ and $.
Old ^ and $ behavior are available with \A and \Z.
2012-01-03 15:48:58 -06:00
Matt Mackall
61f1d2e359 rollback: clarify --force text (issue3175) 2011-12-29 14:02:18 -06:00
Matt Mackall
c9f57cde0f merge with stable 2011-12-29 14:45:18 -06:00
FUJIWARA Katsunori
9dd2a411a7 i18n: use "encoding.lower()" to normalize specified keywords for log searching
some problematic encoding (e.g.: cp932) uses ASCII alphabet characters
in byte sequence of multi byte characters.

"str.lower()" on such byte sequence may treat distinct characters as
same one, and cause unexpected log matching.

this patch uses "encoding.lower()" instead of "str.lower()" to
normalize strings for compare.
2011-12-25 20:35:16 +09:00
Matt Mackall
11aa73a675 merge with stable 2011-12-22 15:56:27 -06:00
Kevin Bullock
0fb78c49bd graft: use consistent language in help
Removes the word 'aborted' from the 3rd paragraph in favor of
'interrupted', the same word used in the description of the
-c/--continue switch. The word 'interrupted' is also consistent with
the help for rebase.
2011-12-20 14:11:14 -06:00
Martin Geisler
034d08dce7 status: add missing ":" to help text 2011-12-15 11:13:38 +01:00
Matt Mackall
a69962e18c branch: warn on branching 2011-12-08 14:32:44 -06:00
Matt Mackall
d91862b8e5 branch: move note about permanence to the top, add 'global' 2011-12-05 17:09:11 -06:00
Patrick Mezard
942cefafa6 import: fix parent selection when importing merges
With "wp1" and "wp2" the current working directory parents, "p1" and "p2" the
patch parents and "parents" the resulting commit parents, the current behaviour
is:

--bypass --exact p2 parents
0        0       0  [wp1, wp2]
0        0       1  [wp1, wp2]/buggy
0        1       0  [p1]
0        1       1  [p1, p2]
1        0       0  [wp1, wp2]
1        0       1  [p1, p2]
1        1       0  [p1]
1        1       1  [p1, p2]

The original behaviour before 1f543fd375c5 was:

--bypass --exact p2 parents
0        0       0  [wp1, wp2]
0        0       1  if p1 == wp1 then [p1, p2] otherwise [wp1, wp2]
0        1       0  [p1]
0        1       1  [p1, p2]

This patch restores the previous behaviour when --bypass is not set, and align
--bypass behaviour when --exact is not set with merge diffs.
2011-11-16 12:53:10 +01:00
Stefano Tortarolo
f195f71994 graft: disallow grafting grafted csets in specific situations (issue3091)
In particular, we do not allow:
- grafting an already grafted cset onto its original branch
- grafting already grafted csets with the same origin onto each other
2011-11-12 14:00:25 +01:00
Stefano Tortarolo
dfee711e26 graft: preserve original source in subsequent grafts 2011-11-12 13:15:40 +01:00
Stefano Tortarolo
a179a7e151 graft: mark a string for translation 2011-11-08 21:31:39 +01:00
Matt Mackall
b066b57e3c backout 17bc9a6bb165 (issue3077) (issue3071)
Using util.realpath turns out to create complex issues on both Mac and
Windows. Back this change out for the release.
2011-10-29 11:02:23 -05:00
Peer Stritzinger
ed0c1f398e revert: fix missing removes when parent was changed in dirstate
When dirstate parent is changed with dirstate.setparent before a
revert so it no longer points to where the dirstate refered to, revert
does not remove all files it should:

Revert to a different revision needs also to remove files that are not
found through disptables and not in the context or parent manifest.
2011-10-26 18:47:12 +02:00
Matt Mackall
b7f097bf54 graft: fix duplicate filter logic 2011-10-24 16:57:14 -05:00
Matt Mackall
0d1e03e15b graft: fix duplicate scan message 2011-10-24 16:57:14 -05:00
Matt Mackall
11a871ed47 graft: fix formatting of message 2011-10-24 12:09:12 -05:00
Thomas Arendsen Hein
51c498ead0 consistency: use util.realpath instead of os.path.realpath where useful
exceptions:
  hg: os.path.realpath used before util can be imported
  tests/run-tests.py: may not import mercurial modules
2011-10-24 13:51:24 +02:00
Kevin Bullock
dd00f9e122 import: abort usefully if no patch name given 2011-10-21 11:10:43 -05:00
Martin Geisler
acfa971cf1 subrepos: abort commit by default if a subrepo is dirty (BC)
This changeset flips the default value of ui.commitsubrepos setting
from True to False and adds a --subrepos flag to commit.

The commit, status, and diff commands behave like this with regard to
recusion and the ui.commitsubrepos setting:

          | recurses      | recurses
          | by default    | with --subrepos
  --------+---------------+----------------
  commit: | commitsubrepo | True
  status: | False         | True
  diff:   | False         | True

By changing the default from True to False, the table becomes
consistent in the two columns:

* without --subrepos on the command line, commit will abort if a
  subrepo is dirty and status/diff wont show changes inside subrepos.

* with --subrepos, all three commands will recurse.

A --subrepos flag on the command line overrides the config settin.g
2011-10-21 00:33:08 +02:00
Wagner Bruna
d4e8e13b0d import: add i18n context 2011-10-18 09:38:10 -02:00
Mads Kiilerich
06d30b903b grep: correct handling of matching lines without line ending (issue3050)
Matching lines without trailing '\n' was missing the last character.

That seems to have been an unintended side effect of 8abe3f27975c.
The test in c21748e4cd4d documents the bad behaviour.
2011-10-16 01:26:06 +02:00
Thomas Arendsen Hein
5a6f0ca4ac commands: use separate try/except and try/finally as needed for python2.4
69d55e9a084a introduced a try/except/finally block, which breaks compatibility
with python2.4
2011-10-16 11:12:59 +02:00
Angel Ezquerra
16f9562667 revert: warn that subrepos cannot be reverted
(tests added by mpm)
2011-10-15 01:06:52 +02:00
Matt Mackall
7751048134 graft: use status verbosity for reporting grafts 2011-10-14 15:40:50 -05:00
Angel Ezquerra
30a511a833 push: propagate --new-branch and --ssh options when pushing subrepos
Up until now the all the push command options were ignored when pushing
subrepos. In particular, the fact that the --new-branch command was not passed
down to subrepos made it not possible to push a repo when any of its
subrepos had a new branch, even if you used the --new-branch option of the push
command.

In addition the error message was confusing since it showed the following hint:
"--new-branch hint: use 'hg push --new-branch' to create new remote branches".
However using the --new_branch flag did not fix the problem, as it was ignored
when pushing subrepos.

This patch passes the --new-branch and --ssh flags to every subrepo that is
pushed.

Issues/Limitations:

- All subrepo types get these flags, but only the mercurial subrepos use them.
- It is no longer possible to _not_ pass down these flags to subrepos when
pushing:
   * An alternative would be to introduce a --subrepos flag that should be
used to pass down these flags to the subrepos.
   * If we did this, it could make sense to make the --force flag respect this
   new --subrepos flag as well for consistency's sake.
- Matt suggested that the ssh related flags could also be passed down to
subrepos during pull and clone. However it seems that it would be the "update"
command that would need to get those, since subrepos are only pulled on update.
In any case I'd prefer to leave that for a later patch.
2011-09-29 17:20:04 +02:00
Matt Mackall
31beaa1cd1 merge with crew 2011-12-15 14:24:38 -06:00
Martin Geisler
d6b9b24fa1 merge with stable 2011-12-15 16:26:33 +01:00
Ion Savin
b96d2a90cd annotate: show full changeset hash when invoked with --debug and -c 2011-12-09 14:14:30 +02:00
Matt Mackall
a968007692 merge with stable 2011-12-08 16:01:44 -06:00
Kevin Bullock
49b349ede1 bookmarks: clarify help for use of merge and update 2011-12-07 11:23:13 -06:00
Kevin Bullock
4b1f198355 merge: make 'nothing to merge' aborts consistent
Makes the 'nothing to merge' abort messages in commands.py consistent with
those in merge.py. Also makes commands.merge() and merge.update() use hints.
The tests show the changes.
2011-12-07 11:23:01 -06:00
Kevin Bullock
d434bb6e1a merge: remove excess creation of changectx 2011-12-07 11:22:57 -06:00
Matt Mackall
239b73ab8c bookmarks: mark divergent bookmarks with book@pathalias when source in [paths] 2011-12-07 16:19:39 -06:00
Matt Mackall
e82c2e671f merge with stable 2011-12-05 17:48:40 -06:00