Multiple undo again...

Martin Geisler mg at lazybytes.net
Fri Jun 4 12:33:22 CDT 2010


Jason Harris <jason at jasonfharris.com> writes:

> Ahhh... Thanks. But sorry what I was planning to do was: something
> like for initialization:
>
> export HGDIRNAME='.hgbackup'
> hg init
> hg addremove *
> hg commit -m "initialize undo / redo"
>
> Then when I needed to backup something like:
>
> export HGDIRNAME='.hgbackup'
> hg addremove *
> hg commit -m "do a backup step"
>
> So where in this process should I do the cp -al

So it seems that the history in the .hgbackup repository wont mean
anything? It will just be a sequence of snapshots and I guess you're
only using Mercurial for this to have some automatic compression?

Is the 'hg addremove' step to save unversioned files? I'm not sure why
you need to save those since Mercurial should not touch them as shown in
this example:

  % hg init
  % echo foo > a.txt
  % hg add
  adding a.txt
  % hg commit -m 'add a.txt'
  % hg remove a.txt
  % hg commit -m 'remove a.txt'
  % echo bar > a.txt
  % hg status
  ? a.txt
  % hg update 0
  abort: untracked file in working directory differs from file in
  requested revision: 'a.txt'

-- 
Martin Geisler

See my Mercurial presentation: http://vimeo.com/11497288
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20100604/67049ce3/attachment.pgp>


More information about the Mercurial-devel mailing list