warning message when adding large files

Cathy Riemer cathy+hglist at bx.psu.edu
Fri Apr 1 11:50:20 CDT 2011


On Fri, Apr 01, 2011 at 06:27:50PM +0200, Adrian Buehlmann wrote:
> On 2011-04-01 17:45, Cathy Riemer wrote:
> > On Fri, Apr 01, 2011 at 12:37:54PM +0200, Martin Geisler wrote:
> >> timeless <timeless at gmail.com> writes:
> >>
> >>> On Thu, Mar 31, 2011 at 9:08 PM, Matt Mackall <mpm at selenic.com> wrote:
> >>>>> I don't understand why it suggests using "revert".  Shouldn't that
> >>>>> be "forget"?
> >>>>
> >>>> They'll both give the same result, moving the file from added to
> >>>> unknown.
> >>>
> >>> Offhand, I think i'd like to see us use 'forget' in this message.
> >>
> >> I like revert since it might remind people that 'hg revert' is how you
> >> remove lines from the output of 'hg status':
> >>
> >>   $ hg status
> >>   M a
> >>   ! b
> >>   R c
> >>   $ hg revert a b c
> >>   $ hg status
> >>
> >> That is not true for 'hg forget' which wont restore deleted files or
> >> revert modified files.
> > 
> > But I was adding *new* files (and I imagine that is the usual
> > case when this message is encountered).  I think at least part
> > of the problem lies in the documentation.
> > 
> > "hg help revert" notes that "This command is most likely not
> > what you are looking for", and says that it "modifies the working
> > directory" and will "revert the named files or directories to
> > the contents they had in the parent of the working directory".
> > Since I was adding new files, this could mean that my working
> > copies would get deleted to match the parent.  I did not want to
> > modify the working directory, just unschedule the pending adds.
> 
> But hg help revert also says:
> 
> "This restores the contents of the affected files to an unmodified
> state and unschedules adds, removes, copies, and renames."
> 
> Note the "unschedules adds".

Yes, I saw that, but it doesn't say what it would do about my working
file.  For a brand-new file, the "unmodified state" would technically
be for it to vanish, right?



More information about the Mercurial-devel mailing list