This appeal is from a judgment of the district court overruling and setting aside a prior decision of the State Land Commissioner. The cause was heard de novo, as *186provided by statute, in the district court, and exclusively upon the record and evidence before the said Commissioner. The controversy grows out of the action of the said Commissioner in executing a contract to appellee Dasburg upon a certain tract of land in Santa Fe county upon which appellant Railway Company had theretofore made improvements in the form of a diversion dam and water pipe line to serve its own facilities and other purposes at Lamy, New Mexico. Appellant company contends, incidental to other defenses, that it has prior rights to and upon the lands occupied by such water supply facilities by virtue of the approval by the Territorial Engineer on November 24, 1908, of its application to appropriate water upon the stream in question and construct such works, all as provided by Chap. 49, of the Laws of 1907, the Territorial Water Code. The Commissioner, also by order to show cause, issued at the same time the contest was filed, instituted a proceeding to cancel the lease for fraud and mistake. This was heard simultaneously with the contest instituted before the Commissioner by the Railway Company. The appeal grows out of the contest proceeding, not out of the proceeding instituted by the Commissioner.
Appellant company filed its contest in 1936 seeking to have the Commissioner revoke and set aside the contract with appellee to purchase the land in question, because of fraud. This contract so attacked was made and entered into by the Commissioner, on behalf of the state, and appellee Dasburg, with payments for the purchase price being distributed, according to the practice, over a period of 10 years. There is no attack upon the authority to sell the land to appellee or upon any other feature of the contract to purchase made by appellee under the rules and regulations of the Commissioner, except as it is controlled by the acts of fraud or mistake.
Had a true statement been made in such application in the first instance, showing the improvements claimed by the company,, no contract would have been made, appellant contends. The substance of the representations made by appellee in said application was that there were no improvements, upon said land at the time of the application, when in truth and in fact appellant company had, some years before, made extensive improvements on a small portion of the tract in question.
Whether such improvements will be protected as against rights acquired by appellee under his contract of purchase is the important question in this case. Appellant believes itself to be protected under the provisions of Chap. 49, the Laws of 1907 which authorize right-of-way upon public lands for the development and transmission of water. Appellee contends that neither this act nor any regular and lawful appropriation of water through proceedings in the Territorial Engineer’s office will avail it, and, in addition, urges other defenses to the company’s claim.
The application of appellant company was. to divert, store and use from January 1st to December 31st of each year, 0.804 acre feet *187•of water from the Rio del Apache, or Indian creek, a tributary of the Rio Galisteo. 'The evidence shows that water is available in this stream for only a few months in the ■year, and that but little use has b*een made •of the dam facilities and pipe line in the last few years, and but little, if _ any, improvement has been made in the works since their completion some 25 years ago, If such facts could make any difference.
In 1936, and some six years after the contract for purchase had been entered into, appellant company filed a contest before the State Land Commissioner calling his attention to the company’s improvements upon the land in question, pointing out what it considered to be false statements of fact in appellee’s application to purchase, and asking for a cancellation of the contract of 1930 between the state and appellee. Upon hearing, where testimony was taken, the then Commissioner, Hon. Frank Vesely, did modify and amend the contract to purchase by taking from the area theretofore contracted to be sold to appellee, sufficient land to,provide right-of-way for a pipe line, and including the dam site area, but refused to find fraud was involved. There is no suggestion in the record before the Commissioner, including his findings in the matter, that there was a wilful misstatement of facts concerning appellant’s improvements. The trial court likewise found appellee exercised entire good faith in endeavoring to discover improvements upon the land, and further found that the land office officials, upon investigation, concurred in appellee’s view that the section of land involved was free of improvements. Notice was given and an appeal was taken by Dasburg to the District court of Santa Fe county from the order of the Commissioner so modifying and amending his application to purchase, as provided by Sec. 132-184, N.M.Stat. Ann., Comp. Upon trial de novo the district court overruled the contention of appellant company and the said Commissioner' and reinstated the contract of Dasburg as theretofore made.
The company brings this appeal assigning several errors, but the principal arguments are submitted under two points. Point 1 challenges the finding and decision of the court to the effect that the application, appraisement and other proceedings in connection with the contract of purchase were regular and as required by law and the rules and regulations of the Commissioner; that the applicant made honest and good-faith efforts to ascertain whether there were improvements upon the land and that the Commissioner was without authority to cancel or modify the- contract. Point 2 challenges the court’s finding and decision to the effect that the Railway Company had not acquired and had no right-of-way or other right, title or interest in the land and that it was guilty of laches in bringing the contest some six years after the Dasburg contract had been made and he had taken possession of the land. Appellant denies that this is exclusively a proceeding to determine its own rights, although conceding that the Commissioner so treated the case throughout; and suggesting further that *188the district court perhaps decided the case upon the question of whether or not the Railway Company had acquired any rights, title or interest in the land.
Appellant contends further, that notwithstanding any right which the company may have in the premises, and benefits which may accrue to it if the Commissioner’s decision is sustained, that nevertheless, the Commissioner, in deciding to cancel or amend the contract of purchase, was acting under a broad discretion lodged in him by the Constitution and the laws of the state and that the courts are without jurisdiction to overrule his reasonable exercise thereof. Sec. 132-187, N.M.Stat.Ann., 1929 Comp., gives the Commissioner power to “cancel any lease, contract or other instrument executed by him which shall have been obtained by fraud or executed through mistake or without authority of law.”
Sec. 49 of the Laws of 1907, approved March 19, 1907, created the office of Territorial Engineer and provided for the method of making application and securing permit to divert and appropriate unappropriated waters within the state. Counsel for appellant apparently concedes that compliance with this law, which appellee agrees was in all respects regular, represents all that was done' by it in securing any rights in or upon the land in question. If is not disputed that appellant made no effort to secure a right-of-way for dam or pipe line upon this public land under the provisions of Chap. 104 of the Laws of 1907, passed and approved March 21, 1907. This latte-r act (Sec. 30) makes ample provisions for the securing of right-of-way upon or across any' portion of the territorial lands for any ditch, reservoir, railroad, public highway, telegraph or telephone line. Sec. 22 thereof makes it unlawful for any person, corporation or association of persons to “enter upon or use, for any purpose whatsoever,” any land belonging to the territory without having “first leased or purchased said land, or in some other manner obtained a legal right so to do from the commissioner of public lands of said Territory in accordance with the terms of this act and the Act of Congress under and by virtue of which title thereto vests in said Territory; * *
Appellee claims, and the trial court apparently adopted the theory, that the company was thus a trespasser upon the lands, and even had he known of the improvements which had been constructed by it prior to the making of the application to purchase, that he would not be bound to-take notice thereof, since it was not a lessee of such lands, obtained from the Commissioner no right to use the same and was. therefore a trespasser whose right to have compensation for improvements made upon public land would not be protected. See Sec. 6, Chap. 73, Laws 1915 (Sec. 132-162, N.M.Stat.Ann.Comp.)
If appellant relies upon any right acquired by virtue of its having secured through the Territorial Engineer a right to construct the works and divert and transport the water, as a right in the public land in question, suggests appellee — and he contends the Water Code does not give such *189right — then, in any event, Chap. 104, supra, being enacted subsequently to such Code (Chap. 49, supra), in case of any conflict, the subsequently-enacted law would control.
We are constrained to hold with the trial court that absent some contract or agreement with the Commissioner, appellant company was a trespasser upon the land in question. It obviously stopped short of its duty when it merely secured permission to divert, impound and transmit water. It yet must secure the right-of-way for the dam, pipe line and other facilities required for the project. Section 30 of Chap. 104 further provides: Section 30: “The commissioner of public lands may grant the right-of-way upon or across any portion of the territorial lands, upon such terms as he may deem for the best interests of the Territory, not inconsistent with the provisions of this act or of the Act of Congress under and by virtue of which title to said lands hath heretofore or may hereafter vest in the Territory of New Mexico, for any ditch, reservoir, railroad, public highway, telegraph or telephone line.”
Appellant relies upon Sec. 70 of Chap. 49 of the Laws of 1907, supra, as authority for claiming right-of-way was granted to it when it was granted its permit by the engineer to impound and divert the water at the place in question. This section in part reads: “There is hereby granted upon and over all the lands now or hereafter belonging to the Territory of New Mexico, a right-of-way for canals, acequias, storage reservoirs or other water works, to any person, firm, association or corporation, desiring to construct and use the same, and who shall comply with the provisions of this act. * * * ”
Provision is further made in this section for the filing of the application to construct such canals, acequias, etc., for inspection by the Territorial Engineer and, eventually for the issuance of the permit therefor. No provision is made for payment for the use of such right-of-way.
Chap. 104 of the Laws of 1907, supra, thereafter and at the same session enacted and which became law two days subsequent to the effective date of Chap. 49, in addition to a repealing clause directed to certain specific acts considered in conflict therewith carried the conventional general repealing clause which stated “and all other acts and parts of acts in conflict herewith are hereby repealed.” Obviously, Sec. 70 of Chap. 49, although enacted only two days earlier, was thus repealed. Clearly, both the Territorial Engineer and the Commissioner of Public Lands could not have such complete jurisdiction over all such public lands.
Another consideration to be noted, and which strengthens our holding that there was in fact such a repeal, is the absence of Sec. 70 from the subsequent compilation and codification of 1915 — and it likewise does not appear in the next compilation, that of 1929. No specific repealing acts are to be found in any legislation between the periods of 1907 and 1915. The compilers and codifiers of the 1915 Code, and the 1915 Legislature in adopting the work, evidently *190gave the same interpretation as to the repeal of this Sec. 70 as we here employ.
It is true that any amendment of the act subsequent to any rights of appellant attaching to the land in 1908, when they did attach if at all, would not affect such right; but we hold no right attached. We cite the omission from the compilation merely as affording additional support to our own appraisal —that there being a conflict between the two acts in question, the provision of the latter act controls and said Sec. 70 was thereby repealed.
The codification of 1915 was enacted with the purpose of harmonizing conflicting sections, and the entire Code was enacted as statutory law by the 1915 legislative session. See Code 1915, page 1665; N.M. Stat.Ann.Comp.1929 sec. 138-101. Every section from the first to the last is held to be enacted by the act. It is immaterial as to the source of the material included in the act, whether coming from old statutes, decisions of the court, or whether the matter be entirely new. Ex parte Bustillos, 26 N.M. 449, 450, 194 P. 886. It was, of course, the purpose of the Legislature to continue in force all statutes so far as necessary to afford protection to parties who had initiated rights under such statutes. This is shown by the language of the saving clause. Harris v. Friend, 24 N.M. 627, 635, 175 P. 722.
Denial of appellant’s right is based, not upon the treatment of the conflicting statutes by the 1915 Code, but upon the fact that Sec. 70 in question was repealed by said Chap. 104, before any rights of appellant had been initiated. Appellant secured approval of his application from the State Engineer, November 24, 1908.
Going to the question of whether the Commissioner could now, in 1936, undertake to so modify or amend the contract of appellee and at the same time convey or dispose of any portion of such public lands as was attempted in his order so set aside by the trial court, we come to a consideration of other factors. We noticed in Lea County Water Co. v. Reeves, 43 N.M. 221, 89 P.2d 607, that provision was made by Chap. 82 of the Laws of 1912, (Sec. 132-154, supra) for granting of right-of-way and easements by the Commissioner over state lands when we held that the holder of the grazing lease took subject to this paramount right. This section reads: “The commissioner may grant rights of way and easements over, upon or across state lands for public highways, railroads, tramways, telegraph, telephone and power lines, irrigation works, mining, logging and for other purposes, upon payment by the grantee or grantees of the price fixed by the commissioner, which shall not be less than the minimum price for the lands, used, as fixed by law.”
Unless Chap. 49 Laws of 1907 gave it, it is difficult to understand how it can be said that appellants could claim the right to use or own the land in question or right-of-way thereupon without complying with the clear mandate of this statute, which is in line with the requirement of the En*191abling Act, that a price must be paid therefor.
Appellee points out that Sec. 36, within the boundaries of which the land in question lies, was, with certain other sections in each township, confirmed to the state of New Mexico by Sec. 10 of the Enabling Act as a trust for the particular benefit of the common school fund, and that the Commissioner is therefore prohibited from disposing of such lands in whole or in part in any manner other than as provided by such Enabling Act. The act sets up the trust, provides for the disposition of these lands only in the manner provided by the act, confines the disposition thereof by “sale, lease, conveyance, or contract” as therein provided, and makes null and void any other manner of disposition, notwithstanding any contrary provision in either the Constitution or laws of the state. The lands so transferred and confirmed were hedged about with the strictest precautions as to alienation, in the interest of the trust they were intended to serve. For a discussion of and decisions upon various phases of the problems that have arisen over this trust, see State ex rel. Otto v. Field, infra; State v. Llewellyn, 23 N.M. 43, 167 P. 414; Elliot v. Rich, 24 N.M. 52, 172 P. 194; Dallas v. Swigart, 24 N.M. 1, 172 P. 416; American Mortg. Co. v. White, 34 N.M. 602, 287 P. 702; Hart v. Walker, 40 N.M. 1, 52 P.2d 123; Lea County Water Co. v. Reeves, 43 N.M. 221, 89 P.2d 607; Terry v. Midwest Refining Co., 10 Cir., 64 F.2d 428.
Appellee argues that to permit tlie use of the state lands in any other method than through sale, contract to sell or lease for value by the State Land Commissioner and as provided by the said organic act and our Constitution would he violative of both instruments and therefore a nullity. The Constitution (Sec. 2, Art. XIII) provides: “The commissioner of public lands shall select, locate, classify, and have the direction, control, care and disposition of all public lands, under the provisions of the acts of congress relating thereto and such regulations as may be provided by law.”
We said in State ex rel. Otto v. Field, 31 N.M. 120, 154, 241 P. 1027, 1041: “What was the object to be accomplished by the grant to the state of these lands and by our public land legislation ? Unquestionably the object in the grant of lands to the state, and the constitutional and statutory provisions relative thereto, was the augmentation of the school fund of the state.”
The Commissioner has the power to alienate these particular public lands which are held in trust for the public schools within the limits, and under the terms, of the Enabling Act, the Constitution and the laws of the state; but no right to such lands can be acquired by a circumventing and or by any indirect method such as the Commissioner attempted in 1936.
The Commissioner now, under statehood, has "absolute dominion” over state lands. State ex rel Otto v. Field, supra. Appellant urges, therefore, that any legislative attempt to provide for an appeal to the district court and trial de novo of such questions as are here presented *192where the “discretion” of the Commissioner is involved, is unconstitutional. We find no merit in this contention. The appeal granted to the district court to try de novo is authorized in plain language. It was never intended that such complete control of the lands by the Commissioner would place any unlawful acts of his beyond the power of the court to correct. State ex rel. Walker v. Hinkle, 37 N.M. 444, 24 P.2d 286.
Although in this contest the Railway Company, and not the state, is the party seeking to uphold the Commissioner’s ruling, in modifying and amending appellee’s lease, counsel for the company nevertheless appears to look upon this appeal as bringing up for review a controversy in which the state is, or should be, interested. It will be noticed in this connection, however, that the Commissioner from whose decision the appeal was taken for trial de novo in the district court, refused to find fraud practiced on the part of appellee Dasburg, and refused to declare cancellation of the contract. He apparently held that appellee had done all that a prudent person could or should have done under the circumstances; but, that nevertheless in view of the extensive improvement made by the company, he should find some equitable way of protecting this investment, however irregularly made. In this the Commissioner was in error.
A rescission of a contract such as this must be as to' the whole or none. See 6 R.C.L. Par. 321, Contracts; 13 C.J. 623; 17 C.J.S., Contracts, § 440 ; 66 C.J. 733; and the consideration must be returned. Mutual mistake — and it could be no more under the evidence and the findings of either the Commissioner or the court — would require the return of the purchase price, certainly, if there could be a cancellation at all.
It is true, partial rescission is sometimes sustained, but is not allowable under the circumstances here. It is not enough to say that this part of the land arbitrarily cut out of appellee’s contract was not the entire consideration moving him to purchase; it is not enough that other valuable land supporting even the larger part of the consideration to be paid, is left him. When we say that the contract is not divisible, as we do, the ordinary rule, that “* * * one who has sufficient cause to rescind the contract for fraud must rescind the whole or none,” prevails. 6 R.C.L. 936, cited by us in Ford v. Norton et al., 32 N.M. 518, 522, 260 P. 411, 412, 55 A.L.R. 261, where we dealt with an attempted partial rescission upon the theory of the contract being separable. Appellee may not have been interested in the land without the area excluded. This may be valuable because of its touching upon Apache Canyon. In any event the court cannot inquire into the conflicting appraisals which parties put upon such considerations.
Conceding, for the purpose of argument, that a finding of fraud or mutual mistake might have justified a complete cancelation with restoration of the purchase price to appellee, obviously there could not be a par*193tial cancelation of such a contract, or a modification or amendment thereof such as was attempted. Certainly where no fraud was practiced and where the mistake rested equally, if not entirely, upon the Commissioner himself, a cancelation without return of purchase money could not be sustained. See United States v. Budd, C.C., 43 F. 630, affirmed by U. S. Supreme Court in United States v. Budd, 144 U.S. 154, 12 S.Ct. 575, 36 L.Ed. 384, and United States v. White, C.C., 17 F. 561. There is no finding of fraud or perjury which would justify cancelation with forfeiture of purchase price as is held to be proper under the federal statute pertaining to cancelation of patents to public lands. United States v. Minor, 114 U.S. 233, 5 S.Ct. 836, 29 L.Ed. 110.
New Mexico has no forfeiture statute, and it is clear that in the absence of such, any effort on the part of the state to cancel appellee’s contract, would, under the circumstances, have to be accompanied by a return or offer to return-to appellee the purchase price paid.
The Commissioner decided there should be no cancelation." Appellant, not a party to the state’s case initiated by the said order to show cause why the contract to purchase should not be canceled, is not in,a position, in any event, to urge upon this court a judgment directing such cancelation. We said in Hart v. Walker, 40 N.M. 1, 52 P.2d 123, 125: “If the leases were obtained by fraud and are voidable by reason of false affidavits and appraisements in appellee’s application, it is not a matter to be settled in this suit, as appellants have no claim on the land; but that is a matter between the state and the appellee. Ample provision is made by law to test the question of fraud by special proceeding before the commissioner of public lands, but not by appellants. Section 132-187 Comp.St.1929.”
What we there said seems to' be conclusive upon the question here. The Commissioner, at the instigation of the appellant company, started an independent proceeding on behalf of the state, and, under the provisions of the last above-quoted statute, for the cancelation of the Dasburg contract to purchase. This was heard simultaneously with appellant’s contest before the Commissioner. Sec. 132-162, N.M. Stat.Ann.1929 Comp., governs contests. Appellant was not, of course, a party to the proceeding to cancel and the state is not a party to this appeal. Had the Commissioner, in the state’s proceeding, canceled and offered to return the purchase price, and an appeal from that action had been taken, the question of correctness of the Commissioner’s act would have then been before us. But such is not the case. Appellant, therefore, finds itself in the position that it cannot, in its contest, urge that appellee’s contract should have been canceled for fraud or mistake. “That is a matter between the state and the appellee.” Hart v. Walker, supra. And, it cannot here question the refusal of the Commissioner to find that fraud existed and his failure to cancel therefor, because appellant was not a party to that proceeding.
*194The Commissioner, who acted upon the Dasburg application in 1930, was doubtless relying also, as he properly could, upon the provisions of Sec. 132-162, N.M. Stat.Ann.1929 Comp., which require payment for improvements at their appraised value, only to any lessee of state lands. There is no authority for requiring payment to any one except a lessee, appellee points out, and, therefore, since he was not required to.pay for a trespasser’s improvements, if under the circumstances of their condition of usability at the time in question it could be said that these were improvements, he was not obliged to take notice thereof in his application to purchase the land. We agree with this contention.
Appellee points out that in no event is he benefited by the so-called “improvements”. The land involved cannot be irrigated through appellant’s facilities, he says, because the water diverted would not belong to the owner of the land. Appellant has acquired this water under its filing. He says these facilities represent for him no improvement to the area upon which they stand, and correctly suggests that appellant cannot be denied its right to divert and use the water, after it has secured a sufficient right-of-way by agreement with the landowner or by condemnation; but that it must get title in a regular and legal way, which ought to present no great difficulty.
It appears, therefore, that the only question properly before this court is whether the Commissioner was correct in modifying or amending appellee’s contract through elimination therefrom of a portion of the lands upon which the improvements were located, and continuing the contract in force as to the remainder. The modification was over the protest of appellee, and, as we have pointed out, it was, under the circumstances, beyond the power of the Commissioner — and it would have been, likewise, beyond the power of the court— to so act. As we have said, it cannot be urged that appellee would necessarily have been interested in the purchase only of that portion of the land left him after the Commissioner had arbitrarily taken out perhaps a valuable part of it for the right-of-way. This was an arbitrary modification and making of a new contract for the parties which cannot be sustained.
The district court was correct in its holding. The contract of appellee is enforceable against any claim appellant has advanced. The Commissioner was without authority to so modify and amend the said contract. The judgment is affirmed, and it is so ordered.
BRICE, C. J., and ZINN, SADLER, and BICKLEY, JJ., concur.