Make it configurable to the extent that you clone a specific commit, and then pull to a configurable commit (to which you would usually provide the argument 'HEAD')
As long as we can can provide the hashes to develop required range- would it matter if we pull the entire repo or just till a specific commit?
How the current command works:
python manage.py {new_hash} {old_hash}
If both of them (old hash, new hash) are provided. Then entire repo is pulled and updates are carried out only between the two. New hash gets saved in the database- indicating that till this the updates have taken place.
If only new_hash
is provided then old_hash
is fetched from the database. And then updates are carried out between the two. new_hash again is saved to the database.
If none is provided then HEAD becomes the new_hash
and old_hash
is fetched from the database.
The third test should start with invalid or broken repository (you can clone a random other small repository, or populate the directory with that name, or both) and make sure that the function would handle that properly (maybe purge the contents, just be careful not to point it to the wrong location, so that you don't end up with your root folder being purged).
I have added some tests- still figuring out a nice way to achieve this one.
git diff old..new
old new
is more natural. But the only reason I went with reverse was that most of the times we would not enter the old hash and simply pick it from the database- for consistency point of view. And if I use old new
then old would become a required argument to even enter new. But since we would mostly be interested in providing the new hash to I went this way. We can avoid this by using --new
optional arguments, but that does not look so neat.
SELECT "ports_buildhistory"."id", "ports_buildhistory"."builder_name_id",
"ports_buildhistory"."build_id", "ports_buildhistory"."status", "ports_buildhistory"."port_name",
"ports_buildhistory"."time_start", "ports_buildhistory"."time_elapsed",
"ports_buildhistory"."watcher_id" FROM "ports_buildhistory" ORDER BY
"ports_buildhistory"."time_start" DESC
tclsh portindex2json.tcl "${INDEX}"/Portindex > "${INDEX}"/Portindex.JSON
tclsh
and portindex2json.tcl
portindex.JSON
in the location ${INDEX}/portindex.JSON
PortIndex_darwin_${PLATFORM}
.
The other thing is ... the script is cloning the git repository for ports & base. I assume it could clone also the one containing portindex2json. And at some point I would argue that portindex2json could simply become part of macports
So we clone it from somewhere and put in the $PORTS directory
macports-ports
, that would make It already available in $PORTS. But this seems to be a bad idea.
/usr/bin/tclsh
.
portindex2json.tcl
, I will create a PR. After that more lines will need to be added to put it to RSYNCROOT
@umeshksingla: I was wrong: https://devcenter.heroku.com/articles/postgresql-indexes#b-trees-and-sorting
i got to know about the order's relevance to null values myself.