##// END OF EJS Templates
push: return 1 if no changes found (issue3228)...
Matt Mackall -
r16023:90f8b8dd stable
parent child Browse files
Show More
@@ -4426,7 +4426,7 b' def push(ui, repo, dest=None, **opts):'
4426 4426 result = repo.push(other, opts.get('force'), revs=revs,
4427 4427 newbranch=opts.get('new_branch'))
4428 4428
4429 result = (result == 0)
4429 result = not result
4430 4430
4431 4431 if opts.get('bookmark'):
4432 4432 rb = other.listkeys('bookmarks')
@@ -1592,7 +1592,8 b' class localrepository(repo.repository):'
1592 1592 def push(self, remote, force=False, revs=None, newbranch=False):
1593 1593 '''Push outgoing changesets (limited by revs) from the current
1594 1594 repository to remote. Return an integer:
1595 - 0 means HTTP error *or* nothing to push
1595 - None means nothing to push
1596 - 0 means HTTP error
1596 1597 - 1 means we pushed and remote head count is unchanged *or*
1597 1598 we have outgoing changesets but refused to push
1598 1599 - other values as described by addchangegroup()
@@ -1626,7 +1627,7 b' class localrepository(repo.repository):'
1626 1627 if not outgoing.missing:
1627 1628 # nothing to push
1628 1629 scmutil.nochangesfound(self.ui, outgoing.excluded)
1629 ret = 1
1630 ret = None
1630 1631 else:
1631 1632 # something to push
1632 1633 if not force:
@@ -173,6 +173,7 b' Pushing applied patch with --force'
173 173 pushing to ../forcepush2
174 174 searching for changes
175 175 no changes found (ignored 1 secret changesets)
176 [1]
176 177 $ hg phase --draft 'mq()'
177 178 $ hg push --force -r default ../forcepush2
178 179 pushing to ../forcepush2
@@ -98,6 +98,7 b' push from alpha to beta should update ph'
98 98 pushing to ../beta
99 99 searching for changes
100 100 no changes found
101 [1]
101 102 $ hgph
102 103 @ 3 public a-D - b555f63b6063
103 104 |
@@ -372,6 +373,7 b' Push back to alpha'
372 373 pushing to ../alpha
373 374 searching for changes
374 375 no changes found
376 [1]
375 377 $ cd ..
376 378 $ cd alpha
377 379 $ hgph
@@ -555,6 +557,7 b' Pushing to Publish=True (common changese'
555 557 pushing to ../alpha
556 558 searching for changes
557 559 no changes found
560 [1]
558 561 $ hgph
559 562 o 6 public a-F - b740e3e5c05d
560 563 |
@@ -659,6 +662,7 b' Pushing to Publish=True (common changese'
659 662 pushing to ../alpha
660 663 searching for changes
661 664 no changes found
665 [1]
662 666 $ hgph
663 667 o 9 public a-H - 967b449fbc94
664 668 |
@@ -932,6 +936,7 b' check that secret local on both side are'
932 936 pushing to http://localhost:$HGPORT/
933 937 searching for changes
934 938 no changes found
939 [1]
935 940 $ hg phase f54f1bb90ff3
936 941 2: draft
937 942
@@ -116,6 +116,7 b''
116 116 pushing to ../c
117 117 searching for changes
118 118 no changes found
119 [1]
119 120
120 121 $ hg push -r 3 ../c
121 122 pushing to ../c
@@ -185,6 +185,7 b' test pushkeys and bookmarks'
185 185 searching for changes
186 186 no changes found
187 187 updating bookmark foo
188 [1]
188 189 $ hg book -d foo
189 190 $ hg in -B
190 191 comparing with ssh://user@dummy/remote
@@ -96,6 +96,7 b' subrepo paths with ssh urls'
96 96 no changes found
97 97 searching for changes
98 98 no changes found
99 [1]
99 100
100 101 $ cat dummylog
101 102 Got arguments 1:user@dummy 2:hg -R cloned serve --stdio
@@ -51,6 +51,7 b' Both are empty:'
51 51 $ hg push -R empty1 $remote
52 52 pushing to http://localhost:$HGPORT/
53 53 no changes found
54 [1]
54 55 $ tstop
55 56
56 57 Base repo:
@@ -110,6 +111,7 b' Full clone:'
110 111 pushing to http://localhost:$HGPORT/
111 112 searching for changes
112 113 no changes found
114 [1]
113 115 $ cd ..
114 116
115 117 Local is empty:
@@ -140,6 +142,7 b' Local is empty:'
140 142 $ hg push $remote
141 143 pushing to http://localhost:$HGPORT/
142 144 no changes found
145 [1]
143 146 $ hg pull $remote
144 147 pulling from http://localhost:$HGPORT/
145 148 requesting all changes
@@ -184,6 +187,7 b' Local is subset:'
184 187 pushing to http://localhost:$HGPORT/
185 188 searching for changes
186 189 no changes found
190 [1]
187 191 $ hg pull $remote
188 192 pulling from http://localhost:$HGPORT/
189 193 searching for changes
@@ -45,6 +45,7 b' Both are empty:'
45 45 $ hg push -R empty1 $remote
46 46 pushing to http://localhost:$HGPORT/
47 47 no changes found
48 [1]
48 49 $ tstop
49 50
50 51 Base repo:
@@ -104,6 +105,7 b' Full clone:'
104 105 pushing to http://localhost:$HGPORT/
105 106 searching for changes
106 107 no changes found
108 [1]
107 109 $ cd ..
108 110
109 111 Local is empty:
@@ -130,6 +132,7 b' Local is empty:'
130 132 $ hg push $remote
131 133 pushing to http://localhost:$HGPORT/
132 134 no changes found
135 [1]
133 136 $ hg pull $remote
134 137 pulling from http://localhost:$HGPORT/
135 138 requesting all changes
@@ -172,6 +175,7 b' Local is subset:'
172 175 pushing to http://localhost:$HGPORT/
173 176 searching for changes
174 177 no changes found
178 [1]
175 179 $ hg pull $remote
176 180 pulling from http://localhost:$HGPORT/
177 181 searching for changes
General Comments 0
You need to be logged in to leave comments. Login now