Commit Graph

12 Commits

Author SHA1 Message Date
Benoit Boissinot
fc997dfbf2 fix calculation of new heads added during push with -r
fix issue450
2006-12-17 05:00:22 +01:00
Thomas Arendsen Hein
f6d571d204 Don't report an error when closing heads during local push (issue387) 2006-12-05 23:25:28 +01:00
Matt Mackall
303ec3f442 correct remote heads test in prepush 2006-11-19 16:32:36 -06:00
Thomas Arendsen Hein
56a3c0876e Report on push/pull if heads are merged, too, like for new heads.
Use case: If a remote repo has two heads and I _want_ to merge them, I merge
and push. Meanwhile someone else pushed on top of one of the heads. He won't
get a warning, because he doesn't create a new head, I won't notice that I
don't close a head, because I don't get a message telling me.
2006-06-10 17:39:29 +02:00
Thomas Arendsen Hein
46d0753ec7 Make hg update more verbose by default (issue12)
(including small changes to revert and backout to not show these stats
 with the exception of backout --merge)

Show update stats (unless -q), e.g.:
K files updated, L files merged, M files removed, N files unresolved

Inform the user what to do after a merge:
(branch merge, don't forget to commit)

Inform the user what to do if a branch merge failed:
There are unresolved merges, you can redo the full merge using:
  hg update -C X
  hg merge Y

Inform the user what to do if a working directory merge failed:
There are unresolved merges with locally modified files.
2006-05-02 18:44:02 +02:00
Matt Mackall
2cd0e1932b Revert push new heads logic
This breaks push -r's new head detection but fixes the common case.

For now we'll assume that someone doing push -r knows what they're doing.
2006-04-21 16:30:23 -05:00
Thomas Arendsen Hein
7563660d88 Fix hg push and hg push -r sometimes creating new heads without --force.
Fixing issue179.

The algorithm checks if there not more new heads on the remote side than heads
which become non-heads due to getting children.

Pushing this repo:
    m
   /\
3 3a|
|/  /
2 2a
|/
1

to a repo only having 1, 2 and 3 didn't abort requiring --force before.

Added test cases for this and some doc strings for used methods.
2006-03-29 22:35:21 +02:00
Vadim Gelfer
dfe0de6855 add merge command. means same thing as "update -m".
repo.addchangegroup method now returns number of heads modified and added,
so command line can tell whether update or merge needed.  this makes
tiny change to ssh wire protocol, but change is backwards compatible.

pull command now returns 0 if no changes to pull.
2006-03-29 10:27:16 -08:00
mpm@selenic.com
4eda11f6dc Update tests 2005-08-24 19:19:35 -07:00
mpm@selenic.com
cf3b118558 Fix long-standing excessive file merges
Since switching to the multihead approach, we've been creating
excessive file-level merges where files are marked as merged with
their ancestors.

This explicitly checks at commit time whether the two parent versions
are linearly related, and if so, reduces the file check-in to a
non-merge. Then the file is compared against the remaining parent,
and, if equal, skips check-in of that file (as it's not changed).

Since we're not checking in all files that were different between
versions, we no longer need to mark so many files for merge. This
removes most of the 'm' state marking as well.

Finally, it is possible to do a tree-level merge with no file-level
changes. This will happen if one user changes file A and another
changes file B. Thus, if we have have two parents, we allow commit to
proceed even if there are no file-level changes.
2005-08-21 21:59:55 -07:00
mpm@selenic.com
ea7bd9ea6f run-tests: remove '+ hg' trick
This was causing me a fair amount of debugging confusion. Let's just
forget it entirely. Updated tests to match.
2005-08-16 19:03:01 -08:00
mpm@selenic.com
7c0d9a3cf7 Warn on pushing unsynced repo or adding new heads
By popular demand
2005-08-01 23:17:22 -08:00