CN101533346B - Source file comparing unit and method thereof - Google Patents

Source file comparing unit and method thereof Download PDF

Info

Publication number
CN101533346B
CN101533346B CN200810085720A CN200810085720A CN101533346B CN 101533346 B CN101533346 B CN 101533346B CN 200810085720 A CN200810085720 A CN 200810085720A CN 200810085720 A CN200810085720 A CN 200810085720A CN 101533346 B CN101533346 B CN 101533346B
Authority
CN
China
Prior art keywords
buffer zone
source file
tissue
compared
organizing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN200810085720A
Other languages
Chinese (zh)
Other versions
CN101533346A (en
Inventor
赖周建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN200810085720A priority Critical patent/CN101533346B/en
Publication of CN101533346A publication Critical patent/CN101533346A/en
Application granted granted Critical
Publication of CN101533346B publication Critical patent/CN101533346B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a source file comparing unit and a method thereof. The method comprises the steps of storing the name of the organization of a first source file and description information thereof as well as the non-organization of the first source file in a first buffer area and the name of the organization of a second source file and description information thereof as well as the non-organization of the second source file in a second buffer area; reading organizations to be compared respectively in the first buffer area and the second buffer area according to the names of the organizations and the description information stored in the first buffer area and the second buffer area and comparing the organizations to be compared by taking the organization as a unit, and comparing the content of the organizations to be compared by row and then storing the comparison result respectively in the first buffer area and the second buffer area when the comparison result of the organizations shows that the organizations compared are different; comparing the non-organizations in the first buffer area and the second buffer area by row and storing the comparison result of the non-organizations respectively in the first buffer area and the second buffer area. The invention saves system resources.

Description

The comparison means of source file and method
Technical field
The present invention relates to source file editor and comparison techniques field, in particular, relate to after revising certain version source file of certain software, modification is joined the technology in other versions of this software.
Background technology
Source code is the term during computer software is learned, and it is the character string of being write as with computerese, is the implementation of software; Source file is a file of preserving source code.For the ease of reading; Source code is that an every trade is organized; Some row has been formed a relatively independent functional block then; So the organism of just being made up of the number line code structure, function, process, class etc., this paper simply is called tissue to this organism, and one of common feature of each tissue is that a title is all arranged; The macro definition and the note that also have the outer multirow of some tissues in addition, their neither one titles, but the organism that they also are made up of the multirow code, this paper also is included into tissue to these, and their name just substitutes with first row.Just simply be called non-tissue tissue is outer comprises statement, global variable definition, single file is grand and single file note etc.Current software function is powerful, and system complex often needs a lot of programmers in the long time section, source code to be revised repeatedly.Usually certain programmer need obtain the source code of certain version of this software when revising software, after modification is accomplished, need modification be saved in this version and other versions that need and go the relatively merging that will use file this moment.
The relatively merging instrument of a lot of files has been arranged at present, and they compare with behavior unit.Its implementation is earlier with two File Opens to be compared, and its content is read in the comparison window, since first capable, compares line by line, and the row labels discrepant, that the other side does not have is come out.There is following drawback in this method that compares by row:
1. when two files differed bigger, mark can be very many, and it doesn't matter for wherein a lot of marks and current merging.For example; On 1.0 version, increase, deleted, revised the file A1.1 of some function; Need these changes also be incorporated among the source file A2.0 of 2.0 versions; Difference is very big with the B2.0 file before modification for A1.1, and is incorporated into the code that can only close this change specifically, and the involutory code of various mark that compares line by line is a kind of serious disturbance;
Usually to the change of source file all with the unit of being organized as, when needs relatively two difference in version the time, because what adopt is to compare line by line, the tissue of change can not open-and-shutly appear at the reader at the moment; And
3. when file is bigger, reads in two files fully and will occupy too much system resource to internal memory.In big file, looking for this change of closing can be suitable taking great energy also, has increased the weight of to merge the burden of code.
Therefore, need a kind of solution of comparison of source file, can solve the problem in the above-mentioned correlation technique.
Summary of the invention
The objective of the invention is to alleviate the burden of programmer when closing code, the instrument of internal memory that takies when reducing bigger file and the source file difference that a kind of each version of comparison is provided.
According to an aspect of the present invention; A kind of comparison means of source file is provided; Comprise: source file tissue extraction module; Be used for respectively extracting tissue, and the title of the tissue that will extract and descriptor thereof store into respectively in first buffer zone and second buffer zone, and non-the organizing in first source file and second source file stored into respectively in first buffer zone and second buffer zone from first source file to be compared and second source file; Organize comparison module; Be used for to be compared organizing being read respectively in first buffer zone and second buffer zone according to the title and the descriptor thereof that are stored in the tissue of first buffer zone and second buffer zone; And tissue to be compared is compared, and comparative result is stored into respectively in first buffer zone and second buffer zone with the unit of being organized as; And row comparison module; Be used for the non-tissue of first buffer zone and second buffer zone being compared with behavior unit; And organizing comparative result to show organizing not simultaneously by comparison; Quilt tissue is relatively launched and with behavior unit the content of the tissue of expansion compared, and comparative result is stored in first buffer zone and second buffer zone.
Said apparatus also comprises: display module is used for display organization comparative result and row comparative result; The buffer management module is used to manage first buffer zone and second buffer zone, and for source file tissue extraction module, organize comparison module, row comparison module and display module that interface is provided; File is preserved module, is used to preserve the source file of modification; And revise and merge module, be used for first source file after the comparison and second source file are made amendment or merged.
Source file tissue extraction module comprises: extraction unit is used for extracting tissue from first source file to be compared and second source file respectively; First storage unit is used for storing the tissue that extraction unit extracts into first buffer zone and second buffer zone, and non-the organizing in first source file and second source file is stored into respectively in first buffer zone and second buffer zone.
Organize comparison module to comprise: reading unit is used for according to the title and the descriptor thereof that are stored in the tissue of first buffer zone and second buffer zone to be compared organizing being read respectively in first buffer zone and second buffer zone; Comparing unit is used for the unit of being organized as tissue to be compared being compared; And second storage unit, be used for storing comparative result into first buffer zone and second buffer zone respectively.
The row comparison module comprises: the non-comparing unit of organizing is used for behavior unit the non-tissue of first buffer zone and second buffer zone being compared; Tissue launches the unit, is used for organizing comparative result to show by organizing not simultaneously relatively, to being launched by tissue relatively; The row comparing unit is used for behavior unit the content of the tissue of expansion being compared; And the 3rd storage unit, be used for storing comparative result into first buffer zone and second buffer zone.
The 3rd storage unit also is used for being had the content that another source file does not have by one of first source file relatively and second source file; Or the content of the content of first one of source file and second source file and another source file is not simultaneously, the content that there are differences is done with mark and with it stored into respectively in first buffer zone and second buffer zone at its place respectively.
According to another aspect of the present invention; A kind of source file comparative approach is provided; May further comprise the steps: set up first buffer zone and second buffer zone; Deposit the title of the tissue of second source file and the non-tissue of the descriptor and first source file thereof in first buffer zone, and deposit the title of the tissue of second source file and the non-tissue of the descriptor and second source file thereof in second buffer zone; According to title that is stored in the tissue in first buffer zone and second buffer zone and descriptor thereof to be compared organizing read respectively in first buffer zone and second buffer zone; And tissue to be compared is compared with the unit of being organized as; And organizing comparative result to show organizing not simultaneously by comparison; With behavior unit the content of quilt tissue is relatively compared, and comparative result is stored into respectively in first buffer zone and second buffer zone; And the non-tissue in first buffer zone and second buffer zone is compared, and comparative result is stored into respectively in first buffer zone and second buffer zone with behavior unit.
The step that comparative result stores into respectively in first buffer zone and second buffer zone is further comprising the steps of: as to be had the content that another source file does not have by one of first source file relatively and second source file; Or the content of the content of first one of source file and second source file and another source file is not simultaneously, the content that there are differences is done with mark and with it stored into respectively in first buffer zone and second buffer zone at its place respectively.
Said method is further comprising the steps of: first source file after the comparison and/or second source file are made amendment or merged; And demonstration comparative result.
Said method is further comprising the steps of: when being organized by relatively two when identical, the content of tissue is directly shown by row.
Said method is further comprising the steps of: when first source file after preserving relatively and/or second source file; With first source file and/or second source file before the backup relatively of alternative document name, and first source file and/or second source file after preserving relatively with the filename of the first relatively more preceding source file and/or second source file respectively.
Said method is further comprising the steps of: when rollback, the filename of first source file and/or second source file of backup changeed back be its old file name.
In said method, the descriptor of tissue comprises the position that is organized in the source file.
Adopt the present invention and present comparing with behavior unit's comparative approach: the comparative result of source file will be in confusion.At first occurring on the screen is the comparative result of tissue, clicks the title of tissue, and the comparative result of organising content just appears on the screen at once.Which of relatively source file being organized variant like this by, what the difference of tissue is with regard to the appearing at clearly in face of the programmer of layering, and needn't from numerous differences of row comparative result, remove the searching tissue of working hard again, seeks the difference between organizing again.In addition, when bigger file, this method will no longer be opened and read in whole file fully, and be when the needs manipulation of tissue, just the content of tissue read in internal memory, save the internal memory spending like this.
Other features and advantages of the present invention will be set forth in instructions subsequently, and, partly from instructions, become obvious, perhaps understand through embodiment of the present invention.The object of the invention can be realized through the structure that in the instructions of being write, claims and accompanying drawing, is particularly pointed out and obtained with other advantages.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:
Fig. 1 shows the block diagram according to the comparison means of the source file of the embodiment of the invention;
Fig. 2 shows the process flow diagram according to the comparative approach of the source file of the embodiment of the invention;
Fig. 3 shows the process flow diagram of the comparative approach of source file according to an embodiment of the invention; And
Fig. 4 shows the specific operation process synoptic diagram that relatively merges according to the embodiment of the invention.
Embodiment
To combine accompanying drawing to specify embodiments of the invention below.
Fig. 1 shows the block diagram according to the comparison means of the source file of the embodiment of the invention.With reference to Fig. 1; Comparison means 100 according to the source file of this embodiment comprises: source file tissue extraction module 102; Be used for extracting tissue from first source file to be compared and second source file respectively; And the title of the tissue that will extract and descriptor thereof store into respectively in first buffer zone and second buffer zone, and non-the organizing in first source file and second source file stored into respectively in first buffer zone and second buffer zone; Organize comparison module 104; Be used for to be compared organizing being read respectively in first buffer zone and second buffer zone according to the title and the descriptor thereof that are stored in the tissue of first buffer zone and second buffer zone; And tissue to be compared is compared, and comparative result is stored into respectively in first buffer zone and second buffer zone with the unit of being organized as; And row comparison module 106; Be used for the non-tissue of first buffer zone and second buffer zone being compared with behavior unit; And organizing comparative result to show organizing not simultaneously by comparison; Quilt tissue is relatively launched and with behavior unit the content of the tissue of expansion compared, and comparative result is stored in first buffer zone and second buffer zone.
Said apparatus also comprises: display module 108 is used for display organization comparative result and row comparative result; Buffer management module 110 is used to manage first buffer zone and second buffer zone, and for source file tissue extraction module, organize comparison module, row comparison module and display module that interface is provided; File is preserved module 112, is used to preserve the source file of modification; And revise and merge module, be used for first source file after the comparison and second source file are made amendment or merged.
Source file tissue extraction module comprises: extraction unit is used for extracting tissue from first source file to be compared and second source file respectively; First storage unit is used for storing the tissue that extraction unit extracts into first buffer zone and second buffer zone, and non-the organizing in first source file and second source file is stored into respectively in first buffer zone and second buffer zone.
Organize comparison module to comprise: reading unit is used for according to the title and the descriptor thereof that are stored in the tissue of first buffer zone and second buffer zone to be compared organizing being read respectively in first buffer zone and second buffer zone; Comparing unit is used for the unit of being organized as tissue to be compared being compared; And second storage unit, be used for storing comparative result into first buffer zone and second buffer zone respectively.
The row comparison module comprises: the non-comparing unit of organizing is used for behavior unit the non-tissue of first buffer zone and second buffer zone being compared; Tissue launches the unit, is used for organizing comparative result to show by organizing not simultaneously relatively, to being launched by tissue relatively; The row comparing unit is used for behavior unit the content of the tissue of expansion being compared; And the 3rd storage unit, be used for storing comparative result into first buffer zone and second buffer zone.
The 3rd storage unit also is used for being had the content that another source file does not have by one of first source file relatively and second source file; Or the content of the content of first one of source file and second source file and another source file is not simultaneously, the content that there are differences is done with mark and with it stored into respectively in first buffer zone and second buffer zone at its place respectively.
Fig. 2 shows process flow diagram according to the comparative approach of the source file of the embodiment of the invention with reference to Fig. 2; Source file comparative approach according to this embodiment; May further comprise the steps: step S202; Set up first buffer zone and second buffer zone, deposit the title of the tissue of first source file and the non-tissue of the descriptor and first source file thereof in first buffer zone, and deposit the title of the tissue of second source file and the non-tissue of the descriptor and second source file thereof in second buffer zone; Step S204; According to the Name and Description information that is stored in the tissue in first buffer zone and second buffer zone to be compared organizing read respectively in first buffer zone and second buffer zone; And tissue to be compared is compared with the unit of being organized as; And organizing comparative result to show by organizing not simultaneously relatively,, and comparative result is stored into respectively in first buffer zone and second buffer zone being compared with behavior unit by the content of tissue relatively; And step S206, with behavior unit the non-tissue in first buffer zone and second buffer zone is compared, and comparative result is stored into respectively in first buffer zone and second buffer zone.
The step that comparative result stores into respectively in first buffer zone and second buffer zone is further comprising the steps of: as to be had the content that another source file does not have by one of first source file relatively and second source file; Or the content of the content of first one of source file and second source file and another source file is not simultaneously, the content that there are differences is done with mark and with it stored into respectively in first buffer zone and second buffer zone at its place respectively.
Said method is further comprising the steps of: first source file after the comparison and/or second source file are made amendment or merged; And demonstration comparative result.
Said method is further comprising the steps of: when being organized by relatively two when identical, the content of tissue is directly shown by row.
Said method is further comprising the steps of: when first source file after preserving relatively and/or second source file; With first source file and/or second source file before the backup relatively of alternative document name, and first source file and/or second source file after preserving relatively with the filename of the first relatively more preceding source file and/or second source file respectively.
Said method is further comprising the steps of: when rollback, the filename of first source file and/or second source file of backup changeed back be its old file name.
In said method, the descriptor of tissue comprises the position that is organized in the source file.
Below in conjunction with Fig. 3 an alternative embodiment of the invention is described.Present embodiment carries out the comparison of source file with the unit of being organized as.System in this enforcement constitutes as shown in Figure 1.Display module is mainly the interface that the user provides a clear embodiment tissue of ability and row comparative result; Source file tissue extraction module is mainly extracted tissue from file, non-tissue is all deposited in the buffer zone, and tissue just only deposits the title of tissue and the descriptor of tissue thereof in the buffer zone in; Organize comparison module mainly to compare, and comparative result deposited in also deposit in the buffer zone with the unit of being organized as; Comparison when non-tissue comparison and the tissue that the row comparison module is used for buffer zone is unfolded; The buffer management module is mainly managed each buffer zone, is other moulds interface that certainly provides convenient operation; File is preserved the source file of module principal security modification and can in time be preserved, and can rollback.
As shown in Figure 3, the realization of present embodiment may further comprise the steps:
Step S302 is provided with visual relatively interface, but 2 editors about the interface mainly is divided into are respectively applied for and show two by the title of the tissue of comparison document and all outer contents of tissue.The interface also need provide some action buttons such as deletion, interpolation, insertion of corresponding row or tissue easily;
Step S304 opens two source files to be compared to read mode, sets up two buffer zones, respectively the non-tissue of source file all is read in the buffer zone, with the tissue title with organize information such as position hereof to be deposited in the buffer zone;
Step S306: compare buffer contents,, just organize actual size relatively by non-if be non-tissue; Tissue just reads in organising content monoblock comparison behind the buffer zone through being organized in the original position, and discrepant, the other side does not have, and all in buffer zone, carries out mark, and is saved in the buffer zone.When being shown to editor, using the display mode that is different from same section to rise and show.When the user clicks the title of tissue,, just with organising content relatively, the result is saved in the buffer zone, and is shown in the window by row if organize differently; Tissue is the same, just directly is shown in the window by being about to tissue;
Step S308 when editor, in time deposits edited result in the buffer zone in, if desired, can buffer zone be backuped on the hard disk; And
Step S310 in the time will preserving certain file, creates a new file, fills in new file according to the content in original and the buffer zone, after having filled in, original is backed up, and changes new filename into old file name.When the needs rollback, change backup file into old file name again.
Specify an alternative embodiment of the invention below in conjunction with Fig. 4.This embodiment realizes the concrete application under LINUX class platform platform with standard C language+GTK.
This instance may further comprise the steps:
Step 1 is set up graphic interface, creates the various buttons and the menu of the selection and the comparative result operation of convenience file, and main window is divided into left and right sides two halves.What select as the user is catalogue relatively the time, earlier the All Files name under both sides' catalogue is presented in the main window of the left and right sides to set capable mode, and file variant or that the other side does not have is distinguished with blue demonstration;
Step 2 after having selected two files that will compare, is read in file in the buffer zone by piece successively, and proposes tissue and non-tissue successively, and they are stored in respectively among buffer zone BUF_BUNCH_A, the BUF_BUNCH_B.Buffer zone is made up of string, and each string serve as to go here and there head with 16 bytes, serves as to go here and there tail with ' 0 ' character.The string header structure is following:
struct?bunch_head{
Unsigned int:offset; / * originally go here and there hereof side-play amount */
Unsigned int * edit_addr; The edited result buffer zone address * of this string of/*/
Unsigned int * insert_addr; The buffer zone address * of this string of/* back insertion string/
Unsigned short int len; / * length, if tissue refer to the big or small * that organizes/
Unsigned char bunch_type; / * string type */
Unsigned char compare_result; / * comparative result: 0 is identical, 1 difference, 2 the other side do not have, most significant digit be 1 expression should go here and there delete */
};
String type has following value: the #include statement is 1; Global variable is 2; Function declaration is 3; The single file note is 4; Single file is grand to be 5; Other are non-to be organized as 6; Structure or class are 20; Function is 21; Multirow is grand to be 22; The multirow note is 23 etc.
For non-tissue; Whole non-organizer is all deposited in the string, and for tissue, only the title with tissue deposits in the string; In the time of relatively; Tissue need reading of content be pressed piece relatively to buffer zone from file, comparative result deposits among the compare_result of string head, according to compare_result and bunch_type branch various colors buffer contents is shown on the interface then;
Step 3 is set up two job buffer WORK_BUF_A, and WORK_BUF_B is respectively applied for the current content of edit of depositing two files.Wait for user's operation, receive order after, remove WORK_BUF.If insert order, will insert the result and put into WORK_BUF, and be presented on the interface synchronously; When the user leaves this operation; Set up a buffer memory, the address of this buffer memory is write among the insert_addr of bunch_head, and in four bytes, deposit the bunch_head address in; If change order, from bunch_head, judge this and get therefrom (edit_addr for empty and during for non-organizing then from BUF_BUNCH, for empty and when organizing offset and len from file, get; Then do not get from the address that edit_addr points to for empty) content, will copy among the WORK_BUF after obtaining after, if being presented on the interface of just will organizing of tissue by going comparative result; Wait for editor; And change displaying contents synchronously, when the user leaves this operation, set up a buffer memory; The address of this buffer memory is write among the edit_addr of bunch_head; And in four bytes, deposit the bunch_head address in,, need it be discharged if buffer memory was arranged originally; If delete command puts 1 with being up to of compare_result in bunch_head, and the demonstration of cancellation on the interface.Fig. 4 has shown the logic flow of this step;
Step 4 when depositing file, is at first created an empty file, reads the string among the BUF_BUNCH in order, writes new file according to bunch_head with file content is a string.Concrete grammar is: judge at first whether edit_addr and insert_addr are empty; Be not empty; Then elder generation writes new file with the content of their appointment; For empty and be non-tissue, the content in just will go here and there writes new file, for sky and be just to organize the length that reads len from offset to write in the new file.Just can changing new filename into old file name after the original backup after the completion.
Can see through this embodiment, when carrying out the source file comparison, can be presented on the interface what histological difference was understood; Improved the work efficiency of programmer when relatively merging code; And avoided fully the content of big file all being read in internal memory, only read in the content of operating in internal memory, thereby practiced thrift system resource; Make system can open more file simultaneously, clear those files of having changed when conveniently relatively merging code.
The above is merely the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (12)

1. the comparison means of a source file is characterized in that, comprising:
Source file tissue extraction module; Be used for extracting tissue from first source file to be compared and second source file respectively; And the title of the said tissue that will extract and descriptor thereof store into respectively in first buffer zone and second buffer zone, and non-the organizing in said first source file and said second source file stored into respectively in said first buffer zone and said second buffer zone;
Organize comparison module; Be used for said organizing to be compared being read respectively in said first buffer zone and said second buffer zone according to the title and the descriptor thereof that are stored in the said tissue of said first buffer zone and said second buffer zone; And said tissue to be compared is compared, and comparative result is stored into respectively in said first buffer zone and said second buffer zone with the unit of being organized as; And
The row comparison module; Be used for the said non-tissue of said first buffer zone and said second buffer zone being compared with behavior unit; And show said the organizing not simultaneously by relatively at the said comparative result of organizing; Quilt said tissue is relatively launched and with behavior unit the content of the said tissue of expansion compared, and comparative result is stored in said first buffer zone and said second buffer zone;
Wherein, the descriptor of said tissue comprises the said position that is organized in the said source file.
2. device according to claim 1 is characterized in that, also comprises:
Display module is used for display organization comparative result and row comparative result;
The buffer management module is used to manage said first buffer zone and said second buffer zone, and is that said source file tissue extraction module, said comparison module, said capable comparison module and the said display module organized provide interface;
File is preserved module, is used to preserve the source file of modification; And
Revise and merge module, be used for said first source file after the comparison and said second source file are made amendment or merged.
3. device according to claim 2 is characterized in that, said source file tissue extraction module comprises:
Extraction unit is used for extracting tissue from first source file to be compared and second source file respectively;
First storage unit; Be used for storing the tissue that said extraction unit extracts into said first buffer zone and said second buffer zone, and non-the organizing in said first source file and said second source file stored into respectively in said first buffer zone and said second buffer zone.
4. device according to claim 2 is characterized in that, the said comparison module of organizing comprises:
Reading unit is used for according to the title and the said descriptor that are stored in the said tissue of said first buffer zone and said second buffer zone said organizing to be compared being read respectively in said first buffer zone and said second buffer zone;
Comparing unit is used for the unit of being organized as said tissue to be compared being compared; And
Second storage unit is used for storing comparative result into said first buffer zone and said second buffer zone respectively.
5. device according to claim 2 is characterized in that, said capable comparison module comprises:
The non-comparing unit of organizing is used for behavior unit the said non-tissue of said first buffer zone and said second buffer zone being compared;
Tissue launches the unit, is used for showing by said organizing not simultaneously relatively at the said comparative result of organizing, to being launched by said tissue relatively;
The row comparing unit is used for behavior unit the content of the said tissue of expansion being compared; And
The 3rd storage unit is used for storing comparative result into said first buffer zone and said second buffer zone.
6. device according to claim 5; It is characterized in that; Said the 3rd storage unit also is used for being had the content that another source file does not have by one of said first source file relatively and said second source file; Or the content of the content of one of said first source file and said second source file and another source file is not simultaneously, the content that there are differences is done with mark and with it stored into respectively in said first buffer zone and said second buffer zone at its place respectively.
7. a source file comparative approach is characterized in that, may further comprise the steps:
Set up first buffer zone and second buffer zone; Deposit the title of the tissue of said first source file and the non-tissue of descriptor and said first source file thereof in said first buffer zone, and deposit the title of the tissue of said second source file and the non-tissue of descriptor and said second source file thereof in said second buffer zone;
According to title that is stored in the said tissue in said first buffer zone and said second buffer zone and descriptor thereof said organizing to be compared read respectively in said first buffer zone and said second buffer zone; And said tissue to be compared is compared with the unit of being organized as; And organizing comparative result to show organizing not simultaneously by comparison; With behavior unit the content of quilt said tissue is relatively compared, and comparative result is stored into respectively in said first buffer zone and said second buffer zone; And
With behavior unit the said non-tissue in said first buffer zone and said second buffer zone is compared, and comparative result is stored into respectively in said first buffer zone and said second buffer zone;
Wherein, the descriptor of said tissue comprises the said position that is organized in the said source file.
8. method according to claim 7 is characterized in that, the said step that comparative result is stored into respectively in said first buffer zone and said second buffer zone is further comprising the steps of:
Had the content that another source file does not have by one of said first source file relatively and said second source file; Or the content of the content of one of said first source file and said second source file and another source file is not simultaneously, the content that there are differences is done with mark and with it stored into respectively in said first buffer zone and said second buffer zone at its place respectively.
9. method according to claim 8 is characterized in that, and is further comprising the steps of:
Said first source file after the comparison and/or said second source file are made amendment or merged; And
Show said comparative result.
10. method according to claim 9 is characterized in that, and is further comprising the steps of:
When being organized by relatively two when identical, the content of said tissue is directly shown by row.
11. method according to claim 10 is characterized in that, and is further comprising the steps of:
When said first source file after preserving relatively and/or said second source file; With said first source file and/or said second source file before the backup relatively of alternative document name, and said first source file and/or said second source file after preserving relatively with the filename of relatively more preceding said first source file and/or said second source file respectively.
12. method according to claim 11 is characterized in that, and is further comprising the steps of:
When rollback, the filename of said first source file and/or said second source file of backup changeed back be its old file name.
CN200810085720A 2008-03-13 2008-03-13 Source file comparing unit and method thereof Expired - Fee Related CN101533346B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200810085720A CN101533346B (en) 2008-03-13 2008-03-13 Source file comparing unit and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200810085720A CN101533346B (en) 2008-03-13 2008-03-13 Source file comparing unit and method thereof

Publications (2)

Publication Number Publication Date
CN101533346A CN101533346A (en) 2009-09-16
CN101533346B true CN101533346B (en) 2012-10-10

Family

ID=41103966

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200810085720A Expired - Fee Related CN101533346B (en) 2008-03-13 2008-03-13 Source file comparing unit and method thereof

Country Status (1)

Country Link
CN (1) CN101533346B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102737012B (en) * 2011-04-06 2015-09-30 赛恩倍吉科技顾问(深圳)有限公司 text information comparison method and system
CN104156198A (en) * 2013-05-14 2014-11-19 广东电网公司信息中心 Method and device for automatically generating software integration version updating description
CN104462083B (en) * 2013-09-13 2018-11-02 佳能株式会社 The method, apparatus and information processing system compared for content
CN103617122B (en) * 2013-12-12 2016-03-30 用友网络科技股份有限公司 A kind of comparison method of source code
CN106844306A (en) * 2016-12-30 2017-06-13 江苏天联信息科技发展有限公司 File comparision method and device
CN106844305A (en) * 2016-12-30 2017-06-13 上海帝联信息科技股份有限公司 Data row comparative approach and device in file
CN110069455B (en) * 2017-09-21 2021-12-14 北京华为数字技术有限公司 File merging method and device
CN110363401B (en) * 2019-06-26 2022-05-03 北京百度网讯科技有限公司 Integrated viscosity evaluation method and device, computer equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1831759A (en) * 2005-03-10 2006-09-13 华为技术有限公司 File comparision method
JP2006277127A (en) * 2005-03-28 2006-10-12 Canon Inc Method for comparing correction program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1831759A (en) * 2005-03-10 2006-09-13 华为技术有限公司 File comparision method
JP2006277127A (en) * 2005-03-28 2006-10-12 Canon Inc Method for comparing correction program

Also Published As

Publication number Publication date
CN101533346A (en) 2009-09-16

Similar Documents

Publication Publication Date Title
CN101533346B (en) Source file comparing unit and method thereof
CA2137492C (en) System for and method of providing delta-versioning of the contents of pcte file objects
US5355472A (en) System for substituting tags for non-editable data sets in hypertext documents and updating web files containing links between data sets corresponding to changes made to the tags
CA1316262C (en) Version management tool
US8418053B2 (en) Division program, combination program and information processing method
CN107844301A (en) A kind of Android application channel closes bag method and device
CN105787093B (en) A kind of construction method of the log file system based on LSM-Tree structure
US5768582A (en) Computer program product for domained incremental changes storage and retrieval
JPH07191892A (en) Method and system for management of file system by using flash-reasable programmable read-only memory
CN106227573A (en) Function call path extraction method based on controlling stream graph
CN108491402A (en) A kind of implementation method of lightweight file system
CN105260139B (en) A kind of disk management method and system
US20080196009A1 (en) Apparatus and method for componentizing legacy system
US7770148B2 (en) Methods and apparatus enabling diagram customization retention
CN101228509A (en) Device, method, and program for generating and executing execution binary image, and computer-readable recording medium containing the execution binary image execution program
CN100524316C (en) Method and program for file information write processing
US8407196B1 (en) Object-oriented database for file system emulator
JPH06243006A (en) Character file access system
US4833641A (en) System for numerical description of computer program logic
CN106557572A (en) A kind of extracting method and system of Android application program file
CN108805990A (en) 3-D graphic editing machine model management system based on Unity engines
CN101685450B (en) Method for realizing function of database in embedded operation system
JP2925042B2 (en) Information link generation method
CN102629259A (en) Read-only file system setting up method in embedded system, device and embedded system
CN106126555A (en) A kind of file management method and file system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20121010

Termination date: 20170313

CF01 Termination of patent right due to non-payment of annual fee