# HG changeset patch # User Matt Harbison # Date 2012-09-06 01:26:08 # Node ID 98d6a10bc401977a61bb5a0bdd145c13412ebb55 # Parent 26ebc7f72fe6ab04e66245891622441031929c48 largefiles: preserve exit code from outgoing command (issue3611) This maintains the exit codes documented in commands.py. diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -968,7 +968,7 @@ def getoutgoinglfiles(ui, repo, dest=Non return toupload def overrideoutgoing(orig, ui, repo, dest=None, **opts): - orig(ui, repo, dest, **opts) + result = orig(ui, repo, dest, **opts) if opts.pop('large', None): toupload = getoutgoinglfiles(ui, repo, dest, **opts) @@ -980,6 +980,8 @@ def overrideoutgoing(orig, ui, repo, des ui.status(lfutil.splitstandin(file) + '\n') ui.status('\n') + return result + def overridesummary(orig, ui, repo, *pats, **opts): try: repo.lfstatus = True diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t --- a/tests/test-largefiles.t +++ b/tests/test-largefiles.t @@ -1144,6 +1144,15 @@ vanilla clients locked out from largefil largefiles can be pushed locally (issue3583) $ hg init dest $ cd r4 + $ hg outgoing ../dest + comparing with ../dest + searching for changes + changeset: 0:639881c12b4c + tag: tip + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: m1 + $ hg push ../dest pushing to ../dest searching for changes @@ -1152,6 +1161,13 @@ largefiles can be pushed locally (issue3 adding manifests adding file changes added 1 changesets with 1 changes to 1 files + +exit code with nothing outgoing (issue3611) + $ hg outgoing ../dest + comparing with ../dest + searching for changes + no changes found + [1] $ cd .. #if serve