242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
|
}
/*
** COMMAND: undo
**
** Usage: %fossil undo ?FILENAME...?
**
** Undo the most recent <a>update</a> or <a>merge</a> or <a>revert</a> operation. If FILENAME is
** specified then restore the content of the named file(s) but otherwise
** leave the <a>update</a> or <a>merge</a> or <a>revert</a> in effect.
**
** A single level of undo/<a>redo</a> is supported. The undo/<a>redo</a> stack
** is cleared by the commit and checkout commands.
*/
void undo_cmd(void){
int undo_available;
db_must_be_within_tree();
db_begin_transaction();
undo_available = db_lget_int("undo_available", 0);
if( g.argc==2 ){
|
|
|
>
|
|
|
|
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
|
}
/*
** COMMAND: undo
**
** Usage: %fossil undo ?FILENAME...?
**
** Undo the most recent <a>update</a> or <a>merge</a> or <a>revert</a>
** operation. If FILENAME is specified then restore the content of the
** named file(s) but otherwise leave the <a>update</a>, <a>merge</a> or
** <a>revert</a> in effect.
**
** A single level of undo/<a>redo</a> is supported. The undo/<a>redo</a>
** stack is cleared by the commit and checkout commands.
*/
void undo_cmd(void){
int undo_available;
db_must_be_within_tree();
db_begin_transaction();
undo_available = db_lget_int("undo_available", 0);
if( g.argc==2 ){
|
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
|
}
/*
** COMMAND: redo
**
** Usage: %fossil redo ?FILENAME...?
**
** Redo an <a>update</a>, <a>merge</a> or <a>revert</a> operation that has been undone
** by the <a>undo</a> command. If FILENAME is specified then restore the changes
** associated with the named file(s) but otherwise leave the update
** or merge undone.
**
** A single level of <a>undo</a>/redo is supported. The <a>undo</a>/redo stack
** is cleared by the <a>commit</a> and <a>checkout</a> commands.
*/
void redo_cmd(void){
int undo_available;
|
|
|
|
|
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
|
}
/*
** COMMAND: redo
**
** Usage: %fossil redo ?FILENAME...?
**
** Redo an <a>update</a>, <a>merge</a> or <a>revert</a> operation that has been
** undone by the <a>undo</a> command. If FILENAME is specified then restore the
** changes associated with the named file(s) but otherwise leave the update
** or merge undone.
**
** A single level of <a>undo</a>/redo is supported. The <a>undo</a>/redo stack
** is cleared by the <a>commit</a> and <a>checkout</a> commands.
*/
void redo_cmd(void){
int undo_available;
|