The sound distributed version control system

#903 [PUSH] after "remote delete" push still works

Opened by tankf33der on March 18, 2024
tankf33der on March 18, 2024
$ pijul init p1
$ pijul clone p1 p2
$ cd p2
$ pijul remote
  ZIEPNQNGCN2L4QWADXYRB5KARA: p1
$ pijul remote delete ZIEPNQNGCN2L4QWADXYRB5KARA

# add record and push it
$ touch a
$ pijul add a
$ pijul rec -am.
$ pijul log
$ pijul push -a

# check remote side
$ cd ..
$ cd p1
$ pijul log
$
dblsaiko on March 27, 2024

This is because default remote is tracked separately from the remote IDs. Looking into this

dblsaiko added a change on March 27, 2024
OWJL5HO72US47LCBHUZVH6ONALVEADWMFAMXK5RMDHLXSCCFSFQAC
dblsaiko added a change on March 27, 2024
EEF5WHUIPNJAD3OQ7XOY4VSDOMRSPMLZ7EWGDRMADGGAY2YYB6OQC
dblsaiko on March 27, 2024

With these changes:

saiko@invader ~/Src/pijul (pijul)-[main] % target/debug/pijul remote
  BX6I2G4Q5GM57WBQNEX3JUFWPA: pijul
* QA74ZIBKKZCV7AY63LHRSML3RA: dblsaiko@ssh.pijul.com:pijul/pijul
saiko@invader ~/Src/pijul (pijul)-[main] % target/debug/pijul remote delete dblsaiko@ssh.pijul.com:pijul/pijul
saiko@invader ~/Src/pijul (pijul)-[main] % target/debug/pijul remote
  BX6I2G4Q5GM57WBQNEX3JUFWPA: pijul
saiko@invader ~/Src/pijul (pijul)-[main] % target/debug/pijul remote default dblsaiko@ssh.pijul.com:pijul/pijul
saiko@invader ~/Src/pijul (pijul)-[main] % target/debug/pijul remote                                           
  BX6I2G4Q5GM57WBQNEX3JUFWPA: pijul
* (none)                    : dblsaiko@ssh.pijul.com:pijul/pijul
saiko@invader ~/Src/pijul (pijul)-[main] % target/debug/pijul push
Nothing to push
saiko@invader ~/Src/pijul (pijul)-[main] % target/debug/pijul remote
  BX6I2G4Q5GM57WBQNEX3JUFWPA: pijul
* QA74ZIBKKZCV7AY63LHRSML3RA: dblsaiko@ssh.pijul.com:pijul/pijul
dblsaiko on March 27, 2024

This doesn’t handle named remotes well yet, though, I wasn’t aware those existed while trying to add essentially the same system :P

With a named remote “origin” -> dblsaiko@ssh.pijul.com:dblsaiko/pijul set as default

% target/debug/pijul remote               
  QA74ZIBKKZCV7AY63LHRSML3RA: dblsaiko@ssh.pijul.com:pijul/pijul
  USECTP33LNFWHBIC7BE74UIMPE: dblsaiko@ssh.pijul.com:dblsaiko/pijul
* (none)                    : origin
dblsaiko added a change on March 27, 2024
67GIAQEUQG3KUD7YTYNUWK33BKWPFVNT4YPQMZ3RCALOZ2STDLRQC
dblsaiko on March 27, 2024

There we go, this should cover everything, I hope. With this, the original behavior of the delete command (deletes remote IDs from the database) can be done with the –exact option.