Hi, all!

For the Unix users out there, here's one way to climb a lineage of parents
for a given file artifact:

[stephan@host:~/cvs/fossil/fossil/src]$ fArtifactParent() { fossil json
artifact $1 | grep -w parent | cut -d: -f2 | tr -d '[",]' ; }
[stephan@host:~/cvs/fossil/fossil/src]$ x=69851d26ed4; while [[ -n "$x" ]];
do x=$(fArtifactParent $x); echo parent=$x; done
parent=f1a2de8646f0885d29534168d30d72096cdaba7e
parent=e172dfa50fe58e59e1ee71792d732baefcb3d8f4
parent=21c91e21e64840990ea68df141f3d2efd76e9585
parent=ef566cc15ca9441af5bc41c69636ec4687bbb546
parent=659b9f92a84d4bb5b7bb065f4f7e26e5439a3cc5
parent=

(69851d26ed42c1ba987f526dd85dac2f3891a673 == www/stats.wiki, chosen solely
because it was on my screen at the time.)

Happy hacking!

PS: this depends on as-yet-uncommitted changes - the commit will be in
later tonight, though.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to