Commit Graph

15 Commits

Author SHA1 Message Date
Adrian Buehlmann
a482b04850 hg.clone: report branch name on update 2009-10-16 23:57:34 +02:00
Adrian Buehlmann
153675561e clone: print "updating working directory" status message
With this change, "hg clone" looks like this:

% hg clone http://example.com/repo/big big
requesting all changes
adding changesets
adding manifests
adding file changes
added XXX changesets with XXX changes to XXX files
updating working directory
XXX files updated, XXX files merged, XXX files removed, XXX files unresolved

So the user sees

% hg clone http://example.com/repo/big big
requesting all changes
adding changesets
adding manifests
adding file changes
added XXX changesets with XXX changes to XXX files
updating working directory

while Mercurial is writing to disk to populate the working directory

With this change, "hg clone" looks like this:

% hg clone big big-work
updating working directory
XXX files updated, XXX files merged, XXX files removed, XXX files unresolved
2008-03-21 14:52:24 +01:00
Patrick Mezard
c9215420e8 Display symlink or executable bit with manifest -v
New output looks like:

644   a
755 * b/a
644 @ l
2007-10-06 22:30:22 +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
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
b12dc2fafb Clean up some merge logic
- rename mode to branch_merge
- use explicit update mode
- use negative mtime for updates that set mtime
- expand some cryptic variable names
- elaborate merge dirstate comments
- remove redundant manifest lookup for non-merge case
- remove impossible merge case
- fix up test cases
2005-08-23 02:19:38 -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
Thomas Arendsen Hein
87aabef405 Updated output of tests. 2005-07-29 15:21:02 +01:00
mpm@selenic.com
907e714bb6 Fix up test results
No more errnos
diff | sed changes
.out message ok
2005-07-26 19:23:59 -08:00
mpm@selenic.com
3a08ca5eaa Update tests to use commit -m and default -u
manifest hash: 6e4385453843031a712005a320d6000595b40d05
2005-07-21 15:05:17 -05:00
Andrew Thompson
62b3015c0d Remove references to 'cloning by hardlink' from tests.
# HG changeset patch
# User Andrew Thompson <andrewkt@aktzero.com>
# Node ID c12a49438454e9782ff7eb9b11841e7b9406fbab
# Parent  0bda45294416406d4c6fbaf1cb643dd0bf6b3a16
Remove references to 'cloning by hardlink' from tests.
2005-07-10 16:17:05 -08:00
Matt Mackall
cc73c7d4df Update tests 2005-07-06 22:27:25 -08:00
maf46@burn.cl.cam.ac.uk
7b2a775c50 Fix zombie files in merge
# HG changeset patch
# User maf46@burn.cl.cam.ac.uk
# Node ID 57667c9b93a5a743e4629d15a0e6bd76699130c3
# Parent  4309b0a5a6010dd2e5811b77d2bc29a51acf290f

Fix zombie files in merge

Keir Fraser observed the following:

> I made a small test case that illustrates the bug in merging changesets
> with 'hg remove's in them:
>
> 1. Create a repository A containing files foo & bar.
> 2. Create clone called B.
> 3. A removes file bar, and commits this removal.
> 4. B edits file foo, and commits this edit.
>
> Now, if B:
>   # hg pull ../A; hg update -m; hg commit
> Then bar remains deleted.
>
> If A:
>   # hg pull ../B; hg update -m; hg commit
> Then bar is resurrected!
>
> It looks as though, when you merge across a branch, any deletions in
> your own branch are forgotten.
> ...
> Fixing this is a must, as zombie files are a real pain. :-)

Keir later patched our local copy of hg as shown below, which fixes
the problem.  I've also enclosed a test which captures the test Keir
outlined...

Files deleted on a branch should not automatically reappear in a merge

Patch notes:
 1. The first chunk does not change behaviour, but cleans up the code
    to more closely match check of 'force' in the second chunk. I
    think it makes the code clearer.
 2. The second chunk fixes two bugs --
    i.  If we choose to keep a remotely-changed locally-deleted file,
        then we need to 'get' that file. If we choose to delete it
        then no action need be taken (it is already deleted in the
        working manifest). Without this fix, choosing to delete would
        get a Python traceback.
    ii. The test for whether the file was remotely-created is
        insufficient. It is only true if f is not in the common
        ancestor. Otherwise the file was deleted locally, and should
        remain deleted. (this is the most important fix!)


Index: hg/tests/test-merge6
===================================================================
2005-07-04 12:38:34 -08:00