Manually specified file version selector names when uploaded from client via Git
Problem: I upload changes as a commit range in git between a reference branch (master) and my current HEAD. I then later need to rebase my current HEAD against an updated reference branch (master) and re-upload the changes. It cannot be differentiated in the file version selector during a review which versions of the file are reference branch (master) and which are HEAD versions. Generically, client tool uploaded differences from git commit ranges automatically label all versions of files as seen in file version selector drop down, with check-in time and non-human readable git object hash (not commit hash) only. Rebasing changes against the latest version of the reference branch, or merging the latest version of the reference branch into the changes, between a first and second upload to a review causes the "before" version from the reference branch to be different during the second uploaded of files and have a newer timestamp than the "after" version of the file from the first upload. The "before" versions therefore can't be differentiated from the "after" versions in the drop down. Solution: Add optional command line argument for "addgitdiffs" that will allow user specified names to be added to the before and after versions of all files included in the commit range. Conflicting names are automatically appended with standard "(1)", "(2)", etc for a given file based on upload order. For example, if I have changes on a "work" branch that originally forked from "master" branch and changed fileA and fileB, my upload command would be ccollab addgitdiffs --before-name="master" --after-name="work" ask master...work which would upload all changes made on the work branch since it split from master by uploading fileA and fileB from the commit on the master branch right before the work branch split, and fileA and fileB from the head of the work branch (currently). The extra arguments would add labeling for all the files from master as "master" and those coming from the work branch as "work" (new). When my review continues for a while and I need to rebase my work branch against the since-updated master branch I'll need to re-upload my changes relative to the new reference point on the master branch. Running the same command as before accomplishes that but causes a problem. When the differences in fileA are viewed without this feature, what's seen in the file version selector drop down is (larger numbers with the timestamps indicate newer timestamps): "<git object hash> <commit timestamp 1>" <---- from master branch in first upload "<git object hash> <commit timestamp 2>" <---- from work branch in first upload "<git object hash> <commit timestamp 3>" <---- from master branch in second upload "<git object hash> <commit timestamp 4>" <---- from work branch in second upload With the recommended feature this list becomes much more clear: "master <git object hash> <commit timestamp 1>" <---- from master branch in first upload "work <git object hash> <commit timestamp 2>" <---- from work branch in first upload "master(1) <git object hash> <commit timestamp 3>" <---- from master branch in second upload "work(1) <git object hash> <commit timestamp 4>" <---- from work branch in second upload3.1KViews1like0CommentsMatch addgitdiffs commit hash specification in the Command-line client to git commit hash specificat
The addgitdiffs command uses Git commit hash syntax identical to the git tool itself except in one regard: specifying individual commit hashes for addgitdiffs is handled the opposite of how the git tool does it. In Git syntax the following lines are identical: git diff AAAAAAA..BBBBBBB git diff AAAAAAA BBBBBBB In the Collaborator command-line client the following lines have exactly opposite meanings: ccollab addgitdiffs ask AAAAAAA..BBBBBBB ccollab addgitdiffs ask AAAAAAA BBBBBBB This seems to be because the addgitdiffs command handles the second case as a list of individual commits, which it assumes are in reverse chronological order (newest to oldest), rather than a direct pass-thru to the git tool (oldest-first) like the first command. To resolve this, split the addgitdiffs command for specifying a list of commits into a separate command (or require extra options).3KViews0likes0Comments