Tag Info

Hot answers tagged

7

Just as you can create a patch for a text (source) file, you can create a patch for a binary file as well. You are effectively just noting what changed between two files (that's called delta encoding). For example, if the app contains many resources, then those don't usually change for smaller updates, and only the executable code itself needs to be ...


7

On Windows there's a mechanism to have the OS alert you when there's a change to a 'watched' directory structure - FindFirstChangeNotification(). When that indicates a file has changed, an application can then go about comparing files in the changed directory to find the actual files that have changed by looking at size, modified date, hash, etc. This (as ...


6

You want a program that can display differences and navigate between them quickly and easily. If you're using it with a VCS, especially a DVCS like Mercurial, you'll want built-in merge support as well. I'd recommend Beyond Compare. It's intuitive and easy to use, they've got versions for Windows and Linux, and the Pro version (which doesn't cost all that ...


5

The Patience Diff algorithm is designed to address this, insofar as it is possible to do so with unannotated text. From that article: [Patience Diff] only considers lines that are (a) common to both files, and (b) appear only once in each file. This means that most lines containing a single brace or a new line are ignored, but distinctive lines like a ...


4

Simplicity. Incremental updates have the same problems as incremental backups; you must apply all of the increments in order from the last complete installation. It becomes impractical to do this forever; eventually everyone will have to get a complete update. Otherwise, you wind up selling a program that requires n incremental updates to get it current ...


4

It does indeed look like it is possible (link to Beyond Compare makers site outlining how) Here are the steps from that link that are specific to Beyond Compare and TFS: Diff In Visual Studio Choose Options from the Tools menu. Expand Source Control in the treeview. Click Visual Studio Team Foundation Server in the treeview. Click the Configure User ...


3

Because usually, diffs are created to be able to compare any file, not only hierarchical-organized source code or data. Because in order to obtain a tree from a source code, one needs to parse it first. Reading lines - every app can do that. Being able to parse C++, Ada, Java, COBOL, Haskell and hundreds of programming languages and non-programming ...


3

I believe that it's an ad-hoc expression to describe the algorithm used by rsync which is based primarily on a rolling hash. It is an extremely fast way to compute diffs, but works in blocks and doesn't handle smaller changes optimally.


2

For me personally, I've used two different programs, kdiff3 and p4merge. I believe they both run off the unix diff. In my limited experience, you can't really go wrong with either of these diff programs as they have always produced identical results for me. The main factor is personal preference. The program kdiff3 is more configurable, but I prefer ...


2

WinMerge can diff compare any file(s) or folder(s) and generate a report (Tools > Generate Report) of differences in various formats (including HTML and CSV). You can generate a report add your own comments into the results. Run the report at the file level to get a colored diff compare. Ultimately, the best method does depend on your tools (which you ...


2

Search is your friend :-) How do I configure TFS to work with various merge tools Here is a direct link to the blog


2

Ultimately to compare files you need to compare every byte - how else would you notice a single byte change? In reality you read blocks of bytes and compute a hash value, you then check against a list of hashes. A good example is "rsync" As far as I know dropbox only dedupes entire files, so will compute a hash of the entire file to check fro the same ...


2

You should update your version of the main branch against the latest version of the main branch, pulling in changes that have occurred since you branched off for your feature branch. Once this is done you can then compare your differences alone. Example using git: First git rebase (or git merge but I prefer git rebasein case of code conflicts) the feature ...


2

Sometimes you can't get away with a small change. You might need to forgo GitHub's code review tools and use Plain Old Git: $ git remote add somebody https://github.com/somebody/repo.git $ git fetch somebody $ git diff --name-only development somebody/topic_branch # shows list of files that were touched $ git diff --name-status development ...


2

This is actually one of the benefits of introducing code reviews in your organization: getting people to make small, incremental changes. Just wait until the guy that made that huge commit has to review a similarly sized commit of yours. Other, more constructive ways of getting to the same result without starting a "commit war", could be: setting a soft ...


2

A working solution is to put a soft upper limit on how large merges you accept, but changes have to be reviewed as some point. If you don't have much experience with source code reviews yet, you could start out recording metrics of the reviews (too): Merge/commit size Issues resolved Errors introduced Review reports Reviewer Time used Volume of comments ...


1

A tool like Semantic Merge which understands the language semantics by parsing the code will work in this case.


1

Well, in the first place I could argue that creating a new procedure1 that does what procedure2 did, with the same signature, is begging for trouble. Even were procedure1 to be the most natural name for the new procedure, you ought to differentiate it at the name level, to prevent confusion down the line. On a change of this import, the procedure1 name ...


1

Here are some options you might want to consider. Some diff tools have an option to input regular expressions as part of the comparison process and some, I believe, have active people in the forums tweaking the expressions for a given language. Write your own diff tool that compares the syntax and tweak the code. I started this but you spend more time ...


1

.NET for instance has a FileSystemWatcher class. I'm sure other low-level languages and runtimes can provide similar capabilities.


1

Common practice in UNIX-land is to just send the plain diff output. The recipient can then use a tool of their choice to read it.


1

I'm a fan of Meld. I never thought I'd move to a gui diff util until Meld came along. It's simple, supports diffing many things (revisions, directories, files, etc), can do two-way or three-way diffs, and makes manually merging files a breeze.



Only top voted, non community-wiki answers of a minimum length are eligible