##// END OF EJS Templates
fetch: fix breakage from mpm....
Vadim Gelfer -
r2822:4f7abf34 default
parent child Browse files
Show More
@@ -0,0 +1,25 b''
1 #!/bin/sh
2
3 HGRCPATH=$HGTMP/.hgrc; export HGRCPATH
4 echo "[extensions]" >> $HGTMP/.hgrc
5 echo "fetch=" >> $HGTMP/.hgrc
6
7 hg init a
8 echo a > a/a
9 hg --cwd a commit -d '1 0' -Ama
10
11 hg clone a b
12 hg clone a c
13
14 echo b > a/b
15 hg --cwd a commit -d '2 0' -Amb
16 hg --cwd a parents -q
17
18 echo % should pull one change
19 hg --cwd b fetch ../a
20 hg --cwd b parents -q
21
22 echo c > c/c
23 hg --cwd c commit -d '3 0' -Amc
24 hg --cwd c fetch ../a
25 ls c
@@ -0,0 +1,27 b''
1 adding a
2 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
4 adding b
5 1:97d72e5f12c7
6 % should pull one change
7 pulling from ../a
8 searching for changes
9 adding changesets
10 adding manifests
11 adding file changes
12 added 1 changesets with 1 changes to 1 files
13 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
14 1:97d72e5f12c7
15 adding c
16 pulling from ../a
17 searching for changes
18 adding changesets
19 adding manifests
20 adding file changes
21 added 1 changesets with 1 changes to 1 files (+1 heads)
22 merging with new head 2:97d72e5f12c7
23 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
24 new changeset 3:5202af1888fa merges remote changes with local
25 a
26 b
27 c
@@ -36,7 +36,7 b" def fetch(ui, repo, source='default', **"
36 if newheads:
36 if newheads:
37 ui.status(_('merging with new head %d:%s\n') %
37 ui.status(_('merging with new head %d:%s\n') %
38 (repo.changelog.rev(newheads[0]), short(newheads[0])))
38 (repo.changelog.rev(newheads[0]), short(newheads[0])))
39 err = repo.update(newheads[0], allow=True, remind=False)
39 err = hg.update(repo, newheads[0], allow=True, remind=False)
40 if not err and len(newheads) > 1:
40 if not err and len(newheads) > 1:
41 ui.status(_('not merging with %d other new heads '
41 ui.status(_('not merging with %d other new heads '
42 '(use "hg heads" and "hg merge" to merge them)') %
42 '(use "hg heads" and "hg merge" to merge them)') %
@@ -211,9 +211,10 b' def clone(ui, source, dest=None, pull=Fa'
211 # update/merge/revert
211 # update/merge/revert
212
212
213 def update(repo, node, allow=False, force=False, choose=None,
213 def update(repo, node, allow=False, force=False, choose=None,
214 moddirstate=True, forcemerge=False, wlock=None, show_stats=True):
214 moddirstate=True, forcemerge=False, wlock=None, show_stats=True,
215 remind=True):
215 return merge.update(repo, node, allow, force, choose, moddirstate,
216 return merge.update(repo, node, allow, force, choose, moddirstate,
216 forcemerge, wlock, show_stats)
217 forcemerge, wlock, show_stats, remind)
217
218
218 def verify(repo):
219 def verify(repo):
219 """verify the consistency of a repository"""
220 """verify the consistency of a repository"""
General Comments 0
You need to be logged in to leave comments. Login now