Don't output files if they aren't in the current channel
[?]
Feb 26, 2021, 10:53 AM
Y6EVFMTA6FOH3OQH6QCSWMI3F6SYZT2FSHO6GF4M3ICENDCWFM4QCDependencies
- [2]
MHQBEHJDunrecord --reset without a pending change - [3]
I7VL7VPZMinor cleanup - [4]
MDADYULSFix a panic when switching between channels that have different files - [5]
76PCXGMLPushing to, and pulling from the local repository - [6]
YN63NUZOSanakirja 1.0 - [7]
YAJAXIV5Unrecording changes atomically - [8]
NLGQAH4HCredit and reset relative to current directory instead of the root - [9]
HMMMKONLFixing alive vertices - [10]
I52XSRUHMassive cleanup, and simplification - [11]
WZVCLZKYaddress clippy lints - [12]
VQPAUKBQchannel switch as an alias to reset - [13]
A6R6SGCPFixing a panic in `pijul change` - [14]
K6GWUOD5Styling progress bars - [15]
VMPAOJS2Don't output after pushing to a local channel - [16]
5BRU2RRWCleanup (debugging a crash related to trees/inodes) - [17]
Y7YAFMFFFix path prefix striping on Windows. - [18]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [19]
QWD7UE76push/pull: rename `channel` option - [20]
MU5GSJAWPartial push and pull (WARNING: breaks the existing protocol) - [21]
XA23FMQMReset only files that have been modified - [22]
JL4WKA5PImplement the Sanakirja concurrency model in a cross-process way - [23]
LGEJSLTYFixing output (including its uses in reset and pull) - [24]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [25]
5DVRL6MFHard-unrecord - [26]
VL7ZYKHBRunning hooks through shell on Windows and Unix - [27]
3KRGVQFUDo not update the mtime of unmodified files
Change contents
- replacement in pijul/src/config.rs at line 141
pub fn get_current_channel<'a>(&'a self, alt: Option<&'a str>) -> &'a str {pub fn get_current_channel<'a>(&'a self, alt: Option<&'a str>) -> (&'a str, bool) { - replacement in pijul/src/config.rs at line 143
channel.as_ref()(channel.as_ref(), alt == self.current_channel.as_deref()) - replacement in pijul/src/config.rs at line 145
channel.as_str()(channel.as_str(), true) - replacement in pijul/src/config.rs at line 147
crate::DEFAULT_CHANNEL(crate::DEFAULT_CHANNEL, true) - replacement in pijul/src/commands/unrecord.rs at line 37
let channel_name = repo.config.get_current_channel(self.channel.as_deref());let (channel_name, is_current_channel) =repo.config.get_current_channel(self.channel.as_deref()); - replacement in pijul/src/commands/unrecord.rs at line 118
if self.reset {if self.reset && is_current_channel { - replacement in pijul/src/commands/reset.rs at line 41
let channel_name = repo.config.get_current_channel(self.channel.as_deref());let (channel_name, _) = repo.config.get_current_channel(self.channel.as_deref()); - replacement in pijul/src/commands/reset.rs at line 70
let current_channel = repo.config.get_current_channel(None);let (current_channel, _) = repo.config.get_current_channel(None); - replacement in pijul/src/commands/record.rs at line 66
txn.open_or_create_channel(repo.config.get_current_channel(self.channel.as_deref()))?;txn.open_or_create_channel(repo.config.get_current_channel(self.channel.as_deref()).0)?; - replacement in pijul/src/commands/pushpull.rs at line 124
let channel_name = repolet (channel_name, _) = repo - replacement in pijul/src/commands/pushpull.rs at line 279
let channel_name = repo.config.get_current_channel(self.to_channel.as_deref());let (channel_name, is_current_channel) =repo.config.get_current_channel(self.to_channel.as_deref()); - replacement in pijul/src/commands/pushpull.rs at line 456
let mut touched_paths: Vec<_> = Vec::new();for &i in touched.iter() {if let Some((path, _)) =libpijul::fs::find_path(&repo.changes, &txn, &channel.borrow(), false, *i)?{touched_paths.push(path)} else {touched_paths.clear();break;if is_current_channel {let mut touched_paths: Vec<_> = Vec::new();for &i in touched.iter() {if let Some((path, _)) =libpijul::fs::find_path(&repo.changes, &txn, &channel.borrow(), false, *i)?{touched_paths.push(path)} else {touched_paths.clear();break;}}touched_paths.sort();let mut last = "";for path in touched_paths.iter() {if !last.is_empty() && path.starts_with(last) {continue;}debug!("path = {:?}", path);txn.output_repository_no_pending(&mut repo.working_copy,&repo.changes,&mut channel,path,true,None,)?;last = path - replacement in pijul/src/commands/pushpull.rs at line 485
}touched_paths.sort();let mut last = "";for path in touched_paths.iter() {if !last.is_empty() && path.starts_with(last) {continue;if touched_paths.is_empty() {txn.output_repository_no_pending(&mut repo.working_copy,&repo.changes,&mut channel,"",true,None,)?; - edit in pijul/src/commands/pushpull.rs at line 495[5.679]→[5.1730:1771](∅→∅),[5.1730]→[5.1730:1771](∅→∅),[5.1771]→[5.10230:10377](∅→∅),[5.10230]→[5.10230:10377](∅→∅),[5.10377]→[5.680:702](∅→∅),[5.702]→[5.10397:10419](∅→∅),[5.1822]→[5.10397:10419](∅→∅),[5.10397]→[5.10397:10419](∅→∅),[5.10419]→[5.445:467](∅→∅),[5.467]→[5.10419:10435](∅→∅),[5.10419]→[5.10419:10435](∅→∅),[5.10435]→[5.703:727](∅→∅)
debug!("path = {:?}", path);txn.output_repository_no_pending(&mut repo.working_copy,&repo.changes,&mut channel,path,true,None,)?;last = path - edit in pijul/src/commands/pushpull.rs at line 496
if touched_paths.is_empty() {txn.output_repository_no_pending(&mut repo.working_copy,&repo.changes,&mut channel,"",true,None,)?;} - replacement in pijul/src/commands/log.rs at line 34
let channel_name = repo.config.get_current_channel(self.channel.as_deref());let (channel_name, _) = repo.config.get_current_channel(self.channel.as_deref()); - replacement in pijul/src/commands/fork.rs at line 34
let channel_name = repo.config.get_current_channel(self.channel.as_deref());let (channel_name, _) = repo.config.get_current_channel(self.channel.as_deref()); - replacement in pijul/src/commands/diff.rs at line 40
txn.open_or_create_channel(repo.config.get_current_channel(self.channel.as_deref()))?;txn.open_or_create_channel(repo.config.get_current_channel(self.channel.as_deref()).0)?; - replacement in pijul/src/commands/debug.rs at line 25
let channel_name = repo.config.get_current_channel(self.channel.as_deref());let (channel_name, _) = repo.config.get_current_channel(self.channel.as_deref()); - replacement in pijul/src/commands/credit.rs at line 30
let channel_name = repo.config.get_current_channel(self.channel.as_deref());let (channel_name, _) = repo.config.get_current_channel(self.channel.as_deref()); - replacement in pijul/src/commands/change.rs at line 29
let channel_name = repo.config.get_current_channel(None);let (channel_name, _) = repo.config.get_current_channel(None); - replacement in pijul/src/commands/archive.rs at line 86
let channel_name = repo.config.get_current_channel(self.channel.as_deref());let (channel_name, _) = repo.config.get_current_channel(self.channel.as_deref()); - replacement in pijul/src/commands/apply.rs at line 31
let channel_name = repo.config.get_current_channel(self.channel.as_deref());let (channel_name, is_current_channel) =repo.config.get_current_channel(self.channel.as_deref()); - replacement in pijul/src/commands/apply.rs at line 80[5.1107]→[4.1294:1361](∅→∅),[4.1361]→[5.1146:1173](∅→∅),[5.1146]→[5.1146:1173](∅→∅),[5.1173]→[4.1362:1628](∅→∅)
let mut touched_files = Vec::with_capacity(touched.len());for i in touched {if let Some((path, _)) =libpijul::fs::find_path(&repo.changes, &txn, &channel.borrow(), false, i)?{touched_files.push(path)} else {touched_files.clear();break;if is_current_channel {let mut touched_files = Vec::with_capacity(touched.len());for i in touched {if let Some((path, _)) =libpijul::fs::find_path(&repo.changes, &txn, &channel.borrow(), false, i)?{touched_files.push(path)} else {touched_files.clear();break;}}for path in touched_files.iter() {txn.output_repository_no_pending(&mut repo.working_copy,&repo.changes,&mut channel,&path,true,None,)?;}if !touched_files.is_empty() {txn.output_repository_no_pending(&mut repo.working_copy,&repo.changes,&mut channel,"",true,None,)?; - edit in pijul/src/commands/apply.rs at line 113[4.1652]→[4.1652:1695](∅→∅),[4.1695]→[5.1293:1440](∅→∅),[5.1293]→[5.1293:1440](∅→∅),[5.1467]→[5.1467:1560](∅→∅),[5.1560]→[4.1696:1972](∅→∅)
for path in touched_files.iter() {txn.output_repository_no_pending(&mut repo.working_copy,&repo.changes,&mut channel,&path,true,None,)?;}if !touched_files.is_empty() {txn.output_repository_no_pending(&mut repo.working_copy,&repo.changes,&mut channel,"",true,None,)?;}