[darcs-users] Automatic darcs

Lele Gaifax lele at nautilus.homeip.net
Sat Aug 7 11:30:21 UTC 2004


>>>>> "David" == David Roundy <droundy at abridgegame.org> writes:

    >>  Speaking of which, which is the better way of checking if a
    >> particular subdir is already under darcs?  My sync tool needed
    >> such info, and I coded it using "darcs annotate" on the
    >> directory looking at its exit status...

    David> The only better way I can think of would be to do a darcs
    David> changes --last 1 and look at the exit status.  This is a
    David> bit more efficient.  Significantly more efficient for truly
    David> large repos with long histories.

I tried that, but doesn't seem to work::

    sh-3.00$ darcs changes --last=1 . && echo "Ok"
    Changes to validation:

    Fri Aug  6 16:42:20 CEST 2004  tiran
      * validation: changeset 2004-08-06 14:42:20 by tiran
      Preparing AT 1.3.0-beta5 (tag at_release-1_3_0-beta5)

    Ok
    sh-3.00$ mkdir not_under_darcs
    sh-3.00$ cd not_under_darcs/
    sh-3.00$ darcs changes --last=1 . && echo "Ok"
    Changes to validation/not_under_darcs:

    Ok

Looking for an empty output may work, though.

Thanx David,
ciao, lele.
-- 
nickname: Lele Gaifax	| Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas	| comincerò ad aver paura di chi mi copia.
email: lele at seldati.it	|		-- Fortunato Depero, 1929.





More information about the darcs-users mailing list