Show More
@@ -983,6 +983,7 b' def bundle(ui, repo, fname, dest=None, *' | |||
|
983 | 983 | common = [repo.lookup(rev) for rev in base] |
|
984 | 984 | heads = revs and map(repo.lookup, revs) or revs |
|
985 | 985 | cg = repo.getbundle('bundle', heads=heads, common=common) |
|
986 | outgoing = None | |
|
986 | 987 | else: |
|
987 | 988 | dest = ui.expandpath(dest or 'default-push', dest or 'default') |
|
988 | 989 | dest, branches = hg.parseurl(dest, opts.get('branch')) |
@@ -994,11 +995,7 b' def bundle(ui, repo, fname, dest=None, *' | |||
|
994 | 995 | force=opts.get('force')) |
|
995 | 996 | cg = repo.getlocalbundle('bundle', outgoing) |
|
996 | 997 | if not cg: |
|
997 |
if |
|
|
998 | repo.ui.status(_("no changes found but %i secret changesets\n") | |
|
999 | % len(outgoing.excluded)) | |
|
1000 | else: | |
|
1001 | ui.status(_("no changes found\n")) | |
|
998 | scmutil.nochangesfound(ui, outgoing and outgoing.excluded) | |
|
1002 | 999 | return 1 |
|
1003 | 1000 | |
|
1004 | 1001 | bundletype = opts.get('type', 'bzip2').lower() |
@@ -10,7 +10,7 b' from i18n import _' | |||
|
10 | 10 | from lock import release |
|
11 | 11 | from node import hex, nullid |
|
12 | 12 | import localrepo, bundlerepo, httprepo, sshrepo, statichttprepo, bookmarks |
|
13 | import lock, util, extensions, error, node | |
|
13 | import lock, util, extensions, error, node, scmutil | |
|
14 | 14 | import cmdutil, discovery |
|
15 | 15 | import merge as mergemod |
|
16 | 16 | import verify as verifymod |
@@ -511,11 +511,7 b' def _outgoing(ui, repo, dest, opts):' | |||
|
511 | 511 | force=opts.get('force')) |
|
512 | 512 | o = outgoing.missing |
|
513 | 513 | if not o: |
|
514 |
if outgoing.excluded |
|
|
515 | repo.ui.status(_("no outgoing changes but %i secret changesets\n") | |
|
516 | % len(outgoing.excluded)) | |
|
517 | else: | |
|
518 | ui.status(_("no changes found\n")) | |
|
514 | scmutil.nochangesfound(repo.ui, outgoing.excluded) | |
|
519 | 515 | return None |
|
520 | 516 | return o |
|
521 | 517 |
@@ -1629,11 +1629,7 b' class localrepository(repo.repository):' | |||
|
1629 | 1629 | |
|
1630 | 1630 | if not outgoing.missing: |
|
1631 | 1631 | # nothing to push |
|
1632 |
if outgoing.excluded |
|
|
1633 | msg = "no changes to push but %i secret changesets\n" | |
|
1634 | self.ui.status(_(msg) % len(outgoing.excluded)) | |
|
1635 | else: | |
|
1636 | self.ui.status(_("no changes found\n")) | |
|
1632 | scmutil.nochangesfound(self.ui, outgoing.excluded) | |
|
1637 | 1633 | ret = 1 |
|
1638 | 1634 | else: |
|
1639 | 1635 | # something to push |
@@ -10,6 +10,14 b' import util, error, osutil, revset, simi' | |||
|
10 | 10 | import match as matchmod |
|
11 | 11 | import os, errno, re, stat, sys, glob |
|
12 | 12 | |
|
13 | def nochangesfound(ui, secretlist=None): | |
|
14 | '''report no changes for push/pull''' | |
|
15 | if secretlist: | |
|
16 | ui.status(_("no changes found (ignored %d secret changesets)\n") | |
|
17 | % len(secretlist)) | |
|
18 | else: | |
|
19 | ui.status(_("no changes found\n")) | |
|
20 | ||
|
13 | 21 | def checkfilename(f): |
|
14 | 22 | '''Check that the filename f is an acceptable filename for a tracked file''' |
|
15 | 23 | if '\r' in f or '\n' in f: |
@@ -44,7 +44,7 b' Bundle and phase' | |||
|
44 | 44 | $ hg -R test phase --force --secret 0 |
|
45 | 45 | $ hg -R test bundle phase.hg empty |
|
46 | 46 | searching for changes |
|
47 |
no changes found |
|
|
47 | no changes found (ignored 9 secret changesets) | |
|
48 | 48 | [1] |
|
49 | 49 | $ hg -R test phase --draft -r 'head()' |
|
50 | 50 |
@@ -405,7 +405,7 b' test outgoing with secret changesets' | |||
|
405 | 405 | $ hg -R test-dev outgoing test |
|
406 | 406 | comparing with test |
|
407 | 407 | searching for changes |
|
408 |
no |
|
|
408 | no changes found (ignored 5 secret changesets) | |
|
409 | 409 | [1] |
|
410 | 410 | $ hg -R test-dev phase --draft -r 'head()' |
|
411 | 411 |
@@ -149,7 +149,7 b' All secret' | |||
|
149 | 149 | $ hg push -r . ../forcepush2 |
|
150 | 150 | pushing to ../forcepush2 |
|
151 | 151 | searching for changes |
|
152 |
no changes |
|
|
152 | no changes found (ignored 1 secret changesets) | |
|
153 | 153 | |
|
154 | 154 | some draft |
|
155 | 155 | |
@@ -183,7 +183,7 b' Pushing applied patch with --force' | |||
|
183 | 183 | $ hg push --force -r default ../forcepush2 |
|
184 | 184 | pushing to ../forcepush2 |
|
185 | 185 | searching for changes |
|
186 |
no changes |
|
|
186 | no changes found (ignored 1 secret changesets) | |
|
187 | 187 | $ hg phase --draft 'mq()' |
|
188 | 188 | $ hg push --force -r default ../forcepush2 |
|
189 | 189 | pushing to ../forcepush2 |
General Comments 0
You need to be logged in to leave comments.
Login now