##// END OF EJS Templates
Update on pull -u when heads were closed (fixes issue666)....
Thomas Arendsen Hein -
r5080:73fdc8bd default
parent child Browse files
Show More
@@ -0,0 +1,29 b''
1 #!/bin/sh
2 #
3
4 hg init t
5 cd t
6 echo 1 > foo
7 hg ci -Am m
8
9 cd ..
10 hg clone t tt
11 cd tt
12 echo 1.1 > foo
13 hg ci -Am m
14
15 cd ../t
16 echo 1.2 > foo
17 hg ci -Am m
18 echo % should fail
19 hg pull -u ../tt
20
21 cd ../tt
22 echo % should fail
23 hg pull -u ../t
24 HGMERGE=true hg merge
25 hg ci -mm
26
27 cd ../t
28 echo % should work
29 hg pull -u ../tt
@@ -0,0 +1,31 b''
1 adding foo
2 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3 % should fail
4 pulling from ../tt
5 searching for changes
6 adding changesets
7 adding manifests
8 adding file changes
9 added 1 changesets with 1 changes to 1 files (+1 heads)
10 not updating, since new heads added
11 (run 'hg heads' to see heads, 'hg merge' to merge)
12 % should fail
13 pulling from ../t
14 searching for changes
15 adding changesets
16 adding manifests
17 adding file changes
18 added 1 changesets with 1 changes to 1 files (+1 heads)
19 not updating, since new heads added
20 (run 'hg heads' to see heads, 'hg merge' to merge)
21 merging foo
22 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
23 (branch merge, don't forget to commit)
24 % should work
25 pulling from ../tt
26 searching for changes
27 adding changesets
28 adding manifests
29 adding file changes
30 added 1 changesets with 1 changes to 1 files (-1 heads)
31 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -2024,7 +2024,7 b' def postincoming(ui, repo, modheads, opt'
2024 2024 if modheads == 0:
2025 2025 return
2026 2026 if optupdate:
2027 if modheads == 1:
2027 if modheads <= 1:
2028 2028 return hg.update(repo, None)
2029 2029 else:
2030 2030 ui.status(_("not updating, since new heads added\n"))
General Comments 0
You need to be logged in to leave comments. Login now